From 92f2d9f340d6fee101725ed6160b6b07318afcdf Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:04:59 +0100 Subject: [PATCH 01/67] sqlc: static address migrations, models, queries --- .../migrations/000009_static_address.down.sql | 1 + .../migrations/000009_static_address.up.sql | 38 ++++++ loopdb/sqlc/models.go | 11 ++ loopdb/sqlc/querier.go | 3 + loopdb/sqlc/queries/static_addresses.sql | 25 ++++ loopdb/sqlc/static_addresses.sql.go | 110 ++++++++++++++++++ 6 files changed, 188 insertions(+) create mode 100644 loopdb/sqlc/migrations/000009_static_address.down.sql create mode 100644 loopdb/sqlc/migrations/000009_static_address.up.sql create mode 100644 loopdb/sqlc/queries/static_addresses.sql create mode 100644 loopdb/sqlc/static_addresses.sql.go diff --git a/loopdb/sqlc/migrations/000009_static_address.down.sql b/loopdb/sqlc/migrations/000009_static_address.down.sql new file mode 100644 index 000000000..492ef974c --- /dev/null +++ b/loopdb/sqlc/migrations/000009_static_address.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS static_addresses; \ No newline at end of file diff --git a/loopdb/sqlc/migrations/000009_static_address.up.sql b/loopdb/sqlc/migrations/000009_static_address.up.sql new file mode 100644 index 000000000..f4b293e2a --- /dev/null +++ b/loopdb/sqlc/migrations/000009_static_address.up.sql @@ -0,0 +1,38 @@ +-- static_address stores the static loop-in addresses that clients +-- cooperatively created with the server. +CREATE TABLE IF NOT EXISTS static_addresses ( + -- id is the auto-incrementing primary key for a static address. + id INTEGER PRIMARY KEY, + + -- client_pubkey is the client side public taproot key that is used to + -- construct the 2-of-2 MuSig2 taproot output that represents the static + -- address. + client_pubkey BYTEA NOT NULL, + + -- server_pubkey is the server side public taproot key that is used to + -- construct the 2-of-2 MuSig2 taproot output that represents the static + -- address. + server_pubkey BYTEA NOT NULL, + + -- expiry denotes the CSV delay at which funds at a specific static address + -- can be swept back to the client. + expiry INT NOT NULL, + + -- client_key_family is the key family of the client public key from the + -- client's lnd wallet. + client_key_family INT NOT NULL, + + -- client_key_index is the key index of the client public key from the + -- client's lnd wallet. + client_key_index INT NOT NULL, + + -- pkscript is the witness program that represents the static address. It is + -- unique amongst all static addresses. + pkscript BYTEA NOT NULL UNIQUE, + + -- protocol_version is the protocol version that the swap was created with. + -- Note that this version is not upgraded if the client upgrades or + -- downgrades their protocol version for static address outputs already in + -- use. + protocol_version INTEGER NOT NULL +); \ No newline at end of file diff --git a/loopdb/sqlc/models.go b/loopdb/sqlc/models.go index 03c5c6762..9de5d69ac 100644 --- a/loopdb/sqlc/models.go +++ b/loopdb/sqlc/models.go @@ -94,6 +94,17 @@ type ReservationUpdate struct { UpdateTimestamp time.Time } +type StaticAddress struct { + ID int32 + ClientPubkey []byte + ServerPubkey []byte + Expiry int32 + ClientKeyFamily int32 + ClientKeyIndex int32 + Pkscript []byte + ProtocolVersion int32 +} + type Swap struct { ID int32 SwapHash []byte diff --git a/loopdb/sqlc/querier.go b/loopdb/sqlc/querier.go index 8fbc6b7e5..e926cc321 100644 --- a/loopdb/sqlc/querier.go +++ b/loopdb/sqlc/querier.go @@ -9,8 +9,10 @@ import ( ) type Querier interface { + AllStaticAddresses(ctx context.Context) ([]StaticAddress, error) ConfirmBatch(ctx context.Context, id int32) error CreateReservation(ctx context.Context, arg CreateReservationParams) error + CreateStaticAddress(ctx context.Context, arg CreateStaticAddressParams) error DropBatch(ctx context.Context, id int32) error FetchLiquidityParams(ctx context.Context) ([]byte, error) GetBatchSweeps(ctx context.Context, batchID int32) ([]Sweep, error) @@ -28,6 +30,7 @@ type Querier interface { GetReservation(ctx context.Context, reservationID []byte) (Reservation, error) GetReservationUpdates(ctx context.Context, reservationID []byte) ([]ReservationUpdate, error) GetReservations(ctx context.Context) ([]Reservation, error) + GetStaticAddress(ctx context.Context, pkscript []byte) (StaticAddress, error) GetSwapUpdates(ctx context.Context, swapHash []byte) ([]SwapUpdate, error) GetSweepStatus(ctx context.Context, swapHash []byte) (bool, error) GetUnconfirmedBatches(ctx context.Context) ([]SweepBatch, error) diff --git a/loopdb/sqlc/queries/static_addresses.sql b/loopdb/sqlc/queries/static_addresses.sql new file mode 100644 index 000000000..a0a1fd05e --- /dev/null +++ b/loopdb/sqlc/queries/static_addresses.sql @@ -0,0 +1,25 @@ +-- name: AllStaticAddresses :many +SELECT * FROM static_addresses; + +-- name: GetStaticAddress :one +SELECT * FROM static_addresses +WHERE pkscript=$1; + +-- name: CreateStaticAddress :exec +INSERT INTO static_addresses ( + client_pubkey, + server_pubkey, + expiry, + client_key_family, + client_key_index, + pkscript, + protocol_version +) VALUES ( + $1, + $2, + $3, + $4, + $5, + $6, + $7 + ); \ No newline at end of file diff --git a/loopdb/sqlc/static_addresses.sql.go b/loopdb/sqlc/static_addresses.sql.go new file mode 100644 index 000000000..23902a22f --- /dev/null +++ b/loopdb/sqlc/static_addresses.sql.go @@ -0,0 +1,110 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.25.0 +// source: static_addresses.sql + +package sqlc + +import ( + "context" +) + +const allStaticAddresses = `-- name: AllStaticAddresses :many +SELECT id, client_pubkey, server_pubkey, expiry, client_key_family, client_key_index, pkscript, protocol_version FROM static_addresses +` + +func (q *Queries) AllStaticAddresses(ctx context.Context) ([]StaticAddress, error) { + rows, err := q.db.QueryContext(ctx, allStaticAddresses) + if err != nil { + return nil, err + } + defer rows.Close() + var items []StaticAddress + for rows.Next() { + var i StaticAddress + if err := rows.Scan( + &i.ID, + &i.ClientPubkey, + &i.ServerPubkey, + &i.Expiry, + &i.ClientKeyFamily, + &i.ClientKeyIndex, + &i.Pkscript, + &i.ProtocolVersion, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const createStaticAddress = `-- name: CreateStaticAddress :exec +INSERT INTO static_addresses ( + client_pubkey, + server_pubkey, + expiry, + client_key_family, + client_key_index, + pkscript, + protocol_version +) VALUES ( + $1, + $2, + $3, + $4, + $5, + $6, + $7 + ) +` + +type CreateStaticAddressParams struct { + ClientPubkey []byte + ServerPubkey []byte + Expiry int32 + ClientKeyFamily int32 + ClientKeyIndex int32 + Pkscript []byte + ProtocolVersion int32 +} + +func (q *Queries) CreateStaticAddress(ctx context.Context, arg CreateStaticAddressParams) error { + _, err := q.db.ExecContext(ctx, createStaticAddress, + arg.ClientPubkey, + arg.ServerPubkey, + arg.Expiry, + arg.ClientKeyFamily, + arg.ClientKeyIndex, + arg.Pkscript, + arg.ProtocolVersion, + ) + return err +} + +const getStaticAddress = `-- name: GetStaticAddress :one +SELECT id, client_pubkey, server_pubkey, expiry, client_key_family, client_key_index, pkscript, protocol_version FROM static_addresses +WHERE pkscript=$1 +` + +func (q *Queries) GetStaticAddress(ctx context.Context, pkscript []byte) (StaticAddress, error) { + row := q.db.QueryRowContext(ctx, getStaticAddress, pkscript) + var i StaticAddress + err := row.Scan( + &i.ID, + &i.ClientPubkey, + &i.ServerPubkey, + &i.Expiry, + &i.ClientKeyFamily, + &i.ClientKeyIndex, + &i.Pkscript, + &i.ProtocolVersion, + ) + return i, err +} From c9da71afe11b2bf3f89573c4c7fd7c9c23a5609d Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 14 Feb 2024 17:00:19 +0100 Subject: [PATCH 02/67] looprpc: static address creation --- looprpc/client.pb.go | 534 ++++++++++++++++--------- looprpc/client.proto | 35 +- looprpc/client.swagger.json | 12 + looprpc/client_grpc.pb.go | 88 ++++ looprpc/staticaddressclient.pb.json.go | 48 +++ 5 files changed, 514 insertions(+), 203 deletions(-) create mode 100644 looprpc/staticaddressclient.pb.json.go diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 1b8c19bc7..d8943636a 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -3949,6 +3949,102 @@ func (x *InstantOut) GetSweepTxId() string { return "" } +type NewAddressRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The client's public key for the 2-of-2 MuSig2 taproot static address. + ClientKey []byte `protobuf:"bytes,1,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` +} + +func (x *NewAddressRequest) Reset() { + *x = NewAddressRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NewAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NewAddressRequest) ProtoMessage() {} + +func (x *NewAddressRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NewAddressRequest.ProtoReflect.Descriptor instead. +func (*NewAddressRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{45} +} + +func (x *NewAddressRequest) GetClientKey() []byte { + if x != nil { + return x.ClientKey + } + return nil +} + +type NewAddressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The taproot static address. + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` +} + +func (x *NewAddressResponse) Reset() { + *x = NewAddressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NewAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NewAddressResponse) ProtoMessage() {} + +func (x *NewAddressResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NewAddressResponse.ProtoReflect.Descriptor instead. +func (*NewAddressResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{46} +} + +func (x *NewAddressResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + var File_client_proto protoreflect.FileDescriptor var file_client_proto_rawDesc = []byte{ @@ -4437,175 +4533,187 @@ var file_client_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, - 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, - 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, - 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, - 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, - 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, - 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, - 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, - 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, - 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, - 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, - 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, - 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, - 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, - 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, - 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, - 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, - 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, - 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, - 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, - 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, - 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, - 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, - 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, - 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, - 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, - 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, - 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, - 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, - 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, - 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, - 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, - 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, - 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, - 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, - 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, - 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, - 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, 0xab, 0x0c, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, - 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, - 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, - 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, - 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, - 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, - 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, - 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, - 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, - 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, - 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, - 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, - 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, - 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, - 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x2e, 0x0a, 0x12, 0x4e, 0x65, + 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, + 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, + 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, + 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, + 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, + 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, + 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, + 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, + 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, + 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, + 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, + 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, + 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, + 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, + 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, + 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, + 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, + 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, + 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, + 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, + 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, + 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, + 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, + 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, + 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, + 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, + 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, + 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, + 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, + 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, + 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, + 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, + 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, + 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, 0xab, 0x0c, 0x0a, 0x0a, + 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, + 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, + 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, + 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, + 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, + 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, + 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, + 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, + 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, + 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, + 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, + 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, + 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, + 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, + 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, - 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, - 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, - 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, - 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, - 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, + 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, + 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, + 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, + 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x5c, 0x0a, 0x13, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x45, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4621,7 +4729,7 @@ func file_client_proto_rawDescGZIP() []byte { } var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 45) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 47) var file_client_proto_goTypes = []any{ (AddressType)(0), // 0: looprpc.AddressType (SwapType)(0), // 1: looprpc.SwapType @@ -4675,19 +4783,21 @@ var file_client_proto_goTypes = []any{ (*ListInstantOutsRequest)(nil), // 49: looprpc.ListInstantOutsRequest (*ListInstantOutsResponse)(nil), // 50: looprpc.ListInstantOutsResponse (*InstantOut)(nil), // 51: looprpc.InstantOut - (*swapserverrpc.RouteHint)(nil), // 52: looprpc.RouteHint + (*NewAddressRequest)(nil), // 52: looprpc.NewAddressRequest + (*NewAddressResponse)(nil), // 53: looprpc.NewAddressResponse + (*swapserverrpc.RouteHint)(nil), // 54: looprpc.RouteHint } var file_client_proto_depIdxs = []int32{ 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType - 52, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 54, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason 13, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter 6, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter 11, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus - 52, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint - 52, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 54, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 54, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint 28, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token 29, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 29, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats @@ -4724,30 +4834,32 @@ var file_client_proto_depIdxs = []int32{ 45, // 43: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest 47, // 44: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest 49, // 45: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 9, // 46: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse - 9, // 47: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse - 11, // 48: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus - 14, // 49: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse - 11, // 50: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus - 41, // 51: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse - 18, // 52: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse - 21, // 53: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse - 17, // 54: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse - 20, // 55: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse - 23, // 56: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse - 25, // 57: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse - 25, // 58: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse - 27, // 59: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse - 31, // 60: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse - 33, // 61: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters - 36, // 62: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse - 39, // 63: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse - 43, // 64: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse - 46, // 65: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse - 48, // 66: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse - 50, // 67: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 46, // [46:68] is the sub-list for method output_type - 24, // [24:46] is the sub-list for method input_type + 52, // 46: looprpc.StaticAddressClient.NewAddress:input_type -> looprpc.NewAddressRequest + 9, // 47: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 9, // 48: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 11, // 49: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 14, // 50: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 11, // 51: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 41, // 52: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 18, // 53: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 21, // 54: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 17, // 55: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 20, // 56: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 23, // 57: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 25, // 58: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 25, // 59: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 27, // 60: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 31, // 61: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 33, // 62: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 36, // 63: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 39, // 64: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 43, // 65: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 46, // 66: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 48, // 67: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 50, // 68: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 53, // 69: looprpc.StaticAddressClient.NewAddress:output_type -> looprpc.NewAddressResponse + 47, // [47:70] is the sub-list for method output_type + 24, // [24:47] is the sub-list for method input_type 24, // [24:24] is the sub-list for extension type_name 24, // [24:24] is the sub-list for extension extendee 0, // [0:24] is the sub-list for field type_name @@ -5299,6 +5411,30 @@ func file_client_proto_init() { return nil } } + file_client_proto_msgTypes[45].Exporter = func(v any, i int) any { + switch v := v.(*NewAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[46].Exporter = func(v any, i int) any { + switch v := v.(*NewAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5306,9 +5442,9 @@ func file_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, NumEnums: 7, - NumMessages: 45, + NumMessages: 47, NumExtensions: 0, - NumServices: 1, + NumServices: 2, }, GoTypes: file_client_proto_goTypes, DependencyIndexes: file_client_proto_depIdxs, diff --git a/looprpc/client.proto b/looprpc/client.proto index 434a99b3a..6ea929883 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -1338,20 +1338,24 @@ message ClientReservation { The state the reservation is in. */ string state = 2; + /* - The amount that the reservation is for. + The amount that the reservation is for. */ uint64 amount = 3; + /* - The transaction id of the reservation. + The transaction id of the reservation. */ string tx_id = 4; + /* - The vout of the reservation. + The vout of the reservation. */ uint32 vout = 5; + /* - The expiry of the reservation. + The expiry of the reservation. */ uint32 expiry = 6; } @@ -1381,10 +1385,12 @@ message InstantOutResponse { The hash of the swap preimage. */ bytes instant_out_hash = 1; + /* The transaction id of the sweep transaction. */ string sweep_tx_id = 2; + /* The state of the swap. */ @@ -1452,3 +1458,24 @@ message InstantOut { */ string sweep_tx_id = 5; } + +service StaticAddressClient { + /* + NewAddress requests a new static address for loop-ins from the server. + */ + rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); +} + +message NewAddressRequest { + /* + The client's public key for the 2-of-2 MuSig2 taproot static address. + */ + bytes client_key = 1; +} + +message NewAddressResponse { + /* + The taproot static address. + */ + string address = 1; +} diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index ded532ab0..7b89896ec 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -7,6 +7,9 @@ "tags": [ { "name": "SwapClient" + }, + { + "name": "StaticAddressClient" } ], "consumes": [ @@ -1309,6 +1312,15 @@ } } }, + "looprpcNewAddressResponse": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "The taproot static address." + } + } + }, "looprpcOutQuoteResponse": { "type": "object", "properties": { diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index b67705bc3..9fe856885 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -1015,3 +1015,91 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ }, Metadata: "client.proto", } + +// StaticAddressClientClient is the client API for StaticAddressClient service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StaticAddressClientClient interface { + // NewAddress requests a new static address for loop-ins from the server. + NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) +} + +type staticAddressClientClient struct { + cc grpc.ClientConnInterface +} + +func NewStaticAddressClientClient(cc grpc.ClientConnInterface) StaticAddressClientClient { + return &staticAddressClientClient{cc} +} + +func (c *staticAddressClientClient) NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) { + out := new(NewAddressResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressClient/NewAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StaticAddressClientServer is the server API for StaticAddressClient service. +// All implementations must embed UnimplementedStaticAddressClientServer +// for forward compatibility +type StaticAddressClientServer interface { + // NewAddress requests a new static address for loop-ins from the server. + NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) + mustEmbedUnimplementedStaticAddressClientServer() +} + +// UnimplementedStaticAddressClientServer must be embedded to have forward compatible implementations. +type UnimplementedStaticAddressClientServer struct { +} + +func (UnimplementedStaticAddressClientServer) NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NewAddress not implemented") +} +func (UnimplementedStaticAddressClientServer) mustEmbedUnimplementedStaticAddressClientServer() {} + +// UnsafeStaticAddressClientServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StaticAddressClientServer will +// result in compilation errors. +type UnsafeStaticAddressClientServer interface { + mustEmbedUnimplementedStaticAddressClientServer() +} + +func RegisterStaticAddressClientServer(s grpc.ServiceRegistrar, srv StaticAddressClientServer) { + s.RegisterService(&StaticAddressClient_ServiceDesc, srv) +} + +func _StaticAddressClient_NewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NewAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressClientServer).NewAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressClient/NewAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressClientServer).NewAddress(ctx, req.(*NewAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StaticAddressClient_ServiceDesc is the grpc.ServiceDesc for StaticAddressClient service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StaticAddressClient_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "looprpc.StaticAddressClient", + HandlerType: (*StaticAddressClientServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "NewAddress", + Handler: _StaticAddressClient_NewAddress_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "client.proto", +} diff --git a/looprpc/staticaddressclient.pb.json.go b/looprpc/staticaddressclient.pb.json.go new file mode 100644 index 000000000..67971575d --- /dev/null +++ b/looprpc/staticaddressclient.pb.json.go @@ -0,0 +1,48 @@ +// Code generated by falafel 0.9.1. DO NOT EDIT. +// source: client.proto + +package looprpc + +import ( + "context" + + gateway "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" + "google.golang.org/grpc" + "google.golang.org/protobuf/encoding/protojson" +) + +func RegisterStaticAddressClientJSONCallbacks(registry map[string]func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error))) { + + marshaler := &gateway.JSONPb{ + MarshalOptions: protojson.MarshalOptions{ + UseProtoNames: true, + EmitUnpopulated: true, + }, + } + + registry["looprpc.StaticAddressClient.NewAddress"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &NewAddressRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewStaticAddressClientClient(conn) + resp, err := client.NewAddress(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } +} From a7cbcbded3a4480b57a64c4a487fe0da92c4f48d Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:16:31 +0100 Subject: [PATCH 03/67] log: static address sub logger --- staticaddr/log.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 staticaddr/log.go diff --git a/staticaddr/log.go b/staticaddr/log.go new file mode 100644 index 000000000..53586b346 --- /dev/null +++ b/staticaddr/log.go @@ -0,0 +1,24 @@ +package staticaddr + +import ( + "github.com/btcsuite/btclog" + "github.com/lightningnetwork/lnd/build" +) + +// Subsystem defines the sub system name of this package. +const Subsystem = "SADDR" + +// log is a logger that is initialized with no output filters. This means the +// package will not perform any logging by default until the caller requests it. +var log btclog.Logger + +// The default amount of logging is none. +func init() { + UseLogger(build.NewSubLogger(Subsystem, nil)) +} + +// UseLogger uses a specified Logger to output package logging info. This should +// be used in preference to SetLogWriter if the caller is also using btclog. +func UseLogger(logger btclog.Logger) { + log = logger +} From 7e22d20e113d9f941b9ee2faa9ea85dc5f03f1cc Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:07:48 +0100 Subject: [PATCH 04/67] loopdb: static address store --- loopdb/sqlite.go | 6 ++ staticaddr/interface.go | 58 ++++++++++++++++ staticaddr/sql_store.go | 146 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 210 insertions(+) create mode 100644 staticaddr/interface.go create mode 100644 staticaddr/sql_store.go diff --git a/loopdb/sqlite.go b/loopdb/sqlite.go index bfb841bbd..58b1cee36 100644 --- a/loopdb/sqlite.go +++ b/loopdb/sqlite.go @@ -309,6 +309,12 @@ func (db *BaseDB) FixFaultyTimestamps(ctx context.Context) error { return tx.Commit() } +// GetNetwork returns the network(mainnet, testnet...) that the database is +// running on. +func (db *BaseDB) GetNetwork() *chaincfg.Params { + return db.network +} + // TxOptions represents a set of options one can use to control what type of // database transaction is created. Transaction can whether be read or write. type TxOptions interface { diff --git a/staticaddr/interface.go b/staticaddr/interface.go new file mode 100644 index 000000000..8b424fbca --- /dev/null +++ b/staticaddr/interface.go @@ -0,0 +1,58 @@ +package staticaddr + +import ( + "context" + "fmt" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/lightningnetwork/lnd/keychain" +) + +var ( + ErrAddressAlreadyExists = fmt.Errorf("address already exists") + ErrAddressNotFound = fmt.Errorf("address not found") +) + +// AddressStore is the database interface that is used to store and retrieve +// static addresses. +type AddressStore interface { + // CreateStaticAddress inserts a new static address with its parameters + // into the store. + CreateStaticAddress(ctx context.Context, + addrParams *AddressParameters) error + + // GetStaticAddress fetches static address parameters for a given + // address ID. + GetStaticAddress(ctx context.Context, + pkScript []byte) (*AddressParameters, error) + + // GetAllStaticAddresses retrieves all static addresses from the store. + GetAllStaticAddresses(ctx context.Context) ( + []*AddressParameters, error) +} + +// AddressParameters holds all the necessary information for the 2-of-2 multisig +// address. +type AddressParameters struct { + // ClientPubkey is the client's pubkey for the static address. It is + // used for the 2-of-2 funding output as well as for the client's + // timeout path. + ClientPubkey *btcec.PublicKey + + // ClientPubkey is the client's pubkey for the static address. It is + // used for the 2-of-2 funding output. + ServerPubkey *btcec.PublicKey + + // Expiry is the CSV timout value at which the client can claim the + // static address's timout path. + Expiry uint32 + + // PkScript is the unique static address's output script. + PkScript []byte + + // KeyLocator is the locator of the client's key. + KeyLocator keychain.KeyLocator + + // ProtocolVersion is the protocol version of the static address. + ProtocolVersion AddressProtocolVersion +} diff --git a/staticaddr/sql_store.go b/staticaddr/sql_store.go new file mode 100644 index 000000000..7f14f7c5e --- /dev/null +++ b/staticaddr/sql_store.go @@ -0,0 +1,146 @@ +package staticaddr + +import ( + "context" + "errors" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/jackc/pgx/v4" + "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/loopdb/sqlc" + "github.com/lightningnetwork/lnd/keychain" +) + +// SqlStore is the backing store for static addresses. +type SqlStore struct { + baseDB *loopdb.BaseDB +} + +// NewSqlStore constructs a new SQLStore from a BaseDB. The BaseDB is agnostic +// to the underlying driver which can be postgres or sqlite. +func NewSqlStore(db *loopdb.BaseDB) *SqlStore { + return &SqlStore{ + baseDB: db, + } +} + +// ExecTx is a wrapper for txBody to abstract the creation and commit of a db +// transaction. The db transaction is embedded in a `*sqlc.Queries` that txBody +// needs to use when executing each one of the queries that need to be applied +// atomically. +func (s *SqlStore) ExecTx(ctx context.Context, txOptions loopdb.TxOptions, + txBody func(queries *sqlc.Queries) error) error { + + // Create the db transaction. + tx, err := s.baseDB.BeginTx(ctx, txOptions) + if err != nil { + return err + } + + // Rollback is safe to call even if the tx is already closed, so if the + // tx commits successfully, this is a no-op. + defer func() { + err := tx.Rollback() + switch { + // If the tx was already closed (it was successfully executed) + // we do not need to log that error. + case errors.Is(err, pgx.ErrTxClosed): + return + + // If this is an unexpected error, log it. + case err != nil: + log.Errorf("unable to rollback db tx: %v", err) + } + }() + + if err := txBody(s.baseDB.Queries.WithTx(tx)); err != nil { + return err + } + + // Commit transaction. + return tx.Commit() +} + +// CreateStaticAddress creates a static address record in the database. +func (s *SqlStore) CreateStaticAddress(ctx context.Context, + addrParams *AddressParameters) error { + + createArgs := sqlc.CreateStaticAddressParams{ + ClientPubkey: addrParams.ClientPubkey.SerializeCompressed(), + ServerPubkey: addrParams.ServerPubkey.SerializeCompressed(), + Expiry: int32(addrParams.Expiry), + ClientKeyFamily: int32(addrParams.KeyLocator.Family), + ClientKeyIndex: int32(addrParams.KeyLocator.Index), + Pkscript: addrParams.PkScript, + ProtocolVersion: int32(addrParams.ProtocolVersion), + } + + return s.baseDB.Queries.CreateStaticAddress(ctx, createArgs) +} + +// GetStaticAddress retrieves static address parameters for a given pkScript. +func (s *SqlStore) GetStaticAddress(ctx context.Context, + pkScript []byte) (*AddressParameters, error) { + + staticAddress, err := s.baseDB.Queries.GetStaticAddress(ctx, pkScript) + if err != nil { + return nil, err + } + + return s.toAddressParameters(staticAddress) +} + +// GetAllStaticAddresses returns all address known to the server. +func (s *SqlStore) GetAllStaticAddresses(ctx context.Context) ( + []*AddressParameters, error) { + + staticAddresses, err := s.baseDB.Queries.AllStaticAddresses(ctx) + if err != nil { + return nil, err + } + + var result []*AddressParameters + for _, address := range staticAddresses { + res, err := s.toAddressParameters(address) + if err != nil { + return nil, err + } + + result = append(result, res) + } + + return result, nil +} + +// Close closes the database connection. +func (s *SqlStore) Close() { + s.baseDB.DB.Close() +} + +// toAddressParameters transforms a database representation of a static address +// to an AddressParameters struct. +func (s *SqlStore) toAddressParameters(row sqlc.StaticAddress) ( + *AddressParameters, error) { + + clientPubkey, err := btcec.ParsePubKey(row.ClientPubkey) + if err != nil { + return nil, err + } + + serverPubkey, err := btcec.ParsePubKey(row.ServerPubkey) + if err != nil { + return nil, err + } + + return &AddressParameters{ + ClientPubkey: clientPubkey, + ServerPubkey: serverPubkey, + PkScript: row.Pkscript, + Expiry: uint32(row.Expiry), + KeyLocator: keychain.KeyLocator{ + Family: keychain.KeyFamily(row.ClientKeyFamily), + Index: uint32(row.ClientKeyIndex), + }, + ProtocolVersion: AddressProtocolVersion(row.ProtocolVersion), + }, nil +} From 8ed9cb7f1b94406b5bc2d2ea364d505ae3d79302 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:09:44 +0100 Subject: [PATCH 05/67] staticaddr: static address manager --- staticaddr/manager.go | 188 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100644 staticaddr/manager.go diff --git a/staticaddr/manager.go b/staticaddr/manager.go new file mode 100644 index 000000000..04dd1d5a8 --- /dev/null +++ b/staticaddr/manager.go @@ -0,0 +1,188 @@ +package staticaddr + +import ( + "context" + "sync" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/swap" + staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/keychain" +) + +// ManagerConfig holds the configuration for the address manager. +type ManagerConfig struct { + // AddressClient is the client that communicates with the loop server + // to manage static addresses. + AddressClient staticaddressrpc.StaticAddressServerClient + + // SwapClient provides loop rpc functionality. + SwapClient *loop.Client + + // Store is the database store that is used to store static address + // related records. + Store AddressStore + + // WalletKit is the wallet client that is used to derive new keys from + // lnd's wallet. + WalletKit lndclient.WalletKitClient + + // ChainParams is the chain configuration(mainnet, testnet...) this + // manager uses. + ChainParams *chaincfg.Params +} + +// Manager manages the address state machines. +type Manager struct { + cfg *ManagerConfig + + initChan chan struct{} + + sync.Mutex +} + +// NewAddressManager creates a new address manager. +func NewAddressManager(cfg *ManagerConfig) *Manager { + return &Manager{ + cfg: cfg, + initChan: make(chan struct{}), + } +} + +// Run runs the address manager. +func (m *Manager) Run(ctx context.Context) error { + log.Debugf("Starting address manager.") + defer log.Debugf("Address manager stopped.") + + // Communicate to the caller that the address manager has completed its + // initialization. + close(m.initChan) + + <-ctx.Done() + + return nil +} + +// NewAddress starts a new address creation flow. +func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, + error) { + + // If there's already a static address in the database, we can return + // it. + m.Lock() + addresses, err := m.cfg.Store.GetAllStaticAddresses(ctx) + if err != nil { + m.Unlock() + + return nil, err + } + if len(addresses) > 0 { + clientPubKey := addresses[0].ClientPubkey + serverPubKey := addresses[0].ServerPubkey + expiry := int64(addresses[0].Expiry) + + m.Unlock() + + return m.getTaprootAddress(clientPubKey, serverPubKey, expiry) + } + m.Unlock() + + // We are fetching a new L402 token from the server. There is one static + // address per L402 token allowed. + err = m.cfg.SwapClient.Server.FetchL402(ctx) + if err != nil { + return nil, err + } + + clientPubKey, err := m.cfg.WalletKit.DeriveNextKey( + ctx, swap.StaticAddressKeyFamily, + ) + if err != nil { + return nil, err + } + + // Send our clientPubKey to the server and wait for the server to + // respond with he serverPubKey and the static address CSV expiry. + protocolVersion := CurrentRPCProtocolVersion() + resp, err := m.cfg.AddressClient.ServerNewAddress( + ctx, &staticaddressrpc.ServerNewAddressRequest{ + ProtocolVersion: protocolVersion, + ClientKey: clientPubKey.PubKey.SerializeCompressed(), //nolint:lll + }, + ) + if err != nil { + return nil, err + } + + serverParams := resp.GetParams() + + serverPubKey, err := btcec.ParsePubKey(serverParams.ServerKey) + if err != nil { + return nil, err + } + + staticAddress, err := script.NewStaticAddress( + input.MuSig2Version100RC2, int64(serverParams.Expiry), + clientPubKey.PubKey, serverPubKey, + ) + if err != nil { + return nil, err + } + + pkScript, err := staticAddress.StaticAddressScript() + if err != nil { + return nil, err + } + + // Create the static address from the parameters the server provided and + // store all parameters in the database. + addrParams := &AddressParameters{ + ClientPubkey: clientPubKey.PubKey, + ServerPubkey: serverPubKey, + PkScript: pkScript, + Expiry: serverParams.Expiry, + KeyLocator: keychain.KeyLocator{ + Family: clientPubKey.Family, + Index: clientPubKey.Index, + }, + ProtocolVersion: AddressProtocolVersion(protocolVersion), + } + err = m.cfg.Store.CreateStaticAddress(ctx, addrParams) + if err != nil { + return nil, err + } + + return m.getTaprootAddress( + clientPubKey.PubKey, serverPubKey, int64(serverParams.Expiry), + ) +} + +func (m *Manager) getTaprootAddress(clientPubkey, + serverPubkey *btcec.PublicKey, expiry int64) (*btcutil.AddressTaproot, + error) { + + staticAddress, err := script.NewStaticAddress( + input.MuSig2Version100RC2, expiry, clientPubkey, serverPubkey, + ) + if err != nil { + return nil, err + } + + return btcutil.NewAddressTaproot( + schnorr.SerializePubKey(staticAddress.TaprootKey), + m.cfg.ChainParams, + ) +} + +// WaitInitComplete waits until the address manager has completed its setup. +func (m *Manager) WaitInitComplete() { + defer log.Debugf("Address manager initiation complete.") + <-m.initChan +} From 5b9f05071ba615c080bca6e6c360e6f0651c3a6b Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 14 Feb 2024 17:02:33 +0100 Subject: [PATCH 06/67] staticaddr: static address server --- staticaddr/server.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 staticaddr/server.go diff --git a/staticaddr/server.go b/staticaddr/server.go new file mode 100644 index 000000000..4eeca96be --- /dev/null +++ b/staticaddr/server.go @@ -0,0 +1,42 @@ +package staticaddr + +import ( + "context" + + "github.com/lightninglabs/loop/looprpc" + staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" +) + +// AddressServer holds all fields for the address rpc server. +type AddressServer struct { + addressClient staticaddressrpc.StaticAddressServerClient + manager *Manager + looprpc.UnimplementedStaticAddressClientServer +} + +// NewAddressServer creates a new static address server. +func NewAddressServer(addressClient staticaddressrpc.StaticAddressServerClient, + manager *Manager) *AddressServer { + + return &AddressServer{ + addressClient: addressClient, + manager: manager, + } +} + +// NewAddress is the rpc endpoint for loop clients to request a new static +// address. +func (r *AddressServer) NewAddress(ctx context.Context, + _ *looprpc.NewAddressRequest) (*looprpc.NewAddressResponse, error) { + + address, err := r.manager.NewAddress(ctx) + if err != nil { + return nil, err + } + + log.Infof("New static loop-in address: %s\n", address.String()) + + return &looprpc.NewAddressResponse{ + Address: address.String(), + }, nil +} From 1fc8818e03bb429128349d2f34530c5f44f6aff0 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:19:00 +0100 Subject: [PATCH 07/67] daemon: integrate static address manager and sql store --- loopd/daemon.go | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/loopd/daemon.go b/loopd/daemon.go index e96e04286..492164d17 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -22,6 +22,7 @@ import ( "github.com/lightninglabs/loop/loopdb" loop_looprpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/notifications" + "github.com/lightninglabs/loop/staticaddr" loop_swaprpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/sweepbatcher" "github.com/lightningnetwork/lnd/clock" @@ -68,6 +69,12 @@ type Daemon struct { // same process. swapClientServer + // AddressServer is the embedded RPC server that satisfies the + // static address client RPC interface. We embed this struct so the + // Daemon itself can be registered to an existing grpc.Server to run as + // a subserver in the same process. + *staticaddr.AddressServer + // ErrChan is an error channel that users of the Daemon struct must use // to detect runtime errors and also whether a shutdown is fully // completed. @@ -233,6 +240,7 @@ func (d *Daemon) startWebServers() error { grpc.StreamInterceptor(streamInterceptor), ) loop_looprpc.RegisterSwapClientServer(d.grpcServer, d) + loop_looprpc.RegisterStaticAddressClientServer(d.grpcServer, d) // Register our debug server if it is compiled in. d.registerDebugServer() @@ -586,6 +594,26 @@ func (d *Daemon) initialize(withMacaroonService bool) error { instantOutManager: instantOutManager, } + // Create a static address server client. + staticAddressClient := loop_swaprpc.NewStaticAddressServerClient( + swapClient.Conn, + ) + + store := staticaddr.NewSqlStore(baseDb) + + cfg := &staticaddr.ManagerConfig{ + AddressClient: staticAddressClient, + SwapClient: swapClient, + Store: store, + WalletKit: d.lnd.WalletKit, + ChainParams: d.lnd.ChainParams, + } + staticAddressManager := staticaddr.NewAddressManager(cfg) + + d.AddressServer = staticaddr.NewAddressServer( + staticAddressClient, staticAddressManager, + ) + // Retrieve all currently existing swaps from the database. swapsList, err := d.impl.FetchSwaps(d.mainCtx) if err != nil { @@ -728,6 +756,22 @@ func (d *Daemon) initialize(withMacaroonService bool) error { } } + // Start the static address manager. + d.wg.Add(1) + go func() { + defer d.wg.Done() + + log.Info("Starting static address manager...") + err = staticAddressManager.Run(d.mainCtx) + if err != nil && !errors.Is(context.Canceled, err) { + d.internalErrChan <- err + } + + log.Info("Static address manager stopped") + }() + + staticAddressManager.WaitInitComplete() + // Last, start our internal error handler. This will return exactly one // error or nil on the main error channel to inform the caller that // something went wrong or that shutdown is complete. We don't add to From cf5384473e102188ead67b56ccdce4a1e49e2bb2 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:21:24 +0100 Subject: [PATCH 08/67] perms: static address creation permission --- loopd/perms/perms.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index 12022fb8e..4edb60394 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -73,6 +73,13 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "auth", Action: "read", }}, + "/looprpc.StaticAddressClient/NewAddress": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetLsatTokens": {{ Entity: "auth", Action: "read", From b4e4ef8921c41a3568ee291f7d89ffe0a895f302 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:21:07 +0100 Subject: [PATCH 09/67] loop: static address creation client command --- cmd/loop/loopin.go | 3 ++ cmd/loop/main.go | 1 + cmd/loop/staticaddr.go | 76 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 cmd/loop/staticaddr.go diff --git a/cmd/loop/loopin.go b/cmd/loop/loopin.go index 52e889009..2d84a5e8d 100644 --- a/cmd/loop/loopin.go +++ b/cmd/loop/loopin.go @@ -52,6 +52,9 @@ var ( Name: "in", Usage: "perform an on-chain to off-chain swap (loop in)", ArgsUsage: "amt", + Subcommands: []cli.Command{ + staticAddressCommands, + }, Description: ` Send the amount in satoshis specified by the amt argument off-chain. diff --git a/cmd/loop/main.go b/cmd/loop/main.go index cfed2c220..88ddd67f5 100644 --- a/cmd/loop/main.go +++ b/cmd/loop/main.go @@ -149,6 +149,7 @@ func main() { setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand, getInfoCommand, abandonSwapCommand, reservationsCommands, instantOutCommand, listInstantOutsCommand, + staticAddressCommands, } err := app.Run(os.Args) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go new file mode 100644 index 000000000..394e5b1b5 --- /dev/null +++ b/cmd/loop/staticaddr.go @@ -0,0 +1,76 @@ +package main + +import ( + "context" + "fmt" + + "github.com/lightninglabs/loop/looprpc" + "github.com/urfave/cli" +) + +var staticAddressCommands = cli.Command{ + Name: "static", + ShortName: "s", + Usage: "manage static loop-in addresses", + Category: "StaticAddress", + Subcommands: []cli.Command{ + newStaticAddressCommand, + }, +} + +var newStaticAddressCommand = cli.Command{ + Name: "new", + ShortName: "n", + Usage: "Create a new static loop in address.", + Description: ` + Requests a new static loop in address from the server. Funds that are + sent to this address will be locked by a 2:2 multisig between us and the + loop server, or a timeout path that we can sweep once it opens up. The + funds can either be cooperatively spent with a signature from the server + or looped in. + `, + Action: newStaticAddress, +} + +func newStaticAddress(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "new") + } + + client, cleanup, err := getAddressClient(ctx) + if err != nil { + return err + } + defer cleanup() + + resp, err := client.NewAddress( + ctxb, &looprpc.NewAddressRequest{}, + ) + if err != nil { + return err + } + + fmt.Printf("Received a new static loop-in address from the server: "+ + "%s\n", resp.Address) + + return nil +} + +func getAddressClient(ctx *cli.Context) (looprpc.StaticAddressClientClient, + func(), error) { + + rpcServer := ctx.GlobalString("rpcserver") + tlsCertPath, macaroonPath, err := extractPathArgs(ctx) + if err != nil { + return nil, nil, err + } + conn, err := getClientConn(rpcServer, tlsCertPath, macaroonPath) + if err != nil { + return nil, nil, err + } + cleanup := func() { conn.Close() } + + addressClient := looprpc.NewStaticAddressClientClient(conn) + return addressClient, cleanup, nil +} From b6f8d4dbe8edaf55ed9e3e84f7ff1d3240beb08f Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 9 Nov 2023 19:20:01 +0100 Subject: [PATCH 10/67] looprpc: list unspent static address --- looprpc/client.pb.go | 714 +++++++++++++++++-------- looprpc/client.proto | 52 ++ looprpc/client.swagger.json | 40 ++ looprpc/client_grpc.pb.go | 38 ++ looprpc/staticaddressclient.pb.json.go | 25 + 5 files changed, 640 insertions(+), 229 deletions(-) diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index d8943636a..7b3f889f5 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -4004,6 +4004,8 @@ type NewAddressResponse struct { // The taproot static address. Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + // The CSV expiry of the static address. + Expiry uint32 `protobuf:"varint,2,opt,name=expiry,proto3" json:"expiry,omitempty"` } func (x *NewAddressResponse) Reset() { @@ -4045,6 +4047,194 @@ func (x *NewAddressResponse) GetAddress() string { return "" } +func (x *NewAddressResponse) GetExpiry() uint32 { + if x != nil { + return x.Expiry + } + return 0 +} + +type ListUnspentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The number of minimum confirmations a utxo must have to be listed. + MinConfs int32 `protobuf:"varint,1,opt,name=min_confs,json=minConfs,proto3" json:"min_confs,omitempty"` + // The number of maximum confirmations a utxo may have to be listed. A zero + // value indicates that there is no maximum. + MaxConfs int32 `protobuf:"varint,2,opt,name=max_confs,json=maxConfs,proto3" json:"max_confs,omitempty"` +} + +func (x *ListUnspentRequest) Reset() { + *x = ListUnspentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUnspentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUnspentRequest) ProtoMessage() {} + +func (x *ListUnspentRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUnspentRequest.ProtoReflect.Descriptor instead. +func (*ListUnspentRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{47} +} + +func (x *ListUnspentRequest) GetMinConfs() int32 { + if x != nil { + return x.MinConfs + } + return 0 +} + +func (x *ListUnspentRequest) GetMaxConfs() int32 { + if x != nil { + return x.MaxConfs + } + return 0 +} + +type ListUnspentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of utxos behind the static address. + Utxos []*Utxo `protobuf:"bytes,1,rep,name=utxos,proto3" json:"utxos,omitempty"` +} + +func (x *ListUnspentResponse) Reset() { + *x = ListUnspentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListUnspentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListUnspentResponse) ProtoMessage() {} + +func (x *ListUnspentResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListUnspentResponse.ProtoReflect.Descriptor instead. +func (*ListUnspentResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{48} +} + +func (x *ListUnspentResponse) GetUtxos() []*Utxo { + if x != nil { + return x.Utxos + } + return nil +} + +type Utxo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The static address of the utxo. + StaticAddress string `protobuf:"bytes,1,opt,name=static_address,json=staticAddress,proto3" json:"static_address,omitempty"` + // The value of the unspent coin in satoshis. + AmountSat int64 `protobuf:"varint,2,opt,name=amount_sat,json=amountSat,proto3" json:"amount_sat,omitempty"` + // The outpoint in the form txid:index. + Outpoint string `protobuf:"bytes,3,opt,name=outpoint,proto3" json:"outpoint,omitempty"` + // The number of confirmations for the Utxo. + Confirmations int64 `protobuf:"varint,4,opt,name=confirmations,proto3" json:"confirmations,omitempty"` +} + +func (x *Utxo) Reset() { + *x = Utxo{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Utxo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Utxo) ProtoMessage() {} + +func (x *Utxo) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Utxo.ProtoReflect.Descriptor instead. +func (*Utxo) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{49} +} + +func (x *Utxo) GetStaticAddress() string { + if x != nil { + return x.StaticAddress + } + return "" +} + +func (x *Utxo) GetAmountSat() int64 { + if x != nil { + return x.AmountSat + } + return 0 +} + +func (x *Utxo) GetOutpoint() string { + if x != nil { + return x.Outpoint + } + return "" +} + +func (x *Utxo) GetConfirmations() int64 { + if x != nil { + return x.Confirmations + } + return 0 +} + var File_client_proto protoreflect.FileDescriptor var file_client_proto_rawDesc = []byte{ @@ -4536,180 +4726,204 @@ var file_client_proto_rawDesc = []byte{ 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x2e, 0x0a, 0x12, 0x4e, 0x65, + 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x46, 0x0a, 0x12, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, - 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, - 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, - 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, - 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, - 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, - 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, - 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, - 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, - 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, - 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, - 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, - 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, - 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, - 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, - 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, - 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, - 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, - 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, - 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, - 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, - 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, - 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, - 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, - 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, - 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, - 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, - 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, - 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, - 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, - 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, - 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, - 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, - 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, 0xab, 0x0c, 0x0a, 0x0a, - 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, - 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, - 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, - 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, - 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, - 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, - 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, - 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, - 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, - 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, - 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, - 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, - 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, - 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, - 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, - 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, - 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, - 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, - 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x5c, 0x0a, 0x13, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x12, 0x45, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x79, 0x22, 0x4e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, + 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, + 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, + 0x66, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, + 0x66, 0x73, 0x22, 0x3a, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x74, 0x78, + 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x8e, + 0x01, 0x0a, 0x04, 0x55, 0x74, 0x78, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1a, 0x0a, + 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, + 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, + 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, + 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, + 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, + 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, + 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, + 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, + 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, + 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, + 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, + 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, + 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, + 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, + 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, + 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, + 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, + 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, + 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, + 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, + 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, + 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, + 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, + 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, + 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, + 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, + 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, + 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, + 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, + 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, + 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, + 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, + 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, + 0x32, 0xab, 0x0c, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, + 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, + 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, + 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, + 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, + 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, + 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, + 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, + 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, + 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, + 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, + 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, + 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, + 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, + 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, + 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa6, + 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, + 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, + 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, @@ -4729,7 +4943,7 @@ func file_client_proto_rawDescGZIP() []byte { } var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 47) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 50) var file_client_proto_goTypes = []any{ (AddressType)(0), // 0: looprpc.AddressType (SwapType)(0), // 1: looprpc.SwapType @@ -4785,19 +4999,22 @@ var file_client_proto_goTypes = []any{ (*InstantOut)(nil), // 51: looprpc.InstantOut (*NewAddressRequest)(nil), // 52: looprpc.NewAddressRequest (*NewAddressResponse)(nil), // 53: looprpc.NewAddressResponse - (*swapserverrpc.RouteHint)(nil), // 54: looprpc.RouteHint + (*ListUnspentRequest)(nil), // 54: looprpc.ListUnspentRequest + (*ListUnspentResponse)(nil), // 55: looprpc.ListUnspentResponse + (*Utxo)(nil), // 56: looprpc.Utxo + (*swapserverrpc.RouteHint)(nil), // 57: looprpc.RouteHint } var file_client_proto_depIdxs = []int32{ 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType - 54, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 57, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason 13, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter 6, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter 11, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus - 54, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint - 54, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 57, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 57, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint 28, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token 29, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 29, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats @@ -4812,57 +5029,60 @@ var file_client_proto_depIdxs = []int32{ 38, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified 44, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation 51, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut - 7, // 24: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest - 8, // 25: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest - 10, // 26: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest - 12, // 27: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest - 15, // 28: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest - 40, // 29: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest - 16, // 30: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest - 19, // 31: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest - 16, // 32: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest - 19, // 33: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest - 22, // 34: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest - 24, // 35: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest - 24, // 36: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest - 26, // 37: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest - 30, // 38: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest - 32, // 39: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest - 35, // 40: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest - 37, // 41: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest - 42, // 42: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest - 45, // 43: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest - 47, // 44: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest - 49, // 45: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 52, // 46: looprpc.StaticAddressClient.NewAddress:input_type -> looprpc.NewAddressRequest - 9, // 47: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse - 9, // 48: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse - 11, // 49: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus - 14, // 50: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse - 11, // 51: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus - 41, // 52: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse - 18, // 53: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse - 21, // 54: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse - 17, // 55: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse - 20, // 56: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse - 23, // 57: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse - 25, // 58: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse - 25, // 59: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse - 27, // 60: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse - 31, // 61: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse - 33, // 62: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters - 36, // 63: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse - 39, // 64: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse - 43, // 65: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse - 46, // 66: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse - 48, // 67: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse - 50, // 68: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 53, // 69: looprpc.StaticAddressClient.NewAddress:output_type -> looprpc.NewAddressResponse - 47, // [47:70] is the sub-list for method output_type - 24, // [24:47] is the sub-list for method input_type - 24, // [24:24] is the sub-list for extension type_name - 24, // [24:24] is the sub-list for extension extendee - 0, // [0:24] is the sub-list for field type_name + 56, // 24: looprpc.ListUnspentResponse.utxos:type_name -> looprpc.Utxo + 7, // 25: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest + 8, // 26: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest + 10, // 27: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest + 12, // 28: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest + 15, // 29: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest + 40, // 30: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest + 16, // 31: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest + 19, // 32: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest + 16, // 33: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest + 19, // 34: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest + 22, // 35: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest + 24, // 36: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest + 24, // 37: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest + 26, // 38: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest + 30, // 39: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest + 32, // 40: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest + 35, // 41: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest + 37, // 42: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest + 42, // 43: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest + 45, // 44: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest + 47, // 45: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest + 49, // 46: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest + 52, // 47: looprpc.StaticAddressClient.NewAddress:input_type -> looprpc.NewAddressRequest + 54, // 48: looprpc.StaticAddressClient.ListUnspent:input_type -> looprpc.ListUnspentRequest + 9, // 49: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 9, // 50: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 11, // 51: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 14, // 52: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 11, // 53: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 41, // 54: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 18, // 55: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 21, // 56: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 17, // 57: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 20, // 58: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 23, // 59: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 25, // 60: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 25, // 61: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 27, // 62: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 31, // 63: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 33, // 64: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 36, // 65: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 39, // 66: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 43, // 67: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 46, // 68: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 48, // 69: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 50, // 70: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 53, // 71: looprpc.StaticAddressClient.NewAddress:output_type -> looprpc.NewAddressResponse + 55, // 72: looprpc.StaticAddressClient.ListUnspent:output_type -> looprpc.ListUnspentResponse + 49, // [49:73] is the sub-list for method output_type + 25, // [25:49] is the sub-list for method input_type + 25, // [25:25] is the sub-list for extension type_name + 25, // [25:25] is the sub-list for extension extendee + 0, // [0:25] is the sub-list for field type_name } func init() { file_client_proto_init() } @@ -5435,6 +5655,42 @@ func file_client_proto_init() { return nil } } + file_client_proto_msgTypes[47].Exporter = func(v any, i int) any { + switch v := v.(*ListUnspentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[48].Exporter = func(v any, i int) any { + switch v := v.(*ListUnspentResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[49].Exporter = func(v any, i int) any { + switch v := v.(*Utxo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5442,7 +5698,7 @@ func file_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, NumEnums: 7, - NumMessages: 47, + NumMessages: 50, NumExtensions: 0, NumServices: 2, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index 6ea929883..23534655b 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -1464,6 +1464,11 @@ service StaticAddressClient { NewAddress requests a new static address for loop-ins from the server. */ rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); + + /* + ListUnspent returns a list of utxos behind a static address. + */ + rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse); } message NewAddressRequest { @@ -1478,4 +1483,51 @@ message NewAddressResponse { The taproot static address. */ string address = 1; + + /* + The CSV expiry of the static address. + */ + uint32 expiry = 2; +} + +message ListUnspentRequest { + /* + The number of minimum confirmations a utxo must have to be listed. + */ + int32 min_confs = 1; + + /* + The number of maximum confirmations a utxo may have to be listed. A zero + value indicates that there is no maximum. + */ + int32 max_confs = 2; +} + +message ListUnspentResponse { + /* + A list of utxos behind the static address. + */ + repeated Utxo utxos = 1; +} + +message Utxo { + /* + The static address of the utxo. + */ + string static_address = 1; + + /* + The value of the unspent coin in satoshis. + */ + int64 amount_sat = 2; + + /* + The outpoint in the form txid:index. + */ + string outpoint = 3; + + /* + The number of confirmations for the Utxo. + */ + int64 confirmations = 4; } diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 7b89896ec..05606d1f1 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -1129,6 +1129,18 @@ } } }, + "looprpcListUnspentResponse": { + "type": "object", + "properties": { + "utxos": { + "type": "array", + "items": { + "$ref": "#/definitions/looprpcUtxo" + }, + "description": "A list of utxos behind the static address." + } + } + }, "looprpcLoopInRequest": { "type": "object", "properties": { @@ -1318,6 +1330,11 @@ "address": { "type": "string", "description": "The taproot static address." + }, + "expiry": { + "type": "integer", + "format": "int64", + "description": "The CSV expiry of the static address." } } }, @@ -1583,6 +1600,29 @@ } } }, + "looprpcUtxo": { + "type": "object", + "properties": { + "static_address": { + "type": "string", + "description": "The static address of the utxo." + }, + "amount_sat": { + "type": "string", + "format": "int64", + "description": "The value of the unspent coin in satoshis." + }, + "outpoint": { + "type": "string", + "description": "The outpoint in the form txid:index." + }, + "confirmations": { + "type": "string", + "format": "int64", + "description": "The number of confirmations for the Utxo." + } + } + }, "protobufAny": { "type": "object", "properties": { diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index 9fe856885..df6cc2965 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -1022,6 +1022,8 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ type StaticAddressClientClient interface { // NewAddress requests a new static address for loop-ins from the server. NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) + // ListUnspent returns a list of utxos behind a static address. + ListUnspent(ctx context.Context, in *ListUnspentRequest, opts ...grpc.CallOption) (*ListUnspentResponse, error) } type staticAddressClientClient struct { @@ -1041,12 +1043,23 @@ func (c *staticAddressClientClient) NewAddress(ctx context.Context, in *NewAddre return out, nil } +func (c *staticAddressClientClient) ListUnspent(ctx context.Context, in *ListUnspentRequest, opts ...grpc.CallOption) (*ListUnspentResponse, error) { + out := new(ListUnspentResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressClient/ListUnspent", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // StaticAddressClientServer is the server API for StaticAddressClient service. // All implementations must embed UnimplementedStaticAddressClientServer // for forward compatibility type StaticAddressClientServer interface { // NewAddress requests a new static address for loop-ins from the server. NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) + // ListUnspent returns a list of utxos behind a static address. + ListUnspent(context.Context, *ListUnspentRequest) (*ListUnspentResponse, error) mustEmbedUnimplementedStaticAddressClientServer() } @@ -1057,6 +1070,9 @@ type UnimplementedStaticAddressClientServer struct { func (UnimplementedStaticAddressClientServer) NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method NewAddress not implemented") } +func (UnimplementedStaticAddressClientServer) ListUnspent(context.Context, *ListUnspentRequest) (*ListUnspentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUnspent not implemented") +} func (UnimplementedStaticAddressClientServer) mustEmbedUnimplementedStaticAddressClientServer() {} // UnsafeStaticAddressClientServer may be embedded to opt out of forward compatibility for this service. @@ -1088,6 +1104,24 @@ func _StaticAddressClient_NewAddress_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _StaticAddressClient_ListUnspent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUnspentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressClientServer).ListUnspent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressClient/ListUnspent", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressClientServer).ListUnspent(ctx, req.(*ListUnspentRequest)) + } + return interceptor(ctx, in, info, handler) +} + // StaticAddressClient_ServiceDesc is the grpc.ServiceDesc for StaticAddressClient service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1099,6 +1133,10 @@ var StaticAddressClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "NewAddress", Handler: _StaticAddressClient_NewAddress_Handler, }, + { + MethodName: "ListUnspent", + Handler: _StaticAddressClient_ListUnspent_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "client.proto", diff --git a/looprpc/staticaddressclient.pb.json.go b/looprpc/staticaddressclient.pb.json.go index 67971575d..afa5506ab 100644 --- a/looprpc/staticaddressclient.pb.json.go +++ b/looprpc/staticaddressclient.pb.json.go @@ -45,4 +45,29 @@ func RegisterStaticAddressClientJSONCallbacks(registry map[string]func(ctx conte } callback(string(respBytes), nil) } + + registry["looprpc.StaticAddressClient.ListUnspent"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &ListUnspentRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewStaticAddressClientClient(conn) + resp, err := client.ListUnspent(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } } From 8d13cf02bdd869334e442f3c8f481f84660e214e Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 25 Oct 2023 15:43:24 +0200 Subject: [PATCH 11/67] staticaddr: track and list spends in manager --- staticaddr/manager.go | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/staticaddr/manager.go b/staticaddr/manager.go index 04dd1d5a8..a963c86ec 100644 --- a/staticaddr/manager.go +++ b/staticaddr/manager.go @@ -1,7 +1,9 @@ package staticaddr import ( + "bytes" "context" + "fmt" "sync" "github.com/btcsuite/btcd/btcec/v2" @@ -15,6 +17,7 @@ import ( staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/input" "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lnwallet" ) // ManagerConfig holds the configuration for the address manager. @@ -159,6 +162,19 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, return nil, err } + // Import the static address tapscript into our lnd wallet, so we can + // track unspent outputs of it. + tapScript := input.TapscriptFullTree( + staticAddress.InternalPubKey, *staticAddress.TimeoutLeaf, + ) + addr, err := m.cfg.WalletKit.ImportTaprootScript(ctx, tapScript) + if err != nil { + return nil, err + } + + log.Infof("imported static address taproot script to lnd wallet: %v", + addr) + return m.getTaprootAddress( clientPubKey.PubKey, serverPubKey, int64(serverParams.Expiry), ) @@ -186,3 +202,50 @@ func (m *Manager) WaitInitComplete() { defer log.Debugf("Address manager initiation complete.") <-m.initChan } + +// ListUnspentRaw returns a list of utxos at the static address. +func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs, + maxConfs int32) (*btcutil.AddressTaproot, []*lnwallet.Utxo, error) { + + addresses, err := m.cfg.Store.GetAllStaticAddresses(ctx) + switch { + case err != nil: + return nil, nil, err + + case len(addresses) == 0: + return nil, nil, fmt.Errorf("no address found") + + case len(addresses) > 1: + return nil, nil, fmt.Errorf("more than one address found") + } + + staticAddress := addresses[0] + + // List all unspent utxos the wallet sees, regardless of the number of + // confirmations. + utxos, err := m.cfg.WalletKit.ListUnspent( + ctx, minConfs, maxConfs, + ) + if err != nil { + return nil, nil, err + } + + // Filter the list of lnd's unspent utxos for the pkScript of our static + // address. + var filteredUtxos []*lnwallet.Utxo + for _, utxo := range utxos { + if bytes.Equal(utxo.PkScript, staticAddress.PkScript) { + filteredUtxos = append(filteredUtxos, utxo) + } + } + + taprootAddress, err := m.getTaprootAddress( + staticAddress.ClientPubkey, staticAddress.ServerPubkey, + int64(staticAddress.Expiry), + ) + if err != nil { + return nil, nil, err + } + + return taprootAddress, filteredUtxos, nil +} From 9551390d327089b9422c20f72ff1524545d1099c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 25 Oct 2023 15:45:47 +0200 Subject: [PATCH 12/67] staticaddr: list unspent outputs in server --- staticaddr/server.go | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/staticaddr/server.go b/staticaddr/server.go index 4eeca96be..a6273ddcb 100644 --- a/staticaddr/server.go +++ b/staticaddr/server.go @@ -26,10 +26,10 @@ func NewAddressServer(addressClient staticaddressrpc.StaticAddressServerClient, // NewAddress is the rpc endpoint for loop clients to request a new static // address. -func (r *AddressServer) NewAddress(ctx context.Context, +func (s *AddressServer) NewAddress(ctx context.Context, _ *looprpc.NewAddressRequest) (*looprpc.NewAddressResponse, error) { - address, err := r.manager.NewAddress(ctx) + address, err := s.manager.NewAddress(ctx) if err != nil { return nil, err } @@ -40,3 +40,31 @@ func (r *AddressServer) NewAddress(ctx context.Context, Address: address.String(), }, nil } + +// ListUnspent returns a list of utxos behind the static address. +func (s *AddressServer) ListUnspent(ctx context.Context, + req *looprpc.ListUnspentRequest) (*looprpc.ListUnspentResponse, error) { + + // List all unspent utxos the wallet sees, regardless of the number of + // confirmations. + staticAddress, utxos, err := s.manager.ListUnspentRaw( + ctx, req.MinConfs, req.MaxConfs, + ) + if err != nil { + return nil, err + } + + // Prepare the list response. + var respUtxos []*looprpc.Utxo + for _, u := range utxos { + utxo := &looprpc.Utxo{ + StaticAddress: staticAddress.String(), + AmountSat: int64(u.Value), + Confirmations: u.Confirmations, + Outpoint: u.OutPoint.String(), + } + respUtxos = append(respUtxos, utxo) + } + + return &looprpc.ListUnspentResponse{Utxos: respUtxos}, nil +} From 46792301d3eeb02dd4c5b6ff53d1547acbbc4e18 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 25 Oct 2023 15:46:06 +0200 Subject: [PATCH 13/67] perms: list unspent outputs --- loopd/perms/perms.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index 4edb60394..30f69a628 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -80,6 +80,13 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "loop", Action: "in", }}, + "/looprpc.StaticAddressClient/ListUnspent": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetLsatTokens": {{ Entity: "auth", Action: "read", From c3fae7253474913ee78d707bf025b1f5561c1aee Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 25 Oct 2023 15:46:48 +0200 Subject: [PATCH 14/67] loop: list unspent static address outputs --- cmd/loop/staticaddr.go | 48 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index 394e5b1b5..c9626bac1 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -15,6 +15,7 @@ var staticAddressCommands = cli.Command{ Category: "StaticAddress", Subcommands: []cli.Command{ newStaticAddressCommand, + listUnspentCommand, }, } @@ -57,6 +58,53 @@ func newStaticAddress(ctx *cli.Context) error { return nil } +var listUnspentCommand = cli.Command{ + Name: "listunspent", + ShortName: "l", + Usage: "List unspent static address outputs.", + Description: ` + List all unspent static address outputs. + `, + Flags: []cli.Flag{ + cli.IntFlag{ + Name: "min_confs", + Usage: "The minimum amount of confirmations an " + + "output should have to be listed.", + }, + cli.IntFlag{ + Name: "max_confs", + Usage: "The maximum number of confirmations an " + + "output could have to be listed.", + }, + }, + Action: listUnspent, +} + +func listUnspent(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "listunspent") + } + + client, cleanup, err := getAddressClient(ctx) + if err != nil { + return err + } + defer cleanup() + + resp, err := client.ListUnspent(ctxb, &looprpc.ListUnspentRequest{ + MinConfs: int32(ctx.Int("min_confs")), + MaxConfs: int32(ctx.Int("max_confs")), + }) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + func getAddressClient(ctx *cli.Context) (looprpc.StaticAddressClientClient, func(), error) { From fd63b6257c5059c0a260989d461500f2d659f152 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 26 Feb 2024 09:06:06 +0100 Subject: [PATCH 15/67] looprpc: include static address in swap client We remove the static address client and add its rpcs into the SwapClient --- looprpc/client.pb.go | 515 +++++++++++++------------ looprpc/client.proto | 32 +- looprpc/client.swagger.json | 7 +- looprpc/client_grpc.pb.go | 206 ++++------ looprpc/staticaddressclient.pb.json.go | 73 ---- looprpc/swapclient.pb.json.go | 50 +++ 6 files changed, 407 insertions(+), 476 deletions(-) delete mode 100644 looprpc/staticaddressclient.pb.json.go diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 7b3f889f5..58cabec6a 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -3949,7 +3949,7 @@ func (x *InstantOut) GetSweepTxId() string { return "" } -type NewAddressRequest struct { +type NewStaticAddressRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3958,8 +3958,8 @@ type NewAddressRequest struct { ClientKey []byte `protobuf:"bytes,1,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` } -func (x *NewAddressRequest) Reset() { - *x = NewAddressRequest{} +func (x *NewStaticAddressRequest) Reset() { + *x = NewStaticAddressRequest{} if protoimpl.UnsafeEnabled { mi := &file_client_proto_msgTypes[45] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3967,13 +3967,13 @@ func (x *NewAddressRequest) Reset() { } } -func (x *NewAddressRequest) String() string { +func (x *NewStaticAddressRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*NewAddressRequest) ProtoMessage() {} +func (*NewStaticAddressRequest) ProtoMessage() {} -func (x *NewAddressRequest) ProtoReflect() protoreflect.Message { +func (x *NewStaticAddressRequest) ProtoReflect() protoreflect.Message { mi := &file_client_proto_msgTypes[45] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3985,19 +3985,19 @@ func (x *NewAddressRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use NewAddressRequest.ProtoReflect.Descriptor instead. -func (*NewAddressRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use NewStaticAddressRequest.ProtoReflect.Descriptor instead. +func (*NewStaticAddressRequest) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{45} } -func (x *NewAddressRequest) GetClientKey() []byte { +func (x *NewStaticAddressRequest) GetClientKey() []byte { if x != nil { return x.ClientKey } return nil } -type NewAddressResponse struct { +type NewStaticAddressResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4008,8 +4008,8 @@ type NewAddressResponse struct { Expiry uint32 `protobuf:"varint,2,opt,name=expiry,proto3" json:"expiry,omitempty"` } -func (x *NewAddressResponse) Reset() { - *x = NewAddressResponse{} +func (x *NewStaticAddressResponse) Reset() { + *x = NewStaticAddressResponse{} if protoimpl.UnsafeEnabled { mi := &file_client_proto_msgTypes[46] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4017,13 +4017,13 @@ func (x *NewAddressResponse) Reset() { } } -func (x *NewAddressResponse) String() string { +func (x *NewStaticAddressResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*NewAddressResponse) ProtoMessage() {} +func (*NewStaticAddressResponse) ProtoMessage() {} -func (x *NewAddressResponse) ProtoReflect() protoreflect.Message { +func (x *NewStaticAddressResponse) ProtoReflect() protoreflect.Message { mi := &file_client_proto_msgTypes[46] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4035,26 +4035,26 @@ func (x *NewAddressResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use NewAddressResponse.ProtoReflect.Descriptor instead. -func (*NewAddressResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use NewStaticAddressResponse.ProtoReflect.Descriptor instead. +func (*NewStaticAddressResponse) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{46} } -func (x *NewAddressResponse) GetAddress() string { +func (x *NewStaticAddressResponse) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *NewAddressResponse) GetExpiry() uint32 { +func (x *NewStaticAddressResponse) GetExpiry() uint32 { if x != nil { return x.Expiry } return 0 } -type ListUnspentRequest struct { +type ListUnspentDepositsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4066,8 +4066,8 @@ type ListUnspentRequest struct { MaxConfs int32 `protobuf:"varint,2,opt,name=max_confs,json=maxConfs,proto3" json:"max_confs,omitempty"` } -func (x *ListUnspentRequest) Reset() { - *x = ListUnspentRequest{} +func (x *ListUnspentDepositsRequest) Reset() { + *x = ListUnspentDepositsRequest{} if protoimpl.UnsafeEnabled { mi := &file_client_proto_msgTypes[47] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4075,13 +4075,13 @@ func (x *ListUnspentRequest) Reset() { } } -func (x *ListUnspentRequest) String() string { +func (x *ListUnspentDepositsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListUnspentRequest) ProtoMessage() {} +func (*ListUnspentDepositsRequest) ProtoMessage() {} -func (x *ListUnspentRequest) ProtoReflect() protoreflect.Message { +func (x *ListUnspentDepositsRequest) ProtoReflect() protoreflect.Message { mi := &file_client_proto_msgTypes[47] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4093,26 +4093,26 @@ func (x *ListUnspentRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListUnspentRequest.ProtoReflect.Descriptor instead. -func (*ListUnspentRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListUnspentDepositsRequest.ProtoReflect.Descriptor instead. +func (*ListUnspentDepositsRequest) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{47} } -func (x *ListUnspentRequest) GetMinConfs() int32 { +func (x *ListUnspentDepositsRequest) GetMinConfs() int32 { if x != nil { return x.MinConfs } return 0 } -func (x *ListUnspentRequest) GetMaxConfs() int32 { +func (x *ListUnspentDepositsRequest) GetMaxConfs() int32 { if x != nil { return x.MaxConfs } return 0 } -type ListUnspentResponse struct { +type ListUnspentDepositsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4121,8 +4121,8 @@ type ListUnspentResponse struct { Utxos []*Utxo `protobuf:"bytes,1,rep,name=utxos,proto3" json:"utxos,omitempty"` } -func (x *ListUnspentResponse) Reset() { - *x = ListUnspentResponse{} +func (x *ListUnspentDepositsResponse) Reset() { + *x = ListUnspentDepositsResponse{} if protoimpl.UnsafeEnabled { mi := &file_client_proto_msgTypes[48] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4130,13 +4130,13 @@ func (x *ListUnspentResponse) Reset() { } } -func (x *ListUnspentResponse) String() string { +func (x *ListUnspentDepositsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ListUnspentResponse) ProtoMessage() {} +func (*ListUnspentDepositsResponse) ProtoMessage() {} -func (x *ListUnspentResponse) ProtoReflect() protoreflect.Message { +func (x *ListUnspentDepositsResponse) ProtoReflect() protoreflect.Message { mi := &file_client_proto_msgTypes[48] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4148,12 +4148,12 @@ func (x *ListUnspentResponse) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ListUnspentResponse.ProtoReflect.Descriptor instead. -func (*ListUnspentResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use ListUnspentDepositsResponse.ProtoReflect.Descriptor instead. +func (*ListUnspentDepositsResponse) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{48} } -func (x *ListUnspentResponse) GetUtxos() []*Utxo { +func (x *ListUnspentDepositsResponse) GetUtxos() []*Utxo { if x != nil { return x.Utxos } @@ -4723,211 +4723,214 @@ var file_client_proto_rawDesc = []byte{ 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, - 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x22, 0x32, 0x0a, 0x11, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x46, 0x0a, 0x12, 0x4e, 0x65, - 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, - 0x72, 0x79, 0x22, 0x4e, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, 0x6e, - 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, 0x6e, - 0x66, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, 0x6e, - 0x66, 0x73, 0x22, 0x3a, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x74, 0x78, - 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x55, 0x74, 0x78, 0x6f, 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x8e, - 0x01, 0x0a, 0x04, 0x55, 0x74, 0x78, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x09, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1a, 0x0a, - 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, - 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, - 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, - 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, - 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, - 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, - 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, - 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, - 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, - 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, - 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, - 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, - 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, - 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, - 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, - 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, - 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, - 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, - 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, - 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, - 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, - 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, - 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, - 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, - 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, - 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, - 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, - 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, - 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, - 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, - 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, - 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, - 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, - 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, - 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, - 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, - 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, - 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, - 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, - 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, - 0x32, 0xab, 0x0c, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, - 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, - 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, - 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, - 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, - 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, - 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, - 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, - 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, - 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, - 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, - 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, - 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, - 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, - 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, - 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, + 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x17, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, + 0x22, 0x4c, 0x0a, 0x18, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x56, + 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, + 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x22, 0x42, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, + 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x55, + 0x74, 0x78, 0x6f, 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x04, 0x55, + 0x74, 0x78, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, + 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, + 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, + 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, + 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, + 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, + 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, + 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, + 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, + 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, + 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, + 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, + 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, + 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, + 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, + 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, + 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, + 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, + 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, + 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, + 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, + 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, + 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, + 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, + 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, + 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, + 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, + 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, + 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, + 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, + 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, + 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, + 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, + 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, + 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, 0xe6, 0x0d, 0x0a, + 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, + 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, + 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, + 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, + 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, + 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, + 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, + 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, + 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, + 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, - 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa6, - 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x45, 0x0a, 0x0a, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, - 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, - 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x12, 0x1b, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, + 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, + 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, + 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, + 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, + 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, + 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4997,10 +5000,10 @@ var file_client_proto_goTypes = []any{ (*ListInstantOutsRequest)(nil), // 49: looprpc.ListInstantOutsRequest (*ListInstantOutsResponse)(nil), // 50: looprpc.ListInstantOutsResponse (*InstantOut)(nil), // 51: looprpc.InstantOut - (*NewAddressRequest)(nil), // 52: looprpc.NewAddressRequest - (*NewAddressResponse)(nil), // 53: looprpc.NewAddressResponse - (*ListUnspentRequest)(nil), // 54: looprpc.ListUnspentRequest - (*ListUnspentResponse)(nil), // 55: looprpc.ListUnspentResponse + (*NewStaticAddressRequest)(nil), // 52: looprpc.NewStaticAddressRequest + (*NewStaticAddressResponse)(nil), // 53: looprpc.NewStaticAddressResponse + (*ListUnspentDepositsRequest)(nil), // 54: looprpc.ListUnspentDepositsRequest + (*ListUnspentDepositsResponse)(nil), // 55: looprpc.ListUnspentDepositsResponse (*Utxo)(nil), // 56: looprpc.Utxo (*swapserverrpc.RouteHint)(nil), // 57: looprpc.RouteHint } @@ -5029,7 +5032,7 @@ var file_client_proto_depIdxs = []int32{ 38, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified 44, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation 51, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut - 56, // 24: looprpc.ListUnspentResponse.utxos:type_name -> looprpc.Utxo + 56, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo 7, // 25: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest 8, // 26: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest 10, // 27: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest @@ -5052,8 +5055,8 @@ var file_client_proto_depIdxs = []int32{ 45, // 44: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest 47, // 45: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest 49, // 46: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 52, // 47: looprpc.StaticAddressClient.NewAddress:input_type -> looprpc.NewAddressRequest - 54, // 48: looprpc.StaticAddressClient.ListUnspent:input_type -> looprpc.ListUnspentRequest + 52, // 47: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest + 54, // 48: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest 9, // 49: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse 9, // 50: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse 11, // 51: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus @@ -5076,8 +5079,8 @@ var file_client_proto_depIdxs = []int32{ 46, // 68: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse 48, // 69: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse 50, // 70: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 53, // 71: looprpc.StaticAddressClient.NewAddress:output_type -> looprpc.NewAddressResponse - 55, // 72: looprpc.StaticAddressClient.ListUnspent:output_type -> looprpc.ListUnspentResponse + 53, // 71: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse + 55, // 72: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse 49, // [49:73] is the sub-list for method output_type 25, // [25:49] is the sub-list for method input_type 25, // [25:25] is the sub-list for extension type_name @@ -5632,7 +5635,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[45].Exporter = func(v any, i int) any { - switch v := v.(*NewAddressRequest); i { + switch v := v.(*NewStaticAddressRequest); i { case 0: return &v.state case 1: @@ -5644,7 +5647,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[46].Exporter = func(v any, i int) any { - switch v := v.(*NewAddressResponse); i { + switch v := v.(*NewStaticAddressResponse); i { case 0: return &v.state case 1: @@ -5656,7 +5659,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[47].Exporter = func(v any, i int) any { - switch v := v.(*ListUnspentRequest); i { + switch v := v.(*ListUnspentDepositsRequest); i { case 0: return &v.state case 1: @@ -5668,7 +5671,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[48].Exporter = func(v any, i int) any { - switch v := v.(*ListUnspentResponse); i { + switch v := v.(*ListUnspentDepositsResponse); i { case 0: return &v.state case 1: @@ -5700,7 +5703,7 @@ func file_client_proto_init() { NumEnums: 7, NumMessages: 50, NumExtensions: 0, - NumServices: 2, + NumServices: 1, }, GoTypes: file_client_proto_goTypes, DependencyIndexes: file_client_proto_depIdxs, diff --git a/looprpc/client.proto b/looprpc/client.proto index 23534655b..0f3f8770e 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -149,6 +149,18 @@ service SwapClient { */ rpc ListInstantOuts (ListInstantOutsRequest) returns (ListInstantOutsResponse); + + /* loop: `static newstaticaddress` + NewStaticAddress requests a new static address for loop-ins from the server. + */ + rpc NewStaticAddress (NewStaticAddressRequest) + returns (NewStaticAddressResponse); + + /* loop: `static listunspentdeposits` + ListUnspentDeposits returns a list of utxos deposited at a static address. + */ + rpc ListUnspentDeposits (ListUnspentDepositsRequest) + returns (ListUnspentDepositsResponse); } message LoopOutRequest { @@ -1459,26 +1471,14 @@ message InstantOut { string sweep_tx_id = 5; } -service StaticAddressClient { - /* - NewAddress requests a new static address for loop-ins from the server. - */ - rpc NewAddress (NewAddressRequest) returns (NewAddressResponse); - - /* - ListUnspent returns a list of utxos behind a static address. - */ - rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse); -} - -message NewAddressRequest { +message NewStaticAddressRequest { /* The client's public key for the 2-of-2 MuSig2 taproot static address. */ bytes client_key = 1; } -message NewAddressResponse { +message NewStaticAddressResponse { /* The taproot static address. */ @@ -1490,7 +1490,7 @@ message NewAddressResponse { uint32 expiry = 2; } -message ListUnspentRequest { +message ListUnspentDepositsRequest { /* The number of minimum confirmations a utxo must have to be listed. */ @@ -1503,7 +1503,7 @@ message ListUnspentRequest { int32 max_confs = 2; } -message ListUnspentResponse { +message ListUnspentDepositsResponse { /* A list of utxos behind the static address. */ diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 05606d1f1..4c4d5761e 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -7,9 +7,6 @@ "tags": [ { "name": "SwapClient" - }, - { - "name": "StaticAddressClient" } ], "consumes": [ @@ -1129,7 +1126,7 @@ } } }, - "looprpcListUnspentResponse": { + "looprpcListUnspentDepositsResponse": { "type": "object", "properties": { "utxos": { @@ -1324,7 +1321,7 @@ } } }, - "looprpcNewAddressResponse": { + "looprpcNewStaticAddressResponse": { "type": "object", "properties": { "address": { diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index df6cc2965..18550de4f 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -106,6 +106,12 @@ type SwapClientClient interface { // ListInstantOuts returns a list of all currently known instant out swaps and // their current status. ListInstantOuts(ctx context.Context, in *ListInstantOutsRequest, opts ...grpc.CallOption) (*ListInstantOutsResponse, error) + // loop: `static newstaticaddress` + // NewStaticAddress requests a new static address for loop-ins from the server. + NewStaticAddress(ctx context.Context, in *NewStaticAddressRequest, opts ...grpc.CallOption) (*NewStaticAddressResponse, error) + // loop: `static listunspentdeposits` + // ListUnspentDeposits returns a list of utxos deposited at a static address. + ListUnspentDeposits(ctx context.Context, in *ListUnspentDepositsRequest, opts ...grpc.CallOption) (*ListUnspentDepositsResponse, error) } type swapClientClient struct { @@ -337,6 +343,24 @@ func (c *swapClientClient) ListInstantOuts(ctx context.Context, in *ListInstantO return out, nil } +func (c *swapClientClient) NewStaticAddress(ctx context.Context, in *NewStaticAddressRequest, opts ...grpc.CallOption) (*NewStaticAddressResponse, error) { + out := new(NewStaticAddressResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/NewStaticAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *swapClientClient) ListUnspentDeposits(ctx context.Context, in *ListUnspentDepositsRequest, opts ...grpc.CallOption) (*ListUnspentDepositsResponse, error) { + out := new(ListUnspentDepositsResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListUnspentDeposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SwapClientServer is the server API for SwapClient service. // All implementations must embed UnimplementedSwapClientServer // for forward compatibility @@ -429,6 +453,12 @@ type SwapClientServer interface { // ListInstantOuts returns a list of all currently known instant out swaps and // their current status. ListInstantOuts(context.Context, *ListInstantOutsRequest) (*ListInstantOutsResponse, error) + // loop: `static newstaticaddress` + // NewStaticAddress requests a new static address for loop-ins from the server. + NewStaticAddress(context.Context, *NewStaticAddressRequest) (*NewStaticAddressResponse, error) + // loop: `static listunspentdeposits` + // ListUnspentDeposits returns a list of utxos deposited at a static address. + ListUnspentDeposits(context.Context, *ListUnspentDepositsRequest) (*ListUnspentDepositsResponse, error) mustEmbedUnimplementedSwapClientServer() } @@ -502,6 +532,12 @@ func (UnimplementedSwapClientServer) InstantOutQuote(context.Context, *InstantOu func (UnimplementedSwapClientServer) ListInstantOuts(context.Context, *ListInstantOutsRequest) (*ListInstantOutsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListInstantOuts not implemented") } +func (UnimplementedSwapClientServer) NewStaticAddress(context.Context, *NewStaticAddressRequest) (*NewStaticAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method NewStaticAddress not implemented") +} +func (UnimplementedSwapClientServer) ListUnspentDeposits(context.Context, *ListUnspentDepositsRequest) (*ListUnspentDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListUnspentDeposits not implemented") +} func (UnimplementedSwapClientServer) mustEmbedUnimplementedSwapClientServer() {} // UnsafeSwapClientServer may be embedded to opt out of forward compatibility for this service. @@ -914,6 +950,42 @@ func _SwapClient_ListInstantOuts_Handler(srv interface{}, ctx context.Context, d return interceptor(ctx, in, info, handler) } +func _SwapClient_NewStaticAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NewStaticAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).NewStaticAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/NewStaticAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).NewStaticAddress(ctx, req.(*NewStaticAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SwapClient_ListUnspentDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListUnspentDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).ListUnspentDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/ListUnspentDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).ListUnspentDeposits(ctx, req.(*ListUnspentDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SwapClient_ServiceDesc is the grpc.ServiceDesc for SwapClient service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1005,6 +1077,14 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListInstantOuts", Handler: _SwapClient_ListInstantOuts_Handler, }, + { + MethodName: "NewStaticAddress", + Handler: _SwapClient_NewStaticAddress_Handler, + }, + { + MethodName: "ListUnspentDeposits", + Handler: _SwapClient_ListUnspentDeposits_Handler, + }, }, Streams: []grpc.StreamDesc{ { @@ -1015,129 +1095,3 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ }, Metadata: "client.proto", } - -// StaticAddressClientClient is the client API for StaticAddressClient service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type StaticAddressClientClient interface { - // NewAddress requests a new static address for loop-ins from the server. - NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) - // ListUnspent returns a list of utxos behind a static address. - ListUnspent(ctx context.Context, in *ListUnspentRequest, opts ...grpc.CallOption) (*ListUnspentResponse, error) -} - -type staticAddressClientClient struct { - cc grpc.ClientConnInterface -} - -func NewStaticAddressClientClient(cc grpc.ClientConnInterface) StaticAddressClientClient { - return &staticAddressClientClient{cc} -} - -func (c *staticAddressClientClient) NewAddress(ctx context.Context, in *NewAddressRequest, opts ...grpc.CallOption) (*NewAddressResponse, error) { - out := new(NewAddressResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressClient/NewAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *staticAddressClientClient) ListUnspent(ctx context.Context, in *ListUnspentRequest, opts ...grpc.CallOption) (*ListUnspentResponse, error) { - out := new(ListUnspentResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressClient/ListUnspent", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StaticAddressClientServer is the server API for StaticAddressClient service. -// All implementations must embed UnimplementedStaticAddressClientServer -// for forward compatibility -type StaticAddressClientServer interface { - // NewAddress requests a new static address for loop-ins from the server. - NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) - // ListUnspent returns a list of utxos behind a static address. - ListUnspent(context.Context, *ListUnspentRequest) (*ListUnspentResponse, error) - mustEmbedUnimplementedStaticAddressClientServer() -} - -// UnimplementedStaticAddressClientServer must be embedded to have forward compatible implementations. -type UnimplementedStaticAddressClientServer struct { -} - -func (UnimplementedStaticAddressClientServer) NewAddress(context.Context, *NewAddressRequest) (*NewAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method NewAddress not implemented") -} -func (UnimplementedStaticAddressClientServer) ListUnspent(context.Context, *ListUnspentRequest) (*ListUnspentResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ListUnspent not implemented") -} -func (UnimplementedStaticAddressClientServer) mustEmbedUnimplementedStaticAddressClientServer() {} - -// UnsafeStaticAddressClientServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StaticAddressClientServer will -// result in compilation errors. -type UnsafeStaticAddressClientServer interface { - mustEmbedUnimplementedStaticAddressClientServer() -} - -func RegisterStaticAddressClientServer(s grpc.ServiceRegistrar, srv StaticAddressClientServer) { - s.RegisterService(&StaticAddressClient_ServiceDesc, srv) -} - -func _StaticAddressClient_NewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(NewAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressClientServer).NewAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressClient/NewAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressClientServer).NewAddress(ctx, req.(*NewAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StaticAddressClient_ListUnspent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ListUnspentRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressClientServer).ListUnspent(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressClient/ListUnspent", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressClientServer).ListUnspent(ctx, req.(*ListUnspentRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// StaticAddressClient_ServiceDesc is the grpc.ServiceDesc for StaticAddressClient service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var StaticAddressClient_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "looprpc.StaticAddressClient", - HandlerType: (*StaticAddressClientServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "NewAddress", - Handler: _StaticAddressClient_NewAddress_Handler, - }, - { - MethodName: "ListUnspent", - Handler: _StaticAddressClient_ListUnspent_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "client.proto", -} diff --git a/looprpc/staticaddressclient.pb.json.go b/looprpc/staticaddressclient.pb.json.go deleted file mode 100644 index afa5506ab..000000000 --- a/looprpc/staticaddressclient.pb.json.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by falafel 0.9.1. DO NOT EDIT. -// source: client.proto - -package looprpc - -import ( - "context" - - gateway "github.com/grpc-ecosystem/grpc-gateway/v2/runtime" - "google.golang.org/grpc" - "google.golang.org/protobuf/encoding/protojson" -) - -func RegisterStaticAddressClientJSONCallbacks(registry map[string]func(ctx context.Context, - conn *grpc.ClientConn, reqJSON string, callback func(string, error))) { - - marshaler := &gateway.JSONPb{ - MarshalOptions: protojson.MarshalOptions{ - UseProtoNames: true, - EmitUnpopulated: true, - }, - } - - registry["looprpc.StaticAddressClient.NewAddress"] = func(ctx context.Context, - conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { - - req := &NewAddressRequest{} - err := marshaler.Unmarshal([]byte(reqJSON), req) - if err != nil { - callback("", err) - return - } - - client := NewStaticAddressClientClient(conn) - resp, err := client.NewAddress(ctx, req) - if err != nil { - callback("", err) - return - } - - respBytes, err := marshaler.Marshal(resp) - if err != nil { - callback("", err) - return - } - callback(string(respBytes), nil) - } - - registry["looprpc.StaticAddressClient.ListUnspent"] = func(ctx context.Context, - conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { - - req := &ListUnspentRequest{} - err := marshaler.Unmarshal([]byte(reqJSON), req) - if err != nil { - callback("", err) - return - } - - client := NewStaticAddressClientClient(conn) - resp, err := client.ListUnspent(ctx, req) - if err != nil { - callback("", err) - return - } - - respBytes, err := marshaler.Marshal(resp) - if err != nil { - callback("", err) - return - } - callback(string(respBytes), nil) - } -} diff --git a/looprpc/swapclient.pb.json.go b/looprpc/swapclient.pb.json.go index 8164f37be..933898d4d 100644 --- a/looprpc/swapclient.pb.json.go +++ b/looprpc/swapclient.pb.json.go @@ -587,4 +587,54 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex } callback(string(respBytes), nil) } + + registry["looprpc.SwapClient.NewStaticAddress"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &NewStaticAddressRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.NewStaticAddress(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } + + registry["looprpc.SwapClient.ListUnspentDeposits"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &ListUnspentDepositsRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.ListUnspentDeposits(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } } From 2ec9c785964a3af5e9b1fe67e9809c9b6a676417 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 7 Mar 2024 17:25:07 +0100 Subject: [PATCH 16/67] sqlc: deposit queries, models and migrations --- .../000010_static_address_deposits.down.sql | 1 + .../000010_static_address_deposits.up.sql | 43 ++++ loopdb/sqlc/models.go | 18 ++ loopdb/sqlc/querier.go | 6 + .../sqlc/queries/static_address_deposits.sql | 66 ++++++ loopdb/sqlc/static_address_deposits.sql.go | 197 ++++++++++++++++++ 6 files changed, 331 insertions(+) create mode 100644 loopdb/sqlc/migrations/000010_static_address_deposits.down.sql create mode 100644 loopdb/sqlc/migrations/000010_static_address_deposits.up.sql create mode 100644 loopdb/sqlc/queries/static_address_deposits.sql create mode 100644 loopdb/sqlc/static_address_deposits.sql.go diff --git a/loopdb/sqlc/migrations/000010_static_address_deposits.down.sql b/loopdb/sqlc/migrations/000010_static_address_deposits.down.sql new file mode 100644 index 000000000..1170fda68 --- /dev/null +++ b/loopdb/sqlc/migrations/000010_static_address_deposits.down.sql @@ -0,0 +1 @@ +DROP TABLE IF EXISTS deposits; diff --git a/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql b/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql new file mode 100644 index 000000000..7898e6084 --- /dev/null +++ b/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql @@ -0,0 +1,43 @@ +-- deposits stores historic and unspent static address outputs. +CREATE TABLE IF NOT EXISTS deposits ( + -- id is the auto-incrementing primary key for a static address. + id INTEGER PRIMARY KEY, + + -- deposit_id is the unique identifier for the deposit. + deposit_id BLOB NOT NULL UNIQUE, + + -- tx_hash is the transaction hash of the deposit. + tx_hash BYTEA NOT NULL, + + -- output_index is the index of the output in the transaction. + out_index INT NOT NULL, + + -- amount is the amount of the deposit. + amount BIGINT NOT NULL, + + -- confirmation_height is the absolute height at which the deposit was + -- confirmed. + confirmation_height BIGINT NOT NULL, + + -- timeout_sweep_pk_script is the public key script that will be used to + -- sweep the deposit after has expired. + timeout_sweep_pk_script BYTEA NOT NULL, + + -- expiry_sweep_txid is the transaction id of the expiry sweep. + expiry_sweep_txid BLOB +); + +-- deposit_updates contains all the updates to a deposit. +CREATE TABLE IF NOT EXISTS deposit_updates ( + -- id is the auto incrementing primary key. + id INTEGER PRIMARY KEY, + + -- deposit_id is the unique identifier for the deposit. + deposit_id BLOB NOT NULL REFERENCES deposits(deposit_id), + + -- update_state is the state of the deposit at the time of the update. + update_state TEXT NOT NULL, + + -- update_timestamp is the timestamp of the update. + update_timestamp TIMESTAMP NOT NULL +); diff --git a/loopdb/sqlc/models.go b/loopdb/sqlc/models.go index 9de5d69ac..47f66ea15 100644 --- a/loopdb/sqlc/models.go +++ b/loopdb/sqlc/models.go @@ -9,6 +9,24 @@ import ( "time" ) +type Deposit struct { + ID int32 + DepositID []byte + TxHash []byte + OutIndex int32 + Amount int64 + ConfirmationHeight int64 + TimeoutSweepPkScript []byte + ExpirySweepTxid []byte +} + +type DepositUpdate struct { + ID int32 + DepositID []byte + UpdateState string + UpdateTimestamp time.Time +} + type HtlcKey struct { SwapHash []byte SenderScriptPubkey []byte diff --git a/loopdb/sqlc/querier.go b/loopdb/sqlc/querier.go index e926cc321..a942562c2 100644 --- a/loopdb/sqlc/querier.go +++ b/loopdb/sqlc/querier.go @@ -9,18 +9,22 @@ import ( ) type Querier interface { + AllDeposits(ctx context.Context) ([]Deposit, error) AllStaticAddresses(ctx context.Context) ([]StaticAddress, error) ConfirmBatch(ctx context.Context, id int32) error + CreateDeposit(ctx context.Context, arg CreateDepositParams) error CreateReservation(ctx context.Context, arg CreateReservationParams) error CreateStaticAddress(ctx context.Context, arg CreateStaticAddressParams) error DropBatch(ctx context.Context, id int32) error FetchLiquidityParams(ctx context.Context) ([]byte, error) GetBatchSweeps(ctx context.Context, batchID int32) ([]Sweep, error) GetBatchSweptAmount(ctx context.Context, batchID int32) (int64, error) + GetDeposit(ctx context.Context, depositID []byte) (Deposit, error) GetInstantOutSwap(ctx context.Context, swapHash []byte) (GetInstantOutSwapRow, error) GetInstantOutSwapUpdates(ctx context.Context, swapHash []byte) ([]InstantoutUpdate, error) GetInstantOutSwaps(ctx context.Context) ([]GetInstantOutSwapsRow, error) GetLastUpdateID(ctx context.Context, swapHash []byte) (int32, error) + GetLatestDepositUpdate(ctx context.Context, depositID []byte) (DepositUpdate, error) GetLoopInSwap(ctx context.Context, swapHash []byte) (GetLoopInSwapRow, error) GetLoopInSwaps(ctx context.Context) ([]GetLoopInSwapsRow, error) GetLoopOutSwap(ctx context.Context, swapHash []byte) (GetLoopOutSwapRow, error) @@ -35,6 +39,7 @@ type Querier interface { GetSweepStatus(ctx context.Context, swapHash []byte) (bool, error) GetUnconfirmedBatches(ctx context.Context) ([]SweepBatch, error) InsertBatch(ctx context.Context, arg InsertBatchParams) (int32, error) + InsertDepositUpdate(ctx context.Context, arg InsertDepositUpdateParams) error InsertHtlcKeys(ctx context.Context, arg InsertHtlcKeysParams) error InsertInstantOut(ctx context.Context, arg InsertInstantOutParams) error InsertInstantOutUpdate(ctx context.Context, arg InsertInstantOutUpdateParams) error @@ -46,6 +51,7 @@ type Querier interface { InsertSwapUpdate(ctx context.Context, arg InsertSwapUpdateParams) error OverrideSwapCosts(ctx context.Context, arg OverrideSwapCostsParams) error UpdateBatch(ctx context.Context, arg UpdateBatchParams) error + UpdateDeposit(ctx context.Context, arg UpdateDepositParams) error UpdateInstantOut(ctx context.Context, arg UpdateInstantOutParams) error UpdateReservation(ctx context.Context, arg UpdateReservationParams) error UpsertLiquidityParams(ctx context.Context, params []byte) error diff --git a/loopdb/sqlc/queries/static_address_deposits.sql b/loopdb/sqlc/queries/static_address_deposits.sql new file mode 100644 index 000000000..d09ca3ffa --- /dev/null +++ b/loopdb/sqlc/queries/static_address_deposits.sql @@ -0,0 +1,66 @@ +-- name: CreateDeposit :exec +INSERT INTO deposits ( + deposit_id, + tx_hash, + out_index, + amount, + confirmation_height, + timeout_sweep_pk_script, + expiry_sweep_txid +) VALUES ( + $1, + $2, + $3, + $4, + $5, + $6, + $7 + ); + +-- name: UpdateDeposit :exec +UPDATE deposits +SET + tx_hash = $2, + out_index = $3, + confirmation_height = $4, + expiry_sweep_txid = $5 +WHERE + deposits.deposit_id = $1; + +-- name: InsertDepositUpdate :exec +INSERT INTO deposit_updates ( + deposit_id, + update_state, + update_timestamp +) VALUES ( + $1, + $2, + $3 + ); + +-- name: GetDeposit :one +SELECT + * +FROM + deposits +WHERE + deposit_id = $1; + +-- name: AllDeposits :many +SELECT + * +FROM + deposits +ORDER BY + id ASC; + +-- name: GetLatestDepositUpdate :one +SELECT + * +FROM + deposit_updates +WHERE + deposit_id = $1 +ORDER BY + update_timestamp DESC +LIMIT 1; \ No newline at end of file diff --git a/loopdb/sqlc/static_address_deposits.sql.go b/loopdb/sqlc/static_address_deposits.sql.go new file mode 100644 index 000000000..8b4612d77 --- /dev/null +++ b/loopdb/sqlc/static_address_deposits.sql.go @@ -0,0 +1,197 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.25.0 +// source: static_address_deposits.sql + +package sqlc + +import ( + "context" + "time" +) + +const allDeposits = `-- name: AllDeposits :many +SELECT + id, deposit_id, tx_hash, out_index, amount, confirmation_height, timeout_sweep_pk_script, expiry_sweep_txid +FROM + deposits +ORDER BY + id ASC +` + +func (q *Queries) AllDeposits(ctx context.Context) ([]Deposit, error) { + rows, err := q.db.QueryContext(ctx, allDeposits) + if err != nil { + return nil, err + } + defer rows.Close() + var items []Deposit + for rows.Next() { + var i Deposit + if err := rows.Scan( + &i.ID, + &i.DepositID, + &i.TxHash, + &i.OutIndex, + &i.Amount, + &i.ConfirmationHeight, + &i.TimeoutSweepPkScript, + &i.ExpirySweepTxid, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const createDeposit = `-- name: CreateDeposit :exec +INSERT INTO deposits ( + deposit_id, + tx_hash, + out_index, + amount, + confirmation_height, + timeout_sweep_pk_script, + expiry_sweep_txid +) VALUES ( + $1, + $2, + $3, + $4, + $5, + $6, + $7 + ) +` + +type CreateDepositParams struct { + DepositID []byte + TxHash []byte + OutIndex int32 + Amount int64 + ConfirmationHeight int64 + TimeoutSweepPkScript []byte + ExpirySweepTxid []byte +} + +func (q *Queries) CreateDeposit(ctx context.Context, arg CreateDepositParams) error { + _, err := q.db.ExecContext(ctx, createDeposit, + arg.DepositID, + arg.TxHash, + arg.OutIndex, + arg.Amount, + arg.ConfirmationHeight, + arg.TimeoutSweepPkScript, + arg.ExpirySweepTxid, + ) + return err +} + +const getDeposit = `-- name: GetDeposit :one +SELECT + id, deposit_id, tx_hash, out_index, amount, confirmation_height, timeout_sweep_pk_script, expiry_sweep_txid +FROM + deposits +WHERE + deposit_id = $1 +` + +func (q *Queries) GetDeposit(ctx context.Context, depositID []byte) (Deposit, error) { + row := q.db.QueryRowContext(ctx, getDeposit, depositID) + var i Deposit + err := row.Scan( + &i.ID, + &i.DepositID, + &i.TxHash, + &i.OutIndex, + &i.Amount, + &i.ConfirmationHeight, + &i.TimeoutSweepPkScript, + &i.ExpirySweepTxid, + ) + return i, err +} + +const getLatestDepositUpdate = `-- name: GetLatestDepositUpdate :one +SELECT + id, deposit_id, update_state, update_timestamp +FROM + deposit_updates +WHERE + deposit_id = $1 +ORDER BY + update_timestamp DESC +LIMIT 1 +` + +func (q *Queries) GetLatestDepositUpdate(ctx context.Context, depositID []byte) (DepositUpdate, error) { + row := q.db.QueryRowContext(ctx, getLatestDepositUpdate, depositID) + var i DepositUpdate + err := row.Scan( + &i.ID, + &i.DepositID, + &i.UpdateState, + &i.UpdateTimestamp, + ) + return i, err +} + +const insertDepositUpdate = `-- name: InsertDepositUpdate :exec +INSERT INTO deposit_updates ( + deposit_id, + update_state, + update_timestamp +) VALUES ( + $1, + $2, + $3 + ) +` + +type InsertDepositUpdateParams struct { + DepositID []byte + UpdateState string + UpdateTimestamp time.Time +} + +func (q *Queries) InsertDepositUpdate(ctx context.Context, arg InsertDepositUpdateParams) error { + _, err := q.db.ExecContext(ctx, insertDepositUpdate, arg.DepositID, arg.UpdateState, arg.UpdateTimestamp) + return err +} + +const updateDeposit = `-- name: UpdateDeposit :exec +UPDATE deposits +SET + tx_hash = $2, + out_index = $3, + confirmation_height = $4, + expiry_sweep_txid = $5 +WHERE + deposits.deposit_id = $1 +` + +type UpdateDepositParams struct { + DepositID []byte + TxHash []byte + OutIndex int32 + ConfirmationHeight int64 + ExpirySweepTxid []byte +} + +func (q *Queries) UpdateDeposit(ctx context.Context, arg UpdateDepositParams) error { + _, err := q.db.ExecContext(ctx, updateDeposit, + arg.DepositID, + arg.TxHash, + arg.OutIndex, + arg.ConfirmationHeight, + arg.ExpirySweepTxid, + ) + return err +} From 7f1e5d619ea646bc08098b59810be38013d6fefe Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 7 Mar 2024 17:27:13 +0100 Subject: [PATCH 17/67] staticaddr: interfaces --- staticaddr/{ => address}/interface.go | 25 ++- staticaddr/{ => address}/sql_store.go | 60 ++------ staticaddr/deposit/interface.go | 44 ++++++ staticaddr/deposit/sql_store.go | 213 ++++++++++++++++++++++++++ 4 files changed, 281 insertions(+), 61 deletions(-) rename staticaddr/{ => address}/interface.go (66%) rename staticaddr/{ => address}/sql_store.go (63%) create mode 100644 staticaddr/deposit/interface.go create mode 100644 staticaddr/deposit/sql_store.go diff --git a/staticaddr/interface.go b/staticaddr/address/interface.go similarity index 66% rename from staticaddr/interface.go rename to staticaddr/address/interface.go index 8b424fbca..fee6be2f8 100644 --- a/staticaddr/interface.go +++ b/staticaddr/address/interface.go @@ -1,39 +1,38 @@ -package staticaddr +package address import ( "context" "fmt" "github.com/btcsuite/btcd/btcec/v2" + "github.com/lightninglabs/loop/staticaddr/version" "github.com/lightningnetwork/lnd/keychain" ) var ( ErrAddressAlreadyExists = fmt.Errorf("address already exists") - ErrAddressNotFound = fmt.Errorf("address not found") ) -// AddressStore is the database interface that is used to store and retrieve +// Store is the database interface that is used to store and retrieve // static addresses. -type AddressStore interface { +type Store interface { // CreateStaticAddress inserts a new static address with its parameters // into the store. - CreateStaticAddress(ctx context.Context, - addrParams *AddressParameters) error + CreateStaticAddress(ctx context.Context, addrParams *Parameters) error // GetStaticAddress fetches static address parameters for a given // address ID. - GetStaticAddress(ctx context.Context, - pkScript []byte) (*AddressParameters, error) + GetStaticAddress(ctx context.Context, pkScript []byte) (*Parameters, + error) // GetAllStaticAddresses retrieves all static addresses from the store. - GetAllStaticAddresses(ctx context.Context) ( - []*AddressParameters, error) + GetAllStaticAddresses(ctx context.Context) ([]*Parameters, + error) } -// AddressParameters holds all the necessary information for the 2-of-2 multisig +// Parameters holds all the necessary information for the 2-of-2 multisig // address. -type AddressParameters struct { +type Parameters struct { // ClientPubkey is the client's pubkey for the static address. It is // used for the 2-of-2 funding output as well as for the client's // timeout path. @@ -54,5 +53,5 @@ type AddressParameters struct { KeyLocator keychain.KeyLocator // ProtocolVersion is the protocol version of the static address. - ProtocolVersion AddressProtocolVersion + ProtocolVersion version.AddressProtocolVersion } diff --git a/staticaddr/sql_store.go b/staticaddr/address/sql_store.go similarity index 63% rename from staticaddr/sql_store.go rename to staticaddr/address/sql_store.go index 7f14f7c5e..2823564f9 100644 --- a/staticaddr/sql_store.go +++ b/staticaddr/address/sql_store.go @@ -1,13 +1,12 @@ -package staticaddr +package address import ( "context" - "errors" "github.com/btcsuite/btcd/btcec/v2" - "github.com/jackc/pgx/v4" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/loopdb/sqlc" + "github.com/lightninglabs/loop/staticaddr/version" "github.com/lightningnetwork/lnd/keychain" ) @@ -24,46 +23,9 @@ func NewSqlStore(db *loopdb.BaseDB) *SqlStore { } } -// ExecTx is a wrapper for txBody to abstract the creation and commit of a db -// transaction. The db transaction is embedded in a `*sqlc.Queries` that txBody -// needs to use when executing each one of the queries that need to be applied -// atomically. -func (s *SqlStore) ExecTx(ctx context.Context, txOptions loopdb.TxOptions, - txBody func(queries *sqlc.Queries) error) error { - - // Create the db transaction. - tx, err := s.baseDB.BeginTx(ctx, txOptions) - if err != nil { - return err - } - - // Rollback is safe to call even if the tx is already closed, so if the - // tx commits successfully, this is a no-op. - defer func() { - err := tx.Rollback() - switch { - // If the tx was already closed (it was successfully executed) - // we do not need to log that error. - case errors.Is(err, pgx.ErrTxClosed): - return - - // If this is an unexpected error, log it. - case err != nil: - log.Errorf("unable to rollback db tx: %v", err) - } - }() - - if err := txBody(s.baseDB.Queries.WithTx(tx)); err != nil { - return err - } - - // Commit transaction. - return tx.Commit() -} - // CreateStaticAddress creates a static address record in the database. func (s *SqlStore) CreateStaticAddress(ctx context.Context, - addrParams *AddressParameters) error { + addrParams *Parameters) error { createArgs := sqlc.CreateStaticAddressParams{ ClientPubkey: addrParams.ClientPubkey.SerializeCompressed(), @@ -80,7 +42,7 @@ func (s *SqlStore) CreateStaticAddress(ctx context.Context, // GetStaticAddress retrieves static address parameters for a given pkScript. func (s *SqlStore) GetStaticAddress(ctx context.Context, - pkScript []byte) (*AddressParameters, error) { + pkScript []byte) (*Parameters, error) { staticAddress, err := s.baseDB.Queries.GetStaticAddress(ctx, pkScript) if err != nil { @@ -91,15 +53,15 @@ func (s *SqlStore) GetStaticAddress(ctx context.Context, } // GetAllStaticAddresses returns all address known to the server. -func (s *SqlStore) GetAllStaticAddresses(ctx context.Context) ( - []*AddressParameters, error) { +func (s *SqlStore) GetAllStaticAddresses(ctx context.Context) ([]*Parameters, + error) { staticAddresses, err := s.baseDB.Queries.AllStaticAddresses(ctx) if err != nil { return nil, err } - var result []*AddressParameters + var result []*Parameters for _, address := range staticAddresses { res, err := s.toAddressParameters(address) if err != nil { @@ -120,7 +82,7 @@ func (s *SqlStore) Close() { // toAddressParameters transforms a database representation of a static address // to an AddressParameters struct. func (s *SqlStore) toAddressParameters(row sqlc.StaticAddress) ( - *AddressParameters, error) { + *Parameters, error) { clientPubkey, err := btcec.ParsePubKey(row.ClientPubkey) if err != nil { @@ -132,7 +94,7 @@ func (s *SqlStore) toAddressParameters(row sqlc.StaticAddress) ( return nil, err } - return &AddressParameters{ + return &Parameters{ ClientPubkey: clientPubkey, ServerPubkey: serverPubkey, PkScript: row.Pkscript, @@ -141,6 +103,8 @@ func (s *SqlStore) toAddressParameters(row sqlc.StaticAddress) ( Family: keychain.KeyFamily(row.ClientKeyFamily), Index: uint32(row.ClientKeyIndex), }, - ProtocolVersion: AddressProtocolVersion(row.ProtocolVersion), + ProtocolVersion: version.AddressProtocolVersion( + row.ProtocolVersion, + ), }, nil } diff --git a/staticaddr/deposit/interface.go b/staticaddr/deposit/interface.go new file mode 100644 index 000000000..dc98f16d3 --- /dev/null +++ b/staticaddr/deposit/interface.go @@ -0,0 +1,44 @@ +package deposit + +import ( + "context" + + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightningnetwork/lnd/lnwallet" +) + +const ( + IdLength = 32 +) + +// Store is the database interface that is used to store and retrieve +// static address deposits. +type Store interface { + // CreateDeposit inserts a new deposit into the store. + CreateDeposit(ctx context.Context, deposit *Deposit) error + + // UpdateDeposit updates the deposit in the database. + UpdateDeposit(ctx context.Context, deposit *Deposit) error + + // GetDeposit retrieves a deposit with depositID from the database. + GetDeposit(ctx context.Context, depositID ID) (*Deposit, error) + + // AllDeposits retrieves all deposits from the store. + AllDeposits(ctx context.Context) ([]*Deposit, error) +} + +// AddressManager handles fetching of address parameters. +type AddressManager interface { + // GetStaticAddressParameters returns the static address parameters. + GetStaticAddressParameters(ctx context.Context) (*address.Parameters, + error) + + // GetStaticAddress returns the deposit address for the given + // client and server public keys. + GetStaticAddress(ctx context.Context) (*script.StaticAddress, error) + + // ListUnspent returns a list of utxos at the static address. + ListUnspent(ctx context.Context, minConfs, + maxConfs int32) ([]*lnwallet.Utxo, error) +} diff --git a/staticaddr/deposit/sql_store.go b/staticaddr/deposit/sql_store.go new file mode 100644 index 000000000..e50f4789d --- /dev/null +++ b/staticaddr/deposit/sql_store.go @@ -0,0 +1,213 @@ +package deposit + +import ( + "context" + "database/sql" + + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/loopdb/sqlc" + "github.com/lightningnetwork/lnd/clock" +) + +// SqlStore is the backing store for static address deposits. +type SqlStore struct { + baseDB *loopdb.BaseDB + + clock clock.Clock +} + +// NewSqlStore constructs a new SQLStore from a BaseDB. The BaseDB is agnostic +// to the underlying driver which can be postgres or sqlite. +func NewSqlStore(db *loopdb.BaseDB) *SqlStore { + return &SqlStore{ + baseDB: db, + + clock: clock.NewDefaultClock(), + } +} + +// CreateDeposit creates a static address deposit record in the database. +func (s *SqlStore) CreateDeposit(ctx context.Context, deposit *Deposit) error { + createArgs := sqlc.CreateDepositParams{ + DepositID: deposit.ID[:], + TxHash: deposit.Hash[:], + OutIndex: int32(deposit.Index), + Amount: int64(deposit.Value), + ConfirmationHeight: deposit.ConfirmationHeight, + TimeoutSweepPkScript: deposit.TimeOutSweepPkScript, + } + + updateArgs := sqlc.InsertDepositUpdateParams{ + DepositID: deposit.ID[:], + UpdateTimestamp: s.clock.Now().UTC(), + UpdateState: string(deposit.State), + } + + return s.baseDB.ExecTx(ctx, &loopdb.SqliteTxOptions{}, + func(q *sqlc.Queries) error { + err := q.CreateDeposit(ctx, createArgs) + if err != nil { + return err + } + + return q.InsertDepositUpdate(ctx, updateArgs) + }) +} + +// UpdateDeposit updates the deposit in the database. +func (s *SqlStore) UpdateDeposit(ctx context.Context, deposit *Deposit) error { + insertUpdateArgs := sqlc.InsertDepositUpdateParams{ + DepositID: deposit.ID[:], + UpdateTimestamp: s.clock.Now().UTC(), + UpdateState: string(deposit.State), + } + + var ( + txHash = deposit.Hash[:] + outIndex = sql.NullInt32{ + Int32: int32(deposit.Index), + Valid: true, + } + confirmationHeight = sql.NullInt64{ + Int64: deposit.ConfirmationHeight, + Valid: deposit.ConfirmationHeight != 0, + } + ) + + updateArgs := sqlc.UpdateDepositParams{ + DepositID: deposit.ID[:], + TxHash: txHash, + OutIndex: outIndex.Int32, + ConfirmationHeight: confirmationHeight.Int64, + ExpirySweepTxid: deposit.ExpirySweepTxid[:], + } + + return s.baseDB.ExecTx(ctx, &loopdb.SqliteTxOptions{}, + func(q *sqlc.Queries) error { + err := q.UpdateDeposit(ctx, updateArgs) + if err != nil { + return err + } + + return q.InsertDepositUpdate(ctx, insertUpdateArgs) + }) +} + +// GetDeposit retrieves the deposit from the database. +func (s *SqlStore) GetDeposit(ctx context.Context, id ID) (*Deposit, error) { + var deposit *Deposit + err := s.baseDB.ExecTx(ctx, loopdb.NewSqlReadOpts(), + func(q *sqlc.Queries) error { + row, err := q.GetDeposit(ctx, id[:]) + if err != nil { + return err + } + + latestUpdate, err := q.GetLatestDepositUpdate( + ctx, id[:], + ) + if err != nil { + return err + } + + deposit, err = s.toDeposit(row, latestUpdate) + if err != nil { + return err + } + + return nil + }) + if err != nil { + return nil, err + } + + return deposit, nil +} + +// AllDeposits retrieves all known deposits to our static address. +func (s *SqlStore) AllDeposits(ctx context.Context) ([]*Deposit, error) { + var allDeposits []*Deposit + + err := s.baseDB.ExecTx(ctx, loopdb.NewSqlReadOpts(), + func(q *sqlc.Queries) error { + var err error + + deposits, err := q.AllDeposits(ctx) + if err != nil { + return err + } + + for _, deposit := range deposits { + latestUpdate, err := q.GetLatestDepositUpdate( + ctx, deposit.DepositID, + ) + if err != nil { + return err + } + + d, err := s.toDeposit(deposit, latestUpdate) + if err != nil { + return err + } + + allDeposits = append(allDeposits, d) + } + + return nil + }) + if err != nil { + return nil, err + } + + return allDeposits, nil +} + +// toDeposit converts an sql deposit to a deposit. +func (s *SqlStore) toDeposit(row sqlc.Deposit, + lastUpdate sqlc.DepositUpdate) (*Deposit, error) { + + id := ID{} + err := id.FromByteSlice(row.DepositID) + if err != nil { + return nil, err + } + + var txHash *chainhash.Hash + if row.TxHash != nil { + txHash, err = chainhash.NewHash(row.TxHash) + if err != nil { + return nil, err + } + } + + var expirySweepTxid chainhash.Hash + if row.ExpirySweepTxid != nil { + hash, err := chainhash.NewHash(row.ExpirySweepTxid) + if err != nil { + return nil, err + } + expirySweepTxid = *hash + } + + return &Deposit{ + ID: id, + state: fsm.StateType(lastUpdate.UpdateState), + OutPoint: wire.OutPoint{ + Hash: *txHash, + Index: uint32(row.OutIndex), + }, + Value: btcutil.Amount(row.Amount), + ConfirmationHeight: row.ConfirmationHeight, + TimeOutSweepPkScript: row.TimeoutSweepPkScript, + ExpirySweepTxid: expirySweepTxid, + }, nil +} + +// Close closes the database connection. +func (s *SqlStore) Close() { + s.baseDB.DB.Close() +} From 24e7b55d271fe7c5e2c4f7c122d3fd591b9eae3c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 7 Mar 2024 17:27:33 +0100 Subject: [PATCH 18/67] staticaddr: deposit logger --- staticaddr/log.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/staticaddr/log.go b/staticaddr/log.go index 53586b346..faa520a2a 100644 --- a/staticaddr/log.go +++ b/staticaddr/log.go @@ -22,3 +22,8 @@ func init() { func UseLogger(logger btclog.Logger) { log = logger } + +// GetLogger returns the logger for this package. +func GetLogger() btclog.Logger { + return log +} From 6d449b5c258ab9d0ade0c94dce36ef605fe1b36d Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 7 Mar 2024 17:28:38 +0100 Subject: [PATCH 19/67] staticaddr: deposit manager and fsm --- staticaddr/{ => address}/manager.go | 106 +++++-- staticaddr/deposit/actions.go | 156 ++++++++++ staticaddr/deposit/deposit.go | 107 +++++++ staticaddr/deposit/fsm.go | 308 ++++++++++++++++++++ staticaddr/deposit/manager.go | 432 ++++++++++++++++++++++++++++ staticaddr/deposit/sql_store.go | 4 +- 6 files changed, 1080 insertions(+), 33 deletions(-) rename staticaddr/{ => address}/manager.go (74%) create mode 100644 staticaddr/deposit/actions.go create mode 100644 staticaddr/deposit/deposit.go create mode 100644 staticaddr/deposit/fsm.go create mode 100644 staticaddr/deposit/manager.go diff --git a/staticaddr/manager.go b/staticaddr/address/manager.go similarity index 74% rename from staticaddr/manager.go rename to staticaddr/address/manager.go index a963c86ec..75dccfb86 100644 --- a/staticaddr/manager.go +++ b/staticaddr/address/manager.go @@ -1,4 +1,4 @@ -package staticaddr +package address import ( "bytes" @@ -10,9 +10,11 @@ import ( "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btclog" "github.com/lightninglabs/lndclient" - "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/staticaddr" "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/staticaddr/version" "github.com/lightninglabs/loop/swap" staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/input" @@ -20,18 +22,26 @@ import ( "github.com/lightningnetwork/lnd/lnwallet" ) +var ( + log btclog.Logger +) + +func init() { + log = staticaddr.GetLogger() +} + // ManagerConfig holds the configuration for the address manager. type ManagerConfig struct { // AddressClient is the client that communicates with the loop server // to manage static addresses. AddressClient staticaddressrpc.StaticAddressServerClient - // SwapClient provides loop rpc functionality. - SwapClient *loop.Client + // FetchL402 is the function used to fetch the l402 token. + FetchL402 func(context.Context) error // Store is the database store that is used to store static address // related records. - Store AddressStore + Store Store // WalletKit is the wallet client that is used to derive new keys from // lnd's wallet. @@ -46,30 +56,19 @@ type ManagerConfig struct { type Manager struct { cfg *ManagerConfig - initChan chan struct{} - sync.Mutex } -// NewAddressManager creates a new address manager. -func NewAddressManager(cfg *ManagerConfig) *Manager { +// NewManager creates a new address manager. +func NewManager(cfg *ManagerConfig) *Manager { return &Manager{ - cfg: cfg, - initChan: make(chan struct{}), + cfg: cfg, } } // Run runs the address manager. func (m *Manager) Run(ctx context.Context) error { - log.Debugf("Starting address manager.") - defer log.Debugf("Address manager stopped.") - - // Communicate to the caller that the address manager has completed its - // initialization. - close(m.initChan) - <-ctx.Done() - return nil } @@ -99,7 +98,7 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, // We are fetching a new L402 token from the server. There is one static // address per L402 token allowed. - err = m.cfg.SwapClient.Server.FetchL402(ctx) + err = m.cfg.FetchL402(ctx) if err != nil { return nil, err } @@ -113,7 +112,7 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, // Send our clientPubKey to the server and wait for the server to // respond with he serverPubKey and the static address CSV expiry. - protocolVersion := CurrentRPCProtocolVersion() + protocolVersion := version.CurrentRPCProtocolVersion() resp, err := m.cfg.AddressClient.ServerNewAddress( ctx, &staticaddressrpc.ServerNewAddressRequest{ ProtocolVersion: protocolVersion, @@ -146,7 +145,7 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, // Create the static address from the parameters the server provided and // store all parameters in the database. - addrParams := &AddressParameters{ + addrParams := &Parameters{ ClientPubkey: clientPubKey.PubKey, ServerPubkey: serverPubKey, PkScript: pkScript, @@ -155,7 +154,9 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, Family: clientPubKey.Family, Index: clientPubKey.Index, }, - ProtocolVersion: AddressProtocolVersion(protocolVersion), + ProtocolVersion: version.AddressProtocolVersion( + protocolVersion, + ), } err = m.cfg.Store.CreateStaticAddress(ctx, addrParams) if err != nil { @@ -172,7 +173,7 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, return nil, err } - log.Infof("imported static address taproot script to lnd wallet: %v", + log.Infof("Imported static address taproot script to lnd wallet: %v", addr) return m.getTaprootAddress( @@ -197,12 +198,6 @@ func (m *Manager) getTaprootAddress(clientPubkey, ) } -// WaitInitComplete waits until the address manager has completed its setup. -func (m *Manager) WaitInitComplete() { - defer log.Debugf("Address manager initiation complete.") - <-m.initChan -} - // ListUnspentRaw returns a list of utxos at the static address. func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs, maxConfs int32) (*btcutil.AddressTaproot, []*lnwallet.Utxo, error) { @@ -213,7 +208,7 @@ func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs, return nil, nil, err case len(addresses) == 0: - return nil, nil, fmt.Errorf("no address found") + return nil, nil, nil case len(addresses) > 1: return nil, nil, fmt.Errorf("more than one address found") @@ -249,3 +244,52 @@ func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs, return taprootAddress, filteredUtxos, nil } + +// GetStaticAddressParameters returns the parameters of the static address. +func (m *Manager) GetStaticAddressParameters(ctx context.Context) (*Parameters, + error) { + + params, err := m.cfg.Store.GetAllStaticAddresses(ctx) + if err != nil { + return nil, err + } + + if len(params) == 0 { + return nil, fmt.Errorf("no static address parameters found") + } + + return params[0], nil +} + +// GetStaticAddress returns a taproot address for the given client and server +// public keys and expiry. +func (m *Manager) GetStaticAddress(ctx context.Context) (*script.StaticAddress, + error) { + + params, err := m.GetStaticAddressParameters(ctx) + if err != nil { + return nil, err + } + + address, err := script.NewStaticAddress( + input.MuSig2Version100RC2, int64(params.Expiry), + params.ClientPubkey, params.ServerPubkey, + ) + if err != nil { + return nil, err + } + + return address, nil +} + +// ListUnspent returns a list of utxos at the static address. +func (m *Manager) ListUnspent(ctx context.Context, minConfs, + maxConfs int32) ([]*lnwallet.Utxo, error) { + + _, utxos, err := m.ListUnspentRaw(ctx, minConfs, maxConfs) + if err != nil { + return nil, err + } + + return utxos, nil +} diff --git a/staticaddr/deposit/actions.go b/staticaddr/deposit/actions.go new file mode 100644 index 000000000..91b54c554 --- /dev/null +++ b/staticaddr/deposit/actions.go @@ -0,0 +1,156 @@ +package deposit + +import ( + "context" + "errors" + "fmt" + "strings" + + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightningnetwork/lnd/lntypes" +) + +const ( + defaultConfTarget = 3 +) + +// PublishDepositExpirySweepAction creates and publishes the timeout transaction +// that spends the deposit from the static address timeout leaf to the +// predefined timeout sweep pkscript. +func (f *FSM) PublishDepositExpirySweepAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + msgTx := wire.NewMsgTx(2) + + params, err := f.cfg.AddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return fsm.OnError + } + + // Add the deposit outpoint as input to the transaction. + msgTx.AddTxIn(&wire.TxIn{ + PreviousOutPoint: f.deposit.OutPoint, + Sequence: params.Expiry, + SignatureScript: nil, + }) + + // Estimate the fee rate of an expiry spend transaction. + feeRateEstimator, err := f.cfg.WalletKit.EstimateFeeRate( + ctx, defaultConfTarget, + ) + if err != nil { + return f.HandleError(fmt.Errorf("timeout sweep fee "+ + "estimation failed: %v", err)) + } + + weight := script.ExpirySpendWeight() + + fee := feeRateEstimator.FeeForWeight(lntypes.WeightUnit(weight)) + + // We cap the fee at 20% of the deposit value. + if fee > f.deposit.Value/5 { + return f.HandleError(errors.New("fee is greater than 20% of " + + "the deposit value")) + } + + output := &wire.TxOut{ + Value: int64(f.deposit.Value - fee), + PkScript: f.deposit.TimeOutSweepPkScript, + } + msgTx.AddTxOut(output) + + txOut := &wire.TxOut{ + Value: int64(f.deposit.Value), + PkScript: params.PkScript, + } + + prevOut := []*wire.TxOut{txOut} + + signDesc, err := f.SignDescriptor(ctx) + if err != nil { + return f.HandleError(err) + } + + rawSigs, err := f.cfg.Signer.SignOutputRaw( + ctx, msgTx, []*lndclient.SignDescriptor{signDesc}, prevOut, + ) + if err != nil { + return f.HandleError(err) + } + + address, err := f.cfg.AddressManager.GetStaticAddress(ctx) + if err != nil { + return f.HandleError(err) + } + + sig := rawSigs[0] + msgTx.TxIn[0].Witness, err = address.GenTimeoutWitness(sig) + if err != nil { + return f.HandleError(err) + } + + txLabel := fmt.Sprintf("timeout sweep for deposit %v", + f.deposit.OutPoint) + + err = f.cfg.WalletKit.PublishTransaction(ctx, msgTx, txLabel) + if err != nil { + if !strings.Contains(err.Error(), "output already spent") { + log.Errorf("%v: %v", txLabel, err) + f.LastActionError = err + return fsm.OnError + } + } else { + f.Debugf("published timeout sweep with txid: %v", + msgTx.TxHash()) + } + + return OnExpiryPublished +} + +// WaitForExpirySweepAction waits for a sufficient number of confirmations +// before a timeout sweep is considered successful. +func (f *FSM) WaitForExpirySweepAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + spendChan, errSpendChan, err := f.cfg.ChainNotifier.RegisterConfirmationsNtfn( //nolint:lll + ctx, nil, f.deposit.TimeOutSweepPkScript, defaultConfTarget, + int32(f.deposit.ConfirmationHeight), + ) + if err != nil { + return f.HandleError(err) + } + + select { + case err := <-errSpendChan: + log.Debugf("error while sweeping expired deposit: %v", err) + return fsm.OnError + + case confirmedTx := <-spendChan: + f.deposit.ExpirySweepTxid = confirmedTx.Tx.TxHash() + return OnExpirySwept + + case <-ctx.Done(): + return fsm.OnError + } +} + +// SweptExpiredDepositAction is the final action of the FSM. It signals to the +// manager that the deposit has been swept and the FSM can be removed. It also +// ends the state machine main loop by cancelling its context. +func (f *FSM) SweptExpiredDepositAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + select { + case <-ctx.Done(): + return fsm.OnError + + default: + f.finalizedDepositChan <- f.deposit.OutPoint + ctx.Done() + } + + return fsm.NoOp +} diff --git a/staticaddr/deposit/deposit.go b/staticaddr/deposit/deposit.go new file mode 100644 index 000000000..d2bda01f2 --- /dev/null +++ b/staticaddr/deposit/deposit.go @@ -0,0 +1,107 @@ +package deposit + +import ( + "crypto/rand" + "fmt" + "sync" + + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/loop/fsm" +) + +// ID is a unique identifier for a deposit. +type ID [IdLength]byte + +// FromByteSlice creates a deposit id from a byte slice. +func (r *ID) FromByteSlice(b []byte) error { + if len(b) != IdLength { + return fmt.Errorf("deposit id must be 32 bytes, got %d, %x", + len(b), b) + } + + copy(r[:], b) + + return nil +} + +// Deposit bundles an utxo at a static address together with manager-relevant +// data. +type Deposit struct { + // ID is the unique identifier of the deposit. + ID ID + + // state is the current state of the deposit. + state fsm.StateType + + // The outpoint of the deposit. + wire.OutPoint + + // Value is the amount of the deposit. + Value btcutil.Amount + + // ConfirmationHeight is the absolute height at which the deposit was + // first confirmed. + ConfirmationHeight int64 + + // TimeOutSweepPkScript is the pk script that is used to sweep the + // deposit to after it is expired. + TimeOutSweepPkScript []byte + + // ExpirySweepTxid is the transaction id of the expiry sweep. + ExpirySweepTxid chainhash.Hash + + sync.Mutex +} + +// IsInPendingState returns true if the deposit is pending. +func (d *Deposit) IsInPendingState() bool { + d.Lock() + defer d.Unlock() + + return !d.IsInFinalState() +} + +// IsInFinalState returns true if the deposit is final. +func (d *Deposit) IsInFinalState() bool { + d.Lock() + defer d.Unlock() + + return d.state == Expired || d.state == Failed +} + +func (d *Deposit) isExpired(currentHeight, expiry uint32) bool { + d.Lock() + defer d.Unlock() + + return currentHeight >= uint32(d.ConfirmationHeight)+expiry +} + +func (d *Deposit) getState() fsm.StateType { + d.Lock() + defer d.Unlock() + + return d.state +} + +func (d *Deposit) setState(state fsm.StateType) { + d.Lock() + defer d.Unlock() + + d.state = state +} + +func (d *Deposit) isInState(state fsm.StateType) bool { + d.Lock() + defer d.Unlock() + + return d.state == state +} + +// GetRandomDepositID generates a random deposit ID. +func GetRandomDepositID() (ID, error) { + var id ID + _, err := rand.Read(id[:]) + return id, err +} diff --git a/staticaddr/deposit/fsm.go b/staticaddr/deposit/fsm.go new file mode 100644 index 000000000..89d2222c4 --- /dev/null +++ b/staticaddr/deposit/fsm.go @@ -0,0 +1,308 @@ +package deposit + +import ( + "context" + "errors" + "fmt" + + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/staticaddr/version" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/keychain" +) + +const ( + DefaultObserverSize = 20 +) + +var ( + ErrProtocolVersionNotSupported = errors.New("protocol version not " + + "supported") +) + +// States. +var ( + Deposited = fsm.StateType("Deposited") + + PublishExpiredDeposit = fsm.StateType("PublishExpiredDeposit") + + WaitForExpirySweep = fsm.StateType("WaitForExpirySweep") + + Expired = fsm.StateType("Expired") + + Failed = fsm.StateType("Failed") +) + +// Events. +var ( + OnStart = fsm.EventType("OnStart") + OnExpiry = fsm.EventType("OnExpiry") + OnExpiryPublished = fsm.EventType("OnExpiryPublished") + OnExpirySwept = fsm.EventType("OnExpirySwept") + OnRecover = fsm.EventType("OnRecover") +) + +// FSM is the state machine that handles the instant out. +type FSM struct { + *fsm.StateMachine + + cfg *ManagerConfig + + deposit *Deposit + + params *address.Parameters + + address *script.StaticAddress + + blockNtfnChan chan uint32 + + finalizedDepositChan chan wire.OutPoint +} + +// NewFSM creates a new state machine that can action on all static address +// feature requests. +func NewFSM(ctx context.Context, deposit *Deposit, cfg *ManagerConfig, + finalizedDepositChan chan wire.OutPoint, + recoverStateMachine bool) (*FSM, error) { + + params, err := cfg.AddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return nil, fmt.Errorf("unable to get static address "+ + "parameters: %v", err) + } + + address, err := cfg.AddressManager.GetStaticAddress(ctx) + if err != nil { + return nil, fmt.Errorf("unable to get static address: %v", err) + } + + depoFsm := &FSM{ + cfg: cfg, + deposit: deposit, + params: params, + address: address, + blockNtfnChan: make(chan uint32), + finalizedDepositChan: finalizedDepositChan, + } + + depositStates := depoFsm.DepositStatesV0() + switch params.ProtocolVersion { + case version.ProtocolVersion_V0: + + default: + return nil, ErrProtocolVersionNotSupported + } + + if recoverStateMachine { + depoFsm.StateMachine = fsm.NewStateMachineWithState( + depositStates, deposit.getState(), + DefaultObserverSize, + ) + } else { + depoFsm.StateMachine = fsm.NewStateMachine( + depositStates, DefaultObserverSize, + ) + } + + depoFsm.ActionEntryFunc = depoFsm.updateDeposit + + go func() { + for { + select { + case currentHeight := <-depoFsm.blockNtfnChan: + err := depoFsm.handleBlockNotification( + ctx, currentHeight, + ) + if err != nil { + log.Errorf("error handling block "+ + "notification: %v", err) + } + + case <-ctx.Done(): + return + } + } + }() + + return depoFsm, nil +} + +// handleBlockNotification inspects the current block height and sends the +// OnExpiry event to publish the expiry sweep transaction if the deposit timed +// out, or it republishes the expiry sweep transaction if it was not yet swept. +func (f *FSM) handleBlockNotification(ctx context.Context, + currentHeight uint32) error { + + params, err := f.cfg.AddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return err + } + + // If the deposit is expired but not yet sufficiently confirmed, we + // republish the expiry sweep transaction. + if f.deposit.isExpired(currentHeight, params.Expiry) { + if f.deposit.isInState(WaitForExpirySweep) { + f.PublishDepositExpirySweepAction(ctx, nil) + } else { + go func() { + err := f.SendEvent(ctx, OnExpiry, nil) + if err != nil { + log.Debugf("error sending OnExpiry "+ + "event: %v", err) + } + }() + } + } + + return nil +} + +// DepositStatesV0 returns the states a deposit can be in. +func (f *FSM) DepositStatesV0() fsm.States { + return fsm.States{ + fsm.EmptyState: fsm.State{ + Transitions: fsm.Transitions{ + OnStart: Deposited, + }, + Action: fsm.NoOpAction, + }, + Deposited: fsm.State{ + Transitions: fsm.Transitions{ + OnExpiry: PublishExpiredDeposit, + OnRecover: Deposited, + }, + Action: fsm.NoOpAction, + }, + PublishExpiredDeposit: fsm.State{ + Transitions: fsm.Transitions{ + OnRecover: PublishExpiredDeposit, + OnExpiryPublished: WaitForExpirySweep, + // If the timeout sweep failed we go back to + // Deposited, hoping that another timeout sweep + // attempt will be successful. Alternatively, + // the client can try to coop-spend the deposit. + fsm.OnError: Deposited, + }, + Action: f.PublishDepositExpirySweepAction, + }, + WaitForExpirySweep: fsm.State{ + Transitions: fsm.Transitions{ + OnExpirySwept: Expired, + // Upon recovery, we republish the sweep tx. + OnRecover: PublishExpiredDeposit, + // If the timeout sweep failed we go back to + // Deposited, hoping that another timeout sweep + // attempt will be successful. Alternatively, + // the client can try to coop-spend the deposit. + fsm.OnError: Deposited, + }, + Action: f.WaitForExpirySweepAction, + }, + Expired: fsm.State{ + Transitions: fsm.Transitions{ + OnExpiry: Expired, + }, + Action: f.SweptExpiredDepositAction, + }, + Failed: fsm.State{ + Transitions: fsm.Transitions{ + OnExpiry: Failed, + }, + Action: fsm.NoOpAction, + }, + } +} + +// DepositEntryFunction is called after every action and updates the deposit in +// the db. +func (f *FSM) updateDeposit(ctx context.Context, + notification fsm.Notification) { + + if f.deposit == nil { + return + } + + f.Debugf("NextState: %v, PreviousState: %v, Event: %v", + notification.NextState, notification.PreviousState, + notification.Event, + ) + + f.deposit.setState(notification.NextState) + + // Don't update the deposit if we are in an initial state or if we + // are transitioning from an initial state to a failed state. + d := f.deposit + if d.isInState(fsm.EmptyState) || d.isInState(Deposited) || + (notification.PreviousState == Deposited && d.isInState( + Failed, + )) { + + return + } + + err := f.cfg.Store.UpdateDeposit(ctx, f.deposit) + if err != nil { + f.Errorf("unable to update deposit: %v", err) + } +} + +// Infof logs an info message with the deposit outpoint. +func (f *FSM) Infof(format string, args ...interface{}) { + log.Infof( + "Deposit %v: "+format, + append( + []interface{}{f.deposit.OutPoint}, + args..., + )..., + ) +} + +// Debugf logs a debug message with the deposit outpoint. +func (f *FSM) Debugf(format string, args ...interface{}) { + log.Debugf( + "Deposit %v: "+format, + append( + []interface{}{f.deposit.OutPoint}, + args..., + )..., + ) +} + +// Errorf logs an error message with the deposit outpoint. +func (f *FSM) Errorf(format string, args ...interface{}) { + log.Errorf( + "Deposit %v: "+format, + append( + []interface{}{f.deposit.OutPoint}, + args..., + )..., + ) +} + +// SignDescriptor returns the sign descriptor for the static address output. +func (f *FSM) SignDescriptor(ctx context.Context) (*lndclient.SignDescriptor, + error) { + + address, err := f.cfg.AddressManager.GetStaticAddress(ctx) + if err != nil { + return nil, err + } + + return &lndclient.SignDescriptor{ + WitnessScript: address.TimeoutLeaf.Script, + KeyDesc: keychain.KeyDescriptor{ + PubKey: f.params.ClientPubkey, + }, + Output: wire.NewTxOut( + int64(f.deposit.Value), f.params.PkScript, + ), + HashType: txscript.SigHashDefault, + InputIndex: 0, + SignMethod: input.TaprootScriptSpendSignMethod, + }, nil +} diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go new file mode 100644 index 000000000..ef4819802 --- /dev/null +++ b/staticaddr/deposit/manager.go @@ -0,0 +1,432 @@ +package deposit + +import ( + "context" + "fmt" + "sync" + "time" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/btcsuite/btclog" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/staticaddr" + staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightningnetwork/lnd/lnrpc/walletrpc" + "github.com/lightningnetwork/lnd/lnwallet" +) + +const ( + // PollInterval is the interval in which we poll for new deposits to our + // static address. + PollInterval = 10 * time.Second + + // MinConfs is the minimum number of confirmations we require for a + // deposit to be considered available for loop-ins, coop-spends and + // timeouts. + MinConfs = 3 + + // MaxConfs is unset since we don't require a max number of + // confirmations for deposits. + MaxConfs = 0 +) + +var ( + log btclog.Logger +) + +func init() { + log = staticaddr.GetLogger() +} + +// ManagerConfig holds the configuration for the address manager. +type ManagerConfig struct { + // AddressClient is the client that communicates with the loop server + // to manage static addresses. + AddressClient staticaddressrpc.StaticAddressServerClient + + // AddressManager is the address manager that is used to fetch static + // address parameters. + AddressManager AddressManager + + // SwapClient provides loop rpc functionality. + SwapClient *loop.Client + + // Store is the database store that is used to store static address + // related records. + Store Store + + // WalletKit is the wallet client that is used to derive new keys from + // lnd's wallet. + WalletKit lndclient.WalletKitClient + + // ChainParams is the chain configuration(mainnet, testnet...) this + // manager uses. + ChainParams *chaincfg.Params + + // ChainNotifier is the chain notifier that is used to listen for new + // blocks. + ChainNotifier lndclient.ChainNotifierClient + + // Signer is the signer client that is used to sign transactions. + Signer lndclient.SignerClient +} + +// Manager manages the address state machines. +type Manager struct { + cfg *ManagerConfig + + runCtx context.Context + + sync.Mutex + + // initChan signals the daemon that the address manager has completed + // its initialization. + initChan chan struct{} + + // activeDeposits contains all the active static address outputs. + activeDeposits map[wire.OutPoint]*FSM + + // initiationHeight stores the currently best known block height. + initiationHeight uint32 + + // currentHeight stores the currently best known block height. + currentHeight uint32 + + // deposits contains all the deposits that have ever been made to the + // static address. This field is used to store and recover deposits. It + // also serves as basis for reconciliation of newly detected deposits by + // matching them against deposits in this map that were already seen. + deposits map[wire.OutPoint]*Deposit + + // finalizedDepositChan is a channel that receives deposits that have + // been finalized. The manager will adjust its internal state and flush + // finalized deposits from its memory. + finalizedDepositChan chan wire.OutPoint +} + +// NewManager creates a new deposit manager. +func NewManager(cfg *ManagerConfig) *Manager { + return &Manager{ + cfg: cfg, + initChan: make(chan struct{}), + activeDeposits: make(map[wire.OutPoint]*FSM), + deposits: make(map[wire.OutPoint]*Deposit), + finalizedDepositChan: make(chan wire.OutPoint), + } +} + +// Run runs the address manager. +func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { + m.runCtx = ctx + + m.Lock() + m.currentHeight, m.initiationHeight = currentHeight, currentHeight + m.Unlock() + + newBlockChan, newBlockErrChan, err := m.cfg.ChainNotifier.RegisterBlockEpochNtfn(m.runCtx) //nolint:lll + if err != nil { + return err + } + + // Recover previous deposits and static address parameters from the DB. + err = m.recover(m.runCtx) + if err != nil { + return err + } + + // Start the deposit notifier. + m.pollDeposits(ctx) + + // Communicate to the caller that the address manager has completed its + // initialization. + close(m.initChan) + + for { + select { + case height := <-newBlockChan: + m.Lock() + m.currentHeight = uint32(height) + m.Unlock() + + // Inform all active deposits about a new block arrival. + for _, fsm := range m.activeDeposits { + select { + case fsm.blockNtfnChan <- uint32(height): + + case <-m.runCtx.Done(): + return m.runCtx.Err() + } + } + case outpoint := <-m.finalizedDepositChan: + // If deposits notify us about their finalization, we + // update the manager's internal state and flush the + // finalized deposit from memory. + m.finalizeDeposit(outpoint) + + case err := <-newBlockErrChan: + return err + + case <-m.runCtx.Done(): + return m.runCtx.Err() + } + } +} + +// recover recovers static address parameters, previous deposits and state +// machines from the database and starts the deposit notifier. +func (m *Manager) recover(ctx context.Context) error { + log.Infof("Recovering static address parameters and deposits...") + + // Recover deposits. + deposits, err := m.cfg.Store.AllDeposits(ctx) + if err != nil { + return err + } + + for i, d := range deposits { + m.deposits[d.OutPoint] = deposits[i] + + // If the current deposit is final it wasn't active when we + // shut down the client last. So we don't need to start a fsm + // for it. + if d.IsInFinalState() { + continue + } + + log.Debugf("Recovering deposit %x", d.ID) + + // Create a state machine for a given deposit. + fsm, err := NewFSM( + m.runCtx, d, m.cfg, + m.finalizedDepositChan, true, + ) + if err != nil { + return err + } + + // Send the OnRecover event to the state machine. + go func() { + err = fsm.SendEvent(ctx, OnRecover, nil) + if err != nil { + log.Errorf("Error sending OnStart event: %v", + err) + } + }() + + m.activeDeposits[d.OutPoint] = fsm + } + + return nil +} + +// WaitInitComplete waits until the address manager has completed its setup. +func (m *Manager) WaitInitComplete() { + defer log.Debugf("Static address deposit manager initiation complete.") + <-m.initChan +} + +// pollDeposits polls new deposits to our static address and notifies the +// manager's event loop about them. +func (m *Manager) pollDeposits(ctx context.Context) { + log.Debugf("Waiting for new static address deposits...") + + go func() { + ticker := time.NewTicker(PollInterval) + defer ticker.Stop() + for { + select { + case <-ticker.C: + err := m.reconcileDeposits(ctx) + if err != nil { + log.Errorf("unable to reconcile "+ + "deposits: %v", err) + } + + case <-ctx.Done(): + return + } + } + }() +} + +// reconcileDeposits fetches all spends to our static address from our lnd +// wallet and matches it against the deposits in our memory that we've seen so +// far. It picks the newly identified deposits and starts a state machine per +// deposit to track its progress. +func (m *Manager) reconcileDeposits(ctx context.Context) error { + log.Tracef("Reconciling new deposits...") + + utxos, err := m.cfg.AddressManager.ListUnspent( + ctx, MinConfs, MaxConfs, + ) + if err != nil { + return fmt.Errorf("unable to list new deposits: %v", err) + } + + newDeposits := m.filterNewDeposits(utxos) + if err != nil { + return fmt.Errorf("unable to filter new deposits: %v", err) + } + + if len(newDeposits) == 0 { + log.Tracef("No new deposits...") + return nil + } + + for _, utxo := range newDeposits { + deposit, err := m.createNewDeposit(ctx, utxo) + if err != nil { + return fmt.Errorf("unable to retain new deposit: %v", + err) + } + + log.Debugf("Received deposit: %v", deposit) + err = m.startDepositFsm(deposit) + if err != nil { + return fmt.Errorf("unable to start new deposit FSM: %v", + err) + } + } + + return nil +} + +// createNewDeposit transforms the wallet utxo into a deposit struct and stores +// it in our database and manager memory. +func (m *Manager) createNewDeposit(ctx context.Context, + utxo *lnwallet.Utxo) (*Deposit, error) { + + blockHeight, err := m.getBlockHeight(ctx, utxo) + if err != nil { + return nil, err + } + + // Get the sweep pk script. + addr, err := m.cfg.WalletKit.NextAddr( + ctx, lnwallet.DefaultAccountName, + walletrpc.AddressType_TAPROOT_PUBKEY, false, + ) + if err != nil { + return nil, err + } + + timeoutSweepPkScript, err := txscript.PayToAddrScript(addr) + if err != nil { + return nil, err + } + + id, err := GetRandomDepositID() + if err != nil { + return nil, err + } + deposit := &Deposit{ + ID: id, + state: Deposited, + OutPoint: utxo.OutPoint, + Value: utxo.Value, + ConfirmationHeight: int64(blockHeight), + TimeOutSweepPkScript: timeoutSweepPkScript, + } + + err = m.cfg.Store.CreateDeposit(ctx, deposit) + if err != nil { + return nil, err + } + + m.Lock() + m.deposits[deposit.OutPoint] = deposit + m.Unlock() + + return deposit, nil +} + +// getBlockHeight retrieves the block height of a given utxo. +func (m *Manager) getBlockHeight(ctx context.Context, + utxo *lnwallet.Utxo) (uint32, error) { + + addressParams, err := m.cfg.AddressManager.GetStaticAddressParameters( + ctx, + ) + if err != nil { + return 0, fmt.Errorf("couldn't get confirmation height for "+ + "deposit, %v", err) + } + + notifChan, errChan, err := m.cfg.ChainNotifier.RegisterConfirmationsNtfn( //nolint:lll + ctx, &utxo.OutPoint.Hash, addressParams.PkScript, MinConfs, + int32(m.initiationHeight), + ) + if err != nil { + return 0, err + } + + select { + case tx := <-notifChan: + return tx.BlockHeight, nil + + case err := <-errChan: + return 0, err + + case <-ctx.Done(): + return 0, ctx.Err() + } +} + +// filterNewDeposits filters the given utxos for new deposits that we haven't +// seen before. +func (m *Manager) filterNewDeposits(utxos []*lnwallet.Utxo) []*lnwallet.Utxo { + m.Lock() + defer m.Unlock() + + var newDeposits []*lnwallet.Utxo + for _, utxo := range utxos { + _, ok := m.deposits[utxo.OutPoint] + if !ok { + newDeposits = append(newDeposits, utxo) + } + } + + return newDeposits +} + +// startDepositFsm creates a new state machine flow from the latest deposit to +// our static address. +func (m *Manager) startDepositFsm(deposit *Deposit) error { + // Create a state machine for a given deposit. + fsm, err := NewFSM( + m.runCtx, deposit, m.cfg, m.finalizedDepositChan, false, + ) + if err != nil { + return err + } + + // Send the start event to the state machine. + go func() { + err = fsm.SendEvent(m.runCtx, OnStart, nil) + if err != nil { + log.Errorf("Error sending OnStart event: %v", err) + } + }() + + err = fsm.DefaultObserver.WaitForState(m.runCtx, time.Minute, Deposited) + if err != nil { + return err + } + + // Add the FSM to the active FSMs map. + m.Lock() + m.activeDeposits[deposit.OutPoint] = fsm + m.Unlock() + + return nil +} + +func (m *Manager) finalizeDeposit(outpoint wire.OutPoint) { + m.Lock() + delete(m.activeDeposits, outpoint) + delete(m.deposits, outpoint) + m.Unlock() +} diff --git a/staticaddr/deposit/sql_store.go b/staticaddr/deposit/sql_store.go index e50f4789d..f746ee7fc 100644 --- a/staticaddr/deposit/sql_store.go +++ b/staticaddr/deposit/sql_store.go @@ -44,7 +44,7 @@ func (s *SqlStore) CreateDeposit(ctx context.Context, deposit *Deposit) error { updateArgs := sqlc.InsertDepositUpdateParams{ DepositID: deposit.ID[:], UpdateTimestamp: s.clock.Now().UTC(), - UpdateState: string(deposit.State), + UpdateState: string(deposit.getState()), } return s.baseDB.ExecTx(ctx, &loopdb.SqliteTxOptions{}, @@ -63,7 +63,7 @@ func (s *SqlStore) UpdateDeposit(ctx context.Context, deposit *Deposit) error { insertUpdateArgs := sqlc.InsertDepositUpdateParams{ DepositID: deposit.ID[:], UpdateTimestamp: s.clock.Now().UTC(), - UpdateState: string(deposit.State), + UpdateState: string(deposit.getState()), } var ( From 909ec2711a0787eb4a68f5d8fbd9658c31121046 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 7 Mar 2024 18:25:31 +0100 Subject: [PATCH 20/67] staticaddr: deposits for server and daemon --- loopd/daemon.go | 134 +++++++++++++++++++++++-------------- loopd/perms/perms.go | 4 +- loopd/swapclient_server.go | 75 +++++++++++++++++---- staticaddr/server.go | 70 ------------------- 4 files changed, 147 insertions(+), 136 deletions(-) delete mode 100644 staticaddr/server.go diff --git a/loopd/daemon.go b/loopd/daemon.go index 492164d17..0749aab18 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -22,7 +22,8 @@ import ( "github.com/lightninglabs/loop/loopdb" loop_looprpc "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/notifications" - "github.com/lightninglabs/loop/staticaddr" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/deposit" loop_swaprpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/sweepbatcher" "github.com/lightningnetwork/lnd/clock" @@ -69,12 +70,6 @@ type Daemon struct { // same process. swapClientServer - // AddressServer is the embedded RPC server that satisfies the - // static address client RPC interface. We embed this struct so the - // Daemon itself can be registered to an existing grpc.Server to run as - // a subserver in the same process. - *staticaddr.AddressServer - // ErrChan is an error channel that users of the Daemon struct must use // to detect runtime errors and also whether a shutdown is fully // completed. @@ -240,7 +235,6 @@ func (d *Daemon) startWebServers() error { grpc.StreamInterceptor(streamInterceptor), ) loop_looprpc.RegisterSwapClientServer(d.grpcServer, d) - loop_looprpc.RegisterStaticAddressClientServer(d.grpcServer, d) // Register our debug server if it is compiled in. d.registerDebugServer() @@ -423,7 +417,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { return err } - // Run the costs migration. + // Run the cost migration. err = loop.MigrateLoopOutCosts( d.mainCtx, d.lnd.LndServices, d.cfg.MigrationRPCBatchSize, swapDb, @@ -458,6 +452,11 @@ func (d *Daemon) initialize(withMacaroonService bool) error { swapClient.Conn, ) + // Create a static address server client. + staticAddressClient := loop_swaprpc.NewStaticAddressServerClient( + swapClient.Conn, + ) + // Both the client RPC server and the swap server client should stop // on main context cancel. So we create it early and pass it down. d.mainCtx, d.mainCtxCancel = context.WithCancel(context.Background()) @@ -537,6 +536,9 @@ func (d *Daemon) initialize(withMacaroonService bool) error { var ( reservationManager *reservation.Manager instantOutManager *instantout.Manager + + staticAddressManager *address.Manager + depositManager *deposit.Manager ) // Create the reservation and instantout managers. @@ -577,43 +579,50 @@ func (d *Daemon) initialize(withMacaroonService bool) error { instantOutManager = instantout.NewInstantOutManager( instantOutConfig, ) + + // Static address manager setup. + staticAddressStore := address.NewSqlStore(baseDb) + addrCfg := &address.ManagerConfig{ + AddressClient: staticAddressClient, + FetchL402: swapClient.Server.FetchL402, + Store: staticAddressStore, + WalletKit: d.lnd.WalletKit, + ChainParams: d.lnd.ChainParams, + } + staticAddressManager = address.NewManager(addrCfg) + + // Static address deposit manager setup. + depositStore := deposit.NewSqlStore(baseDb) + depoCfg := &deposit.ManagerConfig{ + AddressClient: staticAddressClient, + AddressManager: staticAddressManager, + SwapClient: swapClient, + Store: depositStore, + WalletKit: d.lnd.WalletKit, + ChainParams: d.lnd.ChainParams, + ChainNotifier: d.lnd.ChainNotifier, + Signer: d.lnd.Signer, + } + depositManager = deposit.NewManager(depoCfg) } // Now finally fully initialize the swap client RPC server instance. d.swapClientServer = swapClientServer{ - config: d.cfg, - network: lndclient.Network(d.cfg.Network), - impl: swapClient, - liquidityMgr: getLiquidityManager(swapClient), - lnd: &d.lnd.LndServices, - swaps: make(map[lntypes.Hash]loop.SwapInfo), - subscribers: make(map[int]chan<- interface{}), - statusChan: make(chan loop.SwapInfo), - mainCtx: d.mainCtx, - reservationManager: reservationManager, - instantOutManager: instantOutManager, + config: d.cfg, + network: lndclient.Network(d.cfg.Network), + impl: swapClient, + liquidityMgr: getLiquidityManager(swapClient), + lnd: &d.lnd.LndServices, + swaps: make(map[lntypes.Hash]loop.SwapInfo), + subscribers: make(map[int]chan<- interface{}), + statusChan: make(chan loop.SwapInfo), + mainCtx: d.mainCtx, + reservationManager: reservationManager, + instantOutManager: instantOutManager, + staticAddressManager: staticAddressManager, + depositManager: depositManager, } - // Create a static address server client. - staticAddressClient := loop_swaprpc.NewStaticAddressServerClient( - swapClient.Conn, - ) - - store := staticaddr.NewSqlStore(baseDb) - - cfg := &staticaddr.ManagerConfig{ - AddressClient: staticAddressClient, - SwapClient: swapClient, - Store: store, - WalletKit: d.lnd.WalletKit, - ChainParams: d.lnd.ChainParams, - } - staticAddressManager := staticaddr.NewAddressManager(cfg) - - d.AddressServer = staticaddr.NewAddressServer( - staticAddressClient, staticAddressManager, - ) - // Retrieve all currently existing swaps from the database. swapsList, err := d.impl.FetchSwaps(d.mainCtx) if err != nil { @@ -757,20 +766,43 @@ func (d *Daemon) initialize(withMacaroonService bool) error { } // Start the static address manager. - d.wg.Add(1) - go func() { - defer d.wg.Done() + if staticAddressManager != nil { + d.wg.Add(1) + go func() { + defer d.wg.Done() - log.Info("Starting static address manager...") - err = staticAddressManager.Run(d.mainCtx) - if err != nil && !errors.Is(context.Canceled, err) { - d.internalErrChan <- err - } + log.Info("Starting static address manager...") + err = staticAddressManager.Run(d.mainCtx) + if err != nil && !errors.Is(context.Canceled, err) { + d.internalErrChan <- err + } + log.Info("Static address manager stopped") + }() + } - log.Info("Static address manager stopped") - }() + // Start the static address deposit manager. + if depositManager != nil { + d.wg.Add(1) + go func() { + defer d.wg.Done() - staticAddressManager.WaitInitComplete() + // Lnd's GetInfo call supplies us with the current block + // height. + info, err := d.lnd.Client.GetInfo(d.mainCtx) + if err != nil { + d.internalErrChan <- err + return + } + + log.Info("Starting static address deposit manager...") + err = depositManager.Run(d.mainCtx, info.BlockHeight) + if err != nil && !errors.Is(context.Canceled, err) { + d.internalErrChan <- err + } + log.Info("Static address deposit manager stopped") + }() + depositManager.WaitInitComplete() + } // Last, start our internal error handler. This will return exactly one // error or nil on the main error channel to inform the caller that diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index 30f69a628..08e40f1cf 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -73,14 +73,14 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "auth", Action: "read", }}, - "/looprpc.StaticAddressClient/NewAddress": {{ + "/looprpc.SwapClient/NewStaticAddress": {{ Entity: "swap", Action: "read", }, { Entity: "loop", Action: "in", }}, - "/looprpc.StaticAddressClient/ListUnspent": {{ + "/looprpc.SwapClient/ListUnspentDeposits": {{ Entity: "swap", Action: "read", }, { diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index b27bf4230..00fd12d18 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -24,6 +24,8 @@ import ( "github.com/lightninglabs/loop/liquidity" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/looprpc" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" @@ -76,19 +78,21 @@ type swapClientServer struct { looprpc.UnimplementedSwapClientServer looprpc.UnimplementedDebugServer - config *Config - network lndclient.Network - impl *loop.Client - liquidityMgr *liquidity.Manager - lnd *lndclient.LndServices - reservationManager *reservation.Manager - instantOutManager *instantout.Manager - swaps map[lntypes.Hash]loop.SwapInfo - subscribers map[int]chan<- interface{} - statusChan chan loop.SwapInfo - nextSubscriberID int - swapsLock sync.Mutex - mainCtx context.Context + config *Config + network lndclient.Network + impl *loop.Client + liquidityMgr *liquidity.Manager + lnd *lndclient.LndServices + reservationManager *reservation.Manager + instantOutManager *instantout.Manager + staticAddressManager *address.Manager + depositManager *deposit.Manager + swaps map[lntypes.Hash]loop.SwapInfo + subscribers map[int]chan<- interface{} + statusChan chan loop.SwapInfo + nextSubscriberID int + swapsLock sync.Mutex + mainCtx context.Context } // LoopOut initiates a loop out swap with the given parameters. The call returns @@ -1314,6 +1318,51 @@ func rpcInstantOut(instantOut *instantout.InstantOut) *looprpc.InstantOut { } } +// NewStaticAddress is the rpc endpoint for loop clients to request a new static +// address. +func (s *swapClientServer) NewStaticAddress(ctx context.Context, + _ *looprpc.NewStaticAddressRequest) ( + *looprpc.NewStaticAddressResponse, error) { + + staticAddress, err := s.staticAddressManager.NewAddress(ctx) + if err != nil { + return nil, err + } + + return &looprpc.NewStaticAddressResponse{ + Address: staticAddress.String(), + }, nil +} + +// ListUnspentDeposits returns a list of utxos behind the static address. +func (s *swapClientServer) ListUnspentDeposits(ctx context.Context, + req *looprpc.ListUnspentDepositsRequest) ( + *looprpc.ListUnspentDepositsResponse, error) { + + // List all unspent utxos the wallet sees, regardless of the number of + // confirmations. + staticAddress, utxos, err := s.staticAddressManager.ListUnspentRaw( + ctx, req.MinConfs, req.MaxConfs, + ) + if err != nil { + return nil, err + } + + // Prepare the list response. + var respUtxos []*looprpc.Utxo + for _, u := range utxos { + utxo := &looprpc.Utxo{ + StaticAddress: staticAddress.String(), + AmountSat: int64(u.Value), + Confirmations: u.Confirmations, + Outpoint: u.OutPoint.String(), + } + respUtxos = append(respUtxos, utxo) + } + + return &looprpc.ListUnspentDepositsResponse{Utxos: respUtxos}, nil +} + func rpcAutoloopReason(reason liquidity.Reason) (looprpc.AutoReason, error) { switch reason { case liquidity.ReasonNone: diff --git a/staticaddr/server.go b/staticaddr/server.go deleted file mode 100644 index a6273ddcb..000000000 --- a/staticaddr/server.go +++ /dev/null @@ -1,70 +0,0 @@ -package staticaddr - -import ( - "context" - - "github.com/lightninglabs/loop/looprpc" - staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" -) - -// AddressServer holds all fields for the address rpc server. -type AddressServer struct { - addressClient staticaddressrpc.StaticAddressServerClient - manager *Manager - looprpc.UnimplementedStaticAddressClientServer -} - -// NewAddressServer creates a new static address server. -func NewAddressServer(addressClient staticaddressrpc.StaticAddressServerClient, - manager *Manager) *AddressServer { - - return &AddressServer{ - addressClient: addressClient, - manager: manager, - } -} - -// NewAddress is the rpc endpoint for loop clients to request a new static -// address. -func (s *AddressServer) NewAddress(ctx context.Context, - _ *looprpc.NewAddressRequest) (*looprpc.NewAddressResponse, error) { - - address, err := s.manager.NewAddress(ctx) - if err != nil { - return nil, err - } - - log.Infof("New static loop-in address: %s\n", address.String()) - - return &looprpc.NewAddressResponse{ - Address: address.String(), - }, nil -} - -// ListUnspent returns a list of utxos behind the static address. -func (s *AddressServer) ListUnspent(ctx context.Context, - req *looprpc.ListUnspentRequest) (*looprpc.ListUnspentResponse, error) { - - // List all unspent utxos the wallet sees, regardless of the number of - // confirmations. - staticAddress, utxos, err := s.manager.ListUnspentRaw( - ctx, req.MinConfs, req.MaxConfs, - ) - if err != nil { - return nil, err - } - - // Prepare the list response. - var respUtxos []*looprpc.Utxo - for _, u := range utxos { - utxo := &looprpc.Utxo{ - StaticAddress: staticAddress.String(), - AmountSat: int64(u.Value), - Confirmations: u.Confirmations, - Outpoint: u.OutPoint.String(), - } - respUtxos = append(respUtxos, utxo) - } - - return &looprpc.ListUnspentResponse{Utxos: respUtxos}, nil -} From 39f77feab6b3025e788eebd8535e508aed2b9f8e Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 7 Mar 2024 18:26:26 +0100 Subject: [PATCH 21/67] staticaddr: add swap client to cmd --- cmd/loop/staticaddr.go | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index c9626bac1..bf1f7fcae 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -39,14 +39,14 @@ func newStaticAddress(ctx *cli.Context) error { return cli.ShowCommandHelp(ctx, "new") } - client, cleanup, err := getAddressClient(ctx) + client, cleanup, err := getClient(ctx) if err != nil { return err } defer cleanup() - resp, err := client.NewAddress( - ctxb, &looprpc.NewAddressRequest{}, + resp, err := client.NewStaticAddress( + ctxb, &looprpc.NewStaticAddressRequest{}, ) if err != nil { return err @@ -86,16 +86,17 @@ func listUnspent(ctx *cli.Context) error { return cli.ShowCommandHelp(ctx, "listunspent") } - client, cleanup, err := getAddressClient(ctx) + client, cleanup, err := getClient(ctx) if err != nil { return err } defer cleanup() - resp, err := client.ListUnspent(ctxb, &looprpc.ListUnspentRequest{ - MinConfs: int32(ctx.Int("min_confs")), - MaxConfs: int32(ctx.Int("max_confs")), - }) + resp, err := client.ListUnspentDeposits( + ctxb, &looprpc.ListUnspentDepositsRequest{ + MinConfs: int32(ctx.Int("min_confs")), + MaxConfs: int32(ctx.Int("max_confs")), + }) if err != nil { return err } @@ -104,21 +105,3 @@ func listUnspent(ctx *cli.Context) error { return nil } - -func getAddressClient(ctx *cli.Context) (looprpc.StaticAddressClientClient, - func(), error) { - - rpcServer := ctx.GlobalString("rpcserver") - tlsCertPath, macaroonPath, err := extractPathArgs(ctx) - if err != nil { - return nil, nil, err - } - conn, err := getClientConn(rpcServer, tlsCertPath, macaroonPath) - if err != nil { - return nil, nil, err - } - cleanup := func() { conn.Close() } - - addressClient := looprpc.NewStaticAddressClientClient(conn) - return addressClient, cleanup, nil -} From 843ef4be55d74a6abf4f925346c2226b23be5a04 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 23 Apr 2024 10:49:49 +0200 Subject: [PATCH 22/67] unit: manager tests --- staticaddr/address/manager_test.go | 149 +++++++++++++ staticaddr/deposit/manager_test.go | 323 +++++++++++++++++++++++++++++ test/walletkit_mock.go | 2 +- 3 files changed, 473 insertions(+), 1 deletion(-) create mode 100644 staticaddr/address/manager_test.go create mode 100644 staticaddr/deposit/manager_test.go diff --git a/staticaddr/address/manager_test.go b/staticaddr/address/manager_test.go new file mode 100644 index 000000000..8e15732de --- /dev/null +++ b/staticaddr/address/manager_test.go @@ -0,0 +1,149 @@ +package address + +import ( + "context" + "encoding/hex" + "testing" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr" + "github.com/btcsuite/btcd/btcutil" + "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/swap" + "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightninglabs/loop/test" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/keychain" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" +) + +var ( + defaultServerPubkeyBytes, _ = hex.DecodeString("021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d") + + defaultServerPubkey, _ = btcec.ParsePubKey(defaultServerPubkeyBytes) + + defaultExpiry = uint32(100) +) + +type mockStaticAddressClient struct { + mock.Mock +} + +func (m *mockStaticAddressClient) ServerNewAddress(ctx context.Context, + in *swapserverrpc.ServerNewAddressRequest, opts ...grpc.CallOption) ( + *swapserverrpc.ServerNewAddressResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.ServerNewAddressResponse), + args.Error(1) +} + +// TestManager tests the static address manager generates the corerct static +// taproot address from the given test parameters. +func TestManager(t *testing.T) { + ctxb, cancel := context.WithCancel(context.Background()) + defer cancel() + + testContext := NewAddressManagerTestContext(t) + + // Start the manager. + go func() { + err := testContext.manager.Run(ctxb) + require.NoError(t, err) + }() + + // Create the expected static address. + expectedAddress, err := GenerateExpectedTaprootAddress(testContext) + require.NoError(t, err) + + // Create a new static address. + taprootAddress, err := testContext.manager.NewAddress(ctxb) + require.NoError(t, err) + + // The addresses have to match. + require.Equal(t, expectedAddress.String(), taprootAddress.String()) +} + +// GenerateExpectedTaprootAddress generates the expected taproot address that +// the predefined parameters are supposed to generate. +func GenerateExpectedTaprootAddress(t *ManagerTestContext) ( + *btcutil.AddressTaproot, error) { + + keyIndex := int32(0) + _, pubKey := test.CreateKey(keyIndex) + + keyDescriptor := &keychain.KeyDescriptor{ + KeyLocator: keychain.KeyLocator{ + Family: keychain.KeyFamily(swap.StaticAddressKeyFamily), + Index: uint32(keyIndex), + }, + PubKey: pubKey, + } + + staticAddress, err := script.NewStaticAddress( + input.MuSig2Version100RC2, int64(defaultExpiry), + keyDescriptor.PubKey, defaultServerPubkey, + ) + if err != nil { + return nil, err + } + + return btcutil.NewAddressTaproot( + schnorr.SerializePubKey(staticAddress.TaprootKey), + t.manager.cfg.ChainParams, + ) +} + +// ManagerTestContext is a helper struct that contains all the necessary +// components to test the static address manager. +type ManagerTestContext struct { + manager *Manager + context test.Context + mockLnd *test.LndMockServices + mockStaticAddressClient *mockStaticAddressClient +} + +// NewAddressManagerTestContext creates a new test context for the static +// address manager. +func NewAddressManagerTestContext(t *testing.T) *ManagerTestContext { + mockLnd := test.NewMockLnd() + lndContext := test.NewContext(t, mockLnd) + + dbFixture := loopdb.NewTestDB(t) + + store := NewSqlStore(dbFixture.BaseDB) + + mockStaticAddressClient := new(mockStaticAddressClient) + + mockStaticAddressClient.On( + "ServerNewAddress", mock.Anything, mock.Anything, mock.Anything, + ).Return( + &swapserverrpc.ServerNewAddressResponse{ + Params: &swapserverrpc.ServerAddressParameters{ + ServerKey: defaultServerPubkeyBytes, + Expiry: defaultExpiry, + }, + }, nil, + ) + + cfg := &ManagerConfig{ + Store: store, + WalletKit: mockLnd.WalletKit, + ChainParams: mockLnd.ChainParams, + AddressClient: mockStaticAddressClient, + FetchL402: func(context.Context) error { return nil }, + } + + manager := NewManager(cfg) + + return &ManagerTestContext{ + manager: manager, + context: lndContext, + mockLnd: mockLnd, + mockStaticAddressClient: mockStaticAddressClient, + } +} diff --git a/staticaddr/deposit/manager_test.go b/staticaddr/deposit/manager_test.go new file mode 100644 index 000000000..4c9ee9337 --- /dev/null +++ b/staticaddr/deposit/manager_test.go @@ -0,0 +1,323 @@ +package deposit + +import ( + "context" + "encoding/hex" + "testing" + "time" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/swap" + "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightninglabs/loop/test" + "github.com/lightningnetwork/lnd/chainntnfs" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/lnrpc/chainrpc" + "github.com/lightningnetwork/lnd/lnwallet" + "github.com/stretchr/testify/mock" + "github.com/stretchr/testify/require" + "google.golang.org/grpc" +) + +var ( + defaultServerPubkeyBytes, _ = hex.DecodeString("021c97a90a411ff2b10dc2a8e32de2f29d2fa49d41bfbb52bd416e460db0747d0d") + + defaultServerPubkey, _ = btcec.ParsePubKey(defaultServerPubkeyBytes) + + defaultExpiry = uint32(100) + + defaultDepositConfirmations = uint32(3) + + confChan = make(chan *chainntnfs.TxConfirmation) + + confErrChan = make(chan error) + + blockChan = make(chan int32) + + blockErrChan = make(chan error) + + initChan = make(chan struct{}) + + finalizedDepositChan = make(chan wire.OutPoint) +) + +type mockStaticAddressClient struct { + mock.Mock +} + +func (m *mockStaticAddressClient) ServerNewAddress(ctx context.Context, + in *swapserverrpc.ServerNewAddressRequest, opts ...grpc.CallOption) ( + *swapserverrpc.ServerNewAddressResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.ServerNewAddressResponse), + args.Error(1) +} + +type mockAddressManager struct { + mock.Mock +} + +func (m *mockAddressManager) GetStaticAddressParameters(ctx context.Context) ( + *address.Parameters, error) { + + args := m.Called(ctx) + + return args.Get(0).(*address.Parameters), + args.Error(1) +} + +func (m *mockAddressManager) GetStaticAddress(ctx context.Context) ( + *script.StaticAddress, error) { + + args := m.Called(ctx) + + return args.Get(0).(*script.StaticAddress), + args.Error(1) +} + +func (m *mockAddressManager) ListUnspent(ctx context.Context, + minConfs, maxConfs int32) ([]*lnwallet.Utxo, error) { + + args := m.Called(ctx, minConfs, maxConfs) + + return args.Get(0).([]*lnwallet.Utxo), + args.Error(1) +} + +type mockStore struct { + mock.Mock +} + +func (s *mockStore) CreateDeposit(ctx context.Context, deposit *Deposit) error { + args := s.Called(ctx, deposit) + return args.Error(0) +} + +func (s *mockStore) UpdateDeposit(ctx context.Context, deposit *Deposit) error { + args := s.Called(ctx, deposit) + return args.Error(0) +} + +func (s *mockStore) GetDeposit(ctx context.Context, depositID ID) (*Deposit, + error) { + + args := s.Called(ctx, depositID) + return args.Get(0).(*Deposit), args.Error(1) +} + +func (s *mockStore) AllDeposits(ctx context.Context) ([]*Deposit, error) { + args := s.Called(ctx) + return args.Get(0).([]*Deposit), args.Error(1) +} + +type MockChainNotifier struct { + mock.Mock +} + +func (m *MockChainNotifier) RawClientWithMacAuth( + ctx context.Context) (context.Context, time.Duration, + chainrpc.ChainNotifierClient) { + + return ctx, 0, nil +} + +func (m *MockChainNotifier) RegisterConfirmationsNtfn(ctx context.Context, + txid *chainhash.Hash, pkScript []byte, numConfs, heightHint int32, + _ ...lndclient.NotifierOption) (chan *chainntnfs.TxConfirmation, + chan error, error) { + + args := m.Called(ctx, txid, pkScript, numConfs, heightHint) + return args.Get(0).(chan *chainntnfs.TxConfirmation), + args.Get(1).(chan error), args.Error(2) +} + +func (m *MockChainNotifier) RegisterBlockEpochNtfn(ctx context.Context) ( + chan int32, chan error, error) { + + args := m.Called(ctx) + return args.Get(0).(chan int32), args.Get(1).(chan error), args.Error(2) +} + +func (m *MockChainNotifier) RegisterSpendNtfn(ctx context.Context, + outpoint *wire.OutPoint, pkScript []byte, heightHint int32) ( + chan *chainntnfs.SpendDetail, chan error, error) { + + args := m.Called(ctx, pkScript, heightHint) + return args.Get(0).(chan *chainntnfs.SpendDetail), + args.Get(1).(chan error), args.Error(2) +} + +// TestManager checks that the manager processes the right channel notifications +// while a deposit is expiring. +func TestManager(t *testing.T) { + ctxb, cancel := context.WithCancel(context.Background()) + defer cancel() + + // Create the test context with required mocks. + testContext := newManagerTestContext(t) + + // Start the deposit manager. + go func() { + err := testContext.manager.Run( + ctxb, uint32(testContext.mockLnd.Height), + ) + require.NoError(t, err) + }() + + // Ensure that the manager has been initialized. + <-initChan + + // Notify about the last block before the expiry. + blockChan <- int32(defaultDepositConfirmations + defaultExpiry) + + // Ensure that the deposit state machine didn't sign for the expiry tx. + select { + case <-testContext.mockLnd.SignOutputRawChannel: + t.Fatal("received unexpected sign request") + + default: + } + + // Mine the expiry tx height. + blockChan <- int32(defaultDepositConfirmations + defaultExpiry) + + // Ensure that the deposit state machine didn't sign for the expiry tx. + <-testContext.mockLnd.SignOutputRawChannel + + // Ensure that the signed expiry transaction is published. + expiryTx := <-testContext.mockLnd.TxPublishChannel + + // Ensure that the deposit is waiting for a confirmation notification. + confChan <- &chainntnfs.TxConfirmation{ + BlockHeight: defaultDepositConfirmations + defaultExpiry + 3, + Tx: expiryTx, + } +} + +// ManagerTestContext is a helper struct that contains all the necessary +// components to test the reservation manager. +type ManagerTestContext struct { + manager *Manager + context test.Context + mockLnd *test.LndMockServices + mockStaticAddressClient *mockStaticAddressClient + mockAddressManager *mockAddressManager +} + +// newManagerTestContext creates a new test context for the reservation manager. +func newManagerTestContext(t *testing.T) *ManagerTestContext { + mockLnd := test.NewMockLnd() + lndContext := test.NewContext(t, mockLnd) + + mockStaticAddressClient := new(mockStaticAddressClient) + mockAddressManager := new(mockAddressManager) + mockStore := new(mockStore) + mockChainNotifier := new(MockChainNotifier) + + ID, err := GetRandomDepositID() + utxo := &lnwallet.Utxo{ + AddressType: lnwallet.TaprootPubkey, + Value: btcutil.Amount(100000), + Confirmations: int64(defaultDepositConfirmations), + PkScript: []byte("pkscript"), + OutPoint: wire.OutPoint{ + Hash: chainhash.Hash{}, + Index: 0xffffffff, + }, + } + require.NoError(t, err) + storedDeposits := []*Deposit{ + { + ID: ID, + state: Deposited, + OutPoint: utxo.OutPoint, + Value: utxo.Value, + ConfirmationHeight: 3, + TimeOutSweepPkScript: []byte{0x42, 0x21, 0x69}, + }, + } + + mockStore.On( + "AllDeposits", mock.Anything, + ).Return(storedDeposits, nil) + + mockStore.On( + "UpdateDeposit", mock.Anything, mock.Anything, + ).Return(nil) + + mockAddressManager.On( + "GetStaticAddressParameters", mock.Anything, + ).Return(&address.Parameters{ + Expiry: defaultExpiry, + }, nil) + + mockAddressManager.On( + "ListUnspent", mock.Anything, mock.Anything, mock.Anything, + ).Return([]*lnwallet.Utxo{utxo}, nil) + + // Define the expected return values for the mocks. + mockChainNotifier.On( + "RegisterConfirmationsNtfn", mock.Anything, mock.Anything, + mock.Anything, mock.Anything, mock.Anything, + ).Return(confChan, confErrChan, nil) + + mockChainNotifier.On("RegisterBlockEpochNtfn", mock.Anything).Return( + blockChan, blockErrChan, nil, + ) + + cfg := &ManagerConfig{ + AddressClient: mockStaticAddressClient, + AddressManager: mockAddressManager, + Store: mockStore, + WalletKit: mockLnd.WalletKit, + ChainParams: mockLnd.ChainParams, + ChainNotifier: mockChainNotifier, + Signer: mockLnd.Signer, + } + + manager := NewManager(cfg) + manager.initChan = initChan + manager.finalizedDepositChan = finalizedDepositChan + + testContext := &ManagerTestContext{ + manager: manager, + context: lndContext, + mockLnd: mockLnd, + mockStaticAddressClient: mockStaticAddressClient, + mockAddressManager: mockAddressManager, + } + + staticAddress := generateStaticAddress( + context.Background(), testContext, + ) + mockAddressManager.On( + "GetStaticAddress", mock.Anything, + ).Return(staticAddress, nil) + + return testContext +} + +func generateStaticAddress(ctx context.Context, + t *ManagerTestContext) *script.StaticAddress { + + keyDescriptor, err := t.mockLnd.WalletKit.DeriveNextKey( + ctx, swap.StaticAddressKeyFamily, + ) + require.NoError(t.context.T, err) + + staticAddress, err := script.NewStaticAddress( + input.MuSig2Version100RC2, int64(defaultExpiry), + keyDescriptor.PubKey, defaultServerPubkey, + ) + require.NoError(t.context.T, err) + + return staticAddress +} diff --git a/test/walletkit_mock.go b/test/walletkit_mock.go index 828a0fe38..637686c68 100644 --- a/test/walletkit_mock.go +++ b/test/walletkit_mock.go @@ -275,5 +275,5 @@ func (m *mockWalletKit) ImportPublicKey(ctx context.Context, func (m *mockWalletKit) ImportTaprootScript(ctx context.Context, tapscript *waddrmgr.Tapscript) (btcutil.Address, error) { - return nil, fmt.Errorf("unimplemented") + return nil, nil } From d0d480ac5d13af31ee0a72135d037b3b36578564 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 25 Apr 2024 15:17:59 +0200 Subject: [PATCH 23/67] staticaddr: public deposit method scope --- staticaddr/deposit/deposit.go | 8 ++++---- staticaddr/deposit/fsm.go | 12 ++++++------ staticaddr/deposit/sql_store.go | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/staticaddr/deposit/deposit.go b/staticaddr/deposit/deposit.go index d2bda01f2..8c1199917 100644 --- a/staticaddr/deposit/deposit.go +++ b/staticaddr/deposit/deposit.go @@ -71,28 +71,28 @@ func (d *Deposit) IsInFinalState() bool { return d.state == Expired || d.state == Failed } -func (d *Deposit) isExpired(currentHeight, expiry uint32) bool { +func (d *Deposit) IsExpired(currentHeight, expiry uint32) bool { d.Lock() defer d.Unlock() return currentHeight >= uint32(d.ConfirmationHeight)+expiry } -func (d *Deposit) getState() fsm.StateType { +func (d *Deposit) GetState() fsm.StateType { d.Lock() defer d.Unlock() return d.state } -func (d *Deposit) setState(state fsm.StateType) { +func (d *Deposit) SetState(state fsm.StateType) { d.Lock() defer d.Unlock() d.state = state } -func (d *Deposit) isInState(state fsm.StateType) bool { +func (d *Deposit) IsInState(state fsm.StateType) bool { d.Lock() defer d.Unlock() diff --git a/staticaddr/deposit/fsm.go b/staticaddr/deposit/fsm.go index 89d2222c4..91bc951d7 100644 --- a/staticaddr/deposit/fsm.go +++ b/staticaddr/deposit/fsm.go @@ -100,7 +100,7 @@ func NewFSM(ctx context.Context, deposit *Deposit, cfg *ManagerConfig, if recoverStateMachine { depoFsm.StateMachine = fsm.NewStateMachineWithState( - depositStates, deposit.getState(), + depositStates, deposit.GetState(), DefaultObserverSize, ) } else { @@ -145,8 +145,8 @@ func (f *FSM) handleBlockNotification(ctx context.Context, // If the deposit is expired but not yet sufficiently confirmed, we // republish the expiry sweep transaction. - if f.deposit.isExpired(currentHeight, params.Expiry) { - if f.deposit.isInState(WaitForExpirySweep) { + if f.deposit.IsExpired(currentHeight, params.Expiry) { + if f.deposit.IsInState(WaitForExpirySweep) { f.PublishDepositExpirySweepAction(ctx, nil) } else { go func() { @@ -232,13 +232,13 @@ func (f *FSM) updateDeposit(ctx context.Context, notification.Event, ) - f.deposit.setState(notification.NextState) + f.deposit.SetState(notification.NextState) // Don't update the deposit if we are in an initial state or if we // are transitioning from an initial state to a failed state. d := f.deposit - if d.isInState(fsm.EmptyState) || d.isInState(Deposited) || - (notification.PreviousState == Deposited && d.isInState( + if d.IsInState(fsm.EmptyState) || d.IsInState(Deposited) || + (notification.PreviousState == Deposited && d.IsInState( Failed, )) { diff --git a/staticaddr/deposit/sql_store.go b/staticaddr/deposit/sql_store.go index f746ee7fc..729007759 100644 --- a/staticaddr/deposit/sql_store.go +++ b/staticaddr/deposit/sql_store.go @@ -44,7 +44,7 @@ func (s *SqlStore) CreateDeposit(ctx context.Context, deposit *Deposit) error { updateArgs := sqlc.InsertDepositUpdateParams{ DepositID: deposit.ID[:], UpdateTimestamp: s.clock.Now().UTC(), - UpdateState: string(deposit.getState()), + UpdateState: string(deposit.GetState()), } return s.baseDB.ExecTx(ctx, &loopdb.SqliteTxOptions{}, @@ -63,7 +63,7 @@ func (s *SqlStore) UpdateDeposit(ctx context.Context, deposit *Deposit) error { insertUpdateArgs := sqlc.InsertDepositUpdateParams{ DepositID: deposit.ID[:], UpdateTimestamp: s.clock.Now().UTC(), - UpdateState: string(deposit.getState()), + UpdateState: string(deposit.GetState()), } var ( From 8e0c23a5e3e37f8ac4886e3ef3c1a0c975eb3574 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:07:36 +0200 Subject: [PATCH 24/67] sqlc: withdrawal address for deposits Deposit schema extension with a withdrawal sweep address. If the user selects a deposit for withdrawal the destination address of the sweep is stored here. --- .../000010_static_address_deposits.up.sql | 7 ++- loopdb/sqlc/models.go | 17 +++---- .../sqlc/queries/static_address_deposits.sql | 9 ++-- loopdb/sqlc/static_address_deposits.sql.go | 44 ++++++++++++------- 4 files changed, 48 insertions(+), 29 deletions(-) diff --git a/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql b/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql index 7898e6084..2952e7e53 100644 --- a/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql +++ b/loopdb/sqlc/migrations/000010_static_address_deposits.up.sql @@ -24,7 +24,12 @@ CREATE TABLE IF NOT EXISTS deposits ( timeout_sweep_pk_script BYTEA NOT NULL, -- expiry_sweep_txid is the transaction id of the expiry sweep. - expiry_sweep_txid BLOB + expiry_sweep_txid BLOB, + + -- finalized_withdrawal_tx is the coop signed tx that will be used to sweep + -- the deposit back to the clients wallet. It will be republished on block + -- arrival and after daemon restarts. + finalized_withdrawal_tx TEXT ); -- deposit_updates contains all the updates to a deposit. diff --git a/loopdb/sqlc/models.go b/loopdb/sqlc/models.go index 47f66ea15..596538821 100644 --- a/loopdb/sqlc/models.go +++ b/loopdb/sqlc/models.go @@ -10,14 +10,15 @@ import ( ) type Deposit struct { - ID int32 - DepositID []byte - TxHash []byte - OutIndex int32 - Amount int64 - ConfirmationHeight int64 - TimeoutSweepPkScript []byte - ExpirySweepTxid []byte + ID int32 + DepositID []byte + TxHash []byte + OutIndex int32 + Amount int64 + ConfirmationHeight int64 + TimeoutSweepPkScript []byte + ExpirySweepTxid []byte + FinalizedWithdrawalTx sql.NullString } type DepositUpdate struct { diff --git a/loopdb/sqlc/queries/static_address_deposits.sql b/loopdb/sqlc/queries/static_address_deposits.sql index d09ca3ffa..bc782bbb2 100644 --- a/loopdb/sqlc/queries/static_address_deposits.sql +++ b/loopdb/sqlc/queries/static_address_deposits.sql @@ -6,7 +6,8 @@ INSERT INTO deposits ( amount, confirmation_height, timeout_sweep_pk_script, - expiry_sweep_txid + expiry_sweep_txid, + finalized_withdrawal_tx ) VALUES ( $1, $2, @@ -14,7 +15,8 @@ INSERT INTO deposits ( $4, $5, $6, - $7 + $7, + $8 ); -- name: UpdateDeposit :exec @@ -23,7 +25,8 @@ SET tx_hash = $2, out_index = $3, confirmation_height = $4, - expiry_sweep_txid = $5 + expiry_sweep_txid = $5, + finalized_withdrawal_tx = $6 WHERE deposits.deposit_id = $1; diff --git a/loopdb/sqlc/static_address_deposits.sql.go b/loopdb/sqlc/static_address_deposits.sql.go index 8b4612d77..75645c8e1 100644 --- a/loopdb/sqlc/static_address_deposits.sql.go +++ b/loopdb/sqlc/static_address_deposits.sql.go @@ -7,12 +7,13 @@ package sqlc import ( "context" + "database/sql" "time" ) const allDeposits = `-- name: AllDeposits :many SELECT - id, deposit_id, tx_hash, out_index, amount, confirmation_height, timeout_sweep_pk_script, expiry_sweep_txid + id, deposit_id, tx_hash, out_index, amount, confirmation_height, timeout_sweep_pk_script, expiry_sweep_txid, finalized_withdrawal_tx FROM deposits ORDER BY @@ -37,6 +38,7 @@ func (q *Queries) AllDeposits(ctx context.Context) ([]Deposit, error) { &i.ConfirmationHeight, &i.TimeoutSweepPkScript, &i.ExpirySweepTxid, + &i.FinalizedWithdrawalTx, ); err != nil { return nil, err } @@ -59,7 +61,8 @@ INSERT INTO deposits ( amount, confirmation_height, timeout_sweep_pk_script, - expiry_sweep_txid + expiry_sweep_txid, + finalized_withdrawal_tx ) VALUES ( $1, $2, @@ -67,18 +70,20 @@ INSERT INTO deposits ( $4, $5, $6, - $7 + $7, + $8 ) ` type CreateDepositParams struct { - DepositID []byte - TxHash []byte - OutIndex int32 - Amount int64 - ConfirmationHeight int64 - TimeoutSweepPkScript []byte - ExpirySweepTxid []byte + DepositID []byte + TxHash []byte + OutIndex int32 + Amount int64 + ConfirmationHeight int64 + TimeoutSweepPkScript []byte + ExpirySweepTxid []byte + FinalizedWithdrawalTx sql.NullString } func (q *Queries) CreateDeposit(ctx context.Context, arg CreateDepositParams) error { @@ -90,13 +95,14 @@ func (q *Queries) CreateDeposit(ctx context.Context, arg CreateDepositParams) er arg.ConfirmationHeight, arg.TimeoutSweepPkScript, arg.ExpirySweepTxid, + arg.FinalizedWithdrawalTx, ) return err } const getDeposit = `-- name: GetDeposit :one SELECT - id, deposit_id, tx_hash, out_index, amount, confirmation_height, timeout_sweep_pk_script, expiry_sweep_txid + id, deposit_id, tx_hash, out_index, amount, confirmation_height, timeout_sweep_pk_script, expiry_sweep_txid, finalized_withdrawal_tx FROM deposits WHERE @@ -115,6 +121,7 @@ func (q *Queries) GetDeposit(ctx context.Context, depositID []byte) (Deposit, er &i.ConfirmationHeight, &i.TimeoutSweepPkScript, &i.ExpirySweepTxid, + &i.FinalizedWithdrawalTx, ) return i, err } @@ -172,17 +179,19 @@ SET tx_hash = $2, out_index = $3, confirmation_height = $4, - expiry_sweep_txid = $5 + expiry_sweep_txid = $5, + finalized_withdrawal_tx = $6 WHERE deposits.deposit_id = $1 ` type UpdateDepositParams struct { - DepositID []byte - TxHash []byte - OutIndex int32 - ConfirmationHeight int64 - ExpirySweepTxid []byte + DepositID []byte + TxHash []byte + OutIndex int32 + ConfirmationHeight int64 + ExpirySweepTxid []byte + FinalizedWithdrawalTx sql.NullString } func (q *Queries) UpdateDeposit(ctx context.Context, arg UpdateDepositParams) error { @@ -192,6 +201,7 @@ func (q *Queries) UpdateDeposit(ctx context.Context, arg UpdateDepositParams) er arg.OutIndex, arg.ConfirmationHeight, arg.ExpirySweepTxid, + arg.FinalizedWithdrawalTx, ) return err } From 7487b90674bf74193866173f34d3c4d0353480b0 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:13:15 +0200 Subject: [PATCH 25/67] looprpc: deposit withdrawal endpoint A new rpc for deposit withdrawals is added. A withdrawal cooperatively spends the 2/2 musig deposit outpoint to a client-specified address. --- looprpc/client.pb.go | 697 ++++++++++++++++++++++------------ looprpc/client.proto | 38 ++ looprpc/client.swagger.json | 22 ++ looprpc/client_grpc.pb.go | 40 ++ looprpc/swapclient.pb.json.go | 25 ++ 5 files changed, 585 insertions(+), 237 deletions(-) diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 58cabec6a..821755390 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -4235,6 +4235,167 @@ func (x *Utxo) GetConfirmations() int64 { return 0 } +type WithdrawDepositsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The outpoints of the deposits to withdraw. + Outpoints []*OutPoint `protobuf:"bytes,1,rep,name=outpoints,proto3" json:"outpoints,omitempty"` + // If set to true, all deposits will be withdrawn. + All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` +} + +func (x *WithdrawDepositsRequest) Reset() { + *x = WithdrawDepositsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawDepositsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawDepositsRequest) ProtoMessage() {} + +func (x *WithdrawDepositsRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawDepositsRequest.ProtoReflect.Descriptor instead. +func (*WithdrawDepositsRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{50} +} + +func (x *WithdrawDepositsRequest) GetOutpoints() []*OutPoint { + if x != nil { + return x.Outpoints + } + return nil +} + +func (x *WithdrawDepositsRequest) GetAll() bool { + if x != nil { + return x.All + } + return false +} + +type WithdrawDepositsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *WithdrawDepositsResponse) Reset() { + *x = WithdrawDepositsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *WithdrawDepositsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*WithdrawDepositsResponse) ProtoMessage() {} + +func (x *WithdrawDepositsResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use WithdrawDepositsResponse.ProtoReflect.Descriptor instead. +func (*WithdrawDepositsResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{51} +} + +type OutPoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Raw bytes representing the transaction id. + TxidBytes []byte `protobuf:"bytes,1,opt,name=txid_bytes,json=txidBytes,proto3" json:"txid_bytes,omitempty"` + // Reversed, hex-encoded string representing the transaction id. + TxidStr string `protobuf:"bytes,2,opt,name=txid_str,json=txidStr,proto3" json:"txid_str,omitempty"` + // The index of the output on the transaction. + OutputIndex uint32 `protobuf:"varint,3,opt,name=output_index,json=outputIndex,proto3" json:"output_index,omitempty"` +} + +func (x *OutPoint) Reset() { + *x = OutPoint{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OutPoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OutPoint) ProtoMessage() {} + +func (x *OutPoint) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use OutPoint.ProtoReflect.Descriptor instead. +func (*OutPoint) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{52} +} + +func (x *OutPoint) GetTxidBytes() []byte { + if x != nil { + return x.TxidBytes + } + return nil +} + +func (x *OutPoint) GetTxidStr() string { + if x != nil { + return x.TxidStr + } + return "" +} + +func (x *OutPoint) GetOutputIndex() uint32 { + if x != nil { + return x.OutputIndex + } + return 0 +} + var File_client_proto protoreflect.FileDescriptor var file_client_proto_rawDesc = []byte{ @@ -4750,187 +4911,207 @@ var file_client_proto_rawDesc = []byte{ 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, - 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, - 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, - 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, - 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, - 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, - 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, - 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, - 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, - 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, - 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, - 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, - 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, - 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, - 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, - 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, - 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, - 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, - 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, - 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, - 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, - 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, - 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, - 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, - 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, - 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, - 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, - 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, - 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, - 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, - 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, - 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, - 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, - 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, - 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, - 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, - 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, - 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, - 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, - 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, - 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, 0xe6, 0x0d, 0x0a, - 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, - 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, - 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, - 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, - 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, - 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x57, + 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x75, + 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, + 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, + 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0x3b, + 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, + 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, + 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, + 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, + 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, + 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, + 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, + 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, + 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, + 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, + 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, + 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, + 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, + 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, + 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, + 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, + 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, + 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, + 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, + 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, + 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, + 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, + 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, + 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, + 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, + 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, + 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, + 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, + 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, + 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, + 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, + 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, + 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, + 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, + 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, + 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, + 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, + 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, + 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, + 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, + 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, + 0xbf, 0x0e, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, + 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, + 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, + 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, + 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, - 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, - 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, + 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, + 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, + 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, - 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, - 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, + 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, + 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, + 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, + 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, + 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, + 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, + 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, - 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, - 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, - 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, - 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, - 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, - 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, + 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, + 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, + 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, + 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, + 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, + 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -4946,7 +5127,7 @@ func file_client_proto_rawDescGZIP() []byte { } var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 50) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 53) var file_client_proto_goTypes = []any{ (AddressType)(0), // 0: looprpc.AddressType (SwapType)(0), // 1: looprpc.SwapType @@ -5005,19 +5186,22 @@ var file_client_proto_goTypes = []any{ (*ListUnspentDepositsRequest)(nil), // 54: looprpc.ListUnspentDepositsRequest (*ListUnspentDepositsResponse)(nil), // 55: looprpc.ListUnspentDepositsResponse (*Utxo)(nil), // 56: looprpc.Utxo - (*swapserverrpc.RouteHint)(nil), // 57: looprpc.RouteHint + (*WithdrawDepositsRequest)(nil), // 57: looprpc.WithdrawDepositsRequest + (*WithdrawDepositsResponse)(nil), // 58: looprpc.WithdrawDepositsResponse + (*OutPoint)(nil), // 59: looprpc.OutPoint + (*swapserverrpc.RouteHint)(nil), // 60: looprpc.RouteHint } var file_client_proto_depIdxs = []int32{ 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType - 57, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 60, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason 13, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter 6, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter 11, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus - 57, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint - 57, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 60, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 60, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint 28, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token 29, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 29, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats @@ -5033,59 +5217,62 @@ var file_client_proto_depIdxs = []int32{ 44, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation 51, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut 56, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo - 7, // 25: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest - 8, // 26: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest - 10, // 27: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest - 12, // 28: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest - 15, // 29: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest - 40, // 30: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest - 16, // 31: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest - 19, // 32: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest - 16, // 33: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest - 19, // 34: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest - 22, // 35: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest - 24, // 36: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest - 24, // 37: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest - 26, // 38: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest - 30, // 39: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest - 32, // 40: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest - 35, // 41: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest - 37, // 42: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest - 42, // 43: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest - 45, // 44: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest - 47, // 45: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest - 49, // 46: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 52, // 47: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest - 54, // 48: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest - 9, // 49: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse - 9, // 50: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse - 11, // 51: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus - 14, // 52: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse - 11, // 53: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus - 41, // 54: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse - 18, // 55: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse - 21, // 56: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse - 17, // 57: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse - 20, // 58: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse - 23, // 59: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse - 25, // 60: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse - 25, // 61: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse - 27, // 62: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse - 31, // 63: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse - 33, // 64: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters - 36, // 65: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse - 39, // 66: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse - 43, // 67: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse - 46, // 68: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse - 48, // 69: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse - 50, // 70: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 53, // 71: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse - 55, // 72: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse - 49, // [49:73] is the sub-list for method output_type - 25, // [25:49] is the sub-list for method input_type - 25, // [25:25] is the sub-list for extension type_name - 25, // [25:25] is the sub-list for extension extendee - 0, // [0:25] is the sub-list for field type_name + 59, // 25: looprpc.WithdrawDepositsRequest.outpoints:type_name -> looprpc.OutPoint + 7, // 26: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest + 8, // 27: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest + 10, // 28: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest + 12, // 29: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest + 15, // 30: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest + 40, // 31: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest + 16, // 32: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest + 19, // 33: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest + 16, // 34: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest + 19, // 35: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest + 22, // 36: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest + 24, // 37: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest + 24, // 38: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest + 26, // 39: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest + 30, // 40: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest + 32, // 41: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest + 35, // 42: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest + 37, // 43: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest + 42, // 44: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest + 45, // 45: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest + 47, // 46: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest + 49, // 47: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest + 52, // 48: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest + 54, // 49: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest + 57, // 50: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest + 9, // 51: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 9, // 52: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 11, // 53: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 14, // 54: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 11, // 55: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 41, // 56: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 18, // 57: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 21, // 58: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 17, // 59: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 20, // 60: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 23, // 61: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 25, // 62: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 25, // 63: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 27, // 64: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 31, // 65: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 33, // 66: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 36, // 67: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 39, // 68: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 43, // 69: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 46, // 70: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 48, // 71: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 50, // 72: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 53, // 73: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse + 55, // 74: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse + 58, // 75: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse + 51, // [51:76] is the sub-list for method output_type + 26, // [26:51] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_client_proto_init() } @@ -5694,6 +5881,42 @@ func file_client_proto_init() { return nil } } + file_client_proto_msgTypes[50].Exporter = func(v any, i int) any { + switch v := v.(*WithdrawDepositsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[51].Exporter = func(v any, i int) any { + switch v := v.(*WithdrawDepositsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[52].Exporter = func(v any, i int) any { + switch v := v.(*OutPoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5701,7 +5924,7 @@ func file_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, NumEnums: 7, - NumMessages: 50, + NumMessages: 53, NumExtensions: 0, NumServices: 1, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index 0f3f8770e..9d7b8e2e7 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -161,6 +161,12 @@ service SwapClient { */ rpc ListUnspentDeposits (ListUnspentDepositsRequest) returns (ListUnspentDepositsResponse); + + /* loop:`static withdraw` + WithdrawDeposits withdraws a selection or all deposits of a static address. + */ + rpc WithdrawDeposits (WithdrawDepositsRequest) + returns (WithdrawDepositsResponse); } message LoopOutRequest { @@ -1531,3 +1537,35 @@ message Utxo { */ int64 confirmations = 4; } + +message WithdrawDepositsRequest { + /* + The outpoints of the deposits to withdraw. + */ + repeated OutPoint outpoints = 1; + + /* + If set to true, all deposits will be withdrawn. + */ + bool all = 2; +} + +message WithdrawDepositsResponse { +} + +message OutPoint { + /* + Raw bytes representing the transaction id. + */ + bytes txid_bytes = 1; + + /* + Reversed, hex-encoded string representing the transaction id. + */ + string txid_str = 2; + + /* + The index of the output on the transaction. + */ + uint32 output_index = 3; +} diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 4c4d5761e..b5146a790 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -1335,6 +1335,25 @@ } } }, + "looprpcOutPoint": { + "type": "object", + "properties": { + "txid_bytes": { + "type": "string", + "format": "byte", + "description": "Raw bytes representing the transaction id." + }, + "txid_str": { + "type": "string", + "description": "Reversed, hex-encoded string representing the transaction id." + }, + "output_index": { + "type": "integer", + "format": "int64", + "description": "The index of the output on the transaction." + } + } + }, "looprpcOutQuoteResponse": { "type": "object", "properties": { @@ -1620,6 +1639,9 @@ } } }, + "looprpcWithdrawDepositsResponse": { + "type": "object" + }, "protobufAny": { "type": "object", "properties": { diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index 18550de4f..b6e542378 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -112,6 +112,9 @@ type SwapClientClient interface { // loop: `static listunspentdeposits` // ListUnspentDeposits returns a list of utxos deposited at a static address. ListUnspentDeposits(ctx context.Context, in *ListUnspentDepositsRequest, opts ...grpc.CallOption) (*ListUnspentDepositsResponse, error) + // loop:`static withdraw` + // WithdrawDeposits withdraws a selection or all deposits of a static address. + WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error) } type swapClientClient struct { @@ -361,6 +364,15 @@ func (c *swapClientClient) ListUnspentDeposits(ctx context.Context, in *ListUnsp return out, nil } +func (c *swapClientClient) WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error) { + out := new(WithdrawDepositsResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/WithdrawDeposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SwapClientServer is the server API for SwapClient service. // All implementations must embed UnimplementedSwapClientServer // for forward compatibility @@ -459,6 +471,9 @@ type SwapClientServer interface { // loop: `static listunspentdeposits` // ListUnspentDeposits returns a list of utxos deposited at a static address. ListUnspentDeposits(context.Context, *ListUnspentDepositsRequest) (*ListUnspentDepositsResponse, error) + // loop:`static withdraw` + // WithdrawDeposits withdraws a selection or all deposits of a static address. + WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) mustEmbedUnimplementedSwapClientServer() } @@ -538,6 +553,9 @@ func (UnimplementedSwapClientServer) NewStaticAddress(context.Context, *NewStati func (UnimplementedSwapClientServer) ListUnspentDeposits(context.Context, *ListUnspentDepositsRequest) (*ListUnspentDepositsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ListUnspentDeposits not implemented") } +func (UnimplementedSwapClientServer) WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method WithdrawDeposits not implemented") +} func (UnimplementedSwapClientServer) mustEmbedUnimplementedSwapClientServer() {} // UnsafeSwapClientServer may be embedded to opt out of forward compatibility for this service. @@ -986,6 +1004,24 @@ func _SwapClient_ListUnspentDeposits_Handler(srv interface{}, ctx context.Contex return interceptor(ctx, in, info, handler) } +func _SwapClient_WithdrawDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(WithdrawDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).WithdrawDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/WithdrawDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).WithdrawDeposits(ctx, req.(*WithdrawDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SwapClient_ServiceDesc is the grpc.ServiceDesc for SwapClient service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1085,6 +1121,10 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "ListUnspentDeposits", Handler: _SwapClient_ListUnspentDeposits_Handler, }, + { + MethodName: "WithdrawDeposits", + Handler: _SwapClient_WithdrawDeposits_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/looprpc/swapclient.pb.json.go b/looprpc/swapclient.pb.json.go index 933898d4d..f032cf2c9 100644 --- a/looprpc/swapclient.pb.json.go +++ b/looprpc/swapclient.pb.json.go @@ -637,4 +637,29 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex } callback(string(respBytes), nil) } + + registry["looprpc.SwapClient.WithdrawDeposits"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &WithdrawDepositsRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.WithdrawDeposits(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } } From e2446ca7cf420bc99508fe826b0acaeac9dfae5a Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:14:55 +0200 Subject: [PATCH 26/67] swapserverrpc: server withdrawal endpoint A server endpoint to obtain a partial sig to cooperatively spend a 2/2 musig deposit outpoint. --- swapserverrpc/server.pb.go | 4 ++-- swapserverrpc/server.proto | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/swapserverrpc/server.pb.go b/swapserverrpc/server.pb.go index 5bdc09f17..bc31c0186 100644 --- a/swapserverrpc/server.pb.go +++ b/swapserverrpc/server.pb.go @@ -3091,9 +3091,9 @@ type ServerWithdrawRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // The deposit outpoints the client wishes to close. + // The deposit outpoints the client wishes to withdraw. Outpoints []*PrevoutInfo `protobuf:"bytes,1,rep,name=outpoints,proto3" json:"outpoints,omitempty"` - // The nonces that the client used to generate the coop close tx sigs. + // The nonces that the client used to generate the withdrawal tx sigs. ClientNonces [][]byte `protobuf:"bytes,2,rep,name=client_nonces,json=clientNonces,proto3" json:"client_nonces,omitempty"` // The address that the client wants to sweep the static address deposits // to. diff --git a/swapserverrpc/server.proto b/swapserverrpc/server.proto index 5a568ae04..9dfc5f97c 100644 --- a/swapserverrpc/server.proto +++ b/swapserverrpc/server.proto @@ -713,10 +713,10 @@ message ServerAddressParameters { } message ServerWithdrawRequest { - // The deposit outpoints the client wishes to close. + // The deposit outpoints the client wishes to withdraw. repeated PrevoutInfo outpoints = 1; - // The nonces that the client used to generate the coop close tx sigs. + // The nonces that the client used to generate the withdrawal tx sigs. repeated bytes client_nonces = 2; // The address that the client wants to sweep the static address deposits From d460e5e9b36605704c118945e63ff51a88dfd2c1 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:17:16 +0200 Subject: [PATCH 27/67] log: unified static address logger --- loopd/log.go | 6 +++++- staticaddr/address/log.go | 24 ++++++++++++++++++++++++ staticaddr/address/manager.go | 9 --------- staticaddr/deposit/log.go | 24 ++++++++++++++++++++++++ staticaddr/deposit/manager.go | 10 ---------- staticaddr/log.go | 9 ++++----- 6 files changed, 57 insertions(+), 25 deletions(-) create mode 100644 staticaddr/address/log.go create mode 100644 staticaddr/deposit/log.go diff --git a/loopd/log.go b/loopd/log.go index ef8c64779..b41146a70 100644 --- a/loopd/log.go +++ b/loopd/log.go @@ -11,6 +11,7 @@ import ( "github.com/lightninglabs/loop/liquidity" "github.com/lightninglabs/loop/loopdb" "github.com/lightninglabs/loop/notifications" + "github.com/lightninglabs/loop/staticaddr" "github.com/lightninglabs/loop/sweep" "github.com/lightninglabs/loop/sweepbatcher" "github.com/lightningnetwork/lnd" @@ -38,6 +39,9 @@ func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) { lnd.AddSubLogger(root, "LNDC", intercept, lndclient.UseLogger) lnd.AddSubLogger(root, "STORE", intercept, loopdb.UseLogger) lnd.AddSubLogger(root, l402.Subsystem, intercept, l402.UseLogger) + lnd.AddSubLogger( + root, staticaddr.Subsystem, intercept, staticaddr.UseLogger, + ) lnd.AddSubLogger( root, liquidity.Subsystem, intercept, liquidity.UseLogger, ) @@ -57,7 +61,7 @@ func SetupLoggers(root *build.RotatingLogWriter, intercept signal.Interceptor) { } // genSubLogger creates a logger for a subsystem. We provide an instance of -// a signal.Interceptor to be able to shutdown in the case of a critical error. +// a signal.Interceptor to be able to shut down in the case of a critical error. func genSubLogger(root *build.RotatingLogWriter, interceptor signal.Interceptor) func(string) btclog.Logger { diff --git a/staticaddr/address/log.go b/staticaddr/address/log.go new file mode 100644 index 000000000..2645fc8e0 --- /dev/null +++ b/staticaddr/address/log.go @@ -0,0 +1,24 @@ +package address + +import ( + "github.com/btcsuite/btclog" + "github.com/lightningnetwork/lnd/build" +) + +// Subsystem defines the sub system name of this package. +const Subsystem = "SADDR" + +// log is a logger that is initialized with no output filters. This means the +// package will not perform any logging by default until the caller requests it. +var log btclog.Logger + +// The default amount of logging is none. +func init() { + UseLogger(build.NewSubLogger(Subsystem, nil)) +} + +// UseLogger uses a specified Logger to output package logging info. This should +// be used in preference to SetLogWriter if the caller is also using btclog. +func UseLogger(logger btclog.Logger) { + log = logger +} diff --git a/staticaddr/address/manager.go b/staticaddr/address/manager.go index 75dccfb86..42b5d639a 100644 --- a/staticaddr/address/manager.go +++ b/staticaddr/address/manager.go @@ -10,7 +10,6 @@ import ( "github.com/btcsuite/btcd/btcec/v2/schnorr" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" - "github.com/btcsuite/btclog" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop/staticaddr" "github.com/lightninglabs/loop/staticaddr/script" @@ -22,14 +21,6 @@ import ( "github.com/lightningnetwork/lnd/lnwallet" ) -var ( - log btclog.Logger -) - -func init() { - log = staticaddr.GetLogger() -} - // ManagerConfig holds the configuration for the address manager. type ManagerConfig struct { // AddressClient is the client that communicates with the loop server diff --git a/staticaddr/deposit/log.go b/staticaddr/deposit/log.go new file mode 100644 index 000000000..58e1547f5 --- /dev/null +++ b/staticaddr/deposit/log.go @@ -0,0 +1,24 @@ +package deposit + +import ( + "github.com/btcsuite/btclog" + "github.com/lightningnetwork/lnd/build" +) + +// Subsystem defines the sub system name of this package. +const Subsystem = "SADDR" + +// log is a logger that is initialized with no output filters. This means the +// package will not perform any logging by default until the caller requests it. +var log btclog.Logger + +// The default amount of logging is none. +func init() { + UseLogger(build.NewSubLogger(Subsystem, nil)) +} + +// UseLogger uses a specified Logger to output package logging info. This should +// be used in preference to SetLogWriter if the caller is also using btclog. +func UseLogger(logger btclog.Logger) { + log = logger +} diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index ef4819802..9a08d0b0a 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -9,10 +9,8 @@ import ( "github.com/btcsuite/btcd/chaincfg" "github.com/btcsuite/btcd/txscript" "github.com/btcsuite/btcd/wire" - "github.com/btcsuite/btclog" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" - "github.com/lightninglabs/loop/staticaddr" staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" "github.com/lightningnetwork/lnd/lnwallet" @@ -33,14 +31,6 @@ const ( MaxConfs = 0 ) -var ( - log btclog.Logger -) - -func init() { - log = staticaddr.GetLogger() -} - // ManagerConfig holds the configuration for the address manager. type ManagerConfig struct { // AddressClient is the client that communicates with the loop server diff --git a/staticaddr/log.go b/staticaddr/log.go index faa520a2a..5ed384792 100644 --- a/staticaddr/log.go +++ b/staticaddr/log.go @@ -2,6 +2,8 @@ package staticaddr import ( "github.com/btcsuite/btclog" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightningnetwork/lnd/build" ) @@ -21,9 +23,6 @@ func init() { // be used in preference to SetLogWriter if the caller is also using btclog. func UseLogger(logger btclog.Logger) { log = logger -} - -// GetLogger returns the logger for this package. -func GetLogger() btclog.Logger { - return log + address.UseLogger(log) + deposit.UseLogger(log) } From 0a1f78b8ea0080454f326a0261246cec71532db0 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:18:31 +0200 Subject: [PATCH 28/67] staticaddr: address and deposit adjustments for withdrawals --- staticaddr/address/manager.go | 1 - staticaddr/address/manager_test.go | 11 ++++ staticaddr/deposit/actions.go | 16 +++++ staticaddr/deposit/deposit.go | 8 ++- staticaddr/deposit/fsm.go | 68 ++++++++++++++------- staticaddr/deposit/manager.go | 94 +++++++++++++++++++++++++++++- staticaddr/deposit/manager_test.go | 19 +++++- staticaddr/deposit/sql_store.go | 48 +++++++++++++-- 8 files changed, 231 insertions(+), 34 deletions(-) diff --git a/staticaddr/address/manager.go b/staticaddr/address/manager.go index 42b5d639a..6420db972 100644 --- a/staticaddr/address/manager.go +++ b/staticaddr/address/manager.go @@ -11,7 +11,6 @@ import ( "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" "github.com/lightninglabs/lndclient" - "github.com/lightninglabs/loop/staticaddr" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightninglabs/loop/staticaddr/version" "github.com/lightninglabs/loop/swap" diff --git a/staticaddr/address/manager_test.go b/staticaddr/address/manager_test.go index 8e15732de..9548640d8 100644 --- a/staticaddr/address/manager_test.go +++ b/staticaddr/address/manager_test.go @@ -32,6 +32,17 @@ type mockStaticAddressClient struct { mock.Mock } +func (m *mockStaticAddressClient) ServerWithdrawDeposits(ctx context.Context, + in *swapserverrpc.ServerWithdrawRequest, + opts ...grpc.CallOption) (*swapserverrpc.ServerWithdrawResponse, + error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.ServerWithdrawResponse), + args.Error(1) +} + func (m *mockStaticAddressClient) ServerNewAddress(ctx context.Context, in *swapserverrpc.ServerNewAddressRequest, opts ...grpc.CallOption) ( *swapserverrpc.ServerNewAddressResponse, error) { diff --git a/staticaddr/deposit/actions.go b/staticaddr/deposit/actions.go index 91b54c554..835a96076 100644 --- a/staticaddr/deposit/actions.go +++ b/staticaddr/deposit/actions.go @@ -154,3 +154,19 @@ func (f *FSM) SweptExpiredDepositAction(ctx context.Context, return fsm.NoOp } + +// WithdrawnDepositAction is the final action after a withdrawal. It signals to +// the manager that the deposit has been swept and the FSM can be removed. +func (f *FSM) WithdrawnDepositAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + select { + case <-ctx.Done(): + return fsm.OnError + + default: + f.finalizedDepositChan <- f.deposit.OutPoint + } + + return fsm.NoOp +} diff --git a/staticaddr/deposit/deposit.go b/staticaddr/deposit/deposit.go index 8c1199917..207ad440f 100644 --- a/staticaddr/deposit/deposit.go +++ b/staticaddr/deposit/deposit.go @@ -35,7 +35,7 @@ type Deposit struct { // state is the current state of the deposit. state fsm.StateType - // The outpoint of the deposit. + // Outpoint of the deposit. wire.OutPoint // Value is the amount of the deposit. @@ -52,6 +52,10 @@ type Deposit struct { // ExpirySweepTxid is the transaction id of the expiry sweep. ExpirySweepTxid chainhash.Hash + // FinalizedWithdrawalTx is the coop signed withdrawal transaction. It + // is republished on new block arrivals and on client restarts. + FinalizedWithdrawalTx *wire.MsgTx + sync.Mutex } @@ -68,7 +72,7 @@ func (d *Deposit) IsInFinalState() bool { d.Lock() defer d.Unlock() - return d.state == Expired || d.state == Failed + return d.state == Expired || d.state == Withdrawn || d.state == Failed } func (d *Deposit) IsExpired(currentHeight, expiry uint32) bool { diff --git a/staticaddr/deposit/fsm.go b/staticaddr/deposit/fsm.go index 91bc951d7..347ad5dff 100644 --- a/staticaddr/deposit/fsm.go +++ b/staticaddr/deposit/fsm.go @@ -29,6 +29,10 @@ var ( var ( Deposited = fsm.StateType("Deposited") + Withdrawing = fsm.StateType("Withdrawing") + + Withdrawn = fsm.StateType("Withdrawn") + PublishExpiredDeposit = fsm.StateType("PublishExpiredDeposit") WaitForExpirySweep = fsm.StateType("WaitForExpirySweep") @@ -40,11 +44,13 @@ var ( // Events. var ( - OnStart = fsm.EventType("OnStart") - OnExpiry = fsm.EventType("OnExpiry") - OnExpiryPublished = fsm.EventType("OnExpiryPublished") - OnExpirySwept = fsm.EventType("OnExpirySwept") - OnRecover = fsm.EventType("OnRecover") + OnStart = fsm.EventType("OnStart") + OnWithdrawInitiated = fsm.EventType("OnWithdrawInitiated") + OnWithdrawn = fsm.EventType("OnWithdrawn") + OnExpiry = fsm.EventType("OnExpiry") + OnExpiryPublished = fsm.EventType("OnExpiryPublished") + OnExpirySwept = fsm.EventType("OnExpirySwept") + OnRecover = fsm.EventType("OnRecover") ) // FSM is the state machine that handles the instant out. @@ -115,13 +121,9 @@ func NewFSM(ctx context.Context, deposit *Deposit, cfg *ManagerConfig, for { select { case currentHeight := <-depoFsm.blockNtfnChan: - err := depoFsm.handleBlockNotification( + depoFsm.handleBlockNotification( ctx, currentHeight, ) - if err != nil { - log.Errorf("error handling block "+ - "notification: %v", err) - } case <-ctx.Done(): return @@ -136,16 +138,11 @@ func NewFSM(ctx context.Context, deposit *Deposit, cfg *ManagerConfig, // OnExpiry event to publish the expiry sweep transaction if the deposit timed // out, or it republishes the expiry sweep transaction if it was not yet swept. func (f *FSM) handleBlockNotification(ctx context.Context, - currentHeight uint32) error { - - params, err := f.cfg.AddressManager.GetStaticAddressParameters(ctx) - if err != nil { - return err - } + currentHeight uint32) { // If the deposit is expired but not yet sufficiently confirmed, we // republish the expiry sweep transaction. - if f.deposit.IsExpired(currentHeight, params.Expiry) { + if f.deposit.IsExpired(currentHeight, f.params.Expiry) { if f.deposit.IsInState(WaitForExpirySweep) { f.PublishDepositExpirySweepAction(ctx, nil) } else { @@ -158,8 +155,6 @@ func (f *FSM) handleBlockNotification(ctx context.Context, }() } } - - return nil } // DepositStatesV0 returns the states a deposit can be in. @@ -173,8 +168,9 @@ func (f *FSM) DepositStatesV0() fsm.States { }, Deposited: fsm.State{ Transitions: fsm.Transitions{ - OnExpiry: PublishExpiredDeposit, - OnRecover: Deposited, + OnExpiry: PublishExpiredDeposit, + OnWithdrawInitiated: Withdrawing, + OnRecover: Deposited, }, Action: fsm.NoOpAction, }, @@ -209,6 +205,36 @@ func (f *FSM) DepositStatesV0() fsm.States { }, Action: f.SweptExpiredDepositAction, }, + Withdrawing: fsm.State{ + Transitions: fsm.Transitions{ + OnWithdrawn: Withdrawn, + // Upon recovery, we go back to the Deposited + // state. The deposit by then has a withdrawal + // address stamped to it which will cause it to + // transition into the Withdrawing state again. + OnRecover: Deposited, + + // A precondition for the Withdrawing state is + // that the withdrawal transaction has been + // broadcast. If the deposit expires while the + // withdrawal isn't confirmed, we can ignore the + // expiry. + OnExpiry: Withdrawing, + + // If the withdrawal failed we go back to + // Deposited, hoping that another withdrawal + // attempt will be successful. Alternatively, + // the client can wait for the timeout sweep. + fsm.OnError: Deposited, + }, + Action: fsm.NoOpAction, + }, + Withdrawn: fsm.State{ + Transitions: fsm.Transitions{ + OnExpiry: Expired, + }, + Action: f.WithdrawnDepositAction, + }, Failed: fsm.State{ Transitions: fsm.Transitions{ OnExpiry: Failed, diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index 9a08d0b0a..329ca0f05 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -3,6 +3,7 @@ package deposit import ( "context" "fmt" + "sort" "sync" "time" @@ -11,6 +12,7 @@ import ( "github.com/btcsuite/btcd/wire" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/fsm" staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" "github.com/lightningnetwork/lnd/lnwallet" @@ -29,6 +31,10 @@ const ( // MaxConfs is unset since we don't require a max number of // confirmations for deposits. MaxConfs = 0 + + // DefaultTransitionTimeout is the default timeout for transitions in + // the deposit state machine. + DefaultTransitionTimeout = 1 * time.Minute ) // ManagerConfig holds the configuration for the address manager. @@ -128,7 +134,7 @@ func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { } // Start the deposit notifier. - m.pollDeposits(ctx) + m.pollDeposits(m.runCtx) // Communicate to the caller that the address manager has completed its // initialization. @@ -420,3 +426,89 @@ func (m *Manager) finalizeDeposit(outpoint wire.OutPoint) { delete(m.deposits, outpoint) m.Unlock() } + +// GetActiveDepositsInState returns all active deposits. +func (m *Manager) GetActiveDepositsInState(stateFilter fsm.StateType) ( + []*Deposit, error) { + + m.Lock() + defer m.Unlock() + + var deposits []*Deposit + for _, fsm := range m.activeDeposits { + if fsm.deposit.GetState() != stateFilter { + continue + } + deposits = append(deposits, fsm.deposit) + } + + sort.Slice(deposits, func(i, j int) bool { + return deposits[i].ConfirmationHeight < + deposits[j].ConfirmationHeight + }) + + return deposits, nil +} + +// GetAllDeposits returns all active deposits. +func (m *Manager) GetAllDeposits() ([]*Deposit, error) { + return m.cfg.Store.AllDeposits(m.runCtx) +} + +// AllOutpointsActiveDeposits checks if all deposits referenced by the outpoints +// are active and in the specified state. +func (m *Manager) AllOutpointsActiveDeposits(outpoints []wire.OutPoint, + stateFilter fsm.StateType) ([]*Deposit, bool) { + + m.Lock() + defer m.Unlock() + + deposits := make([]*Deposit, 0, len(outpoints)) + for _, o := range outpoints { + if _, ok := m.activeDeposits[o]; !ok { + return nil, false + } + + deposit := m.deposits[o] + if deposit.GetState() != stateFilter { + return nil, false + } + + deposits = append(deposits, m.deposits[o]) + } + + return deposits, true +} + +// TransitionDeposits allows a caller to transition a set of deposits to a new +// state. +func (m *Manager) TransitionDeposits(deposits []*Deposit, event fsm.EventType, + expectedFinalState fsm.StateType) error { + + for _, d := range deposits { + m.Lock() + sm, ok := m.activeDeposits[d.OutPoint] + m.Unlock() + if !ok { + return fmt.Errorf("deposit not found") + } + + err := sm.SendEvent(m.runCtx, event, nil) + if err != nil { + return err + } + err = sm.DefaultObserver.WaitForState( + m.runCtx, DefaultTransitionTimeout, expectedFinalState, + ) + if err != nil { + return err + } + } + + return nil +} + +// UpdateDeposit overrides all fields of the deposit with given ID in the store. +func (m *Manager) UpdateDeposit(d *Deposit) error { + return m.cfg.Store.UpdateDeposit(m.runCtx, d) +} diff --git a/staticaddr/deposit/manager_test.go b/staticaddr/deposit/manager_test.go index 4c9ee9337..eeb875f8b 100644 --- a/staticaddr/deposit/manager_test.go +++ b/staticaddr/deposit/manager_test.go @@ -51,6 +51,17 @@ type mockStaticAddressClient struct { mock.Mock } +func (m *mockStaticAddressClient) ServerWithdrawDeposits(ctx context.Context, + in *swapserverrpc.ServerWithdrawRequest, + opts ...grpc.CallOption) (*swapserverrpc.ServerWithdrawResponse, + error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.ServerWithdrawResponse), + args.Error(1) +} + func (m *mockStaticAddressClient) ServerNewAddress(ctx context.Context, in *swapserverrpc.ServerNewAddressRequest, opts ...grpc.CallOption) ( *swapserverrpc.ServerNewAddressResponse, error) { @@ -158,8 +169,7 @@ func (m *MockChainNotifier) RegisterSpendNtfn(ctx context.Context, // TestManager checks that the manager processes the right channel notifications // while a deposit is expiring. func TestManager(t *testing.T) { - ctxb, cancel := context.WithCancel(context.Background()) - defer cancel() + ctx := context.Background() // Create the test context with required mocks. testContext := newManagerTestContext(t) @@ -167,7 +177,7 @@ func TestManager(t *testing.T) { // Start the deposit manager. go func() { err := testContext.manager.Run( - ctxb, uint32(testContext.mockLnd.Height), + ctx, uint32(testContext.mockLnd.Height), ) require.NoError(t, err) }() @@ -200,6 +210,9 @@ func TestManager(t *testing.T) { BlockHeight: defaultDepositConfirmations + defaultExpiry + 3, Tx: expiryTx, } + + // Ensure that the deposit is finalized. + <-finalizedDepositChan } // ManagerTestContext is a helper struct that contains all the necessary diff --git a/staticaddr/deposit/sql_store.go b/staticaddr/deposit/sql_store.go index 729007759..6221210e6 100644 --- a/staticaddr/deposit/sql_store.go +++ b/staticaddr/deposit/sql_store.go @@ -1,8 +1,10 @@ package deposit import ( + "bytes" "context" "database/sql" + "encoding/hex" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg/chainhash" @@ -74,16 +76,35 @@ func (s *SqlStore) UpdateDeposit(ctx context.Context, deposit *Deposit) error { } confirmationHeight = sql.NullInt64{ Int64: deposit.ConfirmationHeight, - Valid: deposit.ConfirmationHeight != 0, } ) + var finalizedWithdrawalTx string + if deposit.FinalizedWithdrawalTx != nil { + var buffer bytes.Buffer + err := deposit.FinalizedWithdrawalTx.Serialize( + &buffer, + ) + if err != nil { + return err + } + + finalizedWithdrawalTx = hex.EncodeToString(buffer.Bytes()) + } + updateArgs := sqlc.UpdateDepositParams{ DepositID: deposit.ID[:], TxHash: txHash, OutIndex: outIndex.Int32, ConfirmationHeight: confirmationHeight.Int64, - ExpirySweepTxid: deposit.ExpirySweepTxid[:], + FinalizedWithdrawalTx: sql.NullString{ + String: finalizedWithdrawalTx, + Valid: finalizedWithdrawalTx != "", + }, + } + + if deposit.ExpirySweepTxid != (chainhash.Hash{}) { + updateArgs.ExpirySweepTxid = deposit.ExpirySweepTxid[:] } return s.baseDB.ExecTx(ctx, &loopdb.SqliteTxOptions{}, @@ -193,6 +214,20 @@ func (s *SqlStore) toDeposit(row sqlc.Deposit, expirySweepTxid = *hash } + var finalizedWithdrawalTx *wire.MsgTx + if row.FinalizedWithdrawalTx.Valid { + finalizedWithdrawalTx = &wire.MsgTx{} + tx, err := hex.DecodeString(row.FinalizedWithdrawalTx.String) + if err != nil { + return nil, err + } + + err = finalizedWithdrawalTx.Deserialize(bytes.NewReader(tx)) + if err != nil { + return nil, err + } + } + return &Deposit{ ID: id, state: fsm.StateType(lastUpdate.UpdateState), @@ -200,10 +235,11 @@ func (s *SqlStore) toDeposit(row sqlc.Deposit, Hash: *txHash, Index: uint32(row.OutIndex), }, - Value: btcutil.Amount(row.Amount), - ConfirmationHeight: row.ConfirmationHeight, - TimeOutSweepPkScript: row.TimeoutSweepPkScript, - ExpirySweepTxid: expirySweepTxid, + Value: btcutil.Amount(row.Amount), + ConfirmationHeight: row.ConfirmationHeight, + TimeOutSweepPkScript: row.TimeoutSweepPkScript, + ExpirySweepTxid: expirySweepTxid, + FinalizedWithdrawalTx: finalizedWithdrawalTx, }, nil } From 8bdade6cf8f1f9808ff4b287a8e1d7291d7f08ce Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:19:07 +0200 Subject: [PATCH 29/67] staticaddr: withdrawal manager and interface --- staticaddr/log.go | 2 + staticaddr/withdraw/interface.go | 40 ++ staticaddr/withdraw/log.go | 15 + staticaddr/withdraw/manager.go | 823 +++++++++++++++++++++++++++++++ 4 files changed, 880 insertions(+) create mode 100644 staticaddr/withdraw/interface.go create mode 100644 staticaddr/withdraw/log.go create mode 100644 staticaddr/withdraw/manager.go diff --git a/staticaddr/log.go b/staticaddr/log.go index 5ed384792..fc5eb0108 100644 --- a/staticaddr/log.go +++ b/staticaddr/log.go @@ -4,6 +4,7 @@ import ( "github.com/btcsuite/btclog" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/withdraw" "github.com/lightningnetwork/lnd/build" ) @@ -25,4 +26,5 @@ func UseLogger(logger btclog.Logger) { log = logger address.UseLogger(log) deposit.UseLogger(log) + withdraw.UseLogger(log) } diff --git a/staticaddr/withdraw/interface.go b/staticaddr/withdraw/interface.go new file mode 100644 index 000000000..3131d9679 --- /dev/null +++ b/staticaddr/withdraw/interface.go @@ -0,0 +1,40 @@ +package withdraw + +import ( + "context" + + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightningnetwork/lnd/lnwallet" +) + +// AddressManager handles fetching of address parameters. +type AddressManager interface { + // GetStaticAddressParameters returns the static address parameters. + GetStaticAddressParameters(ctx context.Context) (*address.Parameters, + error) + + // GetStaticAddress returns the deposit address for the given + // client and server public keys. + GetStaticAddress(ctx context.Context) (*script.StaticAddress, error) + + // ListUnspent returns a list of utxos at the static address. + ListUnspent(ctx context.Context, minConfs, + maxConfs int32) ([]*lnwallet.Utxo, error) +} + +type DepositManager interface { + GetActiveDepositsInState(stateFilter fsm.StateType) ([]*deposit.Deposit, + error) + + AllOutpointsActiveDeposits(outpoints []wire.OutPoint, + stateFilter fsm.StateType) ([]*deposit.Deposit, bool) + + TransitionDeposits(ctx context.Context, deposits []*deposit.Deposit, + event fsm.EventType, expectedFinalState fsm.StateType) error + + UpdateDeposit(ctx context.Context, d *deposit.Deposit) error +} diff --git a/staticaddr/withdraw/log.go b/staticaddr/withdraw/log.go new file mode 100644 index 000000000..8408af32a --- /dev/null +++ b/staticaddr/withdraw/log.go @@ -0,0 +1,15 @@ +package withdraw + +import ( + "github.com/btcsuite/btclog" +) + +// log is a logger that is initialized with no output filters. This means the +// package will not perform any logging by default until the caller requests it. +var log btclog.Logger + +// UseLogger uses a specified Logger to output package logging info. This should +// be used in preference to SetLogWriter if the caller is also using btclog. +func UseLogger(logger btclog.Logger) { + log = logger +} diff --git a/staticaddr/withdraw/manager.go b/staticaddr/withdraw/manager.go new file mode 100644 index 000000000..26f5de501 --- /dev/null +++ b/staticaddr/withdraw/manager.go @@ -0,0 +1,823 @@ +package withdraw + +import ( + "context" + "errors" + "fmt" + "reflect" + "strings" + + "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop/staticaddr/deposit" + staticaddressrpc "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/lnrpc/walletrpc" + "github.com/lightningnetwork/lnd/lntypes" + "github.com/lightningnetwork/lnd/lnwallet" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" +) + +var ( + // ErrWithdrawingInactiveDeposits is returned when the user tries to + // withdraw inactive deposits. + ErrWithdrawingInactiveDeposits = errors.New("deposits to be " + + "withdrawn are unknown or inactive") + + // MinConfs is the minimum number of confirmations we require for a + // deposit to be considered withdrawn. + MinConfs int32 = 3 + + // Is the default confirmation target for the fee estimation of the + // withdrawal transaction. + defaultConfTarget int32 = 3 +) + +// ManagerConfig holds the configuration for the address manager. +type ManagerConfig struct { + // StaticAddressServerClient is the client that calls the swap server + // rpcs to negotiate static address withdrawals. + StaticAddressServerClient staticaddressrpc.StaticAddressServerClient + + // AddressManager gives the withdrawal manager access to static address + // parameters. + AddressManager AddressManager + + // DepositManager gives the withdrawal manager access to the deposits + // enabling it to create and manage withdrawals. + DepositManager DepositManager + + // WalletKit is the wallet client that is used to derive new keys from + // lnd's wallet. + WalletKit lndclient.WalletKitClient + + // ChainParams is the chain configuration(mainnet, testnet...) this + // manager uses. + ChainParams *chaincfg.Params + + // ChainNotifier is the chain notifier that is used to listen for new + // blocks. + ChainNotifier lndclient.ChainNotifierClient + + // Signer is the signer client that is used to sign transactions. + Signer lndclient.SignerClient +} + +// newWithdrawalRequest is used to send withdrawal request to the manager main +// loop. +type newWithdrawalRequest struct { + outpoints []wire.OutPoint + respChan chan *newWithdrawalResponse +} + +// newWithdrawalResponse is used to return withdrawal info and error to the +// server. +type newWithdrawalResponse struct { + txHash string + withdrawalPkScript string + err error +} + +// Manager manages the withdrawal state machines. +type Manager struct { + cfg *ManagerConfig + + // initChan signals the daemon that the withdrawal manager has completed + // its initialization. + initChan chan struct{} + + // newWithdrawalRequestChan receives a list of outpoints that should be + // withdrawn. The request is forwarded to the managers main loop. + newWithdrawalRequestChan chan newWithdrawalRequest + + // exitChan signals subroutines that the withdrawal manager is exiting. + exitChan chan struct{} + + // errChan forwards errors from the withdrawal manager to the server. + errChan chan error + + // initiationHeight stores the currently best known block height. + initiationHeight uint32 + + // finalizedWithdrawalTx are the finalized withdrawal transactions that + // are published to the network and re-published on block arrivals. + finalizedWithdrawalTxns map[chainhash.Hash]*wire.MsgTx +} + +// NewManager creates a new deposit withdrawal manager. +func NewManager(cfg *ManagerConfig) *Manager { + return &Manager{ + cfg: cfg, + initChan: make(chan struct{}), + finalizedWithdrawalTxns: make(map[chainhash.Hash]*wire.MsgTx), + exitChan: make(chan struct{}), + newWithdrawalRequestChan: make(chan newWithdrawalRequest), + errChan: make(chan error), + } +} + +// Run runs the deposit withdrawal manager. +func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { + m.initiationHeight = currentHeight + + newBlockChan, newBlockErrChan, err := + m.cfg.ChainNotifier.RegisterBlockEpochNtfn(ctx) + + if err != nil { + return err + } + + err = m.recoverWithdrawals(ctx) + if err != nil { + return err + } + + // Communicate to the caller that the address manager has completed its + // initialization. + close(m.initChan) + + var ( + txHash string + pkScript string + ) + for { + select { + case <-newBlockChan: + err = m.republishWithdrawals(ctx) + if err != nil { + log.Errorf("Error republishing withdrawals: %v", + err) + } + + case request := <-m.newWithdrawalRequestChan: + txHash, pkScript, err = m.WithdrawDeposits( + ctx, request.outpoints, + ) + if err != nil { + log.Errorf("Error withdrawing deposits: %v", + err) + } + + // We forward the initialized loop-in and error to + // DeliverLoopInRequest. + resp := &newWithdrawalResponse{ + txHash: txHash, + withdrawalPkScript: pkScript, + err: err, + } + select { + case request.respChan <- resp: + + case <-ctx.Done(): + // Notify subroutines that the main loop has + // been canceled. + close(m.exitChan) + + return ctx.Err() + } + + case err = <-newBlockErrChan: + return err + + case <-ctx.Done(): + // Signal subroutines that the manager is exiting. + close(m.exitChan) + + return ctx.Err() + } + } +} + +func (m *Manager) recoverWithdrawals(ctx context.Context) error { + // To recover withdrawals we skim through all active deposits and check + // if they have a withdrawal address set. For the ones that do we + // cluster those with equal withdrawal addresses and kick-off + // their withdrawal. Each cluster represents a separate withdrawal + // intent by the user. + activeDeposits, err := m.cfg.DepositManager.GetActiveDepositsInState( + deposit.Deposited, + ) + if err != nil { + return err + } + + // Group the deposits by their finalized withdrawal transaction. + depositsByWithdrawalTx := make(map[*wire.MsgTx][]*deposit.Deposit) + for _, d := range activeDeposits { + withdrawalTx := d.FinalizedWithdrawalTx + if withdrawalTx == nil { + continue + } + + depositsByWithdrawalTx[withdrawalTx] = append( + depositsByWithdrawalTx[withdrawalTx], d, + ) + } + + // We can now reinstate each cluster of deposits for a withdrawal. + for finalizedWithdrawalTx, deposits := range depositsByWithdrawalTx { + tx := finalizedWithdrawalTx + err = m.cfg.DepositManager.TransitionDeposits( + ctx, deposits, deposit.OnWithdrawInitiated, + deposit.Withdrawing, + ) + if err != nil { + return err + } + + err = m.publishFinalizedWithdrawalTx(ctx, tx) + if err != nil { + return err + } + + err = m.handleWithdrawal( + ctx, deposits, tx.TxHash(), tx.TxOut[0].PkScript, + ) + if err != nil { + return err + } + + m.finalizedWithdrawalTxns[tx.TxHash()] = tx + } + + return nil +} + +// WaitInitComplete waits until the address manager has completed its setup. +func (m *Manager) WaitInitComplete() { + defer log.Debugf("Static address withdrawal manager initiation " + + "complete.") + + <-m.initChan +} + +// WithdrawDeposits starts a deposits withdrawal flow. +func (m *Manager) WithdrawDeposits(ctx context.Context, + outpoints []wire.OutPoint) (string, string, error) { + + if len(outpoints) == 0 { + return "", "", fmt.Errorf("no outpoints selected to " + + "withdraw, unconfirmed deposits can't be withdrawn") + } + + // Ensure that the deposits are in a state in which they can be + // withdrawn. + deposits, allActive := m.cfg.DepositManager.AllOutpointsActiveDeposits( + outpoints, deposit.Deposited) + + if !allActive { + return "", "", ErrWithdrawingInactiveDeposits + } + + // Generate the withdrawal address from our local lnd wallet. + withdrawalAddress, err := m.cfg.WalletKit.NextAddr( + ctx, lnwallet.DefaultAccountName, + walletrpc.AddressType_TAPROOT_PUBKEY, false, + ) + if err != nil { + return "", "", err + } + + finalizedTx, err := m.createFinalizedWithdrawalTx( + ctx, deposits, withdrawalAddress, + ) + if err != nil { + return "", "", err + } + + // Attach the finalized withdrawal tx to the deposits. After a client + // restart we can use this address as an indicator to republish the + // withdrawal tx and continue the withdrawal. + // Deposits with the same withdrawal tx are part of the same withdrawal. + for _, d := range deposits { + d.Lock() + d.FinalizedWithdrawalTx = finalizedTx + d.Unlock() + } + + // Transition the deposits to the withdrawing state. This updates each + // deposits withdrawal address. If a transition fails, we'll return an + // error and abort the withdrawal. An error in transition is likely due + // to an error in the state machine. The already transitioned deposits + // should be reset to the Deposit state after a restart. + err = m.cfg.DepositManager.TransitionDeposits( + ctx, deposits, deposit.OnWithdrawInitiated, deposit.Withdrawing, + ) + if err != nil { + return "", "", err + } + + err = m.publishFinalizedWithdrawalTx(ctx, finalizedTx) + if err != nil { + return "", "", err + } + + withdrawalPkScript, err := txscript.PayToAddrScript(withdrawalAddress) + if err != nil { + return "", "", err + } + + err = m.handleWithdrawal( + ctx, deposits, finalizedTx.TxHash(), withdrawalPkScript, + ) + if err != nil { + return "", "", err + } + + m.finalizedWithdrawalTxns[finalizedTx.TxHash()] = finalizedTx + + return finalizedTx.TxID(), withdrawalAddress.String(), nil +} + +func (m *Manager) createFinalizedWithdrawalTx(ctx context.Context, + deposits []*deposit.Deposit, withdrawalAddress btcutil.Address) ( + *wire.MsgTx, error) { + + // Create a musig2 session for each deposit. + withdrawalSessions, clientNonces, err := m.createMusig2Sessions( + ctx, deposits, + ) + if err != nil { + return nil, err + } + + // Get the fee rate for the withdrawal sweep. + withdrawalSweepFeeRate, err := m.cfg.WalletKit.EstimateFeeRate( + ctx, defaultConfTarget, + ) + if err != nil { + return nil, err + } + + outpoints := toOutpoints(deposits) + resp, err := m.cfg.StaticAddressServerClient.ServerWithdrawDeposits( + ctx, &staticaddressrpc.ServerWithdrawRequest{ + Outpoints: toPrevoutInfo(outpoints), + ClientNonces: clientNonces, + ClientSweepAddr: withdrawalAddress.String(), + TxFeeRate: uint64(withdrawalSweepFeeRate), + }, + ) + if err != nil { + return nil, err + } + + addressParams, err := m.cfg.AddressManager.GetStaticAddressParameters( + ctx, + ) + if err != nil { + return nil, fmt.Errorf("couldn't get confirmation height for "+ + "deposit, %w", err) + } + + prevOuts := m.toPrevOuts(deposits, addressParams.PkScript) + totalValue := withdrawalValue(prevOuts) + withdrawalTx, err := m.createWithdrawalTx( + outpoints, totalValue, withdrawalAddress, + withdrawalSweepFeeRate, + ) + if err != nil { + return nil, err + } + + coopServerNonces, err := toNonces(resp.ServerNonces) + if err != nil { + return nil, err + } + + // Next we'll get our sweep tx signatures. + prevOutFetcher := txscript.NewMultiPrevOutFetcher(prevOuts) + _, err = m.signMusig2Tx( + ctx, prevOutFetcher, outpoints, m.cfg.Signer, withdrawalTx, + withdrawalSessions, coopServerNonces, + ) + if err != nil { + return nil, err + } + + // Now we'll finalize the sweepless sweep transaction. + finalizedTx, err := m.finalizeMusig2Transaction( + ctx, outpoints, m.cfg.Signer, withdrawalSessions, + withdrawalTx, resp.Musig2SweepSigs, + ) + if err != nil { + return nil, err + } + + return finalizedTx, nil +} + +func (m *Manager) publishFinalizedWithdrawalTx(ctx context.Context, + tx *wire.MsgTx) error { + + if tx == nil { + return errors.New("can't publish, finalized withdrawal tx is " + + "nil") + } + + txLabel := fmt.Sprintf("deposit-withdrawal-%v", tx.TxHash()) + + // Publish the withdrawal sweep transaction. + err := m.cfg.WalletKit.PublishTransaction(ctx, tx, txLabel) + + if err != nil { + if !strings.Contains(err.Error(), "output already spent") { + log.Errorf("%v: %v", txLabel, err) + } + } + + log.Debugf("published deposit withdrawal with txid: %v", tx.TxHash()) + + return nil +} + +func (m *Manager) handleWithdrawal(ctx context.Context, + deposits []*deposit.Deposit, txHash chainhash.Hash, + withdrawalPkScript []byte) error { + + confChan, errChan, err := m.cfg.ChainNotifier.RegisterConfirmationsNtfn( + ctx, &txHash, withdrawalPkScript, MinConfs, + int32(m.initiationHeight), + ) + if err != nil { + return err + } + + go func() { + select { + case <-confChan: + err = m.cfg.DepositManager.TransitionDeposits( + ctx, deposits, deposit.OnWithdrawn, + deposit.Withdrawn, + ) + if err != nil { + log.Errorf("Error transitioning deposits: %v", + err) + } + + // Remove the withdrawal from the active withdrawals and + // remove its finalized to stop republishing it on block + // arrivals. + delete(m.finalizedWithdrawalTxns, txHash) + + case err := <-errChan: + log.Errorf("Error waiting for confirmation: %v", err) + + case <-ctx.Done(): + log.Errorf("Withdrawal tx confirmation wait canceled") + } + }() + + return nil +} + +func toOutpoints(deposits []*deposit.Deposit) []wire.OutPoint { + outpoints := make([]wire.OutPoint, len(deposits)) + for i, d := range deposits { + outpoints[i] = wire.OutPoint{ + Hash: d.Hash, + Index: d.Index, + } + } + + return outpoints +} + +// signMusig2Tx adds the server nonces to the musig2 sessions and signs the +// transaction. +func (m *Manager) signMusig2Tx(ctx context.Context, + prevOutFetcher *txscript.MultiPrevOutFetcher, outpoints []wire.OutPoint, + signer lndclient.SignerClient, tx *wire.MsgTx, + musig2sessions []*input.MuSig2SessionInfo, + counterPartyNonces [][musig2.PubNonceSize]byte) ([][]byte, error) { + + sigHashes := txscript.NewTxSigHashes(tx, prevOutFetcher) + sigs := make([][]byte, len(outpoints)) + + for idx, outpoint := range outpoints { + if !reflect.DeepEqual(tx.TxIn[idx].PreviousOutPoint, + outpoint) { + + return nil, fmt.Errorf("tx input does not match " + + "deposits") + } + + taprootSigHash, err := txscript.CalcTaprootSignatureHash( + sigHashes, txscript.SigHashDefault, tx, idx, + prevOutFetcher, + ) + if err != nil { + return nil, err + } + + var digest [32]byte + copy(digest[:], taprootSigHash) + + // Register the server's nonce before attempting to create our + // partial signature. + haveAllNonces, err := signer.MuSig2RegisterNonces( + ctx, musig2sessions[idx].SessionID, + [][musig2.PubNonceSize]byte{counterPartyNonces[idx]}, + ) + if err != nil { + return nil, err + } + + // Sanity check that we have all the nonces. + if !haveAllNonces { + return nil, fmt.Errorf("invalid MuSig2 session: " + + "nonces missing") + } + + // Since our MuSig2 session has all nonces, we can now create + // the local partial signature by signing the sig hash. + sig, err := signer.MuSig2Sign( + ctx, musig2sessions[idx].SessionID, digest, false, + ) + if err != nil { + return nil, err + } + + sigs[idx] = sig + } + + return sigs, nil +} + +func withdrawalValue(prevOuts map[wire.OutPoint]*wire.TxOut) btcutil.Amount { + var totalValue btcutil.Amount + for _, prevOut := range prevOuts { + totalValue += btcutil.Amount(prevOut.Value) + } + return totalValue +} + +// toNonces converts a byte slice to a 66 byte slice. +func toNonces(nonces [][]byte) ([][musig2.PubNonceSize]byte, error) { + res := make([][musig2.PubNonceSize]byte, 0, len(nonces)) + for _, n := range nonces { + n := n + nonce, err := byteSliceTo66ByteSlice(n) + if err != nil { + return nil, err + } + + res = append(res, nonce) + } + + return res, nil +} + +// byteSliceTo66ByteSlice converts a byte slice to a 66 byte slice. +func byteSliceTo66ByteSlice(b []byte) ([musig2.PubNonceSize]byte, error) { + if len(b) != musig2.PubNonceSize { + return [musig2.PubNonceSize]byte{}, + fmt.Errorf("invalid byte slice length") + } + + var res [musig2.PubNonceSize]byte + copy(res[:], b) + + return res, nil +} + +func (m *Manager) createWithdrawalTx(outpoints []wire.OutPoint, + withdrawlAmount btcutil.Amount, clientSweepAddress btcutil.Address, + feeRate chainfee.SatPerKWeight) (*wire.MsgTx, + error) { + + // First Create the tx. + msgTx := wire.NewMsgTx(2) + + // Add the deposit inputs to the transaction in the order the server + // signed them. + for _, outpoint := range outpoints { + msgTx.AddTxIn(&wire.TxIn{ + PreviousOutPoint: outpoint, + }) + } + + // Estimate the fee. + weight, err := withdrawalFee(len(outpoints), clientSweepAddress) + if err != nil { + return nil, err + } + + pkscript, err := txscript.PayToAddrScript(clientSweepAddress) + if err != nil { + return nil, err + } + + fee := feeRate.FeeForWeight(weight) + + // Create the sweep output + sweepOutput := &wire.TxOut{ + Value: int64(withdrawlAmount) - int64(fee), + PkScript: pkscript, + } + + msgTx.AddTxOut(sweepOutput) + + return msgTx, nil +} + +// withdrawalFee returns the weight for the withdrawal transaction. +func withdrawalFee(numInputs int, + sweepAddress btcutil.Address) (lntypes.WeightUnit, error) { + + var weightEstimator input.TxWeightEstimator + for i := 0; i < numInputs; i++ { + weightEstimator.AddTaprootKeySpendInput( + txscript.SigHashDefault, + ) + } + + // Get the weight of the sweep output. + switch sweepAddress.(type) { + case *btcutil.AddressWitnessPubKeyHash: + weightEstimator.AddP2WKHOutput() + + case *btcutil.AddressTaproot: + weightEstimator.AddP2TROutput() + + default: + return 0, fmt.Errorf("invalid sweep address type %T", + sweepAddress) + } + + return weightEstimator.Weight(), nil +} + +// finalizeMusig2Transaction creates the finalized transactions for either +// the htlc or the cooperative close. +func (m *Manager) finalizeMusig2Transaction(ctx context.Context, + outpoints []wire.OutPoint, signer lndclient.SignerClient, + musig2Sessions []*input.MuSig2SessionInfo, + tx *wire.MsgTx, serverSigs [][]byte) (*wire.MsgTx, error) { + + for idx := range outpoints { + haveAllSigs, finalSig, err := signer.MuSig2CombineSig( + ctx, musig2Sessions[idx].SessionID, + [][]byte{serverSigs[idx]}, + ) + if err != nil { + return nil, err + } + + if !haveAllSigs { + return nil, fmt.Errorf("missing sigs") + } + + tx.TxIn[idx].Witness = wire.TxWitness{finalSig} + } + + return tx, nil +} + +func toPrevoutInfo(outpoints []wire.OutPoint) []*staticaddressrpc.PrevoutInfo { + var result []*staticaddressrpc.PrevoutInfo + for _, o := range outpoints { + outP := o + outpoint := &staticaddressrpc.PrevoutInfo{ + TxidBytes: outP.Hash[:], + OutputIndex: outP.Index, + } + result = append(result, outpoint) + } + + return result +} + +// createMusig2Sessions creates a musig2 session for a number of deposits. +func (m *Manager) createMusig2Sessions(ctx context.Context, + deposits []*deposit.Deposit) ([]*input.MuSig2SessionInfo, [][]byte, + error) { + + musig2Sessions := make([]*input.MuSig2SessionInfo, len(deposits)) + clientNonces := make([][]byte, len(deposits)) + + // Create the sessions and nonces from the deposits. + for i := 0; i < len(deposits); i++ { + session, err := m.createMusig2Session(ctx) + if err != nil { + return nil, nil, err + } + + musig2Sessions[i] = session + clientNonces[i] = session.PublicNonce[:] + } + + return musig2Sessions, clientNonces, nil +} + +// Musig2CreateSession creates a musig2 session for the deposit. +func (m *Manager) createMusig2Session(ctx context.Context) ( + *input.MuSig2SessionInfo, error) { + + addressParams, err := m.cfg.AddressManager.GetStaticAddressParameters( + ctx, + ) + if err != nil { + return nil, fmt.Errorf("couldn't get confirmation height for "+ + "deposit, %w", err) + } + + signers := [][]byte{ + addressParams.ClientPubkey.SerializeCompressed(), + addressParams.ServerPubkey.SerializeCompressed(), + } + + address, err := m.cfg.AddressManager.GetStaticAddress(ctx) + if err != nil { + return nil, fmt.Errorf("couldn't get confirmation height for "+ + "deposit, %w", err) + } + + expiryLeaf := address.TimeoutLeaf + + rootHash := expiryLeaf.TapHash() + + return m.cfg.Signer.MuSig2CreateSession( + ctx, input.MuSig2Version100RC2, &addressParams.KeyLocator, + signers, lndclient.MuSig2TaprootTweakOpt(rootHash[:], false), + ) +} + +func (m *Manager) toPrevOuts(deposits []*deposit.Deposit, + pkScript []byte) map[wire.OutPoint]*wire.TxOut { + + prevOuts := make(map[wire.OutPoint]*wire.TxOut, len(deposits)) + for _, d := range deposits { + outpoint := wire.OutPoint{ + Hash: d.Hash, + Index: d.Index, + } + txOut := &wire.TxOut{ + Value: int64(d.Value), + PkScript: pkScript, + } + prevOuts[outpoint] = txOut + } + + return prevOuts +} + +func (m *Manager) republishWithdrawals(ctx context.Context) error { + for _, finalizedTx := range m.finalizedWithdrawalTxns { + if finalizedTx == nil { + log.Warnf("Finalized withdrawal tx is nil") + continue + } + + err := m.publishFinalizedWithdrawalTx(ctx, finalizedTx) + if err != nil { + log.Errorf("Error republishing withdrawal: %v", err) + + return err + } + } + + return nil +} + +// DeliverWithdrawalRequest forwards a withdrawal request to the manager main +// loop. +func (m *Manager) DeliverWithdrawalRequest(ctx context.Context, + outpoints []wire.OutPoint) (string, string, error) { + + request := newWithdrawalRequest{ + outpoints: outpoints, + respChan: make(chan *newWithdrawalResponse), + } + + // Send the new loop-in request to the manager run loop. + select { + case m.newWithdrawalRequestChan <- request: + + case <-m.exitChan: + return "", "", fmt.Errorf("withdrawal manager has been " + + "canceled") + + case <-ctx.Done(): + return "", "", fmt.Errorf("context canceled while withdrawing") + } + + // Wait for the response from the manager run loop. + select { + case resp := <-request.respChan: + return resp.txHash, resp.withdrawalPkScript, resp.err + + case <-m.exitChan: + return "", "", fmt.Errorf("withdrawal manager has been " + + "canceled") + + case <-ctx.Done(): + return "", "", fmt.Errorf("context canceled while waiting " + + "for withdrawal response") + } +} From 69cf9f1d6e924e3b372fabcca5dd7767c901786f Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:19:43 +0200 Subject: [PATCH 30/67] loopd: static address withdrawals support --- loopd/daemon.go | 41 ++++++++++++++++++++++ loopd/perms/perms.go | 7 ++++ loopd/swapclient_server.go | 69 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+) diff --git a/loopd/daemon.go b/loopd/daemon.go index 0749aab18..50405613c 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -24,6 +24,7 @@ import ( "github.com/lightninglabs/loop/notifications" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/withdraw" loop_swaprpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/sweepbatcher" "github.com/lightningnetwork/lnd/clock" @@ -539,6 +540,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { staticAddressManager *address.Manager depositManager *deposit.Manager + withdrawalManager *withdraw.Manager ) // Create the reservation and instantout managers. @@ -604,6 +606,18 @@ func (d *Daemon) initialize(withMacaroonService bool) error { Signer: d.lnd.Signer, } depositManager = deposit.NewManager(depoCfg) + + // Static address deposit withdrawal manager setup. + withdrawalCfg := &withdraw.ManagerConfig{ + StaticAddressServerClient: staticAddressClient, + AddressManager: staticAddressManager, + DepositManager: depositManager, + WalletKit: d.lnd.WalletKit, + ChainParams: d.lnd.ChainParams, + ChainNotifier: d.lnd.ChainNotifier, + Signer: d.lnd.Signer, + } + withdrawalManager = withdraw.NewManager(withdrawalCfg) } // Now finally fully initialize the swap client RPC server instance. @@ -621,6 +635,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { instantOutManager: instantOutManager, staticAddressManager: staticAddressManager, depositManager: depositManager, + withdrawalManager: withdrawalManager, } // Retrieve all currently existing swaps from the database. @@ -804,6 +819,32 @@ func (d *Daemon) initialize(withMacaroonService bool) error { depositManager.WaitInitComplete() } + // Start the static address deposit withdrawal manager. + if withdrawalManager != nil { + d.wg.Add(1) + go func() { + defer d.wg.Done() + + // Lnd's GetInfo call supplies us with the current block + // height. + info, err := d.lnd.Client.GetInfo(d.mainCtx) + if err != nil { + d.internalErrChan <- err + return + } + + log.Info("Starting static address deposit withdrawal " + + "manager...") + err = withdrawalManager.Run(d.mainCtx, info.BlockHeight) + if err != nil && !errors.Is(context.Canceled, err) { + d.internalErrChan <- err + } + log.Info("Static address deposit withdrawal manager " + + "stopped") + }() + withdrawalManager.WaitInitComplete() + } + // Last, start our internal error handler. This will return exactly one // error or nil on the main error channel to inform the caller that // something went wrong or that shutdown is complete. We don't add to diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index 08e40f1cf..10d2ec153 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -87,6 +87,13 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "loop", Action: "in", }}, + "/looprpc.SwapClient/WithdrawDeposits": {{ + Entity: "swap", + Action: "execute", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetLsatTokens": {{ Entity: "auth", Action: "read", diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 00fd12d18..fa60267ac 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -15,6 +15,7 @@ import ( "github.com/btcsuite/btcd/btcec/v2" "github.com/btcsuite/btcd/btcutil" "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/wire" "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" @@ -26,6 +27,7 @@ import ( "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/withdraw" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/lnrpc/walletrpc" @@ -87,6 +89,7 @@ type swapClientServer struct { instantOutManager *instantout.Manager staticAddressManager *address.Manager depositManager *deposit.Manager + withdrawalManager *withdraw.Manager swaps map[lntypes.Hash]loop.SwapInfo subscribers map[int]chan<- interface{} statusChan chan loop.SwapInfo @@ -1363,6 +1366,72 @@ func (s *swapClientServer) ListUnspentDeposits(ctx context.Context, return &looprpc.ListUnspentDepositsResponse{Utxos: respUtxos}, nil } +// WithdrawDeposits tries to obtain a partial signature from the server to spend +// the selected deposits to the client's wallet. +func (s *swapClientServer) WithdrawDeposits(ctx context.Context, + req *looprpc.WithdrawDepositsRequest) ( + *looprpc.WithdrawDepositsResponse, error) { + + var ( + isAllSelected = req.All + isUtxoSelected = len(req.Outpoints) > 0 + outpoints []wire.OutPoint + err error + ) + + switch { + case isAllSelected == isUtxoSelected: + return nil, fmt.Errorf("must select either all or some utxos") + + case isAllSelected: + deposits, err := s.depositManager.GetActiveDepositsInState( + deposit.Deposited, + ) + if err != nil { + return nil, err + } + + for _, d := range deposits { + outpoints = append(outpoints, d.OutPoint) + } + + case isUtxoSelected: + outpoints, err = toServerOutpoints(req.Outpoints) + if err != nil { + return nil, err + } + } + + txhash, pkScript, err := s.withdrawalManager.DeliverWithdrawalRequest( + ctx, outpoints, + ) + if err != nil { + return nil, err + } + + return &looprpc.WithdrawDepositsResponse{ + WithdrawalTxHash: txhash, + PkScript: pkScript, + }, err +} + +func toServerOutpoints(outpoints []*looprpc.OutPoint) ([]wire.OutPoint, + error) { + + var serverOutpoints []wire.OutPoint + for _, o := range outpoints { + outpointStr := fmt.Sprintf("%s:%d", o.TxidStr, o.OutputIndex) + newOutpoint, err := wire.NewOutPointFromString(outpointStr) + if err != nil { + return nil, err + } + + serverOutpoints = append(serverOutpoints, *newOutpoint) + } + + return serverOutpoints, nil +} + func rpcAutoloopReason(reason liquidity.Reason) (looprpc.AutoReason, error) { switch reason { case liquidity.ReasonNone: From 1fd8238ff11a251912f21e41e108059a6a8a7d64 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Mon, 6 May 2024 14:19:49 +0200 Subject: [PATCH 31/67] loop: static address withdrawals support --- cmd/loop/staticaddr.go | 114 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index bf1f7fcae..bc2a62da7 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -2,8 +2,13 @@ package main import ( "context" + "encoding/hex" + "errors" "fmt" + "strconv" + "strings" + "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/lightninglabs/loop/looprpc" "github.com/urfave/cli" ) @@ -16,6 +21,7 @@ var staticAddressCommands = cli.Command{ Subcommands: []cli.Command{ newStaticAddressCommand, listUnspentCommand, + withdrawalCommand, }, } @@ -105,3 +111,111 @@ func listUnspent(ctx *cli.Context) error { return nil } + +var withdrawalCommand = cli.Command{ + Name: "withdraw", + ShortName: "w", + Usage: "Withdraw from static address deposits.", + Description: ` + Withdraws from all or selected static address deposits by sweeping them + back to our lnd wallet. + `, + Flags: []cli.Flag{ + cli.StringSliceFlag{ + Name: "utxo", + Usage: "specify utxos as outpoints(tx:idx) which will" + + "be withdrawn.", + }, + cli.BoolFlag{ + Name: "all", + Usage: "withdraws all static address deposits.", + }, + }, + Action: withdraw, +} + +func withdraw(ctx *cli.Context) error { + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "withdraw") + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + var ( + isAllSelected = ctx.IsSet("all") + isUtxoSelected = ctx.IsSet("utxo") + outpoints []*looprpc.OutPoint + ctxb = context.Background() + ) + + switch { + case isAllSelected == isUtxoSelected: + return errors.New("must select either all or some utxos") + + case isAllSelected: + case isUtxoSelected: + utxos := ctx.StringSlice("utxo") + outpoints, err = utxosToOutpoints(utxos) + if err != nil { + return err + } + + default: + return fmt.Errorf("unknown withdrawal request") + } + + resp, err := client.WithdrawDeposits(ctxb, &looprpc.WithdrawDepositsRequest{ + Outpoints: outpoints, + All: isAllSelected, + }) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + +func utxosToOutpoints(utxos []string) ([]*looprpc.OutPoint, error) { + outpoints := make([]*looprpc.OutPoint, 0, len(utxos)) + if len(utxos) == 0 { + return nil, fmt.Errorf("no utxos specified") + } + for _, utxo := range utxos { + outpoint, err := NewProtoOutPoint(utxo) + if err != nil { + return nil, err + } + outpoints = append(outpoints, outpoint) + } + + return outpoints, nil +} + +// NewProtoOutPoint parses an OutPoint into its corresponding lnrpc.OutPoint +// type. +func NewProtoOutPoint(op string) (*looprpc.OutPoint, error) { + parts := strings.Split(op, ":") + if len(parts) != 2 { + return nil, errors.New("outpoint should be of the form " + + "txid:index") + } + txid := parts[0] + if hex.DecodedLen(len(txid)) != chainhash.HashSize { + return nil, fmt.Errorf("invalid hex-encoded txid %v", txid) + } + outputIndex, err := strconv.Atoi(parts[1]) + if err != nil { + return nil, fmt.Errorf("invalid output index: %v", err) + } + + return &looprpc.OutPoint{ + TxidStr: txid, + OutputIndex: uint32(outputIndex), + }, nil +} From 00f8d5fdb179e9acf19475f97c0b7c00d6ddfc41 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 5 Jun 2024 13:33:47 +0200 Subject: [PATCH 32/67] looprpc: static address summary --- looprpc/client.pb.go | 1064 +++++++++++++++++++++++---------- looprpc/client.proto | 131 ++++ looprpc/client.swagger.json | 84 +++ looprpc/client_grpc.pb.go | 42 ++ looprpc/swapclient.pb.json.go | 25 + 5 files changed, 1025 insertions(+), 321 deletions(-) diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 821755390..d4586167e 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -439,6 +439,84 @@ func (AutoReason) EnumDescriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{5} } +type DepositState int32 + +const ( + // UNKNOWN_STATE is the default state of a deposit. + DepositState_UNKNOWN_STATE DepositState = 0 + // DEPOSITED indicates that the deposit has been sufficiently confirmed on + // chain. + DepositState_DEPOSITED DepositState = 1 + // WITHDRAWING indicates that the deposit is currently being withdrawn. It + // flips to WITHDRAWN once the withdrawal transaction has been sufficiently + // confirmed. + DepositState_WITHDRAWING DepositState = 2 + // WITHDRAWN indicates that the deposit has been withdrawn. + DepositState_WITHDRAWN DepositState = 3 + // PUBLISH_EXPIRED indicates that the deposit has expired and the sweep + // transaction has been published. + DepositState_PUBLISH_EXPIRED DepositState = 4 + // WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep + // transaction has not yet been sufficiently confirmed. + DepositState_WAIT_FOR_EXPIRY_SWEEP DepositState = 5 + // EXPIRED indicates that the deposit has expired and the sweep transaction + // has been sufficiently confirmed. + DepositState_EXPIRED DepositState = 6 + // FAILED_STATE indicates that the deposit has failed. + DepositState_FAILED_STATE DepositState = 7 +) + +// Enum value maps for DepositState. +var ( + DepositState_name = map[int32]string{ + 0: "UNKNOWN_STATE", + 1: "DEPOSITED", + 2: "WITHDRAWING", + 3: "WITHDRAWN", + 4: "PUBLISH_EXPIRED", + 5: "WAIT_FOR_EXPIRY_SWEEP", + 6: "EXPIRED", + 7: "FAILED_STATE", + } + DepositState_value = map[string]int32{ + "UNKNOWN_STATE": 0, + "DEPOSITED": 1, + "WITHDRAWING": 2, + "WITHDRAWN": 3, + "PUBLISH_EXPIRED": 4, + "WAIT_FOR_EXPIRY_SWEEP": 5, + "EXPIRED": 6, + "FAILED_STATE": 7, + } +) + +func (x DepositState) Enum() *DepositState { + p := new(DepositState) + *p = x + return p +} + +func (x DepositState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DepositState) Descriptor() protoreflect.EnumDescriptor { + return file_client_proto_enumTypes[6].Descriptor() +} + +func (DepositState) Type() protoreflect.EnumType { + return &file_client_proto_enumTypes[6] +} + +func (x DepositState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DepositState.Descriptor instead. +func (DepositState) EnumDescriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{6} +} + type ListSwapsFilter_SwapTypeFilter int32 const ( @@ -475,11 +553,11 @@ func (x ListSwapsFilter_SwapTypeFilter) String() string { } func (ListSwapsFilter_SwapTypeFilter) Descriptor() protoreflect.EnumDescriptor { - return file_client_proto_enumTypes[6].Descriptor() + return file_client_proto_enumTypes[7].Descriptor() } func (ListSwapsFilter_SwapTypeFilter) Type() protoreflect.EnumType { - return &file_client_proto_enumTypes[6] + return &file_client_proto_enumTypes[7] } func (x ListSwapsFilter_SwapTypeFilter) Number() protoreflect.EnumNumber { @@ -4396,6 +4474,249 @@ func (x *OutPoint) GetOutputIndex() uint32 { return 0 } +type StaticAddressSummaryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Filters the list of all stored deposits by deposit state. + StateFilter DepositState `protobuf:"varint,1,opt,name=state_filter,json=stateFilter,proto3,enum=looprpc.DepositState" json:"state_filter,omitempty"` + // Filters the list of all stored deposits by the outpoint. + Outpoints []string `protobuf:"bytes,2,rep,name=outpoints,proto3" json:"outpoints,omitempty"` +} + +func (x *StaticAddressSummaryRequest) Reset() { + *x = StaticAddressSummaryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[53] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressSummaryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressSummaryRequest) ProtoMessage() {} + +func (x *StaticAddressSummaryRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[53] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressSummaryRequest.ProtoReflect.Descriptor instead. +func (*StaticAddressSummaryRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{53} +} + +func (x *StaticAddressSummaryRequest) GetStateFilter() DepositState { + if x != nil { + return x.StateFilter + } + return DepositState_UNKNOWN_STATE +} + +func (x *StaticAddressSummaryRequest) GetOutpoints() []string { + if x != nil { + return x.Outpoints + } + return nil +} + +type StaticAddressSummaryResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The static address of the client. + StaticAddress string `protobuf:"bytes,1,opt,name=static_address,json=staticAddress,proto3" json:"static_address,omitempty"` + // The total number of deposits. + TotalNumDeposits uint32 `protobuf:"varint,2,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` + // The total value of unconfirmed deposits. + ValueUnconfirmed int64 `protobuf:"varint,3,opt,name=value_unconfirmed,json=valueUnconfirmed,proto3" json:"value_unconfirmed,omitempty"` + // The total value of confirmed deposits. + ValueDeposited int64 `protobuf:"varint,4,opt,name=value_deposited,json=valueDeposited,proto3" json:"value_deposited,omitempty"` + // The total value of all expired deposits. + ValueExpired int64 `protobuf:"varint,5,opt,name=value_expired,json=valueExpired,proto3" json:"value_expired,omitempty"` + // The total value of all deposits that have been withdrawn. + ValueWithdrawn int64 `protobuf:"varint,6,opt,name=value_withdrawn,json=valueWithdrawn,proto3" json:"value_withdrawn,omitempty"` + // A list of all deposits that match the filtered state. + FilteredDeposits []*Deposit `protobuf:"bytes,7,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` +} + +func (x *StaticAddressSummaryResponse) Reset() { + *x = StaticAddressSummaryResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressSummaryResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressSummaryResponse) ProtoMessage() {} + +func (x *StaticAddressSummaryResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressSummaryResponse.ProtoReflect.Descriptor instead. +func (*StaticAddressSummaryResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{54} +} + +func (x *StaticAddressSummaryResponse) GetStaticAddress() string { + if x != nil { + return x.StaticAddress + } + return "" +} + +func (x *StaticAddressSummaryResponse) GetTotalNumDeposits() uint32 { + if x != nil { + return x.TotalNumDeposits + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueUnconfirmed() int64 { + if x != nil { + return x.ValueUnconfirmed + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueDeposited() int64 { + if x != nil { + return x.ValueDeposited + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueExpired() int64 { + if x != nil { + return x.ValueExpired + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueWithdrawn() int64 { + if x != nil { + return x.ValueWithdrawn + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetFilteredDeposits() []*Deposit { + if x != nil { + return x.FilteredDeposits + } + return nil +} + +type Deposit struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The identifier of the deposit. + Id []byte `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + // The state of the deposit. + State DepositState `protobuf:"varint,2,opt,name=state,proto3,enum=looprpc.DepositState" json:"state,omitempty"` + // The outpoint of the deposit in format txid:index. + Outpoint string `protobuf:"bytes,3,opt,name=outpoint,proto3" json:"outpoint,omitempty"` + // The value of the deposit in satoshis. + Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` + // The block height at which the deposit was confirmed. + ConfirmationHeight int64 `protobuf:"varint,5,opt,name=confirmation_height,json=confirmationHeight,proto3" json:"confirmation_height,omitempty"` +} + +func (x *Deposit) Reset() { + *x = Deposit{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Deposit) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Deposit) ProtoMessage() {} + +func (x *Deposit) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Deposit.ProtoReflect.Descriptor instead. +func (*Deposit) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{55} +} + +func (x *Deposit) GetId() []byte { + if x != nil { + return x.Id + } + return nil +} + +func (x *Deposit) GetState() DepositState { + if x != nil { + return x.State + } + return DepositState_UNKNOWN_STATE +} + +func (x *Deposit) GetOutpoint() string { + if x != nil { + return x.Outpoint + } + return "" +} + +func (x *Deposit) GetValue() int64 { + if x != nil { + return x.Value + } + return 0 +} + +func (x *Deposit) GetConfirmationHeight() int64 { + if x != nil { + return x.ConfirmationHeight + } + return 0 +} + var File_client_proto protoreflect.FileDescriptor var file_client_proto_rawDesc = []byte{ @@ -4925,193 +5246,249 @@ var file_client_proto_rawDesc = []byte{ 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x2a, 0x3b, - 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, - 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, - 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, - 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, - 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, - 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, - 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, - 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, - 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, - 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, - 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, - 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, - 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, - 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, - 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, - 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, - 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, - 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, - 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, - 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, - 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, - 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, - 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, - 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, - 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, - 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, - 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, - 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, - 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, - 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, - 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, - 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, - 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, - 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, - 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, - 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, - 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, - 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, - 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, - 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, - 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, - 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, - 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x32, - 0xbf, 0x0e, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, - 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, - 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, - 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, - 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, - 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, + 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, + 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, + 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, + 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, + 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, + 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, + 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x12, + 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0xa9, + 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, + 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, + 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, + 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, + 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, + 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, + 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, + 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, + 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, + 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, + 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, + 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, + 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, + 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, + 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, + 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, + 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, + 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, + 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, + 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, + 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, + 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, + 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, + 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, + 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, + 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, + 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, + 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, + 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, + 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, + 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, + 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, + 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, + 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, + 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, + 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, + 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, + 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, + 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, + 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, + 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, + 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, + 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x2a, 0x9f, 0x01, 0x0a, 0x0c, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, + 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, + 0x0a, 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, + 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x13, + 0x0a, 0x0f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x05, 0x12, 0x0b, + 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, + 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x07, 0x32, 0xa7, 0x0f, + 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, + 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, + 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, + 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, - 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, - 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, - 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, - 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, - 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, + 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, + 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, + 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, + 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, - 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, - 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, - 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, - 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, - 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, - 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, + 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, + 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, + 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, + 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, + 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, - 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, - 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, - 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, - 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, + 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, + 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, + 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, + 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, - 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, + 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5126,153 +5503,162 @@ func file_client_proto_rawDescGZIP() []byte { return file_client_proto_rawDescData } -var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 7) -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 53) +var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 56) var file_client_proto_goTypes = []any{ - (AddressType)(0), // 0: looprpc.AddressType - (SwapType)(0), // 1: looprpc.SwapType - (SwapState)(0), // 2: looprpc.SwapState - (FailureReason)(0), // 3: looprpc.FailureReason - (LiquidityRuleType)(0), // 4: looprpc.LiquidityRuleType - (AutoReason)(0), // 5: looprpc.AutoReason - (ListSwapsFilter_SwapTypeFilter)(0), // 6: looprpc.ListSwapsFilter.SwapTypeFilter - (*LoopOutRequest)(nil), // 7: looprpc.LoopOutRequest - (*LoopInRequest)(nil), // 8: looprpc.LoopInRequest - (*SwapResponse)(nil), // 9: looprpc.SwapResponse - (*MonitorRequest)(nil), // 10: looprpc.MonitorRequest - (*SwapStatus)(nil), // 11: looprpc.SwapStatus - (*ListSwapsRequest)(nil), // 12: looprpc.ListSwapsRequest - (*ListSwapsFilter)(nil), // 13: looprpc.ListSwapsFilter - (*ListSwapsResponse)(nil), // 14: looprpc.ListSwapsResponse - (*SwapInfoRequest)(nil), // 15: looprpc.SwapInfoRequest - (*TermsRequest)(nil), // 16: looprpc.TermsRequest - (*InTermsResponse)(nil), // 17: looprpc.InTermsResponse - (*OutTermsResponse)(nil), // 18: looprpc.OutTermsResponse - (*QuoteRequest)(nil), // 19: looprpc.QuoteRequest - (*InQuoteResponse)(nil), // 20: looprpc.InQuoteResponse - (*OutQuoteResponse)(nil), // 21: looprpc.OutQuoteResponse - (*ProbeRequest)(nil), // 22: looprpc.ProbeRequest - (*ProbeResponse)(nil), // 23: looprpc.ProbeResponse - (*TokensRequest)(nil), // 24: looprpc.TokensRequest - (*TokensResponse)(nil), // 25: looprpc.TokensResponse - (*FetchL402TokenRequest)(nil), // 26: looprpc.FetchL402TokenRequest - (*FetchL402TokenResponse)(nil), // 27: looprpc.FetchL402TokenResponse - (*L402Token)(nil), // 28: looprpc.L402Token - (*LoopStats)(nil), // 29: looprpc.LoopStats - (*GetInfoRequest)(nil), // 30: looprpc.GetInfoRequest - (*GetInfoResponse)(nil), // 31: looprpc.GetInfoResponse - (*GetLiquidityParamsRequest)(nil), // 32: looprpc.GetLiquidityParamsRequest - (*LiquidityParameters)(nil), // 33: looprpc.LiquidityParameters - (*LiquidityRule)(nil), // 34: looprpc.LiquidityRule - (*SetLiquidityParamsRequest)(nil), // 35: looprpc.SetLiquidityParamsRequest - (*SetLiquidityParamsResponse)(nil), // 36: looprpc.SetLiquidityParamsResponse - (*SuggestSwapsRequest)(nil), // 37: looprpc.SuggestSwapsRequest - (*Disqualified)(nil), // 38: looprpc.Disqualified - (*SuggestSwapsResponse)(nil), // 39: looprpc.SuggestSwapsResponse - (*AbandonSwapRequest)(nil), // 40: looprpc.AbandonSwapRequest - (*AbandonSwapResponse)(nil), // 41: looprpc.AbandonSwapResponse - (*ListReservationsRequest)(nil), // 42: looprpc.ListReservationsRequest - (*ListReservationsResponse)(nil), // 43: looprpc.ListReservationsResponse - (*ClientReservation)(nil), // 44: looprpc.ClientReservation - (*InstantOutRequest)(nil), // 45: looprpc.InstantOutRequest - (*InstantOutResponse)(nil), // 46: looprpc.InstantOutResponse - (*InstantOutQuoteRequest)(nil), // 47: looprpc.InstantOutQuoteRequest - (*InstantOutQuoteResponse)(nil), // 48: looprpc.InstantOutQuoteResponse - (*ListInstantOutsRequest)(nil), // 49: looprpc.ListInstantOutsRequest - (*ListInstantOutsResponse)(nil), // 50: looprpc.ListInstantOutsResponse - (*InstantOut)(nil), // 51: looprpc.InstantOut - (*NewStaticAddressRequest)(nil), // 52: looprpc.NewStaticAddressRequest - (*NewStaticAddressResponse)(nil), // 53: looprpc.NewStaticAddressResponse - (*ListUnspentDepositsRequest)(nil), // 54: looprpc.ListUnspentDepositsRequest - (*ListUnspentDepositsResponse)(nil), // 55: looprpc.ListUnspentDepositsResponse - (*Utxo)(nil), // 56: looprpc.Utxo - (*WithdrawDepositsRequest)(nil), // 57: looprpc.WithdrawDepositsRequest - (*WithdrawDepositsResponse)(nil), // 58: looprpc.WithdrawDepositsResponse - (*OutPoint)(nil), // 59: looprpc.OutPoint - (*swapserverrpc.RouteHint)(nil), // 60: looprpc.RouteHint + (AddressType)(0), // 0: looprpc.AddressType + (SwapType)(0), // 1: looprpc.SwapType + (SwapState)(0), // 2: looprpc.SwapState + (FailureReason)(0), // 3: looprpc.FailureReason + (LiquidityRuleType)(0), // 4: looprpc.LiquidityRuleType + (AutoReason)(0), // 5: looprpc.AutoReason + (DepositState)(0), // 6: looprpc.DepositState + (ListSwapsFilter_SwapTypeFilter)(0), // 7: looprpc.ListSwapsFilter.SwapTypeFilter + (*LoopOutRequest)(nil), // 8: looprpc.LoopOutRequest + (*LoopInRequest)(nil), // 9: looprpc.LoopInRequest + (*SwapResponse)(nil), // 10: looprpc.SwapResponse + (*MonitorRequest)(nil), // 11: looprpc.MonitorRequest + (*SwapStatus)(nil), // 12: looprpc.SwapStatus + (*ListSwapsRequest)(nil), // 13: looprpc.ListSwapsRequest + (*ListSwapsFilter)(nil), // 14: looprpc.ListSwapsFilter + (*ListSwapsResponse)(nil), // 15: looprpc.ListSwapsResponse + (*SwapInfoRequest)(nil), // 16: looprpc.SwapInfoRequest + (*TermsRequest)(nil), // 17: looprpc.TermsRequest + (*InTermsResponse)(nil), // 18: looprpc.InTermsResponse + (*OutTermsResponse)(nil), // 19: looprpc.OutTermsResponse + (*QuoteRequest)(nil), // 20: looprpc.QuoteRequest + (*InQuoteResponse)(nil), // 21: looprpc.InQuoteResponse + (*OutQuoteResponse)(nil), // 22: looprpc.OutQuoteResponse + (*ProbeRequest)(nil), // 23: looprpc.ProbeRequest + (*ProbeResponse)(nil), // 24: looprpc.ProbeResponse + (*TokensRequest)(nil), // 25: looprpc.TokensRequest + (*TokensResponse)(nil), // 26: looprpc.TokensResponse + (*FetchL402TokenRequest)(nil), // 27: looprpc.FetchL402TokenRequest + (*FetchL402TokenResponse)(nil), // 28: looprpc.FetchL402TokenResponse + (*L402Token)(nil), // 29: looprpc.L402Token + (*LoopStats)(nil), // 30: looprpc.LoopStats + (*GetInfoRequest)(nil), // 31: looprpc.GetInfoRequest + (*GetInfoResponse)(nil), // 32: looprpc.GetInfoResponse + (*GetLiquidityParamsRequest)(nil), // 33: looprpc.GetLiquidityParamsRequest + (*LiquidityParameters)(nil), // 34: looprpc.LiquidityParameters + (*LiquidityRule)(nil), // 35: looprpc.LiquidityRule + (*SetLiquidityParamsRequest)(nil), // 36: looprpc.SetLiquidityParamsRequest + (*SetLiquidityParamsResponse)(nil), // 37: looprpc.SetLiquidityParamsResponse + (*SuggestSwapsRequest)(nil), // 38: looprpc.SuggestSwapsRequest + (*Disqualified)(nil), // 39: looprpc.Disqualified + (*SuggestSwapsResponse)(nil), // 40: looprpc.SuggestSwapsResponse + (*AbandonSwapRequest)(nil), // 41: looprpc.AbandonSwapRequest + (*AbandonSwapResponse)(nil), // 42: looprpc.AbandonSwapResponse + (*ListReservationsRequest)(nil), // 43: looprpc.ListReservationsRequest + (*ListReservationsResponse)(nil), // 44: looprpc.ListReservationsResponse + (*ClientReservation)(nil), // 45: looprpc.ClientReservation + (*InstantOutRequest)(nil), // 46: looprpc.InstantOutRequest + (*InstantOutResponse)(nil), // 47: looprpc.InstantOutResponse + (*InstantOutQuoteRequest)(nil), // 48: looprpc.InstantOutQuoteRequest + (*InstantOutQuoteResponse)(nil), // 49: looprpc.InstantOutQuoteResponse + (*ListInstantOutsRequest)(nil), // 50: looprpc.ListInstantOutsRequest + (*ListInstantOutsResponse)(nil), // 51: looprpc.ListInstantOutsResponse + (*InstantOut)(nil), // 52: looprpc.InstantOut + (*NewStaticAddressRequest)(nil), // 53: looprpc.NewStaticAddressRequest + (*NewStaticAddressResponse)(nil), // 54: looprpc.NewStaticAddressResponse + (*ListUnspentDepositsRequest)(nil), // 55: looprpc.ListUnspentDepositsRequest + (*ListUnspentDepositsResponse)(nil), // 56: looprpc.ListUnspentDepositsResponse + (*Utxo)(nil), // 57: looprpc.Utxo + (*WithdrawDepositsRequest)(nil), // 58: looprpc.WithdrawDepositsRequest + (*WithdrawDepositsResponse)(nil), // 59: looprpc.WithdrawDepositsResponse + (*OutPoint)(nil), // 60: looprpc.OutPoint + (*StaticAddressSummaryRequest)(nil), // 61: looprpc.StaticAddressSummaryRequest + (*StaticAddressSummaryResponse)(nil), // 62: looprpc.StaticAddressSummaryResponse + (*Deposit)(nil), // 63: looprpc.Deposit + (*swapserverrpc.RouteHint)(nil), // 64: looprpc.RouteHint } var file_client_proto_depIdxs = []int32{ 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType - 60, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 64, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason - 13, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter - 6, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter - 11, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus - 60, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint - 60, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint - 28, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token - 29, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats - 29, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats - 34, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule + 14, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter + 7, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter + 12, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus + 64, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 64, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 29, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token + 30, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats + 30, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats + 35, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule 0, // 14: looprpc.LiquidityParameters.account_addr_type:type_name -> looprpc.AddressType 1, // 15: looprpc.LiquidityRule.swap_type:type_name -> looprpc.SwapType 4, // 16: looprpc.LiquidityRule.type:type_name -> looprpc.LiquidityRuleType - 33, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters + 34, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters 5, // 18: looprpc.Disqualified.reason:type_name -> looprpc.AutoReason - 7, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest - 8, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest - 38, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified - 44, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation - 51, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut - 56, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo - 59, // 25: looprpc.WithdrawDepositsRequest.outpoints:type_name -> looprpc.OutPoint - 7, // 26: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest - 8, // 27: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest - 10, // 28: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest - 12, // 29: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest - 15, // 30: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest - 40, // 31: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest - 16, // 32: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest - 19, // 33: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest - 16, // 34: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest - 19, // 35: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest - 22, // 36: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest - 24, // 37: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest - 24, // 38: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest - 26, // 39: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest - 30, // 40: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest - 32, // 41: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest - 35, // 42: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest - 37, // 43: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest - 42, // 44: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest - 45, // 45: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest - 47, // 46: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest - 49, // 47: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 52, // 48: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest - 54, // 49: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest - 57, // 50: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest - 9, // 51: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse - 9, // 52: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse - 11, // 53: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus - 14, // 54: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse - 11, // 55: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus - 41, // 56: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse - 18, // 57: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse - 21, // 58: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse - 17, // 59: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse - 20, // 60: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse - 23, // 61: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse - 25, // 62: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse - 25, // 63: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse - 27, // 64: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse - 31, // 65: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse - 33, // 66: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters - 36, // 67: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse - 39, // 68: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse - 43, // 69: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse - 46, // 70: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse - 48, // 71: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse - 50, // 72: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 53, // 73: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse - 55, // 74: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse - 58, // 75: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse - 51, // [51:76] is the sub-list for method output_type - 26, // [26:51] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 8, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest + 9, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest + 39, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified + 45, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation + 52, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut + 57, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo + 60, // 25: looprpc.WithdrawDepositsRequest.outpoints:type_name -> looprpc.OutPoint + 6, // 26: looprpc.StaticAddressSummaryRequest.state_filter:type_name -> looprpc.DepositState + 63, // 27: looprpc.StaticAddressSummaryResponse.filtered_deposits:type_name -> looprpc.Deposit + 6, // 28: looprpc.Deposit.state:type_name -> looprpc.DepositState + 8, // 29: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest + 9, // 30: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest + 11, // 31: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest + 13, // 32: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest + 16, // 33: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest + 41, // 34: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest + 17, // 35: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest + 20, // 36: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest + 17, // 37: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest + 20, // 38: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest + 23, // 39: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest + 25, // 40: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest + 25, // 41: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest + 27, // 42: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest + 31, // 43: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest + 33, // 44: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest + 36, // 45: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest + 38, // 46: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest + 43, // 47: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest + 46, // 48: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest + 48, // 49: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest + 50, // 50: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest + 53, // 51: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest + 55, // 52: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest + 58, // 53: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest + 61, // 54: looprpc.SwapClient.GetStaticAddressSummary:input_type -> looprpc.StaticAddressSummaryRequest + 10, // 55: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 10, // 56: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 12, // 57: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 15, // 58: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 12, // 59: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 42, // 60: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 19, // 61: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 22, // 62: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 18, // 63: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 21, // 64: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 24, // 65: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 26, // 66: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 26, // 67: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 28, // 68: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 32, // 69: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 34, // 70: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 37, // 71: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 40, // 72: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 44, // 73: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 47, // 74: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 49, // 75: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 51, // 76: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 54, // 77: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse + 56, // 78: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse + 59, // 79: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse + 62, // 80: looprpc.SwapClient.GetStaticAddressSummary:output_type -> looprpc.StaticAddressSummaryResponse + 55, // [55:81] is the sub-list for method output_type + 29, // [29:55] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_client_proto_init() } @@ -5917,14 +6303,50 @@ func file_client_proto_init() { return nil } } + file_client_proto_msgTypes[53].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressSummaryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[54].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressSummaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[55].Exporter = func(v any, i int) any { + switch v := v.(*Deposit); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, - NumEnums: 7, - NumMessages: 53, + NumEnums: 8, + NumMessages: 56, NumExtensions: 0, NumServices: 1, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index 9d7b8e2e7..cb3b533f9 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -167,6 +167,13 @@ service SwapClient { */ rpc WithdrawDeposits (WithdrawDepositsRequest) returns (WithdrawDepositsResponse); + + /* loop:`static summary` + GetStaticAddressSummary returns a summary of static address related + statistics. + */ + rpc GetStaticAddressSummary (StaticAddressSummaryRequest) + returns (StaticAddressSummaryResponse); } message LoopOutRequest { @@ -1569,3 +1576,127 @@ message OutPoint { */ uint32 output_index = 3; } + +message StaticAddressSummaryRequest { + /* + Filters the list of all stored deposits by deposit state. + */ + DepositState state_filter = 1; + + /* + Filters the list of all stored deposits by the outpoint. + */ + repeated string outpoints = 2; +} + +message StaticAddressSummaryResponse { + /* + The static address of the client. + */ + string static_address = 1; + + /* + The total number of deposits. + */ + uint32 total_num_deposits = 2; + + /* + The total value of unconfirmed deposits. + */ + int64 value_unconfirmed = 3; + + /* + The total value of confirmed deposits. + */ + int64 value_deposited = 4; + + /* + The total value of all expired deposits. + */ + int64 value_expired = 5; + + /* + The total value of all deposits that have been withdrawn. + */ + int64 value_withdrawn = 6; + + /* + A list of all deposits that match the filtered state. + */ + repeated Deposit filtered_deposits = 7; +} + +enum DepositState { + /* + UNKNOWN_STATE is the default state of a deposit. + */ + UNKNOWN_STATE = 0; + + /* + DEPOSITED indicates that the deposit has been sufficiently confirmed on + chain. + */ + DEPOSITED = 1; + + /* + WITHDRAWING indicates that the deposit is currently being withdrawn. It + flips to WITHDRAWN once the withdrawal transaction has been sufficiently + confirmed. + */ + WITHDRAWING = 2; + + /* + WITHDRAWN indicates that the deposit has been withdrawn. + */ + WITHDRAWN = 3; + + /* + PUBLISH_EXPIRED indicates that the deposit has expired and the sweep + transaction has been published. + */ + PUBLISH_EXPIRED = 4; + + /* + WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep + transaction has not yet been sufficiently confirmed. + */ + WAIT_FOR_EXPIRY_SWEEP = 5; + + /* + EXPIRED indicates that the deposit has expired and the sweep transaction + has been sufficiently confirmed. + */ + EXPIRED = 6; + + /* + FAILED_STATE indicates that the deposit has failed. + */ + FAILED_STATE = 7; +} + +message Deposit { + /* + The identifier of the deposit. + */ + bytes id = 1; + + /* + The state of the deposit. + */ + DepositState state = 2; + + /* + The outpoint of the deposit in format txid:index. + */ + string outpoint = 3; + + /* + The value of the deposit in satoshis. + */ + int64 value = 4; + + /* + The block height at which the deposit was confirmed. + */ + int64 confirmation_height = 5; +} diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index b5146a790..0d8ee017e 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -641,6 +641,49 @@ } } }, + "looprpcDeposit": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "byte", + "description": "The identifier of the deposit." + }, + "state": { + "$ref": "#/definitions/looprpcDepositState", + "description": "The state of the deposit." + }, + "outpoint": { + "type": "string", + "description": "The outpoint of the deposit in format txid:index." + }, + "value": { + "type": "string", + "format": "int64", + "description": "The value of the deposit in satoshis." + }, + "confirmation_height": { + "type": "string", + "format": "int64", + "description": "The block height at which the deposit was confirmed." + } + } + }, + "looprpcDepositState": { + "type": "string", + "enum": [ + "UNKNOWN_STATE", + "DEPOSITED", + "WITHDRAWING", + "WITHDRAWN", + "PUBLISH_EXPIRED", + "WAIT_FOR_EXPIRY_SWEEP", + "EXPIRED", + "FAILED_STATE" + ], + "default": "UNKNOWN_STATE", + "description": " - UNKNOWN_STATE: UNKNOWN_STATE is the default state of a deposit.\n - DEPOSITED: DEPOSITED indicates that the deposit has been sufficiently confirmed on\nchain.\n - WITHDRAWING: WITHDRAWING indicates that the deposit is currently being withdrawn. It\nflips to WITHDRAWN once the withdrawal transaction has been sufficiently\nconfirmed.\n - WITHDRAWN: WITHDRAWN indicates that the deposit has been withdrawn.\n - PUBLISH_EXPIRED: PUBLISH_EXPIRED indicates that the deposit has expired and the sweep\ntransaction has been published.\n - WAIT_FOR_EXPIRY_SWEEP: WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep\ntransaction has not yet been sufficiently confirmed.\n - EXPIRED: EXPIRED indicates that the deposit has expired and the sweep transaction\nhas been sufficiently confirmed.\n - FAILED_STATE: FAILED_STATE indicates that the deposit has failed." + }, "looprpcDisqualified": { "type": "object", "properties": { @@ -1441,6 +1484,47 @@ "looprpcSetLiquidityParamsResponse": { "type": "object" }, + "looprpcStaticAddressSummaryResponse": { + "type": "object", + "properties": { + "static_address": { + "type": "string", + "description": "The static address of the client." + }, + "total_num_deposits": { + "type": "integer", + "format": "int64", + "description": "The total number of deposits." + }, + "value_unconfirmed": { + "type": "string", + "format": "int64", + "description": "The total value of unconfirmed deposits." + }, + "value_deposited": { + "type": "string", + "format": "int64", + "description": "The total value of confirmed deposits." + }, + "value_expired": { + "type": "string", + "format": "int64", + "description": "The total value of all expired deposits." + }, + "value_withdrawn": { + "type": "string", + "format": "int64", + "description": "The total value of all deposits that have been withdrawn." + }, + "filtered_deposits": { + "type": "array", + "items": { + "$ref": "#/definitions/looprpcDeposit" + }, + "description": "A list of all deposits that match the filtered state." + } + } + }, "looprpcSuggestSwapsResponse": { "type": "object", "properties": { diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index b6e542378..9be5fe9d7 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -115,6 +115,10 @@ type SwapClientClient interface { // loop:`static withdraw` // WithdrawDeposits withdraws a selection or all deposits of a static address. WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error) + // loop:`static summary` + // GetStaticAddressSummary returns a summary of static address related + // statistics. + GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error) } type swapClientClient struct { @@ -373,6 +377,15 @@ func (c *swapClientClient) WithdrawDeposits(ctx context.Context, in *WithdrawDep return out, nil } +func (c *swapClientClient) GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error) { + out := new(StaticAddressSummaryResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetStaticAddressSummary", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SwapClientServer is the server API for SwapClient service. // All implementations must embed UnimplementedSwapClientServer // for forward compatibility @@ -474,6 +487,10 @@ type SwapClientServer interface { // loop:`static withdraw` // WithdrawDeposits withdraws a selection or all deposits of a static address. WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) + // loop:`static summary` + // GetStaticAddressSummary returns a summary of static address related + // statistics. + GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) mustEmbedUnimplementedSwapClientServer() } @@ -556,6 +573,9 @@ func (UnimplementedSwapClientServer) ListUnspentDeposits(context.Context, *ListU func (UnimplementedSwapClientServer) WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawDeposits not implemented") } +func (UnimplementedSwapClientServer) GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetStaticAddressSummary not implemented") +} func (UnimplementedSwapClientServer) mustEmbedUnimplementedSwapClientServer() {} // UnsafeSwapClientServer may be embedded to opt out of forward compatibility for this service. @@ -1022,6 +1042,24 @@ func _SwapClient_WithdrawDeposits_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SwapClient_GetStaticAddressSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StaticAddressSummaryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).GetStaticAddressSummary(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/GetStaticAddressSummary", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).GetStaticAddressSummary(ctx, req.(*StaticAddressSummaryRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SwapClient_ServiceDesc is the grpc.ServiceDesc for SwapClient service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1125,6 +1163,10 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "WithdrawDeposits", Handler: _SwapClient_WithdrawDeposits_Handler, }, + { + MethodName: "GetStaticAddressSummary", + Handler: _SwapClient_GetStaticAddressSummary_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/looprpc/swapclient.pb.json.go b/looprpc/swapclient.pb.json.go index f032cf2c9..da8749d75 100644 --- a/looprpc/swapclient.pb.json.go +++ b/looprpc/swapclient.pb.json.go @@ -662,4 +662,29 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex } callback(string(respBytes), nil) } + + registry["looprpc.SwapClient.GetStaticAddressSummary"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &StaticAddressSummaryRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.GetStaticAddressSummary(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } } From 633ca67ddc31349bff62dcb2c3445192225fd5aa Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 5 Jun 2024 13:48:18 +0200 Subject: [PATCH 33/67] staticaddr: expose static address to client summary --- staticaddr/address/manager.go | 13 +++++++------ staticaddr/deposit/interface.go | 6 ++++++ staticaddr/deposit/manager_test.go | 10 ++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/staticaddr/address/manager.go b/staticaddr/address/manager.go index 6420db972..8932d4dd4 100644 --- a/staticaddr/address/manager.go +++ b/staticaddr/address/manager.go @@ -82,7 +82,7 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, m.Unlock() - return m.getTaprootAddress(clientPubKey, serverPubKey, expiry) + return m.GetTaprootAddress(clientPubKey, serverPubKey, expiry) } m.Unlock() @@ -166,14 +166,15 @@ func (m *Manager) NewAddress(ctx context.Context) (*btcutil.AddressTaproot, log.Infof("Imported static address taproot script to lnd wallet: %v", addr) - return m.getTaprootAddress( + return m.GetTaprootAddress( clientPubKey.PubKey, serverPubKey, int64(serverParams.Expiry), ) } -func (m *Manager) getTaprootAddress(clientPubkey, - serverPubkey *btcec.PublicKey, expiry int64) (*btcutil.AddressTaproot, - error) { +// GetTaprootAddress returns a taproot address for the given client and server +// public keys and expiry. +func (m *Manager) GetTaprootAddress(clientPubkey, serverPubkey *btcec.PublicKey, + expiry int64) (*btcutil.AddressTaproot, error) { staticAddress, err := script.NewStaticAddress( input.MuSig2Version100RC2, expiry, clientPubkey, serverPubkey, @@ -224,7 +225,7 @@ func (m *Manager) ListUnspentRaw(ctx context.Context, minConfs, } } - taprootAddress, err := m.getTaprootAddress( + taprootAddress, err := m.GetTaprootAddress( staticAddress.ClientPubkey, staticAddress.ServerPubkey, int64(staticAddress.Expiry), ) diff --git a/staticaddr/deposit/interface.go b/staticaddr/deposit/interface.go index dc98f16d3..d38cfbaac 100644 --- a/staticaddr/deposit/interface.go +++ b/staticaddr/deposit/interface.go @@ -3,6 +3,8 @@ package deposit import ( "context" + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcutil" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/script" "github.com/lightningnetwork/lnd/lnwallet" @@ -41,4 +43,8 @@ type AddressManager interface { // ListUnspent returns a list of utxos at the static address. ListUnspent(ctx context.Context, minConfs, maxConfs int32) ([]*lnwallet.Utxo, error) + + // GetTaprootAddress returns a taproot address. + GetTaprootAddress(clientPubkey, serverPubkey *btcec.PublicKey, + expiry int64) (*btcutil.AddressTaproot, error) } diff --git a/staticaddr/deposit/manager_test.go b/staticaddr/deposit/manager_test.go index eeb875f8b..49c3d4691 100644 --- a/staticaddr/deposit/manager_test.go +++ b/staticaddr/deposit/manager_test.go @@ -103,6 +103,16 @@ func (m *mockAddressManager) ListUnspent(ctx context.Context, args.Error(1) } +func (m *mockAddressManager) GetTaprootAddress(clientPubkey, + serverPubkey *btcec.PublicKey, expiry int64) (*btcutil.AddressTaproot, + error) { + + args := m.Called(clientPubkey, serverPubkey, expiry) + + return args.Get(0).(*btcutil.AddressTaproot), + args.Error(1) +} + type mockStore struct { mock.Mock } From ac4f9ba6f638176d800baae90e2a5b81f1704419 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 5 Jun 2024 13:48:41 +0200 Subject: [PATCH 34/67] loopd: static address summary --- cmd/loop/staticaddr.go | 78 +++++++++++++++ loopd/perms/perms.go | 7 ++ loopd/swapclient_server.go | 198 +++++++++++++++++++++++++++++++++++++ 3 files changed, 283 insertions(+) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index bc2a62da7..4de4e7c28 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -22,6 +22,7 @@ var staticAddressCommands = cli.Command{ newStaticAddressCommand, listUnspentCommand, withdrawalCommand, + summaryCommand, }, } @@ -181,6 +182,83 @@ func withdraw(ctx *cli.Context) error { return nil } +var summaryCommand = cli.Command{ + Name: "summary", + ShortName: "s", + Usage: "Display a summary of static address related information.", + Description: ` + Displays various static address related information like deposits, + withdrawals and statistics. The information can be filtered by state. + `, + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "filter", + Usage: "specify a filter to only display deposits in " + + "the specified state. The state can be one " + + "of [deposited|withdrawing|withdrawn|" + + "publish_expired_deposit|" + + "wait_for_expiry_sweep|expired|failed].", + }, + }, + Action: summary, +} + +func summary(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "summary") + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + var filterState looprpc.DepositState + switch ctx.String("filter") { + case "": + // If no filter is specified, we'll default to showing all. + + case "deposited": + filterState = looprpc.DepositState_DEPOSITED + + case "withdrawing": + filterState = looprpc.DepositState_WITHDRAWING + + case "withdrawn": + filterState = looprpc.DepositState_WITHDRAWN + + case "publish_expired_deposit": + filterState = looprpc.DepositState_PUBLISH_EXPIRED + + case "wait_for_expiry_sweep": + filterState = looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP + + case "expired": + filterState = looprpc.DepositState_EXPIRED + + case "failed": + filterState = looprpc.DepositState_FAILED_STATE + + default: + filterState = looprpc.DepositState_UNKNOWN_STATE + } + + resp, err := client.GetStaticAddressSummary( + ctxb, &looprpc.StaticAddressSummaryRequest{ + StateFilter: filterState, + }, + ) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + func utxosToOutpoints(utxos []string) ([]*looprpc.OutPoint, error) { outpoints := make([]*looprpc.OutPoint, 0, len(utxos)) if len(utxos) == 0 { diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index 10d2ec153..98ffb5927 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -94,6 +94,13 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "loop", Action: "in", }}, + "/looprpc.SwapClient/GetStaticAddressSummary": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetLsatTokens": {{ Entity: "auth", Action: "read", diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index fa60267ac..2b76342c8 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -19,6 +19,7 @@ import ( "github.com/lightninglabs/aperture/l402" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/instantout" "github.com/lightninglabs/loop/instantout/reservation" "github.com/lightninglabs/loop/labels" @@ -1415,6 +1416,203 @@ func (s *swapClientServer) WithdrawDeposits(ctx context.Context, }, err } +// GetStaticAddressSummary returns a summary static address related information. +// Amongst deposits and withdrawals and their total values it also includes a +// list of detailed deposit information filtered by their state. +func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, + req *looprpc.StaticAddressSummaryRequest) ( + *looprpc.StaticAddressSummaryResponse, error) { + + if req.StateFilter != looprpc.DepositState_UNKNOWN_STATE && + len(req.Outpoints) > 0 { + + return nil, fmt.Errorf("can either filter by state or " + + "outpoints") + } + + allDeposits, err := s.depositManager.GetAllDeposits() + if err != nil { + return nil, err + } + + return s.depositSummary( + ctx, allDeposits, req.StateFilter, req.Outpoints, + ) +} + +func (s *swapClientServer) depositSummary(ctx context.Context, + deposits []*deposit.Deposit, stateFilter looprpc.DepositState, + outpointsFilter []string) (*looprpc.StaticAddressSummaryResponse, + error) { + + var ( + totalNumDeposits = len(deposits) + valueUnconfirmed int64 + valueDeposited int64 + valueExpired int64 + valueWithdrawn int64 + ) + + // Value unconfirmed. + utxos, err := s.staticAddressManager.ListUnspent( + ctx, 0, deposit.MinConfs-1, + ) + if err != nil { + return nil, err + } + for _, u := range utxos { + valueUnconfirmed += int64(u.Value) + } + + // Confirmed total values by category. + for _, d := range deposits { + value := int64(d.Value) + switch d.GetState() { + case deposit.Deposited: + valueDeposited += value + + case deposit.Expired: + valueExpired += value + + case deposit.Withdrawn: + valueWithdrawn += value + } + } + + // Deposits filtered by state or outpoints. + var clientDeposits []*looprpc.Deposit + if len(outpointsFilter) > 0 { + f := func(d *deposit.Deposit) bool { + for _, outpoint := range outpointsFilter { + if outpoint == d.OutPoint.String() { + return true + } + } + return false + } + clientDeposits = filter(deposits, f) + + if len(outpointsFilter) != len(clientDeposits) { + return nil, fmt.Errorf("not all outpoints found in " + + "deposits") + } + } else { + f := func(d *deposit.Deposit) bool { + if stateFilter == looprpc.DepositState_UNKNOWN_STATE { + // Per default, we return deposits in all + // states. + return true + } + + return d.GetState() == toServerState(stateFilter) + } + clientDeposits = filter(deposits, f) + } + + params, err := s.staticAddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return nil, err + } + + address, err := s.staticAddressManager.GetTaprootAddress( + params.ClientPubkey, params.ServerPubkey, int64(params.Expiry), + ) + if err != nil { + return nil, err + } + + return &looprpc.StaticAddressSummaryResponse{ + StaticAddress: address.String(), + TotalNumDeposits: uint32(totalNumDeposits), + ValueUnconfirmed: valueUnconfirmed, + ValueDeposited: valueDeposited, + ValueExpired: valueExpired, + ValueWithdrawn: valueWithdrawn, + FilteredDeposits: clientDeposits, + }, nil +} + +type filterFunc func(deposits *deposit.Deposit) bool + +func filter(deposits []*deposit.Deposit, f filterFunc) []*looprpc.Deposit { + var clientDeposits []*looprpc.Deposit + for _, d := range deposits { + if !f(d) { + continue + } + + hash := d.Hash + outpoint := wire.NewOutPoint(&hash, d.Index).String() + deposit := &looprpc.Deposit{ + Id: d.ID[:], + State: toClientState(d.GetState()), + Outpoint: outpoint, + Value: int64(d.Value), + ConfirmationHeight: d.ConfirmationHeight, + } + + clientDeposits = append(clientDeposits, deposit) + } + + return clientDeposits +} + +func toClientState(state fsm.StateType) looprpc.DepositState { + switch state { + case deposit.Deposited: + return looprpc.DepositState_DEPOSITED + + case deposit.Withdrawing: + return looprpc.DepositState_WITHDRAWING + + case deposit.Withdrawn: + return looprpc.DepositState_WITHDRAWN + + case deposit.PublishExpiredDeposit: + return looprpc.DepositState_PUBLISH_EXPIRED + + case deposit.WaitForExpirySweep: + return looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP + + case deposit.Expired: + return looprpc.DepositState_EXPIRED + + case deposit.Failed: + return looprpc.DepositState_FAILED_STATE + + default: + return looprpc.DepositState_UNKNOWN_STATE + } +} + +func toServerState(state looprpc.DepositState) fsm.StateType { + switch state { + case looprpc.DepositState_DEPOSITED: + return deposit.Deposited + + case looprpc.DepositState_WITHDRAWING: + return deposit.Withdrawing + + case looprpc.DepositState_WITHDRAWN: + return deposit.Withdrawn + + case looprpc.DepositState_PUBLISH_EXPIRED: + return deposit.PublishExpiredDeposit + + case looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP: + return deposit.WaitForExpirySweep + + case looprpc.DepositState_EXPIRED: + return deposit.Expired + + case looprpc.DepositState_FAILED_STATE: + return deposit.Failed + + default: + return fsm.EmptyState + } +} + func toServerOutpoints(outpoints []*looprpc.OutPoint) ([]wire.OutPoint, error) { From b10a422b11a702df544bc62a9764548187c0d04d Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 6 Jun 2024 15:19:10 +0200 Subject: [PATCH 35/67] looprpc: deposit outpoints for QuoteRequest This commit adds static address deposit outpoints to the QuoteRequest message. It allows to quote for loop in swaps with the total value of specified deposits. --- looprpc/client.pb.go | 1148 ++++++++++++++++++----------------- looprpc/client.proto | 7 + looprpc/client.swagger.json | 22 + 3 files changed, 610 insertions(+), 567 deletions(-) diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index d4586167e..e73dafee6 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -1757,6 +1757,10 @@ type QuoteRequest struct { // private. In which case, loop will generate hophints to assist with // probing and payment. Private bool `protobuf:"varint,7,opt,name=private,proto3" json:"private,omitempty"` + // Static address deposit outpoints that will be quoted for. This option only + // pertains to loop in swaps. Either this or the amt parameter can be set at + // the same time. + DepositOutpoints []string `protobuf:"bytes,8,rep,name=deposit_outpoints,json=depositOutpoints,proto3" json:"deposit_outpoints,omitempty"` } func (x *QuoteRequest) Reset() { @@ -1840,6 +1844,13 @@ func (x *QuoteRequest) GetPrivate() bool { return false } +func (x *QuoteRequest) GetDepositOutpoints() []string { + if x != nil { + return x.DepositOutpoints + } + return nil +} + type InQuoteResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4900,7 +4911,7 @@ var file_client_proto_rawDesc = []byte{ 0x6c, 0x74, 0x61, 0x18, 0x09, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x43, 0x6c, 0x74, 0x76, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x04, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x4a, - 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0xa8, 0x02, 0x0a, 0x0c, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, + 0x04, 0x08, 0x07, 0x10, 0x08, 0x22, 0xd5, 0x02, 0x0a, 0x0c, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, @@ -4919,576 +4930,579 @@ var file_client_proto_rawDesc = []byte{ 0x48, 0x69, 0x6e, 0x74, 0x52, 0x10, 0x6c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x22, 0xb0, 0x01, 0x0a, 0x0f, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, - 0x5f, 0x73, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x77, 0x61, 0x70, - 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x68, 0x74, 0x6c, 0x63, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, - 0x68, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x5f, - 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6c, 0x74, - 0x76, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, - 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, - 0x04, 0x10, 0x05, 0x22, 0xf3, 0x01, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, - 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, - 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, - 0x65, 0x70, 0x61, 0x79, 0x5f, 0x61, 0x6d, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0c, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x41, 0x6d, 0x74, 0x53, 0x61, 0x74, - 0x12, 0x2b, 0x0a, 0x12, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x68, 0x74, - 0x6c, 0x63, 0x53, 0x77, 0x65, 0x65, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2a, 0x0a, - 0x11, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x65, - 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x77, 0x61, 0x70, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x74, - 0x76, 0x5f, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, - 0x6c, 0x74, 0x76, 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, - 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, - 0x6f, 0x6e, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x70, 0x0a, 0x0c, 0x50, 0x72, 0x6f, - 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6d, 0x74, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, - 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, - 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, - 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, - 0x0e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x2a, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x46, - 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, - 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcb, - 0x02, 0x0a, 0x09, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, - 0x62, 0x61, 0x73, 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, - 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, - 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, - 0x70, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, - 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, - 0x28, 0x0a, 0x10, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6d, - 0x73, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x50, 0x61, 0x69, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x72, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6d, 0x73, - 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x46, 0x65, 0x65, 0x50, 0x61, 0x69, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x21, 0x0a, 0x0c, - 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, - 0x72, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc8, 0x01, 0x0a, - 0x09, 0x4c, 0x6f, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, - 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, - 0x23, 0x0a, 0x0d, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, - 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x66, 0x61, 0x69, 0x6c, 0x43, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, - 0x6e, 0x67, 0x5f, 0x61, 0x6d, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x75, - 0x6d, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, - 0x75, 0x6d, 0x5f, 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x73, 0x75, 0x6d, 0x53, 0x75, 0x63, 0x63, 0x65, - 0x65, 0x64, 0x65, 0x64, 0x41, 0x6d, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc0, 0x02, 0x0a, 0x0f, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, - 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x12, 0x1d, 0x0a, 0x0a, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x70, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, - 0x12, 0x1f, 0x0a, 0x0b, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, - 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, - 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, - 0x6f, 0x6e, 0x50, 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, - 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, - 0x6c, 0x73, 0x43, 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x38, 0x0a, 0x0e, 0x6c, 0x6f, - 0x6f, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x69, 0x6e, 0x5f, - 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, - 0x0b, 0x6c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x1b, 0x0a, 0x19, - 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x94, 0x09, 0x0a, 0x13, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, - 0x73, 0x12, 0x2c, 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, - 0x17, 0x0a, 0x07, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x06, 0x66, 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, 0x3d, 0x0a, 0x1c, 0x73, 0x77, 0x65, 0x65, - 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, - 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, - 0x73, 0x77, 0x65, 0x65, 0x70, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x53, 0x61, 0x74, 0x50, - 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x73, - 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x50, 0x70, 0x6d, - 0x12, 0x2d, 0x0a, 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, - 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6d, - 0x61, 0x78, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, - 0x3a, 0x0a, 0x1a, 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x72, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x16, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x6d, - 0x61, 0x78, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x04, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x53, 0x61, - 0x74, 0x12, 0x29, 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x61, - 0x78, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x11, - 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x18, 0x08, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x43, 0x6f, - 0x6e, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x73, 0x65, 0x63, 0x18, - 0x09, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x42, 0x61, - 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x53, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, - 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, - 0x6c, 0x6f, 0x6f, 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, - 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x11, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, - 0x74, 0x53, 0x61, 0x74, 0x12, 0x3d, 0x0a, 0x19, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, - 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x65, - 0x63, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x18, 0x01, 0x52, 0x16, 0x61, 0x75, 0x74, - 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, - 0x53, 0x65, 0x63, 0x12, 0x2b, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x78, 0x5f, - 0x69, 0x6e, 0x5f, 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x0f, 0x61, 0x75, 0x74, 0x6f, 0x4d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, - 0x75, 0x6e, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x53, 0x77, - 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, - 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, - 0x04, 0x52, 0x0d, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, - 0x12, 0x28, 0x0a, 0x10, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, - 0x72, 0x67, 0x65, 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x68, 0x74, 0x6c, 0x63, - 0x43, 0x6f, 0x6e, 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x75, - 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x6c, - 0x6f, 0x6f, 0x70, 0x44, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4a, - 0x0a, 0x22, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, - 0x74, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, - 0x5f, 0x73, 0x65, 0x63, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, 0x61, 0x75, 0x74, 0x6f, - 0x6c, 0x6f, 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, - 0x68, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x63, 0x12, 0x3f, 0x0a, 0x1c, 0x61, 0x75, - 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x61, - 0x73, 0x74, 0x5f, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, - 0x52, 0x19, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, - 0x4c, 0x61, 0x73, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x65, - 0x61, 0x73, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x15, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x0c, 0x65, 0x61, 0x73, 0x79, 0x41, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, - 0x12, 0x42, 0x0a, 0x1e, 0x65, 0x61, 0x73, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, - 0x70, 0x5f, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, - 0x61, 0x74, 0x18, 0x16, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x65, 0x61, 0x73, 0x79, 0x41, 0x75, - 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x61, 0x72, 0x67, 0x65, - 0x74, 0x53, 0x61, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x17, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x40, - 0x0a, 0x11, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x74, - 0x79, 0x70, 0x65, 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x54, 0x79, 0x70, 0x65, - 0x22, 0x84, 0x02, 0x0a, 0x0d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, - 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, - 0x64, 0x12, 0x2e, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x63, - 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x54, - 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x67, - 0x6f, 0x69, 0x6e, 0x67, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x54, 0x68, - 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x59, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, - 0x72, 0x73, 0x22, 0x1c, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, - 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x15, 0x0a, 0x13, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x72, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x71, 0x75, - 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2b, - 0x0a, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, - 0x73, 0x6f, 0x6e, 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xb6, 0x01, 0x0a, 0x14, - 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x6f, 0x75, 0x74, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x07, 0x6c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x6c, 0x6f, 0x6f, 0x70, - 0x5f, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x06, 0x6c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x69, 0x73, - 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x71, 0x75, 0x61, - 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x71, 0x75, 0x61, 0x6c, 0x69, - 0x66, 0x69, 0x65, 0x64, 0x22, 0x57, 0x0a, 0x12, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, - 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x16, 0x69, 0x5f, - 0x6b, 0x6e, 0x6f, 0x77, 0x5f, 0x77, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x5f, 0x61, 0x6d, 0x5f, 0x64, - 0x6f, 0x69, 0x6e, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x4b, 0x6e, 0x6f, - 0x77, 0x57, 0x68, 0x61, 0x74, 0x49, 0x41, 0x6d, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x22, 0x15, 0x0a, - 0x13, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, - 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, - 0x5a, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, - 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x11, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x76, - 0x6f, 0x75, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x76, 0x6f, 0x75, 0x74, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x85, 0x01, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, - 0x0f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, - 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x04, 0x52, 0x0f, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x53, - 0x65, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, - 0x74, 0x0a, 0x12, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x5f, 0x6f, 0x75, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x0e, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x1e, 0x0a, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x22, 0x55, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x10, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x61, 0x6d, - 0x74, 0x12, 0x29, 0x0a, 0x10, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6e, 0x75, 0x6d, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x65, 0x0a, 0x17, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, - 0x22, 0x0a, 0x0d, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x46, 0x65, 0x65, - 0x53, 0x61, 0x74, 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, - 0x17, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x77, 0x61, 0x70, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x05, 0x73, 0x77, - 0x61, 0x70, 0x73, 0x22, 0xa0, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, - 0x0f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, - 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, - 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, - 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x17, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, - 0x22, 0x4c, 0x0a, 0x18, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x56, - 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x6d, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x6d, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, - 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, - 0x78, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x22, 0x42, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, - 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x55, - 0x74, 0x78, 0x6f, 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x04, 0x55, - 0x74, 0x78, 0x6f, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, + 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xb0, 0x01, + 0x0a, 0x0f, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, + 0x53, 0x61, 0x74, 0x12, 0x2f, 0x0a, 0x14, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x73, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x11, 0x68, 0x74, 0x6c, 0x63, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x46, 0x65, + 0x65, 0x53, 0x61, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x64, 0x65, 0x6c, + 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6c, 0x74, 0x76, 0x44, 0x65, + 0x6c, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, 0x54, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, + 0x22, 0xf3, 0x01, 0x0a, 0x10, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, + 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x73, 0x77, 0x61, + 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x24, 0x0a, 0x0e, 0x70, 0x72, 0x65, 0x70, 0x61, + 0x79, 0x5f, 0x61, 0x6d, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0c, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x41, 0x6d, 0x74, 0x53, 0x61, 0x74, 0x12, 0x2b, 0x0a, + 0x12, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0f, 0x68, 0x74, 0x6c, 0x63, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x77, + 0x61, 0x70, 0x5f, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x73, 0x77, 0x61, 0x70, 0x50, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x74, 0x76, 0x5f, 0x64, + 0x65, 0x6c, 0x74, 0x61, 0x18, 0x05, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09, 0x63, 0x6c, 0x74, 0x76, + 0x44, 0x65, 0x6c, 0x74, 0x61, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, + 0x72, 0x67, 0x65, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x66, + 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0x70, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6d, 0x74, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, + 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, + 0x48, 0x6f, 0x70, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, + 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x0f, 0x0a, 0x0d, 0x50, 0x72, 0x6f, 0x62, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0f, 0x0a, 0x0d, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3c, 0x0a, 0x0e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x06, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x18, 0x0a, 0x16, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcb, 0x02, 0x0a, 0x09, + 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x0c, 0x62, 0x61, 0x73, 0x65, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x21, + 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x48, 0x61, 0x73, + 0x68, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x72, 0x65, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0f, 0x70, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x10, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6d, 0x73, 0x61, 0x74, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x61, + 0x69, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x31, 0x0a, 0x15, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x61, 0x69, 0x64, 0x5f, 0x6d, 0x73, 0x61, 0x74, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x65, + 0x65, 0x50, 0x61, 0x69, 0x64, 0x4d, 0x73, 0x61, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x69, 0x6d, + 0x65, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x74, + 0x6f, 0x72, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc8, 0x01, 0x0a, 0x09, 0x4c, 0x6f, + 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0c, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x0c, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x75, 0x6e, + 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x61, 0x69, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x66, 0x61, 0x69, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x75, 0x6d, 0x5f, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, + 0x61, 0x6d, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, 0x75, 0x6d, 0x50, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x41, 0x6d, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x75, 0x6d, 0x5f, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, 0x64, 0x5f, 0x61, 0x6d, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0f, 0x73, 0x75, 0x6d, 0x53, 0x75, 0x63, 0x63, 0x65, 0x65, 0x64, 0x65, + 0x64, 0x41, 0x6d, 0x74, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xc0, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x1d, + 0x0a, 0x0a, 0x72, 0x70, 0x63, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x72, 0x70, 0x63, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x12, 0x1f, 0x0a, + 0x0b, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x12, 0x23, + 0x0a, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x50, + 0x61, 0x74, 0x68, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x6c, 0x73, 0x5f, 0x63, 0x65, 0x72, 0x74, 0x5f, + 0x70, 0x61, 0x74, 0x68, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74, 0x6c, 0x73, 0x43, + 0x65, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x12, 0x38, 0x0a, 0x0e, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, + 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x73, 0x52, 0x0c, 0x6c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x73, 0x12, 0x36, 0x0a, 0x0d, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x74, 0x61, + 0x74, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x0b, 0x6c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x94, 0x09, 0x0a, 0x13, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x2c, + 0x0a, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x52, 0x75, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x12, 0x17, 0x0a, 0x07, + 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x10, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x66, + 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, 0x3d, 0x0a, 0x1c, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x17, 0x73, 0x77, 0x65, + 0x65, 0x70, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x53, 0x61, 0x74, 0x50, 0x65, 0x72, 0x56, + 0x62, 0x79, 0x74, 0x65, 0x12, 0x27, 0x0a, 0x10, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, + 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, 0x2d, 0x0a, + 0x13, 0x6d, 0x61, 0x78, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, + 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x10, 0x6d, 0x61, 0x78, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, 0x3a, 0x0a, 0x1a, + 0x6d, 0x61, 0x78, 0x5f, 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x72, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, 0x70, 0x6d, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x16, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x46, 0x65, 0x65, 0x50, 0x70, 0x6d, 0x12, 0x24, 0x0a, 0x0e, 0x6d, 0x61, 0x78, 0x5f, + 0x70, 0x72, 0x65, 0x70, 0x61, 0x79, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x04, + 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x50, 0x72, 0x65, 0x70, 0x61, 0x79, 0x53, 0x61, 0x74, 0x12, 0x29, + 0x0a, 0x11, 0x6d, 0x61, 0x78, 0x5f, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x73, 0x61, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0e, 0x6d, 0x61, 0x78, 0x4d, 0x69, + 0x6e, 0x65, 0x72, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x2a, 0x0a, 0x11, 0x73, 0x77, 0x65, + 0x65, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x54, + 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, + 0x5f, 0x62, 0x61, 0x63, 0x6b, 0x6f, 0x66, 0x66, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x11, 0x66, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x42, 0x61, 0x63, 0x6b, 0x6f, + 0x66, 0x66, 0x53, 0x65, 0x63, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, + 0x70, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, + 0x70, 0x12, 0x2e, 0x0a, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x62, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x04, 0x52, 0x11, + 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x53, 0x61, + 0x74, 0x12, 0x3d, 0x0a, 0x19, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x62, 0x75, + 0x64, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x18, 0x0c, + 0x20, 0x01, 0x28, 0x04, 0x42, 0x02, 0x18, 0x01, 0x52, 0x16, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, + 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x63, + 0x12, 0x2b, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x6f, 0x5f, 0x6d, 0x61, 0x78, 0x5f, 0x69, 0x6e, 0x5f, + 0x66, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0f, 0x61, 0x75, + 0x74, 0x6f, 0x4d, 0x61, 0x78, 0x49, 0x6e, 0x46, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x12, 0x26, 0x0a, + 0x0f, 0x6d, 0x69, 0x6e, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, 0x6d, 0x69, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x41, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x26, 0x0a, 0x0f, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, + 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0d, + 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x28, 0x0a, + 0x10, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, + 0x74, 0x18, 0x11, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0e, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6f, 0x6e, + 0x66, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x75, 0x74, 0x6f, 0x6c, + 0x6f, 0x6f, 0x70, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x12, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, + 0x44, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x61, + 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x72, + 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x5f, 0x73, 0x65, + 0x63, 0x18, 0x13, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1e, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, + 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x50, 0x65, + 0x72, 0x69, 0x6f, 0x64, 0x53, 0x65, 0x63, 0x12, 0x3f, 0x0a, 0x1c, 0x61, 0x75, 0x74, 0x6f, 0x6c, + 0x6f, 0x6f, 0x70, 0x5f, 0x62, 0x75, 0x64, 0x67, 0x65, 0x74, 0x5f, 0x6c, 0x61, 0x73, 0x74, 0x5f, + 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x18, 0x14, 0x20, 0x01, 0x28, 0x04, 0x52, 0x19, 0x61, + 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x42, 0x75, 0x64, 0x67, 0x65, 0x74, 0x4c, 0x61, 0x73, + 0x74, 0x52, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x61, 0x73, 0x79, + 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x15, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x0c, 0x65, 0x61, 0x73, 0x79, 0x41, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x12, 0x42, 0x0a, + 0x1e, 0x65, 0x61, 0x73, 0x79, 0x5f, 0x61, 0x75, 0x74, 0x6f, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x6c, + 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, + 0x16, 0x20, 0x01, 0x28, 0x04, 0x52, 0x1a, 0x65, 0x61, 0x73, 0x79, 0x41, 0x75, 0x74, 0x6f, 0x6c, + 0x6f, 0x6f, 0x70, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x53, 0x61, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x17, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x40, 0x0a, 0x11, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x18, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0f, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, 0x72, 0x54, 0x79, 0x70, 0x65, 0x22, 0x84, 0x02, + 0x0a, 0x0d, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x12, 0x2e, + 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, + 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2e, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, + 0x6e, 0x67, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x11, 0x69, 0x6e, 0x63, 0x6f, 0x6d, 0x69, 0x6e, 0x67, 0x54, 0x68, 0x72, 0x65, + 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x12, 0x2d, 0x0a, 0x12, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, + 0x67, 0x5f, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x11, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x54, 0x68, 0x72, 0x65, 0x73, + 0x68, 0x6f, 0x6c, 0x64, 0x22, 0x59, 0x0a, 0x19, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x3c, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, + 0x65, 0x72, 0x73, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, + 0x1c, 0x0a, 0x1a, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x15, 0x0a, + 0x13, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x22, 0x72, 0x0a, 0x0c, 0x44, 0x69, 0x73, 0x71, 0x75, 0x61, 0x6c, 0x69, + 0x66, 0x69, 0x65, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x06, 0x72, + 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x52, 0x06, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x22, 0xb6, 0x01, 0x0a, 0x14, 0x53, 0x75, 0x67, + 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x32, 0x0a, 0x08, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x6f, 0x75, 0x74, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x6c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x6c, 0x6f, 0x6f, 0x70, 0x5f, 0x69, 0x6e, + 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x06, + 0x6c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x39, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x71, 0x75, 0x61, + 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x69, 0x73, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, + 0x69, 0x65, 0x64, 0x52, 0x0c, 0x64, 0x69, 0x73, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, + 0x64, 0x22, 0x57, 0x0a, 0x12, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x31, 0x0a, 0x16, 0x69, 0x5f, 0x6b, 0x6e, 0x6f, + 0x77, 0x5f, 0x77, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x5f, 0x61, 0x6d, 0x5f, 0x64, 0x6f, 0x69, 0x6e, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x4b, 0x6e, 0x6f, 0x77, 0x57, 0x68, + 0x61, 0x74, 0x49, 0x41, 0x6d, 0x44, 0x6f, 0x69, 0x6e, 0x67, 0x22, 0x15, 0x0a, 0x13, 0x41, 0x62, + 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x19, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5a, 0x0a, 0x18, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0c, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c, 0x72, 0x65, 0x73, 0x65, + 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x11, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, + 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, + 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x12, 0x13, 0x0a, 0x05, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x74, 0x78, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x76, 0x6f, 0x75, 0x74, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x76, 0x6f, 0x75, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x79, 0x22, 0x85, 0x01, 0x0a, 0x11, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x5f, + 0x63, 0x68, 0x61, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x04, 0x52, 0x0f, + 0x6f, 0x75, 0x74, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x43, 0x68, 0x61, 0x6e, 0x53, 0x65, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, 0x72, 0x22, 0x74, 0x0a, 0x12, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x28, 0x0a, 0x10, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x5f, 0x6f, 0x75, + 0x74, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x69, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x48, 0x61, 0x73, 0x68, 0x12, 0x1e, 0x0a, 0x0b, + 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x49, 0x64, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x22, 0x55, 0x0a, 0x16, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, + 0x61, 0x6d, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x03, 0x61, 0x6d, 0x74, 0x12, 0x29, + 0x0a, 0x10, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x65, 0x0a, 0x17, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, + 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x12, 0x22, 0x0a, 0x0d, + 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, + 0x22, 0x18, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, + 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44, 0x0a, 0x17, 0x4c, 0x69, + 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x05, 0x73, 0x77, 0x61, 0x70, 0x73, + 0x22, 0xa0, 0x01, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x04, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x0e, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x49, 0x64, 0x73, 0x12, 0x1e, 0x0a, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, 0x70, 0x54, + 0x78, 0x49, 0x64, 0x22, 0x38, 0x0a, 0x17, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x4c, 0x0a, + 0x18, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x56, 0x0a, 0x1a, 0x4c, + 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x69, 0x6e, + 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x69, + 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x6d, 0x61, 0x78, 0x5f, 0x63, 0x6f, + 0x6e, 0x66, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x43, 0x6f, + 0x6e, 0x66, 0x73, 0x22, 0x42, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x23, 0x0a, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x0d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x55, 0x74, 0x78, 0x6f, + 0x52, 0x05, 0x75, 0x74, 0x78, 0x6f, 0x73, 0x22, 0x8e, 0x01, 0x0a, 0x04, 0x55, 0x74, 0x78, 0x6f, + 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, 0x6f, 0x75, 0x6e, + 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x61, 0x6d, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x09, 0x74, 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, + 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, + 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, 0x1b, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, + 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x57, - 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x75, - 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, - 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, - 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, - 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, - 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, - 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, - 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, - 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, - 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x0e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x12, - 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0xa9, - 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, - 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, - 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, - 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, - 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, - 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, - 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, - 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, - 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, - 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, - 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, - 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, - 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, - 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, - 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, - 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, - 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, - 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, + 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x23, + 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x12, 0x3d, 0x0a, 0x11, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x07, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, + 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, + 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, + 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, + 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, + 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, + 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, + 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, + 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, + 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, + 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, + 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, + 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, + 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, + 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, + 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, - 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, - 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, - 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, - 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, - 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, - 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, - 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, - 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, - 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, - 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, - 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, - 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, - 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, - 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, - 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, - 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, - 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, - 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, - 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, - 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, - 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, - 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, - 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, - 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, - 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x2a, 0x9f, 0x01, 0x0a, 0x0c, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, - 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, - 0x0a, 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, - 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x13, - 0x0a, 0x0f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, - 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x05, 0x12, 0x0b, - 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, - 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x07, 0x32, 0xa7, 0x0f, - 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, - 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, - 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, - 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, - 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, + 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, + 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, + 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, + 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, + 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, + 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, + 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, + 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, + 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, + 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, + 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, + 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, + 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, + 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, + 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, + 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, + 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, + 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, + 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x2a, 0x9f, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, + 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, + 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, + 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, + 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x50, + 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, + 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, + 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x45, + 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x07, 0x32, 0xa7, 0x0f, 0x0a, 0x0a, 0x53, + 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, + 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, + 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, + 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, + 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, + 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, + 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, + 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, + 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, - 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, - 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, - 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, - 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, - 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, - 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, - 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, - 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, - 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, - 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, - 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, - 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, - 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, + 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, + 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, + 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, + 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, + 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, - 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, - 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, - 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, - 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, - 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, - 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, + 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, + 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, + 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, + 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/looprpc/client.proto b/looprpc/client.proto index cb3b533f9..3ed4561de 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -766,6 +766,13 @@ message QuoteRequest { probing and payment. */ bool private = 7; + + /* + Static address deposit outpoints that will be quoted for. This option only + pertains to loop in swaps. Either this or the amt parameter can be set at + the same time. + */ + repeated string deposit_outpoints = 8; } message InQuoteResponse { diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index 0d8ee017e..bca77163a 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -254,6 +254,17 @@ "in": "query", "required": false, "type": "boolean" + }, + { + "name": "deposit_outpoints", + "description": "Static address deposit outpoints that will be quoted for. This option only\npertains to loop in swaps. Either this or the amt parameter can be set at\nthe same time.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ @@ -404,6 +415,17 @@ "in": "query", "required": false, "type": "boolean" + }, + { + "name": "deposit_outpoints", + "description": "Static address deposit outpoints that will be quoted for. This option only\npertains to loop in swaps. Either this or the amt parameter can be set at\nthe same time.", + "in": "query", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" } ], "tags": [ From 31750d52cdd5b4a72cbc4c897dd2e7ce7175f58c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 6 Jun 2024 15:26:34 +0200 Subject: [PATCH 36/67] swapserverrpc: number of deposits for ServerLoopInQuoteRequest This commit adds the number of deposits to the ServerLoopInQuoteRequest that the client wants to quote for. --- swapserverrpc/server.pb.go | 9 ++++----- swapserverrpc/server.proto | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/swapserverrpc/server.pb.go b/swapserverrpc/server.pb.go index bc31c0186..ec9aded89 100644 --- a/swapserverrpc/server.pb.go +++ b/swapserverrpc/server.pb.go @@ -1216,11 +1216,10 @@ type ServerLoopInQuoteRequest struct { // loopd/v0.10.0-beta/commit=3b635821 // litd/v0.2.0-alpha/commit=326d754 UserAgent string `protobuf:"bytes,6,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` - // If this is a quote request for a static address loop in, this value - // defines the number of static address deposits that the client wants to - // quote for. The amount of the quote reflects the sum of all deposits. The - // number of deposits here is taken into consideration for the total swap - // fee. + // The number of static address deposits the client wants to quote for. + // If the number of deposits exceeds one the server will apply a per-input + // service fee. This is to cover for the increased on-chain fee the server + // has to pay when the sweeping transaction is broadcast. NumStaticAddressDeposits uint32 `protobuf:"varint,7,opt,name=num_static_address_deposits,json=numStaticAddressDeposits,proto3" json:"num_static_address_deposits,omitempty"` } diff --git a/swapserverrpc/server.proto b/swapserverrpc/server.proto index 9dfc5f97c..a68f1bd4c 100644 --- a/swapserverrpc/server.proto +++ b/swapserverrpc/server.proto @@ -289,11 +289,10 @@ message ServerLoopInQuoteRequest { // litd/v0.2.0-alpha/commit=326d754 string user_agent = 6; - // If this is a quote request for a static address loop in, this value - // defines the number of static address deposits that the client wants to - // quote for. The amount of the quote reflects the sum of all deposits. The - // number of deposits here is taken into consideration for the total swap - // fee. + // The number of static address deposits the client wants to quote for. + // If the number of deposits exceeds one the server will apply a per-input + // service fee. This is to cover for the increased on-chain fee the server + // has to pay when the sweeping transaction is broadcast. uint32 num_static_address_deposits = 7; } From 2cd8145df1243d311b6b391167a47f5a012274bc Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 6 Jun 2024 15:30:50 +0200 Subject: [PATCH 37/67] loopd: quoting for static address loop-ins --- client.go | 12 ++++--- interface.go | 6 ++++ loopd/swapclient_server.go | 61 ++++++++++++++++++++++++++++++--- loopd/swapclient_server_test.go | 27 +++++++++++++-- loopin.go | 2 +- server_mock_test.go | 3 +- swap_server_client.go | 14 ++++---- 7 files changed, 105 insertions(+), 20 deletions(-) diff --git a/client.go b/client.go index 2254cf895..cf253452a 100644 --- a/client.go +++ b/client.go @@ -694,9 +694,9 @@ func (s *Client) LoopIn(globalCtx context.Context, return swapInfo, nil } -// LoopInQuote takes an amount and returns a break down of estimated -// costs for the client. Both the swap server and the on-chain fee estimator are -// queried to get to build the quote response. +// LoopInQuote takes an amount and returns a breakdown of estimated costs for +// the client. Both the swap server and the on-chain fee estimator are queried +// to get to build the quote response. func (s *Client) LoopInQuote(ctx context.Context, request *LoopInQuoteRequest) (*LoopInQuote, error) { @@ -742,7 +742,7 @@ func (s *Client) LoopInQuote(ctx context.Context, quote, err := s.Server.GetLoopInQuote( ctx, request.Amount, s.lndServices.NodePubkey, request.LastHop, - request.RouteHints, request.Initiator, + request.RouteHints, request.Initiator, request.NumDeposits, ) if err != nil { return nil, err @@ -752,7 +752,9 @@ func (s *Client) LoopInQuote(ctx context.Context, // We don't calculate the on-chain fee if the HTLC is going to be // published externally. - if request.ExternalHtlc { + // We also don't calculate the on-chain fee if the loop in is funded by + // static address deposits because we don't publish the HTLC on-chain. + if request.ExternalHtlc || request.NumDeposits > 0 { return &LoopInQuote{ SwapFee: swapFee, MinerFee: 0, diff --git a/interface.go b/interface.go index 1f13aea52..37e5e01c4 100644 --- a/interface.go +++ b/interface.go @@ -288,6 +288,12 @@ type LoopInQuoteRequest struct { // initiated the swap (loop CLI, autolooper, LiT UI and so on) and is // appended to the user agent string. Initiator string + + // The number of static address deposits the client wants to quote for. + // If the number of deposits exceeds one the server will apply a + // per-input service fee. This is to cover for the increased on-chain + // fee the server has to pay when the sweeping transaction is broadcast. + NumDeposits uint32 } // LoopInQuote contains estimates for the fees making up the total swap cost diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 2b76342c8..af211589a 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -748,13 +748,53 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, log.Infof("Loop in quote request received") + var ( + numDeposits = uint32(len(req.DepositOutpoints)) + err error + ) + htlcConfTarget, err := validateLoopInRequest( - req.ConfTarget, req.ExternalHtlc, + req.ConfTarget, req.ExternalHtlc, numDeposits, req.Amt, ) if err != nil { return nil, err } + // Retrieve deposits to calculate their total value. + var summary *looprpc.StaticAddressSummaryResponse + amount := btcutil.Amount(req.Amt) + if len(req.DepositOutpoints) > 0 { + summary, err = s.GetStaticAddressSummary( + ctx, &looprpc.StaticAddressSummaryRequest{ + Outpoints: req.DepositOutpoints, + }, + ) + if err != nil { + return nil, err + } + + if summary == nil { + return nil, fmt.Errorf("no summary returned for " + + "deposit outpoints") + } + + // The requested amount should be 0 here if the request + // contained deposit outpoints. + if amount != 0 && len(summary.FilteredDeposits) > 0 { + return nil, fmt.Errorf("amount should be 0 for " + + "deposit quotes") + } + + // In case we quote for deposits we send the server both the + // total value and the number of deposits. This is so the server + // can probe the total amount and calculate the per input fee. + if amount == 0 && len(summary.FilteredDeposits) > 0 { + for _, deposit := range summary.FilteredDeposits { + amount += btcutil.Amount(deposit.Value) + } + } + } + var ( routeHints [][]zpay32.HopHint lastHop *route.Vertex @@ -778,13 +818,14 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, } quote, err := s.impl.LoopInQuote(ctx, &loop.LoopInQuoteRequest{ - Amount: btcutil.Amount(req.Amt), + Amount: amount, HtlcConfTarget: htlcConfTarget, ExternalHtlc: req.ExternalHtlc, LastHop: lastHop, RouteHints: routeHints, Private: req.Private, Initiator: defaultLoopdInitiator, + NumDeposits: numDeposits, }) if err != nil { return nil, err @@ -881,7 +922,7 @@ func (s *swapClientServer) LoopIn(ctx context.Context, log.Infof("Loop in request received") htlcConfTarget, err := validateLoopInRequest( - in.HtlcConfTarget, in.ExternalHtlc, + in.HtlcConfTarget, in.ExternalHtlc, 0, in.Amt, ) if err != nil { return nil, err @@ -1730,7 +1771,13 @@ func validateConfTarget(target, defaultTarget int32) (int32, error) { // validateLoopInRequest fails if the mutually exclusive conf target and // external parameters are both set. -func validateLoopInRequest(htlcConfTarget int32, external bool) (int32, error) { +func validateLoopInRequest(htlcConfTarget int32, external bool, + numDeposits uint32, amount int64) (int32, error) { + + if amount == 0 && numDeposits == 0 { + return 0, errors.New("either amount or deposits must be set") + } + // If the htlc is going to be externally set, the htlcConfTarget should // not be set, because it has no relevance when the htlc is external. if external && htlcConfTarget != 0 { @@ -1744,6 +1791,12 @@ func validateLoopInRequest(htlcConfTarget int32, external bool) (int32, error) { return 0, nil } + // If the loop in uses static address deposits, we do not need to set a + // confirmation target since the HTLC won't be published by the client. + if numDeposits > 0 { + return 0, nil + } + return validateConfTarget(htlcConfTarget, loop.DefaultHtlcConfTarget) } diff --git a/loopd/swapclient_server_test.go b/loopd/swapclient_server_test.go index 2cdd2359d..df688f47d 100644 --- a/loopd/swapclient_server_test.go +++ b/loopd/swapclient_server_test.go @@ -146,6 +146,8 @@ func TestValidateConfTarget(t *testing.T) { func TestValidateLoopInRequest(t *testing.T) { tests := []struct { name string + amount int64 + numDeposits uint32 external bool confTarget int32 expectErr bool @@ -153,6 +155,7 @@ func TestValidateLoopInRequest(t *testing.T) { }{ { name: "external and htlc conf set", + amount: 100_000, external: true, confTarget: 1, expectErr: true, @@ -160,6 +163,7 @@ func TestValidateLoopInRequest(t *testing.T) { }, { name: "external and no conf", + amount: 100_000, external: true, confTarget: 0, expectErr: false, @@ -167,6 +171,7 @@ func TestValidateLoopInRequest(t *testing.T) { }, { name: "not external, zero conf", + amount: 100_000, external: false, confTarget: 0, expectErr: false, @@ -174,6 +179,7 @@ func TestValidateLoopInRequest(t *testing.T) { }, { name: "not external, bad conf", + amount: 100_000, external: false, confTarget: 1, expectErr: true, @@ -181,20 +187,35 @@ func TestValidateLoopInRequest(t *testing.T) { }, { name: "not external, ok conf", + amount: 100_000, external: false, confTarget: 5, expectErr: false, expectedTarget: 5, }, + { + name: "not external, amount no deposit", + amount: 100_000, + numDeposits: 0, + external: false, + expectErr: false, + expectedTarget: loop.DefaultHtlcConfTarget, + }, + { + name: "not external, deposit no amount", + amount: 100_000, + numDeposits: 1, + external: false, + expectErr: false, + }, } for _, test := range tests { - test := test - t.Run(test.name, func(t *testing.T) { external := test.external conf, err := validateLoopInRequest( - test.confTarget, external, + test.confTarget, external, test.numDeposits, + test.amount, ) if test.expectErr { diff --git a/loopin.go b/loopin.go index 21e40dcba..c8f56435b 100644 --- a/loopin.go +++ b/loopin.go @@ -128,7 +128,7 @@ func newLoopInSwap(globalCtx context.Context, cfg *swapConfig, // hints. quote, err := cfg.server.GetLoopInQuote( globalCtx, request.Amount, cfg.lnd.NodePubkey, request.LastHop, - request.RouteHints, request.Initiator, + request.RouteHints, request.Initiator, 0, ) if err != nil { return nil, wrapGrpcError("loop in terms", err) diff --git a/server_mock_test.go b/server_mock_test.go index f46a49774..d10223e7c 100644 --- a/server_mock_test.go +++ b/server_mock_test.go @@ -225,7 +225,8 @@ func (s *serverMock) GetLoopInTerms(ctx context.Context, initiator string) ( } func (s *serverMock) GetLoopInQuote(context.Context, btcutil.Amount, - route.Vertex, *route.Vertex, [][]zpay32.HopHint, string) (*LoopInQuote, error) { + route.Vertex, *route.Vertex, [][]zpay32.HopHint, string, + uint32) (*LoopInQuote, error) { return &LoopInQuote{ SwapFee: testSwapFee, diff --git a/swap_server_client.go b/swap_server_client.go index ddb5ba560..19311ec35 100644 --- a/swap_server_client.go +++ b/swap_server_client.go @@ -82,7 +82,7 @@ type swapServerClient interface { GetLoopInQuote(ctx context.Context, amt btcutil.Amount, pubKey route.Vertex, lastHop *route.Vertex, routeHints [][]zpay32.HopHint, - initiator string) (*LoopInQuote, error) + initiator string, numDeposits uint32) (*LoopInQuote, error) Probe(ctx context.Context, amt btcutil.Amount, target route.Vertex, lastHop *route.Vertex, routeHints [][]zpay32.HopHint) error @@ -268,7 +268,8 @@ func (s *grpcSwapServerClient) GetLoopInTerms(ctx context.Context, func (s *grpcSwapServerClient) GetLoopInQuote(ctx context.Context, amt btcutil.Amount, pubKey route.Vertex, lastHop *route.Vertex, - routeHints [][]zpay32.HopHint, initiator string) (*LoopInQuote, error) { + routeHints [][]zpay32.HopHint, initiator string, + numDeposits uint32) (*LoopInQuote, error) { err := s.Probe(ctx, amt, pubKey, lastHop, routeHints) if err != nil && status.Code(err) != codes.Unavailable { @@ -279,10 +280,11 @@ func (s *grpcSwapServerClient) GetLoopInQuote(ctx context.Context, defer rpcCancel() req := &swapserverrpc.ServerLoopInQuoteRequest{ - Amt: uint64(amt), - ProtocolVersion: loopdb.CurrentRPCProtocolVersion(), - Pubkey: pubKey[:], - UserAgent: UserAgent(initiator), + Amt: uint64(amt), + ProtocolVersion: loopdb.CurrentRPCProtocolVersion(), + Pubkey: pubKey[:], + UserAgent: UserAgent(initiator), + NumStaticAddressDeposits: numDeposits, } if lastHop != nil { From 3482993f611d45d3227aef66c84800d826800611 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 6 Jun 2024 15:31:17 +0200 Subject: [PATCH 38/67] cmd: quote for static address loop-ins --- cmd/loop/quote.go | 76 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 65 insertions(+), 11 deletions(-) diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index 1eb54e620..f92b7243c 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -6,6 +6,7 @@ import ( "os" "time" + "github.com/btcsuite/btcd/btcutil" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/looprpc" "github.com/lightningnetwork/lnd/routing/route" @@ -19,10 +20,11 @@ var quoteCommand = cli.Command{ } var quoteInCommand = cli.Command{ - Name: "in", - Usage: "get a quote for the cost of a loop in swap", - ArgsUsage: "amt", - Description: "Allows to determine the cost of a swap up front", + Name: "in", + Usage: "get a quote for the cost of a loop in swap", + ArgsUsage: "amt", + Description: "Allows to determine the cost of a swap up front." + + "Either specify an amount or deposit outpoints.", Flags: []cli.Flag{ cli.StringFlag{ Name: lastHopFlag.Name, @@ -33,20 +35,38 @@ var quoteInCommand = cli.Command{ verboseFlag, privateFlag, routeHintsFlag, + cli.StringSliceFlag{ + Name: "deposit_outpoint", + Usage: "one or more static address deposit outpoints " + + "to quote for. Deposit outpoints are not to " + + "be used in combination with an amount. Each" + + "additional outpoint can be added by " + + "specifying --deposit_outpoint tx_id:idx", + }, }, Action: quoteIn, } func quoteIn(ctx *cli.Context) error { // Show command help if the incorrect number arguments was provided. - if ctx.NArg() != 1 { + if ctx.NArg() != 1 && !ctx.IsSet("deposit_outpoint") { return cli.ShowCommandHelp(ctx, "in") } - args := ctx.Args() - amt, err := parseAmt(args[0]) - if err != nil { - return err + var ( + manualAmt btcutil.Amount + depositAmt btcutil.Amount + depositOutpoints []string + err error + ctxb = context.Background() + ) + + if ctx.NArg() == 1 { + args := ctx.Args() + manualAmt, err = parseAmt(args[0]) + if err != nil { + return err + } } client, cleanup, err := getClient(ctx) @@ -62,11 +82,20 @@ func quoteIn(ctx *cli.Context) error { return err } + if ctx.IsSet("deposit_outpoint") { + depositOutpoints = ctx.StringSlice("deposit_outpoint") + depositAmt, err = depositAmount(ctxb, client, depositOutpoints) + if err != nil { + return err + } + } + quoteReq := &looprpc.QuoteRequest{ - Amt: int64(amt), + Amt: int64(manualAmt), ConfTarget: int32(ctx.Uint64("conf_target")), LoopInRouteHints: hints, Private: ctx.Bool(privateFlag.Name), + DepositOutpoints: depositOutpoints, } if ctx.IsSet(lastHopFlag.Name) { @@ -80,7 +109,6 @@ func quoteIn(ctx *cli.Context) error { quoteReq.LoopInLastHop = lastHopVertex[:] } - ctxb := context.Background() quoteResp, err := client.GetLoopInQuote(ctxb, quoteReq) if err != nil { return err @@ -98,10 +126,36 @@ func quoteIn(ctx *cli.Context) error { "amount.\n") } + // If the user specified static address deposits, we quoted for their + // total value and need to display that value instead of the manually + // selected one. + if manualAmt == 0 { + quoteReq.Amt = int64(depositAmt) + } printQuoteInResp(quoteReq, quoteResp, ctx.Bool("verbose")) return nil } +func depositAmount(ctx context.Context, client looprpc.SwapClientClient, + depositOutpoints []string) (btcutil.Amount, error) { + + addressSummary, err := client.GetStaticAddressSummary( + ctx, &looprpc.StaticAddressSummaryRequest{ + Outpoints: depositOutpoints, + }, + ) + if err != nil { + return 0, err + } + + var depositAmt btcutil.Amount + for _, deposit := range addressSummary.FilteredDeposits { + depositAmt += btcutil.Amount(deposit.Value) + } + + return depositAmt, nil +} + var quoteOutCommand = cli.Command{ Name: "out", Usage: "get a quote for the cost of a loop out swap", From 39963b20358792ad359ec9a8a7a39a7146f6fb25 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 19 Nov 2024 13:15:21 +0100 Subject: [PATCH 39/67] swapserverrpc: static address loop-ins --- swapserverrpc/server.pb.go | 1694 ++++++++++++++++++++++++++----- swapserverrpc/server.proto | 174 ++++ swapserverrpc/server_grpc.pb.go | 160 +++ 3 files changed, 1751 insertions(+), 277 deletions(-) diff --git a/swapserverrpc/server.pb.go b/swapserverrpc/server.pb.go index ec9aded89..33a7a2cbe 100644 --- a/swapserverrpc/server.pb.go +++ b/swapserverrpc/server.pb.go @@ -3218,6 +3218,807 @@ func (x *ServerWithdrawResponse) GetServerNonces() [][]byte { return nil } +type ServerStaticAddressLoopInRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The client's public key for the htlc output. + HtlcClientPubKey []byte `protobuf:"bytes,1,opt,name=htlc_client_pub_key,json=htlcClientPubKey,proto3" json:"htlc_client_pub_key,omitempty"` + // The hashed swap invoice preimage of the swap. + SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The deposit outpoints the client wishes to loop in. They implicitly state + // the swap amount. + DepositOutpoints []string `protobuf:"bytes,3,rep,name=deposit_outpoints,json=depositOutpoints,proto3" json:"deposit_outpoints,omitempty"` + // The swap invoice that the client wants the server to pay. + SwapInvoice string `protobuf:"bytes,4,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"` + // An optional last hop the client wants to receive the invoice payment + // from. + LastHop []byte `protobuf:"bytes,5,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"` + // The protocol version that the client adheres to. + ProtocolVersion StaticAddressProtocolVersion `protobuf:"varint,6,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.StaticAddressProtocolVersion" json:"protocol_version,omitempty"` + // The user agent string that identifies the software running on the user's + // side. This can be changed in the user's client software but it _SHOULD_ + // conform to the following pattern: + // + // Agent-Name/semver-version(/additional-info) + // + // Examples: + // + // loopd/v0.10.0-beta/commit=3b635821 + // litd/v0.2.0-alpha/commit=326d754 + // loopd/v0.10.0-beta/commit=3b635823,initiator=easy-autoloop + UserAgent string `protobuf:"bytes,7,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + // The swap payment timeout allows the user to specify an upper limit for + // the amount of time the server is allowed to take to fulfill the off-chain + // swap payment. If the timeout is reached the swap will be aborted on the + // server side and the client can retry the swap with different parameters. + PaymentTimeoutSeconds uint32 `protobuf:"varint,8,opt,name=payment_timeout_seconds,json=paymentTimeoutSeconds,proto3" json:"payment_timeout_seconds,omitempty"` +} + +func (x *ServerStaticAddressLoopInRequest) Reset() { + *x = ServerStaticAddressLoopInRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[41] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerStaticAddressLoopInRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerStaticAddressLoopInRequest) ProtoMessage() {} + +func (x *ServerStaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[41] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerStaticAddressLoopInRequest.ProtoReflect.Descriptor instead. +func (*ServerStaticAddressLoopInRequest) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{41} +} + +func (x *ServerStaticAddressLoopInRequest) GetHtlcClientPubKey() []byte { + if x != nil { + return x.HtlcClientPubKey + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetDepositOutpoints() []string { + if x != nil { + return x.DepositOutpoints + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetSwapInvoice() string { + if x != nil { + return x.SwapInvoice + } + return "" +} + +func (x *ServerStaticAddressLoopInRequest) GetLastHop() []byte { + if x != nil { + return x.LastHop + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetProtocolVersion() StaticAddressProtocolVersion { + if x != nil { + return x.ProtocolVersion + } + return StaticAddressProtocolVersion_V0 +} + +func (x *ServerStaticAddressLoopInRequest) GetUserAgent() string { + if x != nil { + return x.UserAgent + } + return "" +} + +func (x *ServerStaticAddressLoopInRequest) GetPaymentTimeoutSeconds() uint32 { + if x != nil { + return x.PaymentTimeoutSeconds + } + return 0 +} + +type ServerStaticAddressLoopInResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The server's public key for the htlc output. + HtlcServerPubKey []byte `protobuf:"bytes,1,opt,name=htlc_server_pub_key,json=htlcServerPubKey,proto3" json:"htlc_server_pub_key,omitempty"` + // The cltv expiry height for the htlc. This is the height at which the + // htlc will expire and the client is free to claim the funds back. + HtlcExpiry int32 `protobuf:"varint,2,opt,name=htlc_expiry,json=htlcExpiry,proto3" json:"htlc_expiry,omitempty"` + // The info the server used to generate the standard fee partial htlc tx + // sigs. + StandardHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,3,opt,name=standard_htlc_info,json=standardHtlcInfo,proto3" json:"standard_htlc_info,omitempty"` + // The info the server used to generate the high fee partial htlc tx sigs. + HighFeeHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,4,opt,name=high_fee_htlc_info,json=highFeeHtlcInfo,proto3" json:"high_fee_htlc_info,omitempty"` + // The info the server used to generate the extreme fee partial htlc tx + // sigs. + ExtremeFeeHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,5,opt,name=extreme_fee_htlc_info,json=extremeFeeHtlcInfo,proto3" json:"extreme_fee_htlc_info,omitempty"` +} + +func (x *ServerStaticAddressLoopInResponse) Reset() { + *x = ServerStaticAddressLoopInResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerStaticAddressLoopInResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerStaticAddressLoopInResponse) ProtoMessage() {} + +func (x *ServerStaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerStaticAddressLoopInResponse.ProtoReflect.Descriptor instead. +func (*ServerStaticAddressLoopInResponse) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{42} +} + +func (x *ServerStaticAddressLoopInResponse) GetHtlcServerPubKey() []byte { + if x != nil { + return x.HtlcServerPubKey + } + return nil +} + +func (x *ServerStaticAddressLoopInResponse) GetHtlcExpiry() int32 { + if x != nil { + return x.HtlcExpiry + } + return 0 +} + +func (x *ServerStaticAddressLoopInResponse) GetStandardHtlcInfo() *ServerHtlcSigningInfo { + if x != nil { + return x.StandardHtlcInfo + } + return nil +} + +func (x *ServerStaticAddressLoopInResponse) GetHighFeeHtlcInfo() *ServerHtlcSigningInfo { + if x != nil { + return x.HighFeeHtlcInfo + } + return nil +} + +func (x *ServerStaticAddressLoopInResponse) GetExtremeFeeHtlcInfo() *ServerHtlcSigningInfo { + if x != nil { + return x.ExtremeFeeHtlcInfo + } + return nil +} + +type ServerHtlcSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the server used to generate the partial htlc tx sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The fee rate in sat/kw that the server wants to use for the htlc tx. + FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` +} + +func (x *ServerHtlcSigningInfo) Reset() { + *x = ServerHtlcSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[43] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerHtlcSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerHtlcSigningInfo) ProtoMessage() {} + +func (x *ServerHtlcSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[43] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerHtlcSigningInfo.ProtoReflect.Descriptor instead. +func (*ServerHtlcSigningInfo) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{43} +} + +func (x *ServerHtlcSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ServerHtlcSigningInfo) GetFeeRate() uint64 { + if x != nil { + return x.FeeRate + } + return 0 +} + +type PushStaticAddressHtlcSigsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash that the client wants to push the htlc sigs for. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The nonces that the client used to generate the htlc sigs. + StandardHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,2,opt,name=standard_htlc_info,json=standardHtlcInfo,proto3" json:"standard_htlc_info,omitempty"` + // The nonces that the client used to generate the high fee htlc sigs. + HighFeeHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,3,opt,name=high_fee_htlc_info,json=highFeeHtlcInfo,proto3" json:"high_fee_htlc_info,omitempty"` + // The nonces that the client used to generate the extreme fee htlc sigs. + ExtremeFeeHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_htlc_info,json=extremeFeeHtlcInfo,proto3" json:"extreme_fee_htlc_info,omitempty"` +} + +func (x *PushStaticAddressHtlcSigsRequest) Reset() { + *x = PushStaticAddressHtlcSigsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[44] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressHtlcSigsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressHtlcSigsRequest) ProtoMessage() {} + +func (x *PushStaticAddressHtlcSigsRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[44] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressHtlcSigsRequest.ProtoReflect.Descriptor instead. +func (*PushStaticAddressHtlcSigsRequest) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{44} +} + +func (x *PushStaticAddressHtlcSigsRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *PushStaticAddressHtlcSigsRequest) GetStandardHtlcInfo() *ClientHtlcSigningInfo { + if x != nil { + return x.StandardHtlcInfo + } + return nil +} + +func (x *PushStaticAddressHtlcSigsRequest) GetHighFeeHtlcInfo() *ClientHtlcSigningInfo { + if x != nil { + return x.HighFeeHtlcInfo + } + return nil +} + +func (x *PushStaticAddressHtlcSigsRequest) GetExtremeFeeHtlcInfo() *ClientHtlcSigningInfo { + if x != nil { + return x.ExtremeFeeHtlcInfo + } + return nil +} + +type ClientHtlcSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the client used to generate the partial htlc tx sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The musig2 htlc sigs that the client generated for the htlc tx. + Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *ClientHtlcSigningInfo) Reset() { + *x = ClientHtlcSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientHtlcSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientHtlcSigningInfo) ProtoMessage() {} + +func (x *ClientHtlcSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientHtlcSigningInfo.ProtoReflect.Descriptor instead. +func (*ClientHtlcSigningInfo) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{45} +} + +func (x *ClientHtlcSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ClientHtlcSigningInfo) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +type PushStaticAddressHtlcSigsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PushStaticAddressHtlcSigsResponse) Reset() { + *x = PushStaticAddressHtlcSigsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressHtlcSigsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressHtlcSigsResponse) ProtoMessage() {} + +func (x *PushStaticAddressHtlcSigsResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressHtlcSigsResponse.ProtoReflect.Descriptor instead. +func (*PushStaticAddressHtlcSigsResponse) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{46} +} + +type FetchSweeplessSweepTxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash of the swap that the client wants to fetch the sweepless + // sweep tx for. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` +} + +func (x *FetchSweeplessSweepTxRequest) Reset() { + *x = FetchSweeplessSweepTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[47] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchSweeplessSweepTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchSweeplessSweepTxRequest) ProtoMessage() {} + +func (x *FetchSweeplessSweepTxRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[47] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchSweeplessSweepTxRequest.ProtoReflect.Descriptor instead. +func (*FetchSweeplessSweepTxRequest) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{47} +} + +func (x *FetchSweeplessSweepTxRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +type FetchSweeplessSweepTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address that the server wants to sweep the static address deposits + // to. + SweepAddr string `protobuf:"bytes,1,opt,name=sweep_addr,json=sweepAddr,proto3" json:"sweep_addr,omitempty"` + // The info the server used to generate the standard fee partial sweepless + // tx sigs. + StandardFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_fee_info,json=standardFeeInfo,proto3" json:"standard_fee_info,omitempty"` + // The info the server used to generate the high fee partial sweepless tx + // sigs. + HighFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_info,json=highFeeInfo,proto3" json:"high_fee_info,omitempty"` + // The info the server used to generate the extreme fee partial sweepless tx + // sigs. + ExtremeFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_info,json=extremeFeeInfo,proto3" json:"extreme_fee_info,omitempty"` +} + +func (x *FetchSweeplessSweepTxResponse) Reset() { + *x = FetchSweeplessSweepTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[48] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchSweeplessSweepTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchSweeplessSweepTxResponse) ProtoMessage() {} + +func (x *FetchSweeplessSweepTxResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[48] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchSweeplessSweepTxResponse.ProtoReflect.Descriptor instead. +func (*FetchSweeplessSweepTxResponse) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{48} +} + +func (x *FetchSweeplessSweepTxResponse) GetSweepAddr() string { + if x != nil { + return x.SweepAddr + } + return "" +} + +func (x *FetchSweeplessSweepTxResponse) GetStandardFeeInfo() *ServerSweeplessSigningInfo { + if x != nil { + return x.StandardFeeInfo + } + return nil +} + +func (x *FetchSweeplessSweepTxResponse) GetHighFeeInfo() *ServerSweeplessSigningInfo { + if x != nil { + return x.HighFeeInfo + } + return nil +} + +func (x *FetchSweeplessSweepTxResponse) GetExtremeFeeInfo() *ServerSweeplessSigningInfo { + if x != nil { + return x.ExtremeFeeInfo + } + return nil +} + +type ServerSweeplessSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the server used to generate the partial sweepless tx + // sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The fee rate in sat/kw that the server wants to use for the sweepless tx. + FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` +} + +func (x *ServerSweeplessSigningInfo) Reset() { + *x = ServerSweeplessSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[49] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerSweeplessSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerSweeplessSigningInfo) ProtoMessage() {} + +func (x *ServerSweeplessSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[49] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerSweeplessSigningInfo.ProtoReflect.Descriptor instead. +func (*ServerSweeplessSigningInfo) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{49} +} + +func (x *ServerSweeplessSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ServerSweeplessSigningInfo) GetFeeRate() uint64 { + if x != nil { + return x.FeeRate + } + return 0 +} + +type PushStaticAddressSweeplessSigsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash of the swap that the client wants to push the sweepless + // sigs for. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The info the client used to generate the standard fee partial sweepless + // tx sigs. + StandardSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_signing_info,json=standardSigningInfo,proto3" json:"standard_signing_info,omitempty"` + // The info the client used to generate the high fee partial sweepless tx + // sigs. + HighFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_signing_info,json=highFeeSigningInfo,proto3" json:"high_fee_signing_info,omitempty"` + // The info the client used to generate the extreme fee partial sweepless + // tx sigs. + ExtremeFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_signing_info,json=extremeFeeSigningInfo,proto3" json:"extreme_fee_signing_info,omitempty"` +} + +func (x *PushStaticAddressSweeplessSigsRequest) Reset() { + *x = PushStaticAddressSweeplessSigsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[50] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressSweeplessSigsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressSweeplessSigsRequest) ProtoMessage() {} + +func (x *PushStaticAddressSweeplessSigsRequest) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[50] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressSweeplessSigsRequest.ProtoReflect.Descriptor instead. +func (*PushStaticAddressSweeplessSigsRequest) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{50} +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetStandardSigningInfo() *ClientSweeplessSigningInfo { + if x != nil { + return x.StandardSigningInfo + } + return nil +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetHighFeeSigningInfo() *ClientSweeplessSigningInfo { + if x != nil { + return x.HighFeeSigningInfo + } + return nil +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetExtremeFeeSigningInfo() *ClientSweeplessSigningInfo { + if x != nil { + return x.ExtremeFeeSigningInfo + } + return nil +} + +type ClientSweeplessSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the client used to generate the partial sweepless tx + // sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The musig2 htlc sigs that the client generated for the sweepless tx. + Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *ClientSweeplessSigningInfo) Reset() { + *x = ClientSweeplessSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[51] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientSweeplessSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientSweeplessSigningInfo) ProtoMessage() {} + +func (x *ClientSweeplessSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[51] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientSweeplessSigningInfo.ProtoReflect.Descriptor instead. +func (*ClientSweeplessSigningInfo) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{51} +} + +func (x *ClientSweeplessSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ClientSweeplessSigningInfo) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +type PushStaticAddressSweeplessSigsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PushStaticAddressSweeplessSigsResponse) Reset() { + *x = PushStaticAddressSweeplessSigsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[52] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressSweeplessSigsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressSweeplessSigsResponse) ProtoMessage() {} + +func (x *PushStaticAddressSweeplessSigsResponse) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[52] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressSweeplessSigsResponse.ProtoReflect.Descriptor instead. +func (*PushStaticAddressSweeplessSigsResponse) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{52} +} + var File_server_proto protoreflect.FileDescriptor var file_server_proto_rawDesc = []byte{ @@ -3598,190 +4399,352 @@ var file_server_proto_rawDesc = []byte{ 0x69, 0x67, 0x32, 0x53, 0x77, 0x65, 0x65, 0x70, 0x53, 0x69, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x73, 0x2a, 0xef, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, - 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, - 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, - 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, - 0x53, 0x45, 0x47, 0x57, 0x49, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x02, - 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x55, 0x53, - 0x48, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, - 0x55, 0x53, 0x45, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, - 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x56, - 0x32, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, 0x4f, - 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, - 0x55, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x50, - 0x52, 0x4f, 0x42, 0x45, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x4f, 0x55, 0x54, 0x49, 0x4e, - 0x47, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x56, 0x33, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x55, 0x53, 0x49, 0x47, - 0x32, 0x10, 0x0b, 0x2a, 0x9e, 0x04, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, - 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, - 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, - 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x52, 0x56, - 0x45, 0x52, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, - 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x45, 0x52, - 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x46, 0x46, 0x5f, 0x43, - 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, 0x19, - 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, - 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x52, - 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, - 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x45, - 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x1c, - 0x0a, 0x18, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, - 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x1d, 0x0a, 0x19, - 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, - 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, 0x53, - 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, - 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, - 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, 0x43, - 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0d, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, - 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0e, 0x12, 0x27, 0x0a, 0x23, 0x53, 0x45, 0x52, - 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, - 0x50, 0x4c, 0x45, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x53, - 0x10, 0x0f, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, - 0x4f, 0x4e, 0x10, 0x10, 0x2a, 0x4a, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x4f, 0x55, 0x54, - 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, - 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, - 0x0d, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02, - 0x2a, 0xf1, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x61, 0x69, 0x6c, - 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4e, 0x44, - 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, - 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4c, 0x4e, 0x44, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x45, 0x52, - 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x30, 0x0a, 0x2c, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, - 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x45, - 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x04, 0x12, 0x2b, 0x0a, 0x27, 0x4c, 0x4e, 0x44, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, - 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, - 0x43, 0x45, 0x10, 0x05, 0x2a, 0x27, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, - 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, - 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x57, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x2a, 0x26, 0x0a, - 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, - 0x02, 0x56, 0x30, 0x10, 0x00, 0x32, 0xc9, 0x0b, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x73, 0x22, 0x82, 0x03, 0x0a, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x10, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, + 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, + 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, + 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x50, 0x0a, + 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, + 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, + 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, + 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, + 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, + 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xe1, 0x02, 0x0a, 0x21, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x13, + 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x68, 0x74, 0x6c, 0x63, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68, + 0x74, 0x6c, 0x63, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, + 0x52, 0x0a, 0x68, 0x74, 0x6c, 0x63, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x12, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, + 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x12, 0x68, 0x69, + 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x48, + 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, + 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, + 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4a, 0x0a, 0x15, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, + 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, + 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x20, 0x50, 0x75, 0x73, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, + 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, + 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, + 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6e, + 0x64, 0x61, 0x72, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x48, 0x74, + 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x12, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0f, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x48, 0x74, + 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, + 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x50, + 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x3b, 0x0a, 0x1c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, + 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0xa7, 0x02, + 0x0a, 0x1d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, + 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x1d, 0x0a, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4f, + 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, + 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, + 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x47, 0x0a, 0x0d, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, + 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x68, 0x69, 0x67, + 0x68, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x72, + 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, + 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4f, 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, + 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, + 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xd3, 0x02, 0x0a, 0x25, 0x50, 0x75, 0x73, + 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x57, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x53, 0x69, 0x67, + 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x56, 0x0a, 0x15, 0x68, 0x69, 0x67, 0x68, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, + 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, + 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x68, 0x69, + 0x67, 0x68, 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x5c, 0x0a, 0x18, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, + 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x48, + 0x0a, 0x1a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, + 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, 0x28, 0x0a, 0x26, 0x50, 0x75, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, + 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2a, 0xef, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, + 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, + 0x5f, 0x53, 0x45, 0x47, 0x57, 0x49, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, + 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x55, + 0x53, 0x48, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, + 0x14, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x4c, 0x4f, 0x4f, + 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x54, 0x4c, 0x43, 0x5f, + 0x56, 0x32, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, + 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, + 0x4f, 0x55, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, + 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x4f, 0x55, 0x54, 0x49, + 0x4e, 0x47, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x48, + 0x54, 0x4c, 0x43, 0x5f, 0x56, 0x33, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x55, 0x53, 0x49, + 0x47, 0x32, 0x10, 0x0b, 0x2a, 0x9e, 0x04, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, + 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x52, 0x56, + 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, + 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, + 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x52, + 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x19, 0x0a, + 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, + 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x46, 0x46, 0x5f, + 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, + 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x57, 0x41, 0x50, + 0x5f, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, + 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, + 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, + 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x1d, 0x0a, + 0x19, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, + 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, + 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, + 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x52, 0x56, 0x45, + 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, + 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0d, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, + 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, + 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0e, 0x12, 0x27, 0x0a, 0x23, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4d, 0x55, 0x4c, 0x54, + 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, + 0x53, 0x10, 0x0f, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x10, 0x2a, 0x4a, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x4f, 0x55, + 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, + 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x11, + 0x0a, 0x0d, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, + 0x02, 0x2a, 0xf1, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4e, + 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x4e, 0x44, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, + 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4c, 0x4e, 0x44, 0x5f, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, + 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4c, 0x4e, 0x44, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x45, + 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x30, 0x0a, 0x2c, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, + 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, + 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x04, 0x12, 0x2b, 0x0a, 0x27, 0x4c, 0x4e, 0x44, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, + 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, + 0x4e, 0x43, 0x45, 0x10, 0x05, 0x2a, 0x27, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, + 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, + 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x57, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x2a, 0x26, + 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, + 0x0a, 0x02, 0x56, 0x30, 0x10, 0x00, 0x32, 0xc9, 0x0b, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, + 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, + 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, + 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, - 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, - 0x75, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, - 0x72, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, - 0x53, 0x77, 0x61, 0x70, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 0x63, - 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, - 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, - 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, - 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, - 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x6d, - 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, - 0x6e, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, 0x6f, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, + 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, + 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, + 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, + 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, + 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, + 0x65, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, + 0x01, 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, + 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, + 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, + 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, - 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, - 0x71, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, + 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, + 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, + 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x52, 0x65, + 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, - 0x53, 0x77, 0x65, 0x65, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, - 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x53, - 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, 0x12, - 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, - 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, - 0x12, 0x42, 0x0a, 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x12, 0x19, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, - 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x32, 0xc9, 0x01, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, - 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, - 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, - 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x73, - 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, + 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, + 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, + 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, + 0x12, 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, + 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, + 0x73, 0x12, 0x42, 0x0a, 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x12, 0x19, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, + 0x30, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, + 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x30, 0x01, 0x32, 0x9d, 0x05, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, + 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x1e, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, + 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x29, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x12, + 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, + 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x12, + 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, + 0x01, 0x0a, 0x1e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, + 0x73, 0x12, 0x2e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, + 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, + 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, + 0x6f, 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, + 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3797,64 +4760,76 @@ func file_server_proto_rawDescGZIP() []byte { } var file_server_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 41) +var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 53) var file_server_proto_goTypes = []interface{}{ - (ProtocolVersion)(0), // 0: looprpc.ProtocolVersion - (ServerSwapState)(0), // 1: looprpc.ServerSwapState - (RoutePaymentType)(0), // 2: looprpc.RoutePaymentType - (PaymentFailureReason)(0), // 3: looprpc.PaymentFailureReason - (RoutingPlugin)(0), // 4: looprpc.RoutingPlugin - (StaticAddressProtocolVersion)(0), // 5: looprpc.StaticAddressProtocolVersion - (*ServerLoopOutRequest)(nil), // 6: looprpc.ServerLoopOutRequest - (*ServerLoopOutResponse)(nil), // 7: looprpc.ServerLoopOutResponse - (*ServerLoopOutQuoteRequest)(nil), // 8: looprpc.ServerLoopOutQuoteRequest - (*ServerLoopOutQuote)(nil), // 9: looprpc.ServerLoopOutQuote - (*ServerLoopOutTermsRequest)(nil), // 10: looprpc.ServerLoopOutTermsRequest - (*ServerLoopOutTerms)(nil), // 11: looprpc.ServerLoopOutTerms - (*ServerLoopInRequest)(nil), // 12: looprpc.ServerLoopInRequest - (*ServerLoopInResponse)(nil), // 13: looprpc.ServerLoopInResponse - (*ServerLoopInQuoteRequest)(nil), // 14: looprpc.ServerLoopInQuoteRequest - (*ServerLoopInQuoteResponse)(nil), // 15: looprpc.ServerLoopInQuoteResponse - (*ServerLoopInTermsRequest)(nil), // 16: looprpc.ServerLoopInTermsRequest - (*ServerLoopInTerms)(nil), // 17: looprpc.ServerLoopInTerms - (*ServerLoopOutPushPreimageRequest)(nil), // 18: looprpc.ServerLoopOutPushPreimageRequest - (*ServerLoopOutPushPreimageResponse)(nil), // 19: looprpc.ServerLoopOutPushPreimageResponse - (*SubscribeUpdatesRequest)(nil), // 20: looprpc.SubscribeUpdatesRequest - (*SubscribeLoopOutUpdatesResponse)(nil), // 21: looprpc.SubscribeLoopOutUpdatesResponse - (*SubscribeLoopInUpdatesResponse)(nil), // 22: looprpc.SubscribeLoopInUpdatesResponse - (*RouteCancel)(nil), // 23: looprpc.RouteCancel - (*HtlcAttempt)(nil), // 24: looprpc.HtlcAttempt - (*CancelLoopOutSwapRequest)(nil), // 25: looprpc.CancelLoopOutSwapRequest - (*CancelLoopOutSwapResponse)(nil), // 26: looprpc.CancelLoopOutSwapResponse - (*ServerProbeRequest)(nil), // 27: looprpc.ServerProbeRequest - (*ServerProbeResponse)(nil), // 28: looprpc.ServerProbeResponse - (*RecommendRoutingPluginReq)(nil), // 29: looprpc.RecommendRoutingPluginReq - (*RecommendRoutingPluginRes)(nil), // 30: looprpc.RecommendRoutingPluginRes - (*ReportRoutingResultReq)(nil), // 31: looprpc.ReportRoutingResultReq - (*ReportRoutingResultRes)(nil), // 32: looprpc.ReportRoutingResultRes - (*MuSig2SignSweepReq)(nil), // 33: looprpc.MuSig2SignSweepReq - (*PrevoutInfo)(nil), // 34: looprpc.PrevoutInfo - (*MuSig2SignSweepRes)(nil), // 35: looprpc.MuSig2SignSweepRes - (*ServerPushKeyReq)(nil), // 36: looprpc.ServerPushKeyReq - (*ServerPushKeyRes)(nil), // 37: looprpc.ServerPushKeyRes - (*FetchL402Request)(nil), // 38: looprpc.FetchL402Request - (*FetchL402Response)(nil), // 39: looprpc.FetchL402Response - (*SubscribeNotificationsRequest)(nil), // 40: looprpc.SubscribeNotificationsRequest - (*SubscribeNotificationsResponse)(nil), // 41: looprpc.SubscribeNotificationsResponse - (*ServerNewAddressRequest)(nil), // 42: looprpc.ServerNewAddressRequest - (*ServerNewAddressResponse)(nil), // 43: looprpc.ServerNewAddressResponse - (*ServerAddressParameters)(nil), // 44: looprpc.ServerAddressParameters - (*ServerWithdrawRequest)(nil), // 45: looprpc.ServerWithdrawRequest - (*ServerWithdrawResponse)(nil), // 46: looprpc.ServerWithdrawResponse - (*RouteHint)(nil), // 47: looprpc.RouteHint - (*ServerReservationNotification)(nil), // 48: looprpc.ServerReservationNotification + (ProtocolVersion)(0), // 0: looprpc.ProtocolVersion + (ServerSwapState)(0), // 1: looprpc.ServerSwapState + (RoutePaymentType)(0), // 2: looprpc.RoutePaymentType + (PaymentFailureReason)(0), // 3: looprpc.PaymentFailureReason + (RoutingPlugin)(0), // 4: looprpc.RoutingPlugin + (StaticAddressProtocolVersion)(0), // 5: looprpc.StaticAddressProtocolVersion + (*ServerLoopOutRequest)(nil), // 6: looprpc.ServerLoopOutRequest + (*ServerLoopOutResponse)(nil), // 7: looprpc.ServerLoopOutResponse + (*ServerLoopOutQuoteRequest)(nil), // 8: looprpc.ServerLoopOutQuoteRequest + (*ServerLoopOutQuote)(nil), // 9: looprpc.ServerLoopOutQuote + (*ServerLoopOutTermsRequest)(nil), // 10: looprpc.ServerLoopOutTermsRequest + (*ServerLoopOutTerms)(nil), // 11: looprpc.ServerLoopOutTerms + (*ServerLoopInRequest)(nil), // 12: looprpc.ServerLoopInRequest + (*ServerLoopInResponse)(nil), // 13: looprpc.ServerLoopInResponse + (*ServerLoopInQuoteRequest)(nil), // 14: looprpc.ServerLoopInQuoteRequest + (*ServerLoopInQuoteResponse)(nil), // 15: looprpc.ServerLoopInQuoteResponse + (*ServerLoopInTermsRequest)(nil), // 16: looprpc.ServerLoopInTermsRequest + (*ServerLoopInTerms)(nil), // 17: looprpc.ServerLoopInTerms + (*ServerLoopOutPushPreimageRequest)(nil), // 18: looprpc.ServerLoopOutPushPreimageRequest + (*ServerLoopOutPushPreimageResponse)(nil), // 19: looprpc.ServerLoopOutPushPreimageResponse + (*SubscribeUpdatesRequest)(nil), // 20: looprpc.SubscribeUpdatesRequest + (*SubscribeLoopOutUpdatesResponse)(nil), // 21: looprpc.SubscribeLoopOutUpdatesResponse + (*SubscribeLoopInUpdatesResponse)(nil), // 22: looprpc.SubscribeLoopInUpdatesResponse + (*RouteCancel)(nil), // 23: looprpc.RouteCancel + (*HtlcAttempt)(nil), // 24: looprpc.HtlcAttempt + (*CancelLoopOutSwapRequest)(nil), // 25: looprpc.CancelLoopOutSwapRequest + (*CancelLoopOutSwapResponse)(nil), // 26: looprpc.CancelLoopOutSwapResponse + (*ServerProbeRequest)(nil), // 27: looprpc.ServerProbeRequest + (*ServerProbeResponse)(nil), // 28: looprpc.ServerProbeResponse + (*RecommendRoutingPluginReq)(nil), // 29: looprpc.RecommendRoutingPluginReq + (*RecommendRoutingPluginRes)(nil), // 30: looprpc.RecommendRoutingPluginRes + (*ReportRoutingResultReq)(nil), // 31: looprpc.ReportRoutingResultReq + (*ReportRoutingResultRes)(nil), // 32: looprpc.ReportRoutingResultRes + (*MuSig2SignSweepReq)(nil), // 33: looprpc.MuSig2SignSweepReq + (*PrevoutInfo)(nil), // 34: looprpc.PrevoutInfo + (*MuSig2SignSweepRes)(nil), // 35: looprpc.MuSig2SignSweepRes + (*ServerPushKeyReq)(nil), // 36: looprpc.ServerPushKeyReq + (*ServerPushKeyRes)(nil), // 37: looprpc.ServerPushKeyRes + (*FetchL402Request)(nil), // 38: looprpc.FetchL402Request + (*FetchL402Response)(nil), // 39: looprpc.FetchL402Response + (*SubscribeNotificationsRequest)(nil), // 40: looprpc.SubscribeNotificationsRequest + (*SubscribeNotificationsResponse)(nil), // 41: looprpc.SubscribeNotificationsResponse + (*ServerNewAddressRequest)(nil), // 42: looprpc.ServerNewAddressRequest + (*ServerNewAddressResponse)(nil), // 43: looprpc.ServerNewAddressResponse + (*ServerAddressParameters)(nil), // 44: looprpc.ServerAddressParameters + (*ServerWithdrawRequest)(nil), // 45: looprpc.ServerWithdrawRequest + (*ServerWithdrawResponse)(nil), // 46: looprpc.ServerWithdrawResponse + (*ServerStaticAddressLoopInRequest)(nil), // 47: looprpc.ServerStaticAddressLoopInRequest + (*ServerStaticAddressLoopInResponse)(nil), // 48: looprpc.ServerStaticAddressLoopInResponse + (*ServerHtlcSigningInfo)(nil), // 49: looprpc.ServerHtlcSigningInfo + (*PushStaticAddressHtlcSigsRequest)(nil), // 50: looprpc.PushStaticAddressHtlcSigsRequest + (*ClientHtlcSigningInfo)(nil), // 51: looprpc.ClientHtlcSigningInfo + (*PushStaticAddressHtlcSigsResponse)(nil), // 52: looprpc.PushStaticAddressHtlcSigsResponse + (*FetchSweeplessSweepTxRequest)(nil), // 53: looprpc.FetchSweeplessSweepTxRequest + (*FetchSweeplessSweepTxResponse)(nil), // 54: looprpc.FetchSweeplessSweepTxResponse + (*ServerSweeplessSigningInfo)(nil), // 55: looprpc.ServerSweeplessSigningInfo + (*PushStaticAddressSweeplessSigsRequest)(nil), // 56: looprpc.PushStaticAddressSweeplessSigsRequest + (*ClientSweeplessSigningInfo)(nil), // 57: looprpc.ClientSweeplessSigningInfo + (*PushStaticAddressSweeplessSigsResponse)(nil), // 58: looprpc.PushStaticAddressSweeplessSigsResponse + (*RouteHint)(nil), // 59: looprpc.RouteHint + (*ServerReservationNotification)(nil), // 60: looprpc.ServerReservationNotification } var file_server_proto_depIdxs = []int32{ 0, // 0: looprpc.ServerLoopOutRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 1: looprpc.ServerLoopOutQuoteRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 2: looprpc.ServerLoopOutTermsRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 3: looprpc.ServerLoopInRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 47, // 4: looprpc.ServerLoopInQuoteRequest.route_hints:type_name -> looprpc.RouteHint + 59, // 4: looprpc.ServerLoopInQuoteRequest.route_hints:type_name -> looprpc.RouteHint 0, // 5: looprpc.ServerLoopInQuoteRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 6: looprpc.ServerLoopInTermsRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 7: looprpc.ServerLoopOutPushPreimageRequest.protocol_version:type_name -> looprpc.ProtocolVersion @@ -3867,7 +4842,7 @@ var file_server_proto_depIdxs = []int32{ 0, // 14: looprpc.CancelLoopOutSwapRequest.protocol_version:type_name -> looprpc.ProtocolVersion 23, // 15: looprpc.CancelLoopOutSwapRequest.route_cancel:type_name -> looprpc.RouteCancel 0, // 16: looprpc.ServerProbeRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 47, // 17: looprpc.ServerProbeRequest.route_hints:type_name -> looprpc.RouteHint + 59, // 17: looprpc.ServerProbeRequest.route_hints:type_name -> looprpc.RouteHint 0, // 18: looprpc.RecommendRoutingPluginReq.protocol_version:type_name -> looprpc.ProtocolVersion 4, // 19: looprpc.RecommendRoutingPluginRes.plugin:type_name -> looprpc.RoutingPlugin 0, // 20: looprpc.ReportRoutingResultReq.protocol_version:type_name -> looprpc.ProtocolVersion @@ -3875,53 +4850,74 @@ var file_server_proto_depIdxs = []int32{ 0, // 22: looprpc.MuSig2SignSweepReq.protocol_version:type_name -> looprpc.ProtocolVersion 34, // 23: looprpc.MuSig2SignSweepReq.prevout_info:type_name -> looprpc.PrevoutInfo 0, // 24: looprpc.ServerPushKeyReq.protocol_version:type_name -> looprpc.ProtocolVersion - 48, // 25: looprpc.SubscribeNotificationsResponse.reservation_notification:type_name -> looprpc.ServerReservationNotification + 60, // 25: looprpc.SubscribeNotificationsResponse.reservation_notification:type_name -> looprpc.ServerReservationNotification 5, // 26: looprpc.ServerNewAddressRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion 44, // 27: looprpc.ServerNewAddressResponse.params:type_name -> looprpc.ServerAddressParameters 34, // 28: looprpc.ServerWithdrawRequest.outpoints:type_name -> looprpc.PrevoutInfo - 10, // 29: looprpc.SwapServer.LoopOutTerms:input_type -> looprpc.ServerLoopOutTermsRequest - 6, // 30: looprpc.SwapServer.NewLoopOutSwap:input_type -> looprpc.ServerLoopOutRequest - 18, // 31: looprpc.SwapServer.LoopOutPushPreimage:input_type -> looprpc.ServerLoopOutPushPreimageRequest - 8, // 32: looprpc.SwapServer.LoopOutQuote:input_type -> looprpc.ServerLoopOutQuoteRequest - 16, // 33: looprpc.SwapServer.LoopInTerms:input_type -> looprpc.ServerLoopInTermsRequest - 12, // 34: looprpc.SwapServer.NewLoopInSwap:input_type -> looprpc.ServerLoopInRequest - 14, // 35: looprpc.SwapServer.LoopInQuote:input_type -> looprpc.ServerLoopInQuoteRequest - 20, // 36: looprpc.SwapServer.SubscribeLoopOutUpdates:input_type -> looprpc.SubscribeUpdatesRequest - 20, // 37: looprpc.SwapServer.SubscribeLoopInUpdates:input_type -> looprpc.SubscribeUpdatesRequest - 25, // 38: looprpc.SwapServer.CancelLoopOutSwap:input_type -> looprpc.CancelLoopOutSwapRequest - 27, // 39: looprpc.SwapServer.Probe:input_type -> looprpc.ServerProbeRequest - 29, // 40: looprpc.SwapServer.RecommendRoutingPlugin:input_type -> looprpc.RecommendRoutingPluginReq - 31, // 41: looprpc.SwapServer.ReportRoutingResult:input_type -> looprpc.ReportRoutingResultReq - 33, // 42: looprpc.SwapServer.MuSig2SignSweep:input_type -> looprpc.MuSig2SignSweepReq - 36, // 43: looprpc.SwapServer.PushKey:input_type -> looprpc.ServerPushKeyReq - 38, // 44: looprpc.SwapServer.FetchL402:input_type -> looprpc.FetchL402Request - 40, // 45: looprpc.SwapServer.SubscribeNotifications:input_type -> looprpc.SubscribeNotificationsRequest - 42, // 46: looprpc.StaticAddressServer.ServerNewAddress:input_type -> looprpc.ServerNewAddressRequest - 45, // 47: looprpc.StaticAddressServer.ServerWithdrawDeposits:input_type -> looprpc.ServerWithdrawRequest - 11, // 48: looprpc.SwapServer.LoopOutTerms:output_type -> looprpc.ServerLoopOutTerms - 7, // 49: looprpc.SwapServer.NewLoopOutSwap:output_type -> looprpc.ServerLoopOutResponse - 19, // 50: looprpc.SwapServer.LoopOutPushPreimage:output_type -> looprpc.ServerLoopOutPushPreimageResponse - 9, // 51: looprpc.SwapServer.LoopOutQuote:output_type -> looprpc.ServerLoopOutQuote - 17, // 52: looprpc.SwapServer.LoopInTerms:output_type -> looprpc.ServerLoopInTerms - 13, // 53: looprpc.SwapServer.NewLoopInSwap:output_type -> looprpc.ServerLoopInResponse - 15, // 54: looprpc.SwapServer.LoopInQuote:output_type -> looprpc.ServerLoopInQuoteResponse - 21, // 55: looprpc.SwapServer.SubscribeLoopOutUpdates:output_type -> looprpc.SubscribeLoopOutUpdatesResponse - 22, // 56: looprpc.SwapServer.SubscribeLoopInUpdates:output_type -> looprpc.SubscribeLoopInUpdatesResponse - 26, // 57: looprpc.SwapServer.CancelLoopOutSwap:output_type -> looprpc.CancelLoopOutSwapResponse - 28, // 58: looprpc.SwapServer.Probe:output_type -> looprpc.ServerProbeResponse - 30, // 59: looprpc.SwapServer.RecommendRoutingPlugin:output_type -> looprpc.RecommendRoutingPluginRes - 32, // 60: looprpc.SwapServer.ReportRoutingResult:output_type -> looprpc.ReportRoutingResultRes - 35, // 61: looprpc.SwapServer.MuSig2SignSweep:output_type -> looprpc.MuSig2SignSweepRes - 37, // 62: looprpc.SwapServer.PushKey:output_type -> looprpc.ServerPushKeyRes - 39, // 63: looprpc.SwapServer.FetchL402:output_type -> looprpc.FetchL402Response - 41, // 64: looprpc.SwapServer.SubscribeNotifications:output_type -> looprpc.SubscribeNotificationsResponse - 43, // 65: looprpc.StaticAddressServer.ServerNewAddress:output_type -> looprpc.ServerNewAddressResponse - 46, // 66: looprpc.StaticAddressServer.ServerWithdrawDeposits:output_type -> looprpc.ServerWithdrawResponse - 48, // [48:67] is the sub-list for method output_type - 29, // [29:48] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 5, // 29: looprpc.ServerStaticAddressLoopInRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion + 49, // 30: looprpc.ServerStaticAddressLoopInResponse.standard_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo + 49, // 31: looprpc.ServerStaticAddressLoopInResponse.high_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo + 49, // 32: looprpc.ServerStaticAddressLoopInResponse.extreme_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo + 51, // 33: looprpc.PushStaticAddressHtlcSigsRequest.standard_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo + 51, // 34: looprpc.PushStaticAddressHtlcSigsRequest.high_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo + 51, // 35: looprpc.PushStaticAddressHtlcSigsRequest.extreme_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo + 55, // 36: looprpc.FetchSweeplessSweepTxResponse.standard_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo + 55, // 37: looprpc.FetchSweeplessSweepTxResponse.high_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo + 55, // 38: looprpc.FetchSweeplessSweepTxResponse.extreme_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo + 57, // 39: looprpc.PushStaticAddressSweeplessSigsRequest.standard_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo + 57, // 40: looprpc.PushStaticAddressSweeplessSigsRequest.high_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo + 57, // 41: looprpc.PushStaticAddressSweeplessSigsRequest.extreme_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo + 10, // 42: looprpc.SwapServer.LoopOutTerms:input_type -> looprpc.ServerLoopOutTermsRequest + 6, // 43: looprpc.SwapServer.NewLoopOutSwap:input_type -> looprpc.ServerLoopOutRequest + 18, // 44: looprpc.SwapServer.LoopOutPushPreimage:input_type -> looprpc.ServerLoopOutPushPreimageRequest + 8, // 45: looprpc.SwapServer.LoopOutQuote:input_type -> looprpc.ServerLoopOutQuoteRequest + 16, // 46: looprpc.SwapServer.LoopInTerms:input_type -> looprpc.ServerLoopInTermsRequest + 12, // 47: looprpc.SwapServer.NewLoopInSwap:input_type -> looprpc.ServerLoopInRequest + 14, // 48: looprpc.SwapServer.LoopInQuote:input_type -> looprpc.ServerLoopInQuoteRequest + 20, // 49: looprpc.SwapServer.SubscribeLoopOutUpdates:input_type -> looprpc.SubscribeUpdatesRequest + 20, // 50: looprpc.SwapServer.SubscribeLoopInUpdates:input_type -> looprpc.SubscribeUpdatesRequest + 25, // 51: looprpc.SwapServer.CancelLoopOutSwap:input_type -> looprpc.CancelLoopOutSwapRequest + 27, // 52: looprpc.SwapServer.Probe:input_type -> looprpc.ServerProbeRequest + 29, // 53: looprpc.SwapServer.RecommendRoutingPlugin:input_type -> looprpc.RecommendRoutingPluginReq + 31, // 54: looprpc.SwapServer.ReportRoutingResult:input_type -> looprpc.ReportRoutingResultReq + 33, // 55: looprpc.SwapServer.MuSig2SignSweep:input_type -> looprpc.MuSig2SignSweepReq + 36, // 56: looprpc.SwapServer.PushKey:input_type -> looprpc.ServerPushKeyReq + 38, // 57: looprpc.SwapServer.FetchL402:input_type -> looprpc.FetchL402Request + 40, // 58: looprpc.SwapServer.SubscribeNotifications:input_type -> looprpc.SubscribeNotificationsRequest + 42, // 59: looprpc.StaticAddressServer.ServerNewAddress:input_type -> looprpc.ServerNewAddressRequest + 45, // 60: looprpc.StaticAddressServer.ServerWithdrawDeposits:input_type -> looprpc.ServerWithdrawRequest + 47, // 61: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:input_type -> looprpc.ServerStaticAddressLoopInRequest + 50, // 62: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:input_type -> looprpc.PushStaticAddressHtlcSigsRequest + 53, // 63: looprpc.StaticAddressServer.FetchSweeplessSweepTx:input_type -> looprpc.FetchSweeplessSweepTxRequest + 56, // 64: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:input_type -> looprpc.PushStaticAddressSweeplessSigsRequest + 11, // 65: looprpc.SwapServer.LoopOutTerms:output_type -> looprpc.ServerLoopOutTerms + 7, // 66: looprpc.SwapServer.NewLoopOutSwap:output_type -> looprpc.ServerLoopOutResponse + 19, // 67: looprpc.SwapServer.LoopOutPushPreimage:output_type -> looprpc.ServerLoopOutPushPreimageResponse + 9, // 68: looprpc.SwapServer.LoopOutQuote:output_type -> looprpc.ServerLoopOutQuote + 17, // 69: looprpc.SwapServer.LoopInTerms:output_type -> looprpc.ServerLoopInTerms + 13, // 70: looprpc.SwapServer.NewLoopInSwap:output_type -> looprpc.ServerLoopInResponse + 15, // 71: looprpc.SwapServer.LoopInQuote:output_type -> looprpc.ServerLoopInQuoteResponse + 21, // 72: looprpc.SwapServer.SubscribeLoopOutUpdates:output_type -> looprpc.SubscribeLoopOutUpdatesResponse + 22, // 73: looprpc.SwapServer.SubscribeLoopInUpdates:output_type -> looprpc.SubscribeLoopInUpdatesResponse + 26, // 74: looprpc.SwapServer.CancelLoopOutSwap:output_type -> looprpc.CancelLoopOutSwapResponse + 28, // 75: looprpc.SwapServer.Probe:output_type -> looprpc.ServerProbeResponse + 30, // 76: looprpc.SwapServer.RecommendRoutingPlugin:output_type -> looprpc.RecommendRoutingPluginRes + 32, // 77: looprpc.SwapServer.ReportRoutingResult:output_type -> looprpc.ReportRoutingResultRes + 35, // 78: looprpc.SwapServer.MuSig2SignSweep:output_type -> looprpc.MuSig2SignSweepRes + 37, // 79: looprpc.SwapServer.PushKey:output_type -> looprpc.ServerPushKeyRes + 39, // 80: looprpc.SwapServer.FetchL402:output_type -> looprpc.FetchL402Response + 41, // 81: looprpc.SwapServer.SubscribeNotifications:output_type -> looprpc.SubscribeNotificationsResponse + 43, // 82: looprpc.StaticAddressServer.ServerNewAddress:output_type -> looprpc.ServerNewAddressResponse + 46, // 83: looprpc.StaticAddressServer.ServerWithdrawDeposits:output_type -> looprpc.ServerWithdrawResponse + 48, // 84: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:output_type -> looprpc.ServerStaticAddressLoopInResponse + 52, // 85: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:output_type -> looprpc.PushStaticAddressHtlcSigsResponse + 54, // 86: looprpc.StaticAddressServer.FetchSweeplessSweepTx:output_type -> looprpc.FetchSweeplessSweepTxResponse + 58, // 87: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:output_type -> looprpc.PushStaticAddressSweeplessSigsResponse + 65, // [65:88] is the sub-list for method output_type + 42, // [42:65] is the sub-list for method input_type + 42, // [42:42] is the sub-list for extension type_name + 42, // [42:42] is the sub-list for extension extendee + 0, // [0:42] is the sub-list for field type_name } func init() { file_server_proto_init() } @@ -4424,6 +5420,150 @@ func file_server_proto_init() { return nil } } + file_server_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerStaticAddressLoopInRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerStaticAddressLoopInResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerHtlcSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressHtlcSigsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientHtlcSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressHtlcSigsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchSweeplessSweepTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchSweeplessSweepTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerSweeplessSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressSweeplessSigsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientSweeplessSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_server_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressSweeplessSigsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_server_proto_msgTypes[19].OneofWrappers = []interface{}{ (*CancelLoopOutSwapRequest_RouteCancel)(nil), @@ -4437,7 +5577,7 @@ func file_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_server_proto_rawDesc, NumEnums: 6, - NumMessages: 41, + NumMessages: 53, NumExtensions: 0, NumServices: 2, }, diff --git a/swapserverrpc/server.proto b/swapserverrpc/server.proto index a68f1bd4c..9e54defbf 100644 --- a/swapserverrpc/server.proto +++ b/swapserverrpc/server.proto @@ -689,6 +689,26 @@ service StaticAddressServer { // the partial sigs for the client's selected deposits. rpc ServerWithdrawDeposits (ServerWithdrawRequest) returns (ServerWithdrawResponse); + + // ServerStaticAddressLoopIn initiates a static address loop-in swap. The + // server will respond with htlc details that the client can use to + // construct and sign the htlc tx. + rpc ServerStaticAddressLoopIn (ServerStaticAddressLoopInRequest) + returns (ServerStaticAddressLoopInResponse); + + // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. + rpc PushStaticAddressHtlcSigs (PushStaticAddressHtlcSigsRequest) + returns (PushStaticAddressHtlcSigsResponse); + + // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to + // to sign it. + rpc FetchSweeplessSweepTx (FetchSweeplessSweepTxRequest) + returns (FetchSweeplessSweepTxResponse); + + // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx + // sigs to the server. + rpc PushStaticAddressSweeplessSigs (PushStaticAddressSweeplessSigsRequest) + returns (PushStaticAddressSweeplessSigsResponse); } message ServerNewAddressRequest { @@ -733,3 +753,157 @@ message ServerWithdrawResponse { // The nonces that the server used to generate the sweepless sweep sigs. repeated bytes server_nonces = 2; } + +message ServerStaticAddressLoopInRequest { + // The client's public key for the htlc output. + bytes htlc_client_pub_key = 1; + + // The hashed swap invoice preimage of the swap. + bytes swap_hash = 2; + + // The deposit outpoints the client wishes to loop in. They implicitly state + // the swap amount. + repeated string deposit_outpoints = 3; + + // The swap invoice that the client wants the server to pay. + string swap_invoice = 4; + + // An optional last hop the client wants to receive the invoice payment + // from. + bytes last_hop = 5; + + // The protocol version that the client adheres to. + StaticAddressProtocolVersion protocol_version = 6; + + // The user agent string that identifies the software running on the user's + // side. This can be changed in the user's client software but it _SHOULD_ + // conform to the following pattern: + // Agent-Name/semver-version(/additional-info) + // Examples: + // loopd/v0.10.0-beta/commit=3b635821 + // litd/v0.2.0-alpha/commit=326d754 + // loopd/v0.10.0-beta/commit=3b635823,initiator=easy-autoloop + string user_agent = 7; + + // The swap payment timeout allows the user to specify an upper limit for + // the amount of time the server is allowed to take to fulfill the off-chain + // swap payment. If the timeout is reached the swap will be aborted on the + // server side and the client can retry the swap with different parameters. + uint32 payment_timeout_seconds = 8; +} + +message ServerStaticAddressLoopInResponse { + // The server's public key for the htlc output. + bytes htlc_server_pub_key = 1; + + // The cltv expiry height for the htlc. This is the height at which the + // htlc will expire and the client is free to claim the funds back. + int32 htlc_expiry = 2; + + // The info the server used to generate the standard fee partial htlc tx + // sigs. + ServerHtlcSigningInfo standard_htlc_info = 3; + + // The info the server used to generate the high fee partial htlc tx sigs. + ServerHtlcSigningInfo high_fee_htlc_info = 4; + + // The info the server used to generate the extreme fee partial htlc tx + // sigs. + ServerHtlcSigningInfo extreme_fee_htlc_info = 5; +} + +message ServerHtlcSigningInfo { + // The nonces that the server used to generate the partial htlc tx sigs. + repeated bytes nonces = 1; + + // The fee rate in sat/kw that the server wants to use for the htlc tx. + uint64 fee_rate = 2; +} + +message PushStaticAddressHtlcSigsRequest { + // The swap hash that the client wants to push the htlc sigs for. + bytes swap_hash = 1; + + // The nonces that the client used to generate the htlc sigs. + ClientHtlcSigningInfo standard_htlc_info = 2; + + // The nonces that the client used to generate the high fee htlc sigs. + ClientHtlcSigningInfo high_fee_htlc_info = 3; + + // The nonces that the client used to generate the extreme fee htlc sigs. + ClientHtlcSigningInfo extreme_fee_htlc_info = 4; +} + +message ClientHtlcSigningInfo { + // The nonces that the client used to generate the partial htlc tx sigs. + repeated bytes nonces = 1; + + // The musig2 htlc sigs that the client generated for the htlc tx. + repeated bytes sigs = 2; +} + +message PushStaticAddressHtlcSigsResponse { +} + +message FetchSweeplessSweepTxRequest { + // The swap hash of the swap that the client wants to fetch the sweepless + // sweep tx for. + bytes swap_hash = 1; +} + +message FetchSweeplessSweepTxResponse { + // The address that the server wants to sweep the static address deposits + // to. + string sweep_addr = 1; + + // The info the server used to generate the standard fee partial sweepless + // tx sigs. + ServerSweeplessSigningInfo standard_fee_info = 2; + + // The info the server used to generate the high fee partial sweepless tx + // sigs. + ServerSweeplessSigningInfo high_fee_info = 3; + + // The info the server used to generate the extreme fee partial sweepless tx + // sigs. + ServerSweeplessSigningInfo extreme_fee_info = 4; +} + +message ServerSweeplessSigningInfo { + // The nonces that the server used to generate the partial sweepless tx + // sigs. + repeated bytes nonces = 1; + + // The fee rate in sat/kw that the server wants to use for the sweepless tx. + uint64 fee_rate = 2; +} + +message PushStaticAddressSweeplessSigsRequest { + // The swap hash of the swap that the client wants to push the sweepless + // sigs for. + bytes swap_hash = 1; + + // The info the client used to generate the standard fee partial sweepless + // tx sigs. + ClientSweeplessSigningInfo standard_signing_info = 2; + + // The info the client used to generate the high fee partial sweepless tx + // sigs. + ClientSweeplessSigningInfo high_fee_signing_info = 3; + + // The info the client used to generate the extreme fee partial sweepless + // tx sigs. + ClientSweeplessSigningInfo extreme_fee_signing_info = 4; +} + +message ClientSweeplessSigningInfo { + // The nonces that the client used to generate the partial sweepless tx + // sigs. + repeated bytes nonces = 1; + + // The musig2 htlc sigs that the client generated for the sweepless tx. + repeated bytes sigs = 2; +} + +message PushStaticAddressSweeplessSigsResponse { +} diff --git a/swapserverrpc/server_grpc.pb.go b/swapserverrpc/server_grpc.pb.go index 6fbccb00c..11aed0d87 100644 --- a/swapserverrpc/server_grpc.pb.go +++ b/swapserverrpc/server_grpc.pb.go @@ -774,6 +774,18 @@ type StaticAddressServerClient interface { // haven't timed out yet to the client's wallet. The server will generate // the partial sigs for the client's selected deposits. ServerWithdrawDeposits(ctx context.Context, in *ServerWithdrawRequest, opts ...grpc.CallOption) (*ServerWithdrawResponse, error) + // ServerStaticAddressLoopIn initiates a static address loop-in swap. The + // server will respond with htlc details that the client can use to + // construct and sign the htlc tx. + ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) + // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. + PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) + // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to + // to sign it. + FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) + // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx + // sigs to the server. + PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) } type staticAddressServerClient struct { @@ -802,6 +814,42 @@ func (c *staticAddressServerClient) ServerWithdrawDeposits(ctx context.Context, return out, nil } +func (c *staticAddressServerClient) ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) { + out := new(ServerStaticAddressLoopInResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerStaticAddressLoopIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) { + out := new(PushStaticAddressHtlcSigsResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressHtlcSigs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) { + out := new(FetchSweeplessSweepTxResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) { + out := new(PushStaticAddressSweeplessSigsResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // StaticAddressServerServer is the server API for StaticAddressServer service. // All implementations must embed UnimplementedStaticAddressServerServer // for forward compatibility @@ -814,6 +862,18 @@ type StaticAddressServerServer interface { // haven't timed out yet to the client's wallet. The server will generate // the partial sigs for the client's selected deposits. ServerWithdrawDeposits(context.Context, *ServerWithdrawRequest) (*ServerWithdrawResponse, error) + // ServerStaticAddressLoopIn initiates a static address loop-in swap. The + // server will respond with htlc details that the client can use to + // construct and sign the htlc tx. + ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) + // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. + PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) + // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to + // to sign it. + FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) + // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx + // sigs to the server. + PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) mustEmbedUnimplementedStaticAddressServerServer() } @@ -827,6 +887,18 @@ func (UnimplementedStaticAddressServerServer) ServerNewAddress(context.Context, func (UnimplementedStaticAddressServerServer) ServerWithdrawDeposits(context.Context, *ServerWithdrawRequest) (*ServerWithdrawResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ServerWithdrawDeposits not implemented") } +func (UnimplementedStaticAddressServerServer) ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ServerStaticAddressLoopIn not implemented") +} +func (UnimplementedStaticAddressServerServer) PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressHtlcSigs not implemented") +} +func (UnimplementedStaticAddressServerServer) FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchSweeplessSweepTx not implemented") +} +func (UnimplementedStaticAddressServerServer) PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressSweeplessSigs not implemented") +} func (UnimplementedStaticAddressServerServer) mustEmbedUnimplementedStaticAddressServerServer() {} // UnsafeStaticAddressServerServer may be embedded to opt out of forward compatibility for this service. @@ -876,6 +948,78 @@ func _StaticAddressServer_ServerWithdrawDeposits_Handler(srv interface{}, ctx co return interceptor(ctx, in, info, handler) } +func _StaticAddressServer_ServerStaticAddressLoopIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServerStaticAddressLoopInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).ServerStaticAddressLoopIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/ServerStaticAddressLoopIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).ServerStaticAddressLoopIn(ctx, req.(*ServerStaticAddressLoopInRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_PushStaticAddressHtlcSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushStaticAddressHtlcSigsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).PushStaticAddressHtlcSigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/PushStaticAddressHtlcSigs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).PushStaticAddressHtlcSigs(ctx, req.(*PushStaticAddressHtlcSigsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_FetchSweeplessSweepTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchSweeplessSweepTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, req.(*FetchSweeplessSweepTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushStaticAddressSweeplessSigsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).PushStaticAddressSweeplessSigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).PushStaticAddressSweeplessSigs(ctx, req.(*PushStaticAddressSweeplessSigsRequest)) + } + return interceptor(ctx, in, info, handler) +} + // StaticAddressServer_ServiceDesc is the grpc.ServiceDesc for StaticAddressServer service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -891,6 +1035,22 @@ var StaticAddressServer_ServiceDesc = grpc.ServiceDesc{ MethodName: "ServerWithdrawDeposits", Handler: _StaticAddressServer_ServerWithdrawDeposits_Handler, }, + { + MethodName: "ServerStaticAddressLoopIn", + Handler: _StaticAddressServer_ServerStaticAddressLoopIn_Handler, + }, + { + MethodName: "PushStaticAddressHtlcSigs", + Handler: _StaticAddressServer_PushStaticAddressHtlcSigs_Handler, + }, + { + MethodName: "FetchSweeplessSweepTx", + Handler: _StaticAddressServer_FetchSweeplessSweepTx_Handler, + }, + { + MethodName: "PushStaticAddressSweeplessSigs", + Handler: _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "server.proto", From d2012e73b683e3992454df8a850f86bf60fd1a85 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 19 Nov 2024 13:15:53 +0100 Subject: [PATCH 40/67] looprpc: static address loop-ins --- cmd/loop/staticaddr.go | 3 - loopd/swapclient_server.go | 20 +- looprpc/client.pb.go | 1111 +++++++++++++++++++++++---------- looprpc/client.proto | 192 +++++- looprpc/client.swagger.json | 95 ++- looprpc/client_grpc.pb.go | 40 ++ looprpc/swapclient.pb.json.go | 25 + 7 files changed, 1108 insertions(+), 378 deletions(-) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index 4de4e7c28..dcd02834c 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -238,9 +238,6 @@ func summary(ctx *cli.Context) error { case "expired": filterState = looprpc.DepositState_EXPIRED - case "failed": - filterState = looprpc.DepositState_FAILED_STATE - default: filterState = looprpc.DepositState_UNKNOWN_STATE } diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index af211589a..7c24c5bc3 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -1563,13 +1563,13 @@ func (s *swapClientServer) depositSummary(ctx context.Context, } return &looprpc.StaticAddressSummaryResponse{ - StaticAddress: address.String(), - TotalNumDeposits: uint32(totalNumDeposits), - ValueUnconfirmed: valueUnconfirmed, - ValueDeposited: valueDeposited, - ValueExpired: valueExpired, - ValueWithdrawn: valueWithdrawn, - FilteredDeposits: clientDeposits, + StaticAddress: address.String(), + TotalNumDeposits: uint32(totalNumDeposits), + ValueUnconfirmedSatoshis: valueUnconfirmed, + ValueDepositedSatoshis: valueDeposited, + ValueExpiredSatoshis: valueExpired, + ValueWithdrawnSatoshis: valueWithdrawn, + FilteredDeposits: clientDeposits, }, nil } @@ -1618,9 +1618,6 @@ func toClientState(state fsm.StateType) looprpc.DepositState { case deposit.Expired: return looprpc.DepositState_EXPIRED - case deposit.Failed: - return looprpc.DepositState_FAILED_STATE - default: return looprpc.DepositState_UNKNOWN_STATE } @@ -1646,9 +1643,6 @@ func toServerState(state looprpc.DepositState) fsm.StateType { case looprpc.DepositState_EXPIRED: return deposit.Expired - case looprpc.DepositState_FAILED_STATE: - return deposit.Failed - default: return fsm.EmptyState } diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index e73dafee6..1506d54d0 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -453,40 +453,57 @@ const ( DepositState_WITHDRAWING DepositState = 2 // WITHDRAWN indicates that the deposit has been withdrawn. DepositState_WITHDRAWN DepositState = 3 + // LOOPING_IN indicates that the deposit is currently being used in a static + // address loop-in swap. + DepositState_LOOPING_IN DepositState = 4 + // LOOPED_IN indicates that the deposit was used in a static address loop-in + // swap. + DepositState_LOOPED_IN DepositState = 5 + // SWEEP_HTLC_TIMEOUT indicates that the deposit is part of an active loop-in + // of which the respective htlc was published by the server and the timeout + // path has opened up for the client to sweep. + DepositState_SWEEP_HTLC_TIMEOUT DepositState = 6 + // HTLC_TIMEOUT_SWEPT indicates that the timeout path of the htlc has been + // swept by the client. + DepositState_HTLC_TIMEOUT_SWEPT DepositState = 7 // PUBLISH_EXPIRED indicates that the deposit has expired and the sweep // transaction has been published. - DepositState_PUBLISH_EXPIRED DepositState = 4 + DepositState_PUBLISH_EXPIRED DepositState = 8 // WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep // transaction has not yet been sufficiently confirmed. - DepositState_WAIT_FOR_EXPIRY_SWEEP DepositState = 5 + DepositState_WAIT_FOR_EXPIRY_SWEEP DepositState = 9 // EXPIRED indicates that the deposit has expired and the sweep transaction // has been sufficiently confirmed. - DepositState_EXPIRED DepositState = 6 - // FAILED_STATE indicates that the deposit has failed. - DepositState_FAILED_STATE DepositState = 7 + DepositState_EXPIRED DepositState = 10 ) // Enum value maps for DepositState. var ( DepositState_name = map[int32]string{ - 0: "UNKNOWN_STATE", - 1: "DEPOSITED", - 2: "WITHDRAWING", - 3: "WITHDRAWN", - 4: "PUBLISH_EXPIRED", - 5: "WAIT_FOR_EXPIRY_SWEEP", - 6: "EXPIRED", - 7: "FAILED_STATE", + 0: "UNKNOWN_STATE", + 1: "DEPOSITED", + 2: "WITHDRAWING", + 3: "WITHDRAWN", + 4: "LOOPING_IN", + 5: "LOOPED_IN", + 6: "SWEEP_HTLC_TIMEOUT", + 7: "HTLC_TIMEOUT_SWEPT", + 8: "PUBLISH_EXPIRED", + 9: "WAIT_FOR_EXPIRY_SWEEP", + 10: "EXPIRED", } DepositState_value = map[string]int32{ "UNKNOWN_STATE": 0, "DEPOSITED": 1, "WITHDRAWING": 2, "WITHDRAWN": 3, - "PUBLISH_EXPIRED": 4, - "WAIT_FOR_EXPIRY_SWEEP": 5, - "EXPIRED": 6, - "FAILED_STATE": 7, + "LOOPING_IN": 4, + "LOOPED_IN": 5, + "SWEEP_HTLC_TIMEOUT": 6, + "HTLC_TIMEOUT_SWEPT": 7, + "PUBLISH_EXPIRED": 8, + "WAIT_FOR_EXPIRY_SWEEP": 9, + "EXPIRED": 10, } ) @@ -4385,6 +4402,11 @@ type WithdrawDepositsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // The transaction hash of the withdrawal transaction. + WithdrawalTxHash string `protobuf:"bytes,1,opt,name=withdrawal_tx_hash,json=withdrawalTxHash,proto3" json:"withdrawal_tx_hash,omitempty"` + // The pkscript of the withdrawal transaction. + PkScript string `protobuf:"bytes,2,opt,name=pk_script,json=pkScript,proto3" json:"pk_script,omitempty"` } func (x *WithdrawDepositsResponse) Reset() { @@ -4419,6 +4441,20 @@ func (*WithdrawDepositsResponse) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{51} } +func (x *WithdrawDepositsResponse) GetWithdrawalTxHash() string { + if x != nil { + return x.WithdrawalTxHash + } + return "" +} + +func (x *WithdrawDepositsResponse) GetPkScript() string { + if x != nil { + return x.PkScript + } + return "" +} + type OutPoint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4552,15 +4588,19 @@ type StaticAddressSummaryResponse struct { // The total number of deposits. TotalNumDeposits uint32 `protobuf:"varint,2,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` // The total value of unconfirmed deposits. - ValueUnconfirmed int64 `protobuf:"varint,3,opt,name=value_unconfirmed,json=valueUnconfirmed,proto3" json:"value_unconfirmed,omitempty"` + ValueUnconfirmedSatoshis int64 `protobuf:"varint,3,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` // The total value of confirmed deposits. - ValueDeposited int64 `protobuf:"varint,4,opt,name=value_deposited,json=valueDeposited,proto3" json:"value_deposited,omitempty"` + ValueDepositedSatoshis int64 `protobuf:"varint,4,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` // The total value of all expired deposits. - ValueExpired int64 `protobuf:"varint,5,opt,name=value_expired,json=valueExpired,proto3" json:"value_expired,omitempty"` + ValueExpiredSatoshis int64 `protobuf:"varint,5,opt,name=value_expired_satoshis,json=valueExpiredSatoshis,proto3" json:"value_expired_satoshis,omitempty"` // The total value of all deposits that have been withdrawn. - ValueWithdrawn int64 `protobuf:"varint,6,opt,name=value_withdrawn,json=valueWithdrawn,proto3" json:"value_withdrawn,omitempty"` + ValueWithdrawnSatoshis int64 `protobuf:"varint,6,opt,name=value_withdrawn_satoshis,json=valueWithdrawnSatoshis,proto3" json:"value_withdrawn_satoshis,omitempty"` + // The total value of all loop-ins that have been finalized. + ValueLoopedInSatoshis int64 `protobuf:"varint,7,opt,name=value_looped_in_satoshis,json=valueLoopedInSatoshis,proto3" json:"value_looped_in_satoshis,omitempty"` + // The total value of all htlc timeout sweeps that the client swept. + ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,8,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` // A list of all deposits that match the filtered state. - FilteredDeposits []*Deposit `protobuf:"bytes,7,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` + FilteredDeposits []*Deposit `protobuf:"bytes,9,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` } func (x *StaticAddressSummaryResponse) Reset() { @@ -4609,30 +4649,44 @@ func (x *StaticAddressSummaryResponse) GetTotalNumDeposits() uint32 { return 0 } -func (x *StaticAddressSummaryResponse) GetValueUnconfirmed() int64 { +func (x *StaticAddressSummaryResponse) GetValueUnconfirmedSatoshis() int64 { + if x != nil { + return x.ValueUnconfirmedSatoshis + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueDepositedSatoshis() int64 { + if x != nil { + return x.ValueDepositedSatoshis + } + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueExpiredSatoshis() int64 { if x != nil { - return x.ValueUnconfirmed + return x.ValueExpiredSatoshis } return 0 } -func (x *StaticAddressSummaryResponse) GetValueDeposited() int64 { +func (x *StaticAddressSummaryResponse) GetValueWithdrawnSatoshis() int64 { if x != nil { - return x.ValueDeposited + return x.ValueWithdrawnSatoshis } return 0 } -func (x *StaticAddressSummaryResponse) GetValueExpired() int64 { +func (x *StaticAddressSummaryResponse) GetValueLoopedInSatoshis() int64 { if x != nil { - return x.ValueExpired + return x.ValueLoopedInSatoshis } return 0 } -func (x *StaticAddressSummaryResponse) GetValueWithdrawn() int64 { +func (x *StaticAddressSummaryResponse) GetValueHtlcTimeoutSweepsSatoshis() int64 { if x != nil { - return x.ValueWithdrawn + return x.ValueHtlcTimeoutSweepsSatoshis } return 0 } @@ -4728,6 +4782,277 @@ func (x *Deposit) GetConfirmationHeight() int64 { return 0 } +type StaticAddressLoopInRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The outpoints of the deposits to loop-in. + Outpoints []string `protobuf:"bytes,1,rep,name=outpoints,proto3" json:"outpoints,omitempty"` + // Maximum satoshis we are willing to pay the server for the swap. This value + // is not disclosed in the swap initiation call, but if the server asks for a + // higher fee, we abort the swap. Typically this value is taken from the + // response of the GetQuote call. + MaxSwapFeeSatoshis int64 `protobuf:"varint,2,opt,name=max_swap_fee_satoshis,json=maxSwapFeeSatoshis,proto3" json:"max_swap_fee_satoshis,omitempty"` + // Optionally the client can specify the last hop pubkey when requesting a + // loop-in quote. This is useful to get better off-chain routing fee from the + // server. + LastHop []byte `protobuf:"bytes,3,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"` + // An optional label for this swap. This field is limited to 500 characters and + // may not be one of the reserved values in loop/labels Reserved list. + Label string `protobuf:"bytes,4,opt,name=label,proto3" json:"label,omitempty"` + // An optional identification string that will be appended to the user agent + // string sent to the server to give information about the usage of loop. This + // initiator part is meant for user interfaces to add their name to give the + // full picture of the binary used (loopd, LiT) and the method used for + // triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). + Initiator string `protobuf:"bytes,5,opt,name=initiator,proto3" json:"initiator,omitempty"` + // Optional route hints to reach the destination through private channels. + RouteHints []*swapserverrpc.RouteHint `protobuf:"bytes,6,rep,name=route_hints,json=routeHints,proto3" json:"route_hints,omitempty"` + // Private indicates whether the destination node should be considered private. + // In which case, loop will generate hop hints to assist with probing and + // payment. + Private bool `protobuf:"varint,7,opt,name=private,proto3" json:"private,omitempty"` + // The swap payment timeout allows the user to specify an upper limit for the + // amount of time the server is allowed to take to fulfill the off-chain swap + // payment. If the timeout is reached the swap will be aborted on the server + // side and the client can retry the swap with different parameters. + PaymentTimeoutSeconds uint32 `protobuf:"varint,8,opt,name=payment_timeout_seconds,json=paymentTimeoutSeconds,proto3" json:"payment_timeout_seconds,omitempty"` +} + +func (x *StaticAddressLoopInRequest) Reset() { + *x = StaticAddressLoopInRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressLoopInRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressLoopInRequest) ProtoMessage() {} + +func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressLoopInRequest.ProtoReflect.Descriptor instead. +func (*StaticAddressLoopInRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{56} +} + +func (x *StaticAddressLoopInRequest) GetOutpoints() []string { + if x != nil { + return x.Outpoints + } + return nil +} + +func (x *StaticAddressLoopInRequest) GetMaxSwapFeeSatoshis() int64 { + if x != nil { + return x.MaxSwapFeeSatoshis + } + return 0 +} + +func (x *StaticAddressLoopInRequest) GetLastHop() []byte { + if x != nil { + return x.LastHop + } + return nil +} + +func (x *StaticAddressLoopInRequest) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *StaticAddressLoopInRequest) GetInitiator() string { + if x != nil { + return x.Initiator + } + return "" +} + +func (x *StaticAddressLoopInRequest) GetRouteHints() []*swapserverrpc.RouteHint { + if x != nil { + return x.RouteHints + } + return nil +} + +func (x *StaticAddressLoopInRequest) GetPrivate() bool { + if x != nil { + return x.Private + } + return false +} + +func (x *StaticAddressLoopInRequest) GetPaymentTimeoutSeconds() uint32 { + if x != nil { + return x.PaymentTimeoutSeconds + } + return 0 +} + +type StaticAddressLoopInResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash that identifies this swap. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The state the swap is in. + State string `protobuf:"bytes,2,opt,name=state,proto3" json:"state,omitempty"` + // The amount of the swap. + Amount uint64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` + // The htlc cltv expiry height of the swap. + HtlcCltv int32 `protobuf:"varint,4,opt,name=htlc_cltv,json=htlcCltv,proto3" json:"htlc_cltv,omitempty"` + // The quoted swap fee in satoshis. + QuotedSwapFeeSatoshis int64 `protobuf:"varint,5,opt,name=quoted_swap_fee_satoshis,json=quotedSwapFeeSatoshis,proto3" json:"quoted_swap_fee_satoshis,omitempty"` + // The maximum total swap fee the client is willing to pay for the swap. + MaxSwapFeeSatoshis int64 `protobuf:"varint,6,opt,name=max_swap_fee_satoshis,json=maxSwapFeeSatoshis,proto3" json:"max_swap_fee_satoshis,omitempty"` + // The block height at which the swap was initiated. + InitiationHeight uint32 `protobuf:"varint,7,opt,name=initiation_height,json=initiationHeight,proto3" json:"initiation_height,omitempty"` + // The static address protocol version. + ProtocolVersion string `protobuf:"bytes,8,opt,name=protocol_version,json=protocolVersion,proto3" json:"protocol_version,omitempty"` + // An optional label for this swap. + Label string `protobuf:"bytes,9,opt,name=label,proto3" json:"label,omitempty"` + // An optional identification string that will be appended to the user agent + // string sent to the server to give information about the usage of loop. This + // initiator part is meant for user interfaces to add their name to give the + // full picture of the binary used (loopd, LiT) and the method used for + // triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). + Initiator string `protobuf:"bytes,10,opt,name=initiator,proto3" json:"initiator,omitempty"` + // The swap payment timeout allows the user to specify an upper limit for the + // amount of time the server is allowed to take to fulfill the off-chain swap + // payment. If the timeout is reached the swap will be aborted on the server + // side and the client can retry the swap with different parameters. + PaymentTimeoutSeconds uint32 `protobuf:"varint,11,opt,name=payment_timeout_seconds,json=paymentTimeoutSeconds,proto3" json:"payment_timeout_seconds,omitempty"` +} + +func (x *StaticAddressLoopInResponse) Reset() { + *x = StaticAddressLoopInResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressLoopInResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressLoopInResponse) ProtoMessage() {} + +func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressLoopInResponse.ProtoReflect.Descriptor instead. +func (*StaticAddressLoopInResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{57} +} + +func (x *StaticAddressLoopInResponse) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *StaticAddressLoopInResponse) GetState() string { + if x != nil { + return x.State + } + return "" +} + +func (x *StaticAddressLoopInResponse) GetAmount() uint64 { + if x != nil { + return x.Amount + } + return 0 +} + +func (x *StaticAddressLoopInResponse) GetHtlcCltv() int32 { + if x != nil { + return x.HtlcCltv + } + return 0 +} + +func (x *StaticAddressLoopInResponse) GetQuotedSwapFeeSatoshis() int64 { + if x != nil { + return x.QuotedSwapFeeSatoshis + } + return 0 +} + +func (x *StaticAddressLoopInResponse) GetMaxSwapFeeSatoshis() int64 { + if x != nil { + return x.MaxSwapFeeSatoshis + } + return 0 +} + +func (x *StaticAddressLoopInResponse) GetInitiationHeight() uint32 { + if x != nil { + return x.InitiationHeight + } + return 0 +} + +func (x *StaticAddressLoopInResponse) GetProtocolVersion() string { + if x != nil { + return x.ProtocolVersion + } + return "" +} + +func (x *StaticAddressLoopInResponse) GetLabel() string { + if x != nil { + return x.Label + } + return "" +} + +func (x *StaticAddressLoopInResponse) GetInitiator() string { + if x != nil { + return x.Initiator + } + return "" +} + +func (x *StaticAddressLoopInResponse) GetPaymentTimeoutSeconds() uint32 { + if x != nil { + return x.PaymentTimeoutSeconds + } + return 0 +} + var File_client_proto protoreflect.FileDescriptor var file_client_proto_rawDesc = []byte{ @@ -5252,257 +5577,332 @@ var file_client_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x1a, 0x0a, 0x18, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x65, 0x0a, 0x18, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, - 0x0a, 0x0a, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x09, 0x74, 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x74, 0x78, 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, - 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, 0x1b, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, - 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0xd6, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, - 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x75, - 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, - 0x69, 0x72, 0x6d, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x12, 0x23, - 0x0a, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, - 0x72, 0x65, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x12, 0x3d, 0x0a, 0x11, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0xa9, 0x01, 0x0a, 0x07, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, - 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, - 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, - 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, - 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, - 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, - 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, - 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, - 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, - 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, - 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, - 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, - 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, - 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, - 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, - 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, - 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, - 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, - 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, - 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, - 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, - 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, - 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, - 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, - 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, - 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, - 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, - 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, - 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, - 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, - 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, - 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, - 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, - 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, - 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, - 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, - 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, - 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, - 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, - 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, - 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x2a, 0x9f, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, - 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, - 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, - 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, - 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x50, - 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x04, - 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, - 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x05, 0x12, 0x0b, 0x0a, 0x07, 0x45, - 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x06, 0x12, 0x10, 0x0a, 0x0c, 0x46, 0x41, 0x49, 0x4c, - 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x07, 0x32, 0xa7, 0x0f, 0x0a, 0x0a, 0x53, - 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, - 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, - 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, + 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, + 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x67, 0x0a, + 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x69, + 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, + 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x69, 0x64, + 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, + 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, + 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x9f, 0x04, + 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, + 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, + 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, + 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, + 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, + 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x6e, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, + 0x61, 0x77, 0x6e, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, + 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x61, 0x74, 0x6f, + 0x73, 0x68, 0x69, 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x74, + 0x6c, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, + 0x73, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x1e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, + 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, + 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, + 0xa9, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, + 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xc3, 0x02, 0x0a, 0x1a, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, + 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, + 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, + 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, + 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, + 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, + 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, + 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, + 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, + 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, + 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x74, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, + 0x08, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x74, 0x76, 0x12, 0x37, 0x0a, 0x18, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, + 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x71, 0x75, 0x6f, + 0x74, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, + 0x69, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, + 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, + 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, + 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, + 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, + 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, + 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, + 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, + 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, + 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, + 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, + 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, + 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, + 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, + 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, + 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, + 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, + 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, + 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, + 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, + 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, + 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, + 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, + 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, + 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, + 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, + 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, + 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, + 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, + 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, + 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, + 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, + 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, + 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, + 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, + 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, + 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, + 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, + 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, + 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, + 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x2a, 0xdc, 0x01, 0x0a, 0x0c, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, + 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, + 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, + 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, + 0x0a, 0x4c, 0x4f, 0x4f, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, + 0x09, 0x4c, 0x4f, 0x4f, 0x50, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, + 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, + 0x55, 0x54, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, + 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, + 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, + 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x32, 0x89, 0x10, 0x0a, 0x0a, 0x53, 0x77, + 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, + 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, + 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, + 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, + 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, - 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, - 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, - 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, - 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, - 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, - 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, - 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, - 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, - 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, - 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, - 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, - 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, - 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, - 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, - 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, - 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, - 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, + 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, + 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, + 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, + 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, + 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, + 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, + 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, + 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, + 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, + 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, + 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, + 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, + 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, - 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, - 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, + 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, + 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, + 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5518,7 +5918,7 @@ func file_client_proto_rawDescGZIP() []byte { } var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 56) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 58) var file_client_proto_goTypes = []any{ (AddressType)(0), // 0: looprpc.AddressType (SwapType)(0), // 1: looprpc.SwapType @@ -5584,19 +5984,21 @@ var file_client_proto_goTypes = []any{ (*StaticAddressSummaryRequest)(nil), // 61: looprpc.StaticAddressSummaryRequest (*StaticAddressSummaryResponse)(nil), // 62: looprpc.StaticAddressSummaryResponse (*Deposit)(nil), // 63: looprpc.Deposit - (*swapserverrpc.RouteHint)(nil), // 64: looprpc.RouteHint + (*StaticAddressLoopInRequest)(nil), // 64: looprpc.StaticAddressLoopInRequest + (*StaticAddressLoopInResponse)(nil), // 65: looprpc.StaticAddressLoopInResponse + (*swapserverrpc.RouteHint)(nil), // 66: looprpc.RouteHint } var file_client_proto_depIdxs = []int32{ 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType - 64, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 66, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason 14, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter 7, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter 12, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus - 64, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint - 64, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 66, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 66, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint 29, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token 30, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 30, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats @@ -5616,63 +6018,66 @@ var file_client_proto_depIdxs = []int32{ 6, // 26: looprpc.StaticAddressSummaryRequest.state_filter:type_name -> looprpc.DepositState 63, // 27: looprpc.StaticAddressSummaryResponse.filtered_deposits:type_name -> looprpc.Deposit 6, // 28: looprpc.Deposit.state:type_name -> looprpc.DepositState - 8, // 29: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest - 9, // 30: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest - 11, // 31: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest - 13, // 32: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest - 16, // 33: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest - 41, // 34: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest - 17, // 35: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest - 20, // 36: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest - 17, // 37: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest - 20, // 38: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest - 23, // 39: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest - 25, // 40: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest - 25, // 41: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest - 27, // 42: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest - 31, // 43: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest - 33, // 44: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest - 36, // 45: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest - 38, // 46: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest - 43, // 47: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest - 46, // 48: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest - 48, // 49: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest - 50, // 50: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 53, // 51: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest - 55, // 52: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest - 58, // 53: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest - 61, // 54: looprpc.SwapClient.GetStaticAddressSummary:input_type -> looprpc.StaticAddressSummaryRequest - 10, // 55: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse - 10, // 56: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse - 12, // 57: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus - 15, // 58: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse - 12, // 59: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus - 42, // 60: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse - 19, // 61: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse - 22, // 62: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse - 18, // 63: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse - 21, // 64: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse - 24, // 65: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse - 26, // 66: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse - 26, // 67: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse - 28, // 68: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse - 32, // 69: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse - 34, // 70: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters - 37, // 71: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse - 40, // 72: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse - 44, // 73: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse - 47, // 74: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse - 49, // 75: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse - 51, // 76: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 54, // 77: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse - 56, // 78: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse - 59, // 79: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse - 62, // 80: looprpc.SwapClient.GetStaticAddressSummary:output_type -> looprpc.StaticAddressSummaryResponse - 55, // [55:81] is the sub-list for method output_type - 29, // [29:55] is the sub-list for method input_type - 29, // [29:29] is the sub-list for extension type_name - 29, // [29:29] is the sub-list for extension extendee - 0, // [0:29] is the sub-list for field type_name + 66, // 29: looprpc.StaticAddressLoopInRequest.route_hints:type_name -> looprpc.RouteHint + 8, // 30: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest + 9, // 31: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest + 11, // 32: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest + 13, // 33: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest + 16, // 34: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest + 41, // 35: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest + 17, // 36: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest + 20, // 37: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest + 17, // 38: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest + 20, // 39: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest + 23, // 40: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest + 25, // 41: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest + 25, // 42: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest + 27, // 43: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest + 31, // 44: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest + 33, // 45: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest + 36, // 46: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest + 38, // 47: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest + 43, // 48: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest + 46, // 49: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest + 48, // 50: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest + 50, // 51: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest + 53, // 52: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest + 55, // 53: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest + 58, // 54: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest + 61, // 55: looprpc.SwapClient.GetStaticAddressSummary:input_type -> looprpc.StaticAddressSummaryRequest + 64, // 56: looprpc.SwapClient.StaticAddressLoopIn:input_type -> looprpc.StaticAddressLoopInRequest + 10, // 57: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 10, // 58: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 12, // 59: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 15, // 60: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 12, // 61: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 42, // 62: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 19, // 63: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 22, // 64: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 18, // 65: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 21, // 66: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 24, // 67: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 26, // 68: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 26, // 69: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 28, // 70: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 32, // 71: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 34, // 72: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 37, // 73: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 40, // 74: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 44, // 75: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 47, // 76: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 49, // 77: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 51, // 78: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 54, // 79: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse + 56, // 80: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse + 59, // 81: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse + 62, // 82: looprpc.SwapClient.GetStaticAddressSummary:output_type -> looprpc.StaticAddressSummaryResponse + 65, // 83: looprpc.SwapClient.StaticAddressLoopIn:output_type -> looprpc.StaticAddressLoopInResponse + 57, // [57:84] is the sub-list for method output_type + 30, // [30:57] is the sub-list for method input_type + 30, // [30:30] is the sub-list for extension type_name + 30, // [30:30] is the sub-list for extension extendee + 0, // [0:30] is the sub-list for field type_name } func init() { file_client_proto_init() } @@ -6353,6 +6758,30 @@ func file_client_proto_init() { return nil } } + file_client_proto_msgTypes[56].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressLoopInRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressLoopInResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -6360,7 +6789,7 @@ func file_client_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, NumEnums: 8, - NumMessages: 56, + NumMessages: 58, NumExtensions: 0, NumServices: 1, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index 3ed4561de..8235f77f3 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -174,6 +174,12 @@ service SwapClient { */ rpc GetStaticAddressSummary (StaticAddressSummaryRequest) returns (StaticAddressSummaryResponse); + + /* loop:`static` + StaticAddressLoopIn initiates a static address loop-in swap. + */ + rpc StaticAddressLoopIn (StaticAddressLoopInRequest) + returns (StaticAddressLoopInResponse); } message LoopOutRequest { @@ -1565,6 +1571,15 @@ message WithdrawDepositsRequest { } message WithdrawDepositsResponse { + /* + The transaction hash of the withdrawal transaction. + */ + string withdrawal_tx_hash = 1; + + /* + The pkscript of the withdrawal transaction. + */ + string pk_script = 2; } message OutPoint { @@ -1610,27 +1625,37 @@ message StaticAddressSummaryResponse { /* The total value of unconfirmed deposits. */ - int64 value_unconfirmed = 3; + int64 value_unconfirmed_satoshis = 3; /* The total value of confirmed deposits. */ - int64 value_deposited = 4; + int64 value_deposited_satoshis = 4; /* The total value of all expired deposits. */ - int64 value_expired = 5; + int64 value_expired_satoshis = 5; /* The total value of all deposits that have been withdrawn. */ - int64 value_withdrawn = 6; + int64 value_withdrawn_satoshis = 6; + + /* + The total value of all loop-ins that have been finalized. + */ + int64 value_looped_in_satoshis = 7; + + /* + The total value of all htlc timeout sweeps that the client swept. + */ + int64 value_htlc_timeout_sweeps_satoshis = 8; /* A list of all deposits that match the filtered state. */ - repeated Deposit filtered_deposits = 7; + repeated Deposit filtered_deposits = 9; } enum DepositState { @@ -1657,28 +1682,48 @@ enum DepositState { */ WITHDRAWN = 3; + /* + LOOPING_IN indicates that the deposit is currently being used in a static + address loop-in swap. + */ + LOOPING_IN = 4; + + /* + LOOPED_IN indicates that the deposit was used in a static address loop-in + swap. + */ + LOOPED_IN = 5; + + /* + SWEEP_HTLC_TIMEOUT indicates that the deposit is part of an active loop-in + of which the respective htlc was published by the server and the timeout + path has opened up for the client to sweep. + */ + SWEEP_HTLC_TIMEOUT = 6; + + /* + HTLC_TIMEOUT_SWEPT indicates that the timeout path of the htlc has been + swept by the client. + */ + HTLC_TIMEOUT_SWEPT = 7; + /* PUBLISH_EXPIRED indicates that the deposit has expired and the sweep transaction has been published. */ - PUBLISH_EXPIRED = 4; + PUBLISH_EXPIRED = 8; /* WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep transaction has not yet been sufficiently confirmed. */ - WAIT_FOR_EXPIRY_SWEEP = 5; + WAIT_FOR_EXPIRY_SWEEP = 9; /* EXPIRED indicates that the deposit has expired and the sweep transaction has been sufficiently confirmed. */ - EXPIRED = 6; - - /* - FAILED_STATE indicates that the deposit has failed. - */ - FAILED_STATE = 7; + EXPIRED = 10; } message Deposit { @@ -1707,3 +1752,124 @@ message Deposit { */ int64 confirmation_height = 5; } + +message StaticAddressLoopInRequest { + /* + The outpoints of the deposits to loop-in. + */ + repeated string outpoints = 1; + + /* + Maximum satoshis we are willing to pay the server for the swap. This value + is not disclosed in the swap initiation call, but if the server asks for a + higher fee, we abort the swap. Typically this value is taken from the + response of the GetQuote call. + */ + int64 max_swap_fee_satoshis = 2; + + /* + Optionally the client can specify the last hop pubkey when requesting a + loop-in quote. This is useful to get better off-chain routing fee from the + server. + */ + bytes last_hop = 3; + + /* + An optional label for this swap. This field is limited to 500 characters and + may not be one of the reserved values in loop/labels Reserved list. + */ + string label = 4; + + /* + An optional identification string that will be appended to the user agent + string sent to the server to give information about the usage of loop. This + initiator part is meant for user interfaces to add their name to give the + full picture of the binary used (loopd, LiT) and the method used for + triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). + */ + string initiator = 5; + + /* + Optional route hints to reach the destination through private channels. + */ + repeated looprpc.RouteHint route_hints = 6; + + /* + Private indicates whether the destination node should be considered private. + In which case, loop will generate hop hints to assist with probing and + payment. + */ + bool private = 7; + + /* + The swap payment timeout allows the user to specify an upper limit for the + amount of time the server is allowed to take to fulfill the off-chain swap + payment. If the timeout is reached the swap will be aborted on the server + side and the client can retry the swap with different parameters. + */ + uint32 payment_timeout_seconds = 8; +} + +message StaticAddressLoopInResponse { + /* + The swap hash that identifies this swap. + */ + bytes swap_hash = 1; + + /* + The state the swap is in. + */ + string state = 2; + + /* + The amount of the swap. + */ + uint64 amount = 3; + + /* + The htlc cltv expiry height of the swap. + */ + int32 htlc_cltv = 4; + + /* + The quoted swap fee in satoshis. + */ + int64 quoted_swap_fee_satoshis = 5; + + /* + The maximum total swap fee the client is willing to pay for the swap. + */ + int64 max_swap_fee_satoshis = 6; + + /* + The block height at which the swap was initiated. + */ + uint32 initiation_height = 7; + + /* + The static address protocol version. + */ + string protocol_version = 8; + + /* + An optional label for this swap. + */ + string label = 9; + + /* + An optional identification string that will be appended to the user agent + string sent to the server to give information about the usage of loop. This + initiator part is meant for user interfaces to add their name to give the + full picture of the binary used (loopd, LiT) and the method used for + triggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI). + */ + string initiator = 10; + + /* + The swap payment timeout allows the user to specify an upper limit for the + amount of time the server is allowed to take to fulfill the off-chain swap + payment. If the timeout is reached the swap will be aborted on the server + side and the client can retry the swap with different parameters. + */ + uint32 payment_timeout_seconds = 11; +} diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index bca77163a..f9e56145c 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -698,13 +698,16 @@ "DEPOSITED", "WITHDRAWING", "WITHDRAWN", + "LOOPING_IN", + "LOOPED_IN", + "SWEEP_HTLC_TIMEOUT", + "HTLC_TIMEOUT_SWEPT", "PUBLISH_EXPIRED", "WAIT_FOR_EXPIRY_SWEEP", - "EXPIRED", - "FAILED_STATE" + "EXPIRED" ], "default": "UNKNOWN_STATE", - "description": " - UNKNOWN_STATE: UNKNOWN_STATE is the default state of a deposit.\n - DEPOSITED: DEPOSITED indicates that the deposit has been sufficiently confirmed on\nchain.\n - WITHDRAWING: WITHDRAWING indicates that the deposit is currently being withdrawn. It\nflips to WITHDRAWN once the withdrawal transaction has been sufficiently\nconfirmed.\n - WITHDRAWN: WITHDRAWN indicates that the deposit has been withdrawn.\n - PUBLISH_EXPIRED: PUBLISH_EXPIRED indicates that the deposit has expired and the sweep\ntransaction has been published.\n - WAIT_FOR_EXPIRY_SWEEP: WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep\ntransaction has not yet been sufficiently confirmed.\n - EXPIRED: EXPIRED indicates that the deposit has expired and the sweep transaction\nhas been sufficiently confirmed.\n - FAILED_STATE: FAILED_STATE indicates that the deposit has failed." + "description": " - UNKNOWN_STATE: UNKNOWN_STATE is the default state of a deposit.\n - DEPOSITED: DEPOSITED indicates that the deposit has been sufficiently confirmed on\nchain.\n - WITHDRAWING: WITHDRAWING indicates that the deposit is currently being withdrawn. It\nflips to WITHDRAWN once the withdrawal transaction has been sufficiently\nconfirmed.\n - WITHDRAWN: WITHDRAWN indicates that the deposit has been withdrawn.\n - LOOPING_IN: LOOPING_IN indicates that the deposit is currently being used in a static\naddress loop-in swap.\n - LOOPED_IN: LOOPED_IN indicates that the deposit was used in a static address loop-in\nswap.\n - SWEEP_HTLC_TIMEOUT: SWEEP_HTLC_TIMEOUT indicates that the deposit is part of an active loop-in\nof which the respective htlc was published by the server and the timeout\npath has opened up for the client to sweep.\n - HTLC_TIMEOUT_SWEPT: HTLC_TIMEOUT_SWEPT indicates that the timeout path of the htlc has been\nswept by the client.\n - PUBLISH_EXPIRED: PUBLISH_EXPIRED indicates that the deposit has expired and the sweep\ntransaction has been published.\n - WAIT_FOR_EXPIRY_SWEEP: WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep\ntransaction has not yet been sufficiently confirmed.\n - EXPIRED: EXPIRED indicates that the deposit has expired and the sweep transaction\nhas been sufficiently confirmed." }, "looprpcDisqualified": { "type": "object", @@ -1506,6 +1509,62 @@ "looprpcSetLiquidityParamsResponse": { "type": "object" }, + "looprpcStaticAddressLoopInResponse": { + "type": "object", + "properties": { + "swap_hash": { + "type": "string", + "format": "byte", + "description": "The swap hash that identifies this swap." + }, + "state": { + "type": "string", + "description": "The state the swap is in." + }, + "amount": { + "type": "string", + "format": "uint64", + "description": "The amount of the swap." + }, + "htlc_cltv": { + "type": "integer", + "format": "int32", + "description": "The htlc cltv expiry height of the swap." + }, + "quoted_swap_fee_satoshis": { + "type": "string", + "format": "int64", + "description": "The quoted swap fee in satoshis." + }, + "max_swap_fee_satoshis": { + "type": "string", + "format": "int64", + "description": "The maximum total swap fee the client is willing to pay for the swap." + }, + "initiation_height": { + "type": "integer", + "format": "int64", + "description": "The block height at which the swap was initiated." + }, + "protocol_version": { + "type": "string", + "description": "The static address protocol version." + }, + "label": { + "type": "string", + "description": "An optional label for this swap." + }, + "initiator": { + "type": "string", + "description": "An optional identification string that will be appended to the user agent\nstring sent to the server to give information about the usage of loop. This\ninitiator part is meant for user interfaces to add their name to give the\nfull picture of the binary used (loopd, LiT) and the method used for\ntriggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI)." + }, + "payment_timeout_seconds": { + "type": "integer", + "format": "int64", + "description": "The swap payment timeout allows the user to specify an upper limit for the\namount of time the server is allowed to take to fulfill the off-chain swap\npayment. If the timeout is reached the swap will be aborted on the server\nside and the client can retry the swap with different parameters." + } + } + }, "looprpcStaticAddressSummaryResponse": { "type": "object", "properties": { @@ -1518,26 +1577,36 @@ "format": "int64", "description": "The total number of deposits." }, - "value_unconfirmed": { + "value_unconfirmed_satoshis": { "type": "string", "format": "int64", "description": "The total value of unconfirmed deposits." }, - "value_deposited": { + "value_deposited_satoshis": { "type": "string", "format": "int64", "description": "The total value of confirmed deposits." }, - "value_expired": { + "value_expired_satoshis": { "type": "string", "format": "int64", "description": "The total value of all expired deposits." }, - "value_withdrawn": { + "value_withdrawn_satoshis": { "type": "string", "format": "int64", "description": "The total value of all deposits that have been withdrawn." }, + "value_looped_in_satoshis": { + "type": "string", + "format": "int64", + "description": "The total value of all loop-ins that have been finalized." + }, + "value_htlc_timeout_sweeps_satoshis": { + "type": "string", + "format": "int64", + "description": "The total value of all htlc timeout sweeps that the client swept." + }, "filtered_deposits": { "type": "array", "items": { @@ -1746,7 +1815,17 @@ } }, "looprpcWithdrawDepositsResponse": { - "type": "object" + "type": "object", + "properties": { + "withdrawal_tx_hash": { + "type": "string", + "description": "The transaction hash of the withdrawal transaction." + }, + "pk_script": { + "type": "string", + "description": "The pkscript of the withdrawal transaction." + } + } }, "protobufAny": { "type": "object", diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index 9be5fe9d7..f482738ee 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -119,6 +119,9 @@ type SwapClientClient interface { // GetStaticAddressSummary returns a summary of static address related // statistics. GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error) + // loop:`static` + // StaticAddressLoopIn initiates a static address loop-in swap. + StaticAddressLoopIn(ctx context.Context, in *StaticAddressLoopInRequest, opts ...grpc.CallOption) (*StaticAddressLoopInResponse, error) } type swapClientClient struct { @@ -386,6 +389,15 @@ func (c *swapClientClient) GetStaticAddressSummary(ctx context.Context, in *Stat return out, nil } +func (c *swapClientClient) StaticAddressLoopIn(ctx context.Context, in *StaticAddressLoopInRequest, opts ...grpc.CallOption) (*StaticAddressLoopInResponse, error) { + out := new(StaticAddressLoopInResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/StaticAddressLoopIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // SwapClientServer is the server API for SwapClient service. // All implementations must embed UnimplementedSwapClientServer // for forward compatibility @@ -491,6 +503,9 @@ type SwapClientServer interface { // GetStaticAddressSummary returns a summary of static address related // statistics. GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) + // loop:`static` + // StaticAddressLoopIn initiates a static address loop-in swap. + StaticAddressLoopIn(context.Context, *StaticAddressLoopInRequest) (*StaticAddressLoopInResponse, error) mustEmbedUnimplementedSwapClientServer() } @@ -576,6 +591,9 @@ func (UnimplementedSwapClientServer) WithdrawDeposits(context.Context, *Withdraw func (UnimplementedSwapClientServer) GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStaticAddressSummary not implemented") } +func (UnimplementedSwapClientServer) StaticAddressLoopIn(context.Context, *StaticAddressLoopInRequest) (*StaticAddressLoopInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method StaticAddressLoopIn not implemented") +} func (UnimplementedSwapClientServer) mustEmbedUnimplementedSwapClientServer() {} // UnsafeSwapClientServer may be embedded to opt out of forward compatibility for this service. @@ -1060,6 +1078,24 @@ func _SwapClient_GetStaticAddressSummary_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _SwapClient_StaticAddressLoopIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(StaticAddressLoopInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).StaticAddressLoopIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/StaticAddressLoopIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).StaticAddressLoopIn(ctx, req.(*StaticAddressLoopInRequest)) + } + return interceptor(ctx, in, info, handler) +} + // SwapClient_ServiceDesc is the grpc.ServiceDesc for SwapClient service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -1167,6 +1203,10 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetStaticAddressSummary", Handler: _SwapClient_GetStaticAddressSummary_Handler, }, + { + MethodName: "StaticAddressLoopIn", + Handler: _SwapClient_StaticAddressLoopIn_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/looprpc/swapclient.pb.json.go b/looprpc/swapclient.pb.json.go index da8749d75..41a721233 100644 --- a/looprpc/swapclient.pb.json.go +++ b/looprpc/swapclient.pb.json.go @@ -687,4 +687,29 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex } callback(string(respBytes), nil) } + + registry["looprpc.SwapClient.StaticAddressLoopIn"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &StaticAddressLoopInRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.StaticAddressLoopIn(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } } From c724604628919a7bf6c6a7243fdfb2592edd5bec Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 30 Jul 2024 12:22:04 +0200 Subject: [PATCH 41/67] sqlc: loop-in tables and queries We add CRU procedures for static address swaps. --- .../000011_static_address_loop_in.down.sql | 2 + .../000011_static_address_loop_in.up.sql | 59 +++ loopdb/sqlc/models.go | 20 + loopdb/sqlc/querier.go | 8 + loopdb/sqlc/queries/static_address_loopin.sql | 95 +++++ loopdb/sqlc/static_address_loopin.sql.go | 349 ++++++++++++++++++ 6 files changed, 533 insertions(+) create mode 100644 loopdb/sqlc/migrations/000011_static_address_loop_in.down.sql create mode 100644 loopdb/sqlc/migrations/000011_static_address_loop_in.up.sql create mode 100644 loopdb/sqlc/queries/static_address_loopin.sql create mode 100644 loopdb/sqlc/static_address_loopin.sql.go diff --git a/loopdb/sqlc/migrations/000011_static_address_loop_in.down.sql b/loopdb/sqlc/migrations/000011_static_address_loop_in.down.sql new file mode 100644 index 000000000..fae889ca3 --- /dev/null +++ b/loopdb/sqlc/migrations/000011_static_address_loop_in.down.sql @@ -0,0 +1,2 @@ +DROP TABLE IF EXISTS static_address_swaps; +DROP TABLE IF EXISTS static_address_swap_updates; diff --git a/loopdb/sqlc/migrations/000011_static_address_loop_in.up.sql b/loopdb/sqlc/migrations/000011_static_address_loop_in.up.sql new file mode 100644 index 000000000..dfff6d2d1 --- /dev/null +++ b/loopdb/sqlc/migrations/000011_static_address_loop_in.up.sql @@ -0,0 +1,59 @@ +-- static_address_swaps stores the static address loop-in specific data. +CREATE TABLE IF NOT EXISTS static_address_swaps ( + -- id is the auto incrementing primary key. + id INTEGER PRIMARY KEY, + + -- swap_hash of the swap is unique and is used to identify the swap. + swap_hash BLOB NOT NULL UNIQUE, + + -- swap_invoice is the invoice that needs to be paid by the server to + -- complete the loop-in swap. + swap_invoice TEXT NOT NULL, + + -- last_hop is an optional parameter that specifies the last hop to be + -- used for a loop in swap. + last_hop BLOB, + + -- payment_timeout_seconds is the time in seconds that the server has to + -- pay the invoice. + payment_timeout_seconds INTEGER NOT NULL, + + -- quoted_swap_fee_satoshis is the swap fee in sats that the server returned + -- in the swap quote. + quoted_swap_fee_satoshis BIGINT NOT NULL, + + -- deposit_outpoints is a concatenated list of outpoints that are used for + -- this swap. The list has the format txid1:idx;txid2:idx;... + deposit_outpoints TEXT NOT NULL, + + -- htlc_tx_fee_rate_sat_kw is the fee rate in sat/kw that is used for the + -- htlc transaction. + htlc_tx_fee_rate_sat_kw BIGINT NOT NULL, + + -- htlc_timeout_sweep_tx_hash contains the htlc timeout sweep tx id. + htlc_timeout_sweep_tx_id TEXT, + + -- htlc_timeout_sweep_address contains the address the htlc timeout sweep + -- transaction sends funds to. + htlc_timeout_sweep_address TEXT NOT NULL +); + +-- static_address_swap_updates contains all the updates to a loop-in swap. +CREATE TABLE IF NOT EXISTS static_address_swap_updates ( + -- id is the auto incrementing primary key. + id INTEGER PRIMARY KEY, + + -- deposit_id is the unique identifier for the deposit. + swap_hash BLOB NOT NULL REFERENCES static_address_swaps(swap_hash), + + -- update_state is the state of the loop-in at the time of the update. + -- Example states are InitHtlc, SignHtlcTx and others defined in + -- staticaddr/loopin/fsm.go. + update_state TEXT NOT NULL, + + -- update_timestamp is the timestamp of the update. + update_timestamp TIMESTAMP NOT NULL +); + +CREATE INDEX IF NOT EXISTS static_address_swap_hash_idx ON static_address_swap_updates(swap_hash); +CREATE INDEX IF NOT EXISTS static_address_update_state_idx ON static_address_swap_updates(update_state); diff --git a/loopdb/sqlc/models.go b/loopdb/sqlc/models.go index 596538821..59939ad7a 100644 --- a/loopdb/sqlc/models.go +++ b/loopdb/sqlc/models.go @@ -124,6 +124,26 @@ type StaticAddress struct { ProtocolVersion int32 } +type StaticAddressSwap struct { + ID int32 + SwapHash []byte + SwapInvoice string + LastHop []byte + PaymentTimeoutSeconds int32 + QuotedSwapFeeSatoshis int64 + DepositOutpoints string + HtlcTxFeeRateSatKw int64 + HtlcTimeoutSweepTxID sql.NullString + HtlcTimeoutSweepAddress string +} + +type StaticAddressSwapUpdate struct { + ID int32 + SwapHash []byte + UpdateState string + UpdateTimestamp time.Time +} + type Swap struct { ID int32 SwapHash []byte diff --git a/loopdb/sqlc/querier.go b/loopdb/sqlc/querier.go index a942562c2..648eb3b50 100644 --- a/loopdb/sqlc/querier.go +++ b/loopdb/sqlc/querier.go @@ -6,6 +6,7 @@ package sqlc import ( "context" + "database/sql" ) type Querier interface { @@ -26,6 +27,7 @@ type Querier interface { GetLastUpdateID(ctx context.Context, swapHash []byte) (int32, error) GetLatestDepositUpdate(ctx context.Context, depositID []byte) (DepositUpdate, error) GetLoopInSwap(ctx context.Context, swapHash []byte) (GetLoopInSwapRow, error) + GetLoopInSwapUpdates(ctx context.Context, swapHash []byte) ([]StaticAddressSwapUpdate, error) GetLoopInSwaps(ctx context.Context) ([]GetLoopInSwapsRow, error) GetLoopOutSwap(ctx context.Context, swapHash []byte) (GetLoopOutSwapRow, error) GetLoopOutSwaps(ctx context.Context) ([]GetLoopOutSwapsRow, error) @@ -35,6 +37,8 @@ type Querier interface { GetReservationUpdates(ctx context.Context, reservationID []byte) ([]ReservationUpdate, error) GetReservations(ctx context.Context) ([]Reservation, error) GetStaticAddress(ctx context.Context, pkscript []byte) (StaticAddress, error) + GetStaticAddressLoopInSwap(ctx context.Context, swapHash []byte) (GetStaticAddressLoopInSwapRow, error) + GetStaticAddressLoopInSwapsByStates(ctx context.Context, dollar_1 sql.NullString) ([]GetStaticAddressLoopInSwapsByStatesRow, error) GetSwapUpdates(ctx context.Context, swapHash []byte) ([]SwapUpdate, error) GetSweepStatus(ctx context.Context, swapHash []byte) (bool, error) GetUnconfirmedBatches(ctx context.Context) ([]SweepBatch, error) @@ -47,13 +51,17 @@ type Querier interface { InsertLoopOut(ctx context.Context, arg InsertLoopOutParams) error InsertMigration(ctx context.Context, arg InsertMigrationParams) error InsertReservationUpdate(ctx context.Context, arg InsertReservationUpdateParams) error + InsertStaticAddressLoopIn(ctx context.Context, arg InsertStaticAddressLoopInParams) error + InsertStaticAddressMetaUpdate(ctx context.Context, arg InsertStaticAddressMetaUpdateParams) error InsertSwap(ctx context.Context, arg InsertSwapParams) error InsertSwapUpdate(ctx context.Context, arg InsertSwapUpdateParams) error + IsStored(ctx context.Context, swapHash []byte) (bool, error) OverrideSwapCosts(ctx context.Context, arg OverrideSwapCostsParams) error UpdateBatch(ctx context.Context, arg UpdateBatchParams) error UpdateDeposit(ctx context.Context, arg UpdateDepositParams) error UpdateInstantOut(ctx context.Context, arg UpdateInstantOutParams) error UpdateReservation(ctx context.Context, arg UpdateReservationParams) error + UpdateStaticAddressLoopIn(ctx context.Context, arg UpdateStaticAddressLoopInParams) error UpsertLiquidityParams(ctx context.Context, params []byte) error UpsertSweep(ctx context.Context, arg UpsertSweepParams) error } diff --git a/loopdb/sqlc/queries/static_address_loopin.sql b/loopdb/sqlc/queries/static_address_loopin.sql new file mode 100644 index 000000000..ea4344b75 --- /dev/null +++ b/loopdb/sqlc/queries/static_address_loopin.sql @@ -0,0 +1,95 @@ +-- name: InsertStaticAddressLoopIn :exec +INSERT INTO static_address_swaps ( + swap_hash, + swap_invoice, + last_hop, + payment_timeout_seconds, + quoted_swap_fee_satoshis, + deposit_outpoints, + htlc_tx_fee_rate_sat_kw, + htlc_timeout_sweep_tx_id, + htlc_timeout_sweep_address +) VALUES ( + $1, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9 +); + +-- name: UpdateStaticAddressLoopIn :exec +UPDATE static_address_swaps +SET + htlc_tx_fee_rate_sat_kw = $2, + htlc_timeout_sweep_tx_id = $3 +WHERE + swap_hash = $1; + +-- name: InsertStaticAddressMetaUpdate :exec +INSERT INTO static_address_swap_updates ( + swap_hash, + update_state, + update_timestamp +) VALUES ( + $1, + $2, + $3 + ); + +-- name: GetStaticAddressLoopInSwap :one +SELECT + swaps.*, + static_address_swaps.*, + htlc_keys.* +FROM + swaps + JOIN + static_address_swaps ON swaps.swap_hash = static_address_swaps.swap_hash + JOIN + htlc_keys ON swaps.swap_hash = htlc_keys.swap_hash +WHERE + swaps.swap_hash = $1; + +-- name: GetStaticAddressLoopInSwapsByStates :many +SELECT + swaps.*, + static_address_swaps.*, + htlc_keys.* +FROM + swaps + JOIN + static_address_swaps ON swaps.swap_hash = static_address_swaps.swap_hash + JOIN + htlc_keys ON swaps.swap_hash = htlc_keys.swap_hash + JOIN + static_address_swap_updates u ON swaps.swap_hash = u.swap_hash + -- This subquery ensures that we are checking only the latest update for + -- each swap_hash. + AND u.update_timestamp = ( + SELECT MAX(update_timestamp) + FROM static_address_swap_updates + WHERE swap_hash = u.swap_hash + ) +WHERE + (',' || $1 || ',') LIKE ('%,' || u.update_state || ',%') +ORDER BY + swaps.id; + +-- name: GetLoopInSwapUpdates :many +SELECT + static_address_swap_updates.* +FROM + static_address_swap_updates +WHERE + swap_hash = $1; + +-- name: IsStored :one +SELECT EXISTS ( + SELECT 1 + FROM static_address_swaps + WHERE swap_hash = $1 +); diff --git a/loopdb/sqlc/static_address_loopin.sql.go b/loopdb/sqlc/static_address_loopin.sql.go new file mode 100644 index 000000000..22ee6438a --- /dev/null +++ b/loopdb/sqlc/static_address_loopin.sql.go @@ -0,0 +1,349 @@ +// Code generated by sqlc. DO NOT EDIT. +// versions: +// sqlc v1.25.0 +// source: static_address_loopin.sql + +package sqlc + +import ( + "context" + "database/sql" + "time" +) + +const getLoopInSwapUpdates = `-- name: GetLoopInSwapUpdates :many +SELECT + static_address_swap_updates.id, static_address_swap_updates.swap_hash, static_address_swap_updates.update_state, static_address_swap_updates.update_timestamp +FROM + static_address_swap_updates +WHERE + swap_hash = $1 +` + +func (q *Queries) GetLoopInSwapUpdates(ctx context.Context, swapHash []byte) ([]StaticAddressSwapUpdate, error) { + rows, err := q.db.QueryContext(ctx, getLoopInSwapUpdates, swapHash) + if err != nil { + return nil, err + } + defer rows.Close() + var items []StaticAddressSwapUpdate + for rows.Next() { + var i StaticAddressSwapUpdate + if err := rows.Scan( + &i.ID, + &i.SwapHash, + &i.UpdateState, + &i.UpdateTimestamp, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const getStaticAddressLoopInSwap = `-- name: GetStaticAddressLoopInSwap :one +SELECT + swaps.id, swaps.swap_hash, swaps.preimage, swaps.initiation_time, swaps.amount_requested, swaps.cltv_expiry, swaps.max_miner_fee, swaps.max_swap_fee, swaps.initiation_height, swaps.protocol_version, swaps.label, + static_address_swaps.id, static_address_swaps.swap_hash, static_address_swaps.swap_invoice, static_address_swaps.last_hop, static_address_swaps.payment_timeout_seconds, static_address_swaps.quoted_swap_fee_satoshis, static_address_swaps.deposit_outpoints, static_address_swaps.htlc_tx_fee_rate_sat_kw, static_address_swaps.htlc_timeout_sweep_tx_id, static_address_swaps.htlc_timeout_sweep_address, + htlc_keys.swap_hash, htlc_keys.sender_script_pubkey, htlc_keys.receiver_script_pubkey, htlc_keys.sender_internal_pubkey, htlc_keys.receiver_internal_pubkey, htlc_keys.client_key_family, htlc_keys.client_key_index +FROM + swaps + JOIN + static_address_swaps ON swaps.swap_hash = static_address_swaps.swap_hash + JOIN + htlc_keys ON swaps.swap_hash = htlc_keys.swap_hash +WHERE + swaps.swap_hash = $1 +` + +type GetStaticAddressLoopInSwapRow struct { + ID int32 + SwapHash []byte + Preimage []byte + InitiationTime time.Time + AmountRequested int64 + CltvExpiry int32 + MaxMinerFee int64 + MaxSwapFee int64 + InitiationHeight int32 + ProtocolVersion int32 + Label string + ID_2 int32 + SwapHash_2 []byte + SwapInvoice string + LastHop []byte + PaymentTimeoutSeconds int32 + QuotedSwapFeeSatoshis int64 + DepositOutpoints string + HtlcTxFeeRateSatKw int64 + HtlcTimeoutSweepTxID sql.NullString + HtlcTimeoutSweepAddress string + SwapHash_3 []byte + SenderScriptPubkey []byte + ReceiverScriptPubkey []byte + SenderInternalPubkey []byte + ReceiverInternalPubkey []byte + ClientKeyFamily int32 + ClientKeyIndex int32 +} + +func (q *Queries) GetStaticAddressLoopInSwap(ctx context.Context, swapHash []byte) (GetStaticAddressLoopInSwapRow, error) { + row := q.db.QueryRowContext(ctx, getStaticAddressLoopInSwap, swapHash) + var i GetStaticAddressLoopInSwapRow + err := row.Scan( + &i.ID, + &i.SwapHash, + &i.Preimage, + &i.InitiationTime, + &i.AmountRequested, + &i.CltvExpiry, + &i.MaxMinerFee, + &i.MaxSwapFee, + &i.InitiationHeight, + &i.ProtocolVersion, + &i.Label, + &i.ID_2, + &i.SwapHash_2, + &i.SwapInvoice, + &i.LastHop, + &i.PaymentTimeoutSeconds, + &i.QuotedSwapFeeSatoshis, + &i.DepositOutpoints, + &i.HtlcTxFeeRateSatKw, + &i.HtlcTimeoutSweepTxID, + &i.HtlcTimeoutSweepAddress, + &i.SwapHash_3, + &i.SenderScriptPubkey, + &i.ReceiverScriptPubkey, + &i.SenderInternalPubkey, + &i.ReceiverInternalPubkey, + &i.ClientKeyFamily, + &i.ClientKeyIndex, + ) + return i, err +} + +const getStaticAddressLoopInSwapsByStates = `-- name: GetStaticAddressLoopInSwapsByStates :many +SELECT + swaps.id, swaps.swap_hash, swaps.preimage, swaps.initiation_time, swaps.amount_requested, swaps.cltv_expiry, swaps.max_miner_fee, swaps.max_swap_fee, swaps.initiation_height, swaps.protocol_version, swaps.label, + static_address_swaps.id, static_address_swaps.swap_hash, static_address_swaps.swap_invoice, static_address_swaps.last_hop, static_address_swaps.payment_timeout_seconds, static_address_swaps.quoted_swap_fee_satoshis, static_address_swaps.deposit_outpoints, static_address_swaps.htlc_tx_fee_rate_sat_kw, static_address_swaps.htlc_timeout_sweep_tx_id, static_address_swaps.htlc_timeout_sweep_address, + htlc_keys.swap_hash, htlc_keys.sender_script_pubkey, htlc_keys.receiver_script_pubkey, htlc_keys.sender_internal_pubkey, htlc_keys.receiver_internal_pubkey, htlc_keys.client_key_family, htlc_keys.client_key_index +FROM + swaps + JOIN + static_address_swaps ON swaps.swap_hash = static_address_swaps.swap_hash + JOIN + htlc_keys ON swaps.swap_hash = htlc_keys.swap_hash + JOIN + static_address_swap_updates u ON swaps.swap_hash = u.swap_hash + -- This subquery ensures that we are checking only the latest update for + -- each swap_hash. + AND u.update_timestamp = ( + SELECT MAX(update_timestamp) + FROM static_address_swap_updates + WHERE swap_hash = u.swap_hash + ) +WHERE + (',' || $1 || ',') LIKE ('%,' || u.update_state || ',%') +ORDER BY + swaps.id +` + +type GetStaticAddressLoopInSwapsByStatesRow struct { + ID int32 + SwapHash []byte + Preimage []byte + InitiationTime time.Time + AmountRequested int64 + CltvExpiry int32 + MaxMinerFee int64 + MaxSwapFee int64 + InitiationHeight int32 + ProtocolVersion int32 + Label string + ID_2 int32 + SwapHash_2 []byte + SwapInvoice string + LastHop []byte + PaymentTimeoutSeconds int32 + QuotedSwapFeeSatoshis int64 + DepositOutpoints string + HtlcTxFeeRateSatKw int64 + HtlcTimeoutSweepTxID sql.NullString + HtlcTimeoutSweepAddress string + SwapHash_3 []byte + SenderScriptPubkey []byte + ReceiverScriptPubkey []byte + SenderInternalPubkey []byte + ReceiverInternalPubkey []byte + ClientKeyFamily int32 + ClientKeyIndex int32 +} + +func (q *Queries) GetStaticAddressLoopInSwapsByStates(ctx context.Context, dollar_1 sql.NullString) ([]GetStaticAddressLoopInSwapsByStatesRow, error) { + rows, err := q.db.QueryContext(ctx, getStaticAddressLoopInSwapsByStates, dollar_1) + if err != nil { + return nil, err + } + defer rows.Close() + var items []GetStaticAddressLoopInSwapsByStatesRow + for rows.Next() { + var i GetStaticAddressLoopInSwapsByStatesRow + if err := rows.Scan( + &i.ID, + &i.SwapHash, + &i.Preimage, + &i.InitiationTime, + &i.AmountRequested, + &i.CltvExpiry, + &i.MaxMinerFee, + &i.MaxSwapFee, + &i.InitiationHeight, + &i.ProtocolVersion, + &i.Label, + &i.ID_2, + &i.SwapHash_2, + &i.SwapInvoice, + &i.LastHop, + &i.PaymentTimeoutSeconds, + &i.QuotedSwapFeeSatoshis, + &i.DepositOutpoints, + &i.HtlcTxFeeRateSatKw, + &i.HtlcTimeoutSweepTxID, + &i.HtlcTimeoutSweepAddress, + &i.SwapHash_3, + &i.SenderScriptPubkey, + &i.ReceiverScriptPubkey, + &i.SenderInternalPubkey, + &i.ReceiverInternalPubkey, + &i.ClientKeyFamily, + &i.ClientKeyIndex, + ); err != nil { + return nil, err + } + items = append(items, i) + } + if err := rows.Close(); err != nil { + return nil, err + } + if err := rows.Err(); err != nil { + return nil, err + } + return items, nil +} + +const insertStaticAddressLoopIn = `-- name: InsertStaticAddressLoopIn :exec +INSERT INTO static_address_swaps ( + swap_hash, + swap_invoice, + last_hop, + payment_timeout_seconds, + quoted_swap_fee_satoshis, + deposit_outpoints, + htlc_tx_fee_rate_sat_kw, + htlc_timeout_sweep_tx_id, + htlc_timeout_sweep_address +) VALUES ( + $1, + $2, + $3, + $4, + $5, + $6, + $7, + $8, + $9 +) +` + +type InsertStaticAddressLoopInParams struct { + SwapHash []byte + SwapInvoice string + LastHop []byte + PaymentTimeoutSeconds int32 + QuotedSwapFeeSatoshis int64 + DepositOutpoints string + HtlcTxFeeRateSatKw int64 + HtlcTimeoutSweepTxID sql.NullString + HtlcTimeoutSweepAddress string +} + +func (q *Queries) InsertStaticAddressLoopIn(ctx context.Context, arg InsertStaticAddressLoopInParams) error { + _, err := q.db.ExecContext(ctx, insertStaticAddressLoopIn, + arg.SwapHash, + arg.SwapInvoice, + arg.LastHop, + arg.PaymentTimeoutSeconds, + arg.QuotedSwapFeeSatoshis, + arg.DepositOutpoints, + arg.HtlcTxFeeRateSatKw, + arg.HtlcTimeoutSweepTxID, + arg.HtlcTimeoutSweepAddress, + ) + return err +} + +const insertStaticAddressMetaUpdate = `-- name: InsertStaticAddressMetaUpdate :exec +INSERT INTO static_address_swap_updates ( + swap_hash, + update_state, + update_timestamp +) VALUES ( + $1, + $2, + $3 + ) +` + +type InsertStaticAddressMetaUpdateParams struct { + SwapHash []byte + UpdateState string + UpdateTimestamp time.Time +} + +func (q *Queries) InsertStaticAddressMetaUpdate(ctx context.Context, arg InsertStaticAddressMetaUpdateParams) error { + _, err := q.db.ExecContext(ctx, insertStaticAddressMetaUpdate, arg.SwapHash, arg.UpdateState, arg.UpdateTimestamp) + return err +} + +const isStored = `-- name: IsStored :one +SELECT EXISTS ( + SELECT 1 + FROM static_address_swaps + WHERE swap_hash = $1 +) +` + +func (q *Queries) IsStored(ctx context.Context, swapHash []byte) (bool, error) { + row := q.db.QueryRowContext(ctx, isStored, swapHash) + var exists bool + err := row.Scan(&exists) + return exists, err +} + +const updateStaticAddressLoopIn = `-- name: UpdateStaticAddressLoopIn :exec +UPDATE static_address_swaps +SET + htlc_tx_fee_rate_sat_kw = $2, + htlc_timeout_sweep_tx_id = $3 +WHERE + swap_hash = $1 +` + +type UpdateStaticAddressLoopInParams struct { + SwapHash []byte + HtlcTxFeeRateSatKw int64 + HtlcTimeoutSweepTxID sql.NullString +} + +func (q *Queries) UpdateStaticAddressLoopIn(ctx context.Context, arg UpdateStaticAddressLoopInParams) error { + _, err := q.db.ExecContext(ctx, updateStaticAddressLoopIn, arg.SwapHash, arg.HtlcTxFeeRateSatKw, arg.HtlcTimeoutSweepTxID) + return err +} From f773985311dff69935d997e305e4d87587b46f20 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 30 Jul 2024 12:23:35 +0200 Subject: [PATCH 42/67] log: static address loop-in logging --- staticaddr/log.go | 2 ++ staticaddr/loopin/log.go | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 staticaddr/loopin/log.go diff --git a/staticaddr/log.go b/staticaddr/log.go index fc5eb0108..cfd9e0b9d 100644 --- a/staticaddr/log.go +++ b/staticaddr/log.go @@ -4,6 +4,7 @@ import ( "github.com/btcsuite/btclog" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/loopin" "github.com/lightninglabs/loop/staticaddr/withdraw" "github.com/lightningnetwork/lnd/build" ) @@ -27,4 +28,5 @@ func UseLogger(logger btclog.Logger) { address.UseLogger(log) deposit.UseLogger(log) withdraw.UseLogger(log) + loopin.UseLogger(log) } diff --git a/staticaddr/loopin/log.go b/staticaddr/loopin/log.go new file mode 100644 index 000000000..99816e9cb --- /dev/null +++ b/staticaddr/loopin/log.go @@ -0,0 +1,24 @@ +package loopin + +import ( + "github.com/btcsuite/btclog" + "github.com/lightningnetwork/lnd/build" +) + +// Subsystem defines the sub system name of this package. +const Subsystem = "SADDR" + +// log is a logger that is initialized with no output filters. This means the +// package will not perform any logging by default until the caller requests it. +var log btclog.Logger + +// The default amount of logging is none. +func init() { + UseLogger(build.NewSubLogger(Subsystem, nil)) +} + +// UseLogger uses a specified Logger to output package logging info. This should +// be used in preference to SetLogWriter if the caller is also using btclog. +func UseLogger(logger btclog.Logger) { + log = logger +} From edf5f6015c467a78ac950996c794b941cb78326d Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 30 Jul 2024 15:37:37 +0200 Subject: [PATCH 43/67] staticaddr: enable deposits for swaps The static address state machine adds states to reflect the state of a deposit during a loop-in swap. --- loopd/swapclient_server.go | 6 +- staticaddr/deposit/actions.go | 14 +- staticaddr/deposit/deposit.go | 19 +-- staticaddr/deposit/fsm.go | 203 ++++++++++++++++++++++---- staticaddr/deposit/manager.go | 249 ++++++++++++++++++++------------ staticaddr/deposit/sql_store.go | 7 +- 6 files changed, 347 insertions(+), 151 deletions(-) diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 7c24c5bc3..8982dd8e2 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -1471,7 +1471,7 @@ func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, "outpoints") } - allDeposits, err := s.depositManager.GetAllDeposits() + allDeposits, err := s.depositManager.GetAllDeposits(ctx) if err != nil { return nil, err } @@ -1609,7 +1609,7 @@ func toClientState(state fsm.StateType) looprpc.DepositState { case deposit.Withdrawn: return looprpc.DepositState_WITHDRAWN - case deposit.PublishExpiredDeposit: + case deposit.PublishExpirySweep: return looprpc.DepositState_PUBLISH_EXPIRED case deposit.WaitForExpirySweep: @@ -1635,7 +1635,7 @@ func toServerState(state looprpc.DepositState) fsm.StateType { return deposit.Withdrawn case looprpc.DepositState_PUBLISH_EXPIRED: - return deposit.PublishExpiredDeposit + return deposit.PublishExpirySweep case looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP: return deposit.WaitForExpirySweep diff --git a/staticaddr/deposit/actions.go b/staticaddr/deposit/actions.go index 835a96076..7f58fa4ae 100644 --- a/staticaddr/deposit/actions.go +++ b/staticaddr/deposit/actions.go @@ -14,7 +14,7 @@ import ( ) const ( - defaultConfTarget = 3 + DefaultConfTarget = 3 ) // PublishDepositExpirySweepAction creates and publishes the timeout transaction @@ -39,11 +39,11 @@ func (f *FSM) PublishDepositExpirySweepAction(ctx context.Context, // Estimate the fee rate of an expiry spend transaction. feeRateEstimator, err := f.cfg.WalletKit.EstimateFeeRate( - ctx, defaultConfTarget, + ctx, DefaultConfTarget, ) if err != nil { return f.HandleError(fmt.Errorf("timeout sweep fee "+ - "estimation failed: %v", err)) + "estimation failed: %w", err)) } weight := script.ExpirySpendWeight() @@ -116,7 +116,7 @@ func (f *FSM) WaitForExpirySweepAction(ctx context.Context, _ fsm.EventContext) fsm.EventType { spendChan, errSpendChan, err := f.cfg.ChainNotifier.RegisterConfirmationsNtfn( //nolint:lll - ctx, nil, f.deposit.TimeOutSweepPkScript, defaultConfTarget, + ctx, nil, f.deposit.TimeOutSweepPkScript, DefaultConfTarget, int32(f.deposit.ConfirmationHeight), ) if err != nil { @@ -124,7 +124,7 @@ func (f *FSM) WaitForExpirySweepAction(ctx context.Context, } select { - case err := <-errSpendChan: + case err = <-errSpendChan: log.Debugf("error while sweeping expired deposit: %v", err) return fsm.OnError @@ -155,9 +155,9 @@ func (f *FSM) SweptExpiredDepositAction(ctx context.Context, return fsm.NoOp } -// WithdrawnDepositAction is the final action after a withdrawal. It signals to +// FinalizeDepositAction is the final action after a withdrawal. It signals to // the manager that the deposit has been swept and the FSM can be removed. -func (f *FSM) WithdrawnDepositAction(ctx context.Context, +func (f *FSM) FinalizeDepositAction(ctx context.Context, _ fsm.EventContext) fsm.EventType { select { diff --git a/staticaddr/deposit/deposit.go b/staticaddr/deposit/deposit.go index 207ad440f..6da9e729a 100644 --- a/staticaddr/deposit/deposit.go +++ b/staticaddr/deposit/deposit.go @@ -59,20 +59,13 @@ type Deposit struct { sync.Mutex } -// IsInPendingState returns true if the deposit is pending. -func (d *Deposit) IsInPendingState() bool { - d.Lock() - defer d.Unlock() - - return !d.IsInFinalState() -} - // IsInFinalState returns true if the deposit is final. func (d *Deposit) IsInFinalState() bool { d.Lock() defer d.Unlock() - return d.state == Expired || d.state == Withdrawn || d.state == Failed + return d.state == Expired || d.state == Withdrawn || + d.state == LoopedIn || d.state == HtlcTimeoutSwept } func (d *Deposit) IsExpired(currentHeight, expiry uint32) bool { @@ -96,6 +89,10 @@ func (d *Deposit) SetState(state fsm.StateType) { d.state = state } +func (d *Deposit) SetStateNoLock(state fsm.StateType) { + d.state = state +} + func (d *Deposit) IsInState(state fsm.StateType) bool { d.Lock() defer d.Unlock() @@ -103,6 +100,10 @@ func (d *Deposit) IsInState(state fsm.StateType) bool { return d.state == state } +func (d *Deposit) IsInStateNoLock(state fsm.StateType) bool { + return d.state == state +} + // GetRandomDepositID generates a random deposit ID. func GetRandomDepositID() (ID, error) { var id ID diff --git a/staticaddr/deposit/fsm.go b/staticaddr/deposit/fsm.go index 347ad5dff..e33a5d41d 100644 --- a/staticaddr/deposit/fsm.go +++ b/staticaddr/deposit/fsm.go @@ -23,34 +23,108 @@ const ( var ( ErrProtocolVersionNotSupported = errors.New("protocol version not " + "supported") + + // Withdrawal and loop-in transitions lock their respective deposits + // themselves. We need to make sure that we don't lock the deposit + // twice. For the events below we expect the deposits already locked. + lockedEvents = map[fsm.EventType]struct{}{ + OnLoopInInitiated: {}, + OnSweepingHtlcTimeout: {}, + OnHtlcTimeoutSwept: {}, + OnLoopedIn: {}, + fsm.OnError: {}, + OnWithdrawInitiated: {}, + OnWithdrawn: {}, + } ) // States. var ( + // Deposited signals that funds at a static address have reached the + // confirmation height. Deposited = fsm.StateType("Deposited") + // Withdrawing signals that the withdrawal transaction has been + // broadcast, awaiting sufficient confirmations. Withdrawing = fsm.StateType("Withdrawing") + // Withdrawn signals that the withdrawal transaction has been confirmed. Withdrawn = fsm.StateType("Withdrawn") - PublishExpiredDeposit = fsm.StateType("PublishExpiredDeposit") + // LoopingIn signals that the deposit is locked for a loop in swap. + LoopingIn = fsm.StateType("LoopingIn") + + // LoopedIn signals that the loop in swap has been successfully + // completed. It implies that we signed the sweepless sweep tx for the + // server. + LoopedIn = fsm.StateType("LoopedIn") + + // SweepHtlcTimeout signals that the htlc timeout path is in the + // process of being swept. + SweepHtlcTimeout = fsm.StateType("SweepHtlcTimeout") + + // HtlcTimeoutSwept signals that the htlc timeout path has been swept. + HtlcTimeoutSwept = fsm.StateType("HtlcTimeoutSwept") + + // PublishExpirySweep signals that the deposit has expired, and we are + // in the process of publishing the expiry sweep transaction. + PublishExpirySweep = fsm.StateType("PublishExpirySweep") + // WaitForExpirySweep signals that the expiry sweep transaction has been + // published, and we are waiting for it to be confirmed. WaitForExpirySweep = fsm.StateType("WaitForExpirySweep") + // Expired signals that the deposit has expired and the expiry sweep + // transaction has been confirmed sufficiently. Expired = fsm.StateType("Expired") - - Failed = fsm.StateType("Failed") ) // Events. var ( - OnStart = fsm.EventType("OnStart") + // OnStart is sent to the fsm once the deposit outpoint has been + // sufficiently confirmed. It transitions the fsm into the Deposited + // state from where we can trigger a withdrawal, a loopin or an expiry. + OnStart = fsm.EventType("OnStart") + + // OnWithdrawInitiated is sent to the fsm when a withdrawal has been + // initiated. OnWithdrawInitiated = fsm.EventType("OnWithdrawInitiated") - OnWithdrawn = fsm.EventType("OnWithdrawn") - OnExpiry = fsm.EventType("OnExpiry") - OnExpiryPublished = fsm.EventType("OnExpiryPublished") - OnExpirySwept = fsm.EventType("OnExpirySwept") - OnRecover = fsm.EventType("OnRecover") + + // OnWithdrawn is sent to the fsm when a withdrawal has been confirmed. + OnWithdrawn = fsm.EventType("OnWithdrawn") + + // OnLoopInInitiated is sent to the fsm when a loop in has been + // initiated. + OnLoopInInitiated = fsm.EventType("OnLoopInInitiated") + + // OnSweepingHtlcTimeout is sent to the fsm when the htlc timeout path + // is being swept. This indicates that the server didn't pay the swap + // invoice, but the htlc tx was published, from we which we need to + // sweep the htlc timeout path. + OnSweepingHtlcTimeout = fsm.EventType("OnSweepingHtlcTimeout") + + // OnHtlcTimeoutSwept is sent to the fsm when the htlc timeout path has + // been swept. + OnHtlcTimeoutSwept = fsm.EventType("OnHtlcTimeoutSwept") + + // OnLoopedIn is sent to the fsm when the user intents to use the + // deposit for a loop in swap. + OnLoopedIn = fsm.EventType("OnLoopedIn") + + // OnExpiry is sent to the fsm when the deposit has expired. + OnExpiry = fsm.EventType("OnExpiry") + + // OnExpiryPublished is sent to the fsm when the expiry sweep tx has + // been published. + OnExpiryPublished = fsm.EventType("OnExpiryPublished") + + // OnExpirySwept is sent to the fsm when the expiry sweep tx has been + // confirmed. + OnExpirySwept = fsm.EventType("OnExpirySwept") + + // OnRecover is sent to the fsm when it should recover from client + // restart. + OnRecover = fsm.EventType("OnRecover") ) // FSM is the state machine that handles the instant out. @@ -79,12 +153,12 @@ func NewFSM(ctx context.Context, deposit *Deposit, cfg *ManagerConfig, params, err := cfg.AddressManager.GetStaticAddressParameters(ctx) if err != nil { return nil, fmt.Errorf("unable to get static address "+ - "parameters: %v", err) + "parameters: %w", err) } address, err := cfg.AddressManager.GetStaticAddress(ctx) if err != nil { - return nil, fmt.Errorf("unable to get static address: %v", err) + return nil, fmt.Errorf("unable to get static address: %w", err) } depoFsm := &FSM{ @@ -150,7 +224,7 @@ func (f *FSM) handleBlockNotification(ctx context.Context, err := f.SendEvent(ctx, OnExpiry, nil) if err != nil { log.Debugf("error sending OnExpiry "+ - "event: %v", err) + "event: %w", err) } }() } @@ -168,15 +242,22 @@ func (f *FSM) DepositStatesV0() fsm.States { }, Deposited: fsm.State{ Transitions: fsm.Transitions{ - OnExpiry: PublishExpiredDeposit, + OnExpiry: PublishExpirySweep, OnWithdrawInitiated: Withdrawing, - OnRecover: Deposited, + OnLoopInInitiated: LoopingIn, + // We encounter OnSweepingHtlcTimeout if the + // server published the htlc tx without paying + // us. We then need to monitor for the timeout + // path to open up to sweep it. + OnSweepingHtlcTimeout: SweepHtlcTimeout, + OnRecover: Deposited, + fsm.OnError: Deposited, }, Action: fsm.NoOpAction, }, - PublishExpiredDeposit: fsm.State{ + PublishExpirySweep: fsm.State{ Transitions: fsm.Transitions{ - OnRecover: PublishExpiredDeposit, + OnRecover: PublishExpirySweep, OnExpiryPublished: WaitForExpirySweep, // If the timeout sweep failed we go back to // Deposited, hoping that another timeout sweep @@ -190,7 +271,7 @@ func (f *FSM) DepositStatesV0() fsm.States { Transitions: fsm.Transitions{ OnExpirySwept: Expired, // Upon recovery, we republish the sweep tx. - OnRecover: PublishExpiredDeposit, + OnRecover: PublishExpirySweep, // If the timeout sweep failed we go back to // Deposited, hoping that another timeout sweep // attempt will be successful. Alternatively, @@ -229,18 +310,50 @@ func (f *FSM) DepositStatesV0() fsm.States { }, Action: fsm.NoOpAction, }, - Withdrawn: fsm.State{ + LoopingIn: fsm.State{ + Transitions: fsm.Transitions{ + // This event is triggered when the loop in + // payment has been received. We consider the + // swap to be completed and transition to a + // final state. + OnLoopedIn: LoopedIn, + + // If the deposit expires while the loop in is + // still pending, we publish the expiry sweep. + OnExpiry: PublishExpirySweep, + + OnLoopInInitiated: LoopingIn, + + OnRecover: LoopingIn, + fsm.OnError: Deposited, + }, + Action: fsm.NoOpAction, + }, + LoopedIn: fsm.State{ Transitions: fsm.Transitions{ OnExpiry: Expired, }, - Action: f.WithdrawnDepositAction, + Action: f.FinalizeDepositAction, }, - Failed: fsm.State{ + SweepHtlcTimeout: fsm.State{ Transitions: fsm.Transitions{ - OnExpiry: Failed, + OnHtlcTimeoutSwept: HtlcTimeoutSwept, + OnRecover: SweepHtlcTimeout, }, Action: fsm.NoOpAction, }, + HtlcTimeoutSwept: fsm.State{ + Transitions: fsm.Transitions{ + OnExpiry: HtlcTimeoutSwept, + }, + Action: f.FinalizeDepositAction, + }, + Withdrawn: fsm.State{ + Transitions: fsm.Transitions{ + OnExpiry: Expired, + }, + Action: f.FinalizeDepositAction, + }, } } @@ -258,23 +371,51 @@ func (f *FSM) updateDeposit(ctx context.Context, notification.Event, ) - f.deposit.SetState(notification.NextState) - - // Don't update the deposit if we are in an initial state or if we - // are transitioning from an initial state to a failed state. - d := f.deposit - if d.IsInState(fsm.EmptyState) || d.IsInState(Deposited) || - (notification.PreviousState == Deposited && d.IsInState( - Failed, - )) { + type checkStateFunc func(state fsm.StateType) bool + type setStateFunc func(state fsm.StateType) + checkFunc := checkStateFunc(f.deposit.IsInState) + setFunc := setStateFunc(f.deposit.SetState) + if _, ok := lockedEvents[notification.Event]; ok { + checkFunc = f.deposit.IsInStateNoLock + setFunc = f.deposit.SetStateNoLock + } + setFunc(notification.NextState) + if isUpdateSkipped(notification, checkFunc) { return } err := f.cfg.Store.UpdateDeposit(ctx, f.deposit) if err != nil { - f.Errorf("unable to update deposit: %v", err) + f.Errorf("unable to update deposit: %w", err) + } +} + +// isUpdateSkipped returns true if the deposit should not be updated for the given +// notification. +func isUpdateSkipped(notification fsm.Notification, + checkStateFunc func(stateType fsm.StateType) bool) bool { + + prevState := notification.PreviousState + + // Skip if we are in the empty state because no deposit has been + // persisted yet. + if checkStateFunc(fsm.EmptyState) { + return true } + + // If we transitioned from the empty state to Deposited there's still no + // deposit persisted, so we don't need to update it. + if prevState == fsm.EmptyState && checkStateFunc(Deposited) { + return true + } + + // We don't update in self-loops, e.g. in the case of recovery. + if checkStateFunc(prevState) { + return true + } + + return false } // Infof logs an info message with the deposit outpoint. diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index 329ca0f05..64b7116fe 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -34,7 +34,7 @@ const ( // DefaultTransitionTimeout is the default timeout for transitions in // the deposit state machine. - DefaultTransitionTimeout = 1 * time.Minute + DefaultTransitionTimeout = 5 * time.Second ) // ManagerConfig holds the configuration for the address manager. @@ -74,9 +74,8 @@ type ManagerConfig struct { type Manager struct { cfg *ManagerConfig - runCtx context.Context - - sync.Mutex + // mu guards access to activeDeposits map. + mu sync.Mutex // initChan signals the daemon that the address manager has completed // its initialization. @@ -88,9 +87,6 @@ type Manager struct { // initiationHeight stores the currently best known block height. initiationHeight uint32 - // currentHeight stores the currently best known block height. - currentHeight uint32 - // deposits contains all the deposits that have ever been made to the // static address. This field is used to store and recover deposits. It // also serves as basis for reconciliation of newly detected deposits by @@ -116,25 +112,21 @@ func NewManager(cfg *ManagerConfig) *Manager { // Run runs the address manager. func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { - m.runCtx = ctx + m.initiationHeight = currentHeight - m.Lock() - m.currentHeight, m.initiationHeight = currentHeight, currentHeight - m.Unlock() - - newBlockChan, newBlockErrChan, err := m.cfg.ChainNotifier.RegisterBlockEpochNtfn(m.runCtx) //nolint:lll + newBlockChan, newBlockErrChan, err := m.cfg.ChainNotifier.RegisterBlockEpochNtfn(ctx) //nolint:lll if err != nil { return err } // Recover previous deposits and static address parameters from the DB. - err = m.recover(m.runCtx) + err = m.recoverDeposits(ctx) if err != nil { return err } // Start the deposit notifier. - m.pollDeposits(m.runCtx) + m.pollDeposits(ctx) // Communicate to the caller that the address manager has completed its // initialization. @@ -143,37 +135,33 @@ func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { for { select { case height := <-newBlockChan: - m.Lock() - m.currentHeight = uint32(height) - m.Unlock() - // Inform all active deposits about a new block arrival. for _, fsm := range m.activeDeposits { select { case fsm.blockNtfnChan <- uint32(height): - case <-m.runCtx.Done(): - return m.runCtx.Err() + case <-ctx.Done(): + return ctx.Err() } } case outpoint := <-m.finalizedDepositChan: // If deposits notify us about their finalization, we // update the manager's internal state and flush the // finalized deposit from memory. - m.finalizeDeposit(outpoint) + delete(m.activeDeposits, outpoint) - case err := <-newBlockErrChan: + case err = <-newBlockErrChan: return err - case <-m.runCtx.Done(): - return m.runCtx.Err() + case <-ctx.Done(): + return ctx.Err() } } } -// recover recovers static address parameters, previous deposits and state -// machines from the database and starts the deposit notifier. -func (m *Manager) recover(ctx context.Context) error { +// recoverDeposits recovers static address parameters, previous deposits and +// state machines from the database and starts the deposit notifier. +func (m *Manager) recoverDeposits(ctx context.Context) error { log.Infof("Recovering static address parameters and deposits...") // Recover deposits. @@ -195,10 +183,7 @@ func (m *Manager) recover(ctx context.Context) error { log.Debugf("Recovering deposit %x", d.ID) // Create a state machine for a given deposit. - fsm, err := NewFSM( - m.runCtx, d, m.cfg, - m.finalizedDepositChan, true, - ) + fsm, err := NewFSM(ctx, d, m.cfg, m.finalizedDepositChan, true) if err != nil { return err } @@ -259,12 +244,12 @@ func (m *Manager) reconcileDeposits(ctx context.Context) error { ctx, MinConfs, MaxConfs, ) if err != nil { - return fmt.Errorf("unable to list new deposits: %v", err) + return fmt.Errorf("unable to list new deposits: %w", err) } newDeposits := m.filterNewDeposits(utxos) if err != nil { - return fmt.Errorf("unable to filter new deposits: %v", err) + return fmt.Errorf("unable to filter new deposits: %w", err) } if len(newDeposits) == 0 { @@ -275,14 +260,14 @@ func (m *Manager) reconcileDeposits(ctx context.Context) error { for _, utxo := range newDeposits { deposit, err := m.createNewDeposit(ctx, utxo) if err != nil { - return fmt.Errorf("unable to retain new deposit: %v", + return fmt.Errorf("unable to retain new deposit: %w", err) } log.Debugf("Received deposit: %v", deposit) - err = m.startDepositFsm(deposit) + err = m.startDepositFsm(ctx, deposit) if err != nil { - return fmt.Errorf("unable to start new deposit FSM: %v", + return fmt.Errorf("unable to start new deposit FSM: %w", err) } } @@ -332,9 +317,9 @@ func (m *Manager) createNewDeposit(ctx context.Context, return nil, err } - m.Lock() + m.mu.Lock() m.deposits[deposit.OutPoint] = deposit - m.Unlock() + m.mu.Unlock() return deposit, nil } @@ -348,7 +333,7 @@ func (m *Manager) getBlockHeight(ctx context.Context, ) if err != nil { return 0, fmt.Errorf("couldn't get confirmation height for "+ - "deposit, %v", err) + "deposit, %w", err) } notifChan, errChan, err := m.cfg.ChainNotifier.RegisterConfirmationsNtfn( //nolint:lll @@ -374,8 +359,8 @@ func (m *Manager) getBlockHeight(ctx context.Context, // filterNewDeposits filters the given utxos for new deposits that we haven't // seen before. func (m *Manager) filterNewDeposits(utxos []*lnwallet.Utxo) []*lnwallet.Utxo { - m.Lock() - defer m.Unlock() + m.mu.Lock() + defer m.mu.Unlock() var newDeposits []*lnwallet.Utxo for _, utxo := range utxos { @@ -390,115 +375,152 @@ func (m *Manager) filterNewDeposits(utxos []*lnwallet.Utxo) []*lnwallet.Utxo { // startDepositFsm creates a new state machine flow from the latest deposit to // our static address. -func (m *Manager) startDepositFsm(deposit *Deposit) error { +func (m *Manager) startDepositFsm(ctx context.Context, deposit *Deposit) error { // Create a state machine for a given deposit. - fsm, err := NewFSM( - m.runCtx, deposit, m.cfg, m.finalizedDepositChan, false, - ) + fsm, err := NewFSM(ctx, deposit, m.cfg, m.finalizedDepositChan, false) if err != nil { return err } // Send the start event to the state machine. go func() { - err = fsm.SendEvent(m.runCtx, OnStart, nil) + err = fsm.SendEvent(ctx, OnStart, nil) if err != nil { log.Errorf("Error sending OnStart event: %v", err) } }() - err = fsm.DefaultObserver.WaitForState(m.runCtx, time.Minute, Deposited) + err = fsm.DefaultObserver.WaitForState(ctx, time.Minute, Deposited) if err != nil { return err } // Add the FSM to the active FSMs map. - m.Lock() + m.mu.Lock() m.activeDeposits[deposit.OutPoint] = fsm - m.Unlock() + m.mu.Unlock() return nil } -func (m *Manager) finalizeDeposit(outpoint wire.OutPoint) { - m.Lock() - delete(m.activeDeposits, outpoint) - delete(m.deposits, outpoint) - m.Unlock() -} - -// GetActiveDepositsInState returns all active deposits. +// GetActiveDepositsInState returns all active deposits. This function is called +// on a client restart before the manager is fully initialized, hence we don't +// have to lock the deposits. func (m *Manager) GetActiveDepositsInState(stateFilter fsm.StateType) ( []*Deposit, error) { - m.Lock() - defer m.Unlock() + m.mu.Lock() + defer m.mu.Unlock() var deposits []*Deposit for _, fsm := range m.activeDeposits { - if fsm.deposit.GetState() != stateFilter { + deposits = append(deposits, fsm.deposit) + } + + lockDeposits(deposits) + defer unlockDeposits(deposits) + + filteredDeposits := make([]*Deposit, 0, len(deposits)) + for _, d := range deposits { + if !d.IsInStateNoLock(stateFilter) { continue } - deposits = append(deposits, fsm.deposit) + + filteredDeposits = append(filteredDeposits, d) } - sort.Slice(deposits, func(i, j int) bool { - return deposits[i].ConfirmationHeight < - deposits[j].ConfirmationHeight + sort.Slice(filteredDeposits, func(i, j int) bool { + return filteredDeposits[i].ConfirmationHeight < + filteredDeposits[j].ConfirmationHeight }) - return deposits, nil -} - -// GetAllDeposits returns all active deposits. -func (m *Manager) GetAllDeposits() ([]*Deposit, error) { - return m.cfg.Store.AllDeposits(m.runCtx) + return filteredDeposits, nil } // AllOutpointsActiveDeposits checks if all deposits referenced by the outpoints -// are active and in the specified state. +// are in our in-mem active deposits map and in the specified state. If +// fsm.EmptyState is set as targetState all deposits are returned regardless of +// their state. Each existent deposit is locked during the check. func (m *Manager) AllOutpointsActiveDeposits(outpoints []wire.OutPoint, - stateFilter fsm.StateType) ([]*Deposit, bool) { + targetState fsm.StateType) ([]*Deposit, bool) { + + m.mu.Lock() + defer m.mu.Unlock() - m.Lock() - defer m.Unlock() + _, deposits := m.toActiveDeposits(&outpoints) + if deposits == nil { + return nil, false + } + + // If the targetState is empty we return all active deposits regardless + // of state. + if targetState == fsm.EmptyState { + return deposits, true + } - deposits := make([]*Deposit, 0, len(outpoints)) - for _, o := range outpoints { - if _, ok := m.activeDeposits[o]; !ok { + lockDeposits(deposits) + defer unlockDeposits(deposits) + for _, d := range deposits { + if !d.IsInStateNoLock(targetState) { return nil, false } + } + + return deposits, true +} - deposit := m.deposits[o] - if deposit.GetState() != stateFilter { +// AllStringOutpointsActiveDeposits converts outpoint strings of format txid:idx +// to wire outpoints and checks if all deposits referenced by the outpoints are +// active and in the specified state. If fsm.EmptyState is referenced as +// stateFilter all deposits are returned regardless of their state. +func (m *Manager) AllStringOutpointsActiveDeposits(outpoints []string, + stateFilter fsm.StateType) ([]*Deposit, bool) { + + outPoints := make([]wire.OutPoint, len(outpoints)) + for i, o := range outpoints { + op, err := wire.NewOutPointFromString(o) + if err != nil { return nil, false } - deposits = append(deposits, m.deposits[o]) + outPoints[i] = *op } - return deposits, true + return m.AllOutpointsActiveDeposits(outPoints, stateFilter) } // TransitionDeposits allows a caller to transition a set of deposits to a new // state. -func (m *Manager) TransitionDeposits(deposits []*Deposit, event fsm.EventType, - expectedFinalState fsm.StateType) error { +// Caveat: The action triggered by the state transitions should not compute +// heavy things or call external endpoints that can block for a long time. +// Deposits will be released if a transition takes longer than +// DefaultTransitionTimeout which is set to 5 seconds. +func (m *Manager) TransitionDeposits(ctx context.Context, deposits []*Deposit, + event fsm.EventType, expectedFinalState fsm.StateType) error { + + outpoints := make([]wire.OutPoint, len(deposits)) + for i, d := range deposits { + outpoints[i] = d.OutPoint + } - for _, d := range deposits { - m.Lock() - sm, ok := m.activeDeposits[d.OutPoint] - m.Unlock() - if !ok { - return fmt.Errorf("deposit not found") - } + m.mu.Lock() + defer m.mu.Unlock() - err := sm.SendEvent(m.runCtx, event, nil) + stateMachines, _ := m.toActiveDeposits(&outpoints) + if stateMachines == nil { + return fmt.Errorf("deposits not found in active deposits") + } + + lockDeposits(deposits) + defer unlockDeposits(deposits) + for _, sm := range stateMachines { + err := sm.SendEvent(ctx, event, nil) if err != nil { return err } + err = sm.DefaultObserver.WaitForState( - m.runCtx, DefaultTransitionTimeout, expectedFinalState, + ctx, DefaultTransitionTimeout, expectedFinalState, ) if err != nil { return err @@ -508,7 +530,44 @@ func (m *Manager) TransitionDeposits(deposits []*Deposit, event fsm.EventType, return nil } +func lockDeposits(deposits []*Deposit) { + for _, d := range deposits { + d.Lock() + } +} + +func unlockDeposits(deposits []*Deposit) { + for _, d := range deposits { + d.Unlock() + } +} + +// GetAllDeposits returns all active deposits. +func (m *Manager) GetAllDeposits(ctx context.Context) ([]*Deposit, error) { + return m.cfg.Store.AllDeposits(ctx) +} + // UpdateDeposit overrides all fields of the deposit with given ID in the store. -func (m *Manager) UpdateDeposit(d *Deposit) error { - return m.cfg.Store.UpdateDeposit(m.runCtx, d) +func (m *Manager) UpdateDeposit(ctx context.Context, d *Deposit) error { + return m.cfg.Store.UpdateDeposit(ctx, d) +} + +// toActiveDeposits converts a list of outpoints to a list of FSMs and deposits. +// The caller should call mu.Lock() before calling this function. +func (m *Manager) toActiveDeposits(outpoints *[]wire.OutPoint) ([]*FSM, + []*Deposit) { + + fsms := make([]*FSM, 0, len(*outpoints)) + deposits := make([]*Deposit, 0, len(*outpoints)) + for _, o := range *outpoints { + sm, ok := m.activeDeposits[o] + if !ok { + return nil, nil + } + + fsms = append(fsms, sm) + deposits = append(deposits, m.deposits[o]) + } + + return fsms, deposits } diff --git a/staticaddr/deposit/sql_store.go b/staticaddr/deposit/sql_store.go index 6221210e6..6a52ae282 100644 --- a/staticaddr/deposit/sql_store.go +++ b/staticaddr/deposit/sql_store.go @@ -65,7 +65,7 @@ func (s *SqlStore) UpdateDeposit(ctx context.Context, deposit *Deposit) error { insertUpdateArgs := sqlc.InsertDepositUpdateParams{ DepositID: deposit.ID[:], UpdateTimestamp: s.clock.Now().UTC(), - UpdateState: string(deposit.GetState()), + UpdateState: string(deposit.state), } var ( @@ -242,8 +242,3 @@ func (s *SqlStore) toDeposit(row sqlc.Deposit, FinalizedWithdrawalTx: finalizedWithdrawalTx, }, nil } - -// Close closes the database connection. -func (s *SqlStore) Close() { - s.baseDB.DB.Close() -} From fcff53b4f0b803a19061af159e3f35371e278b6d Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 26 Sep 2024 11:42:44 +0200 Subject: [PATCH 44/67] loopin: public scope for ValidateLoopInContract --- client.go | 6 +++++- loopin.go | 18 ++++++++++++++---- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/client.go b/client.go index cf253452a..bce79ce73 100644 --- a/client.go +++ b/client.go @@ -43,9 +43,13 @@ var ( ErrSwapAmountTooHigh = errors.New("swap amount too high") // ErrExpiryTooFar is returned when the server proposes an expiry that - // is too soon for us. + // is too far in the future. ErrExpiryTooFar = errors.New("swap expiry too far") + // ErrExpiryTooSoon is returned when the server proposes an expiry that + // is too soon. + ErrExpiryTooSoon = errors.New("swap expiry too soon") + // ErrInsufficientBalance indicates insufficient confirmed balance to // publish a swap. ErrInsufficientBalance = errors.New("insufficient confirmed balance") diff --git a/loopin.go b/loopin.go index c8f56435b..bd694cd62 100644 --- a/loopin.go +++ b/loopin.go @@ -38,6 +38,10 @@ var ( // getting us to lock up our funds to an arbitrary point in the future. MaxLoopInAcceptDelta = int32(1500) + // MinLoopInExpiryDelta defines the minimum number of remaining blocks + // that we accept until htlc expiry path that opens up for us to sweep. + MinLoopInExpiryDelta = int32(100) + // MinLoopInPublishDelta defines the minimum number of remaining blocks // until on-chain htlc expiry required to proceed to publishing the htlc // tx. This value isn't critical, as we could even safely publish the @@ -248,7 +252,7 @@ func newLoopInSwap(globalCtx context.Context, cfg *swapConfig, // Validate if the response parameters are outside our allowed range // preventing us from continuing with a swap. - err = validateLoopInContract(currentHeight, swapResp) + err = ValidateLoopInContract(currentHeight, swapResp.expiry) if err != nil { return nil, err } @@ -429,14 +433,20 @@ func resumeLoopInSwap(_ context.Context, cfg *swapConfig, return swap, nil } -// validateLoopInContract validates the contract parameters against our request. -func validateLoopInContract(height int32, response *newLoopInResponse) error { +// ValidateLoopInContract validates the contract parameters against our +// configured maximum values. +func ValidateLoopInContract(height int32, htlcExpiry int32) error { // Verify that we are not forced to publish a htlc that locks up our // funds for too long in case the server doesn't follow through. - if response.expiry-height > MaxLoopInAcceptDelta { + if htlcExpiry-height > MaxLoopInAcceptDelta { return ErrExpiryTooFar } + // Ensure that the expiry height is in the future. + if htlcExpiry < height+MinLoopInExpiryDelta { + return ErrExpiryTooSoon + } + return nil } From fb1305e50f32b6bcd6243588ed23c5f8865c90df Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 26 Sep 2024 11:43:38 +0200 Subject: [PATCH 45/67] interface: add StaticAddressLoopInRequest interface --- interface.go | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/interface.go b/interface.go index 37e5e01c4..8764bf76e 100644 --- a/interface.go +++ b/interface.go @@ -234,6 +234,48 @@ type LoopInRequest struct { RouteHints [][]zpay32.HopHint } +// StaticAddressLoopInRequest contains the required parameters for the swap. +type StaticAddressLoopInRequest struct { + // DepositOutpoints contain the outpoints in format txid:idx of the + // static address deposits that are being looped in. The sum of output + // values constitute the swap amount. + DepositOutpoints []string + + // MaxSwapFee is the maximum we are willing to pay the server for the + // swap. This value is not disclosed in the swap initiation call, but if + // the server asks for a higher fee, we abort the swap. Typically, this + // value is taken from the response of the LoopInQuote call. It + // includes the pre-pay amount. + MaxSwapFee btcutil.Amount + + // LastHop optionally specifies the last hop to use for the loop in + // payment. + LastHop *route.Vertex + + // Label contains an optional text label for the swap. + Label string + + // Initiator is an optional string that identifies what software + // initiated the swap (loop CLI, autolooper, LiT UI and so on) and is + // appended to the user agent string. + Initiator string + + // Private indicates whether the destination node should be considered + // private. In which case, loop will generate hophints to assist with + // probing and payment. + Private bool + + // RouteHints are optional route hints to reach the destination through + // private channels. + RouteHints [][]zpay32.HopHint + + // PaymentTimeoutSeconds allows the user to specify an upper limit for + // the amount of time the server is allowed to fulfill the off-chain + // swap payment. If the timeout is reached the swap will be aborted and + // the client can retry the swap if desired with different parameters. + PaymentTimeoutSeconds uint32 +} + // LoopInTerms are the server terms on which it executes loop in swaps. type LoopInTerms struct { // MinSwapAmount is the minimum amount that the server requires for a From ea3c5e5b7342cd62112b6a3e4613e07ad2dfecae Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 17 Oct 2024 13:29:43 +0200 Subject: [PATCH 46/67] staticaddr: configurable max htlc tx fee In this commit we introduce maximum fee percentages for the static loop-in htlc transactions. Since the server has the ability to publish htlc transactions without settling the swap payment we have to restrict the amount the server allocates for fees of these transactions. --- client.go | 16 ++++++++++++++++ loopd/config.go | 47 +++++++++++++++++++++++++++-------------------- loopd/utils.go | 22 ++++++++++++---------- 3 files changed, 55 insertions(+), 30 deletions(-) diff --git a/client.go b/client.go index bce79ce73..47a875ea6 100644 --- a/client.go +++ b/client.go @@ -141,6 +141,22 @@ type ClientConfig struct { // MaxPaymentRetries is the maximum times we retry an off-chain payment // (used in loop out). MaxPaymentRetries int + + // MaxStaticAddrHtlcFeePercentage is the percentage of the swap amount + // that we allow the server to charge for the htlc transaction. + // Although highly unlikely, this is a defense against the server + // publishing the htlc without paying the swap invoice, forcing us to + // sweep the timeout path. + MaxStaticAddrHtlcFeePercentage float64 + + // MaxStaticAddrHtlcBackupFeePercentage is the percentage of the swap + // amount that we allow the server to charge for the htlc backup + // transactions. This is a defense against the server publishing the + // htlc backup without paying the swap invoice, forcing us to sweep the + // timeout path. This value is elevated compared to + // MaxStaticAddrHtlcFeePercentage since it serves the server as backup + // transaction in case of fee spikes. + MaxStaticAddrHtlcBackupFeePercentage float64 } // NewClient returns a new instance to initiate swaps with. diff --git a/loopd/config.go b/loopd/config.go index 3adc81d34..df77bf549 100644 --- a/loopd/config.go +++ b/loopd/config.go @@ -42,11 +42,13 @@ var ( LoopDirBase, DefaultNetwork, defaultSqliteDatabaseFileName, ) - defaultMaxLogFiles = 3 - defaultMaxLogFileSize = 10 - defaultLoopOutMaxParts = uint32(5) - defaultTotalPaymentTimeout = time.Minute * 60 - defaultMaxPaymentRetries = 3 + defaultMaxLogFiles = 3 + defaultMaxLogFileSize = 10 + defaultLoopOutMaxParts = uint32(5) + defaultTotalPaymentTimeout = time.Minute * 60 + defaultMaxPaymentRetries = 3 + defaultMaxStaticAddrHtlcFeePercentage = 0.2 + defaultMaxStaticAddrHtlcBackupFeePercentage = 0.5 // defaultRPCBatchSize is the default batch size to use for RPC calls // we make to LND during migrations. If operations on the LND side are @@ -183,6 +185,9 @@ type Config struct { TotalPaymentTimeout time.Duration `long:"totalpaymenttimeout" description:"The timeout to use for off-chain payments."` MaxPaymentRetries int `long:"maxpaymentretries" description:"The maximum number of times an off-chain payment may be retried."` + MaxStaticAddrHtlcFeePercentage float64 `long:"maxstaticaddrhtlcfeepercentage" description:"The maximum fee percentage that the server can charge for the htlc tx."` + MaxStaticAddrHtlcBackupFeePercentage float64 `long:"maxstaticaddrhtlcbackupfeepercentage" description:"The maximum fee percentage that the server can charge for the htlc backup tx. The backup transaction is only used in rare cases when the regular htlc tx is not confirmed on time. These backup transactions refer to high fee or extremely high fee transactions in the API."` + EnableExperimental bool `long:"experimental" description:"Enable experimental features: reservations"` MigrationRPCBatchSize int `long:"migrationrpcbatchsize" description:"The RPC batch size to use during migrations."` @@ -216,21 +221,23 @@ func DefaultConfig() Config { Sqlite: &loopdb.SqliteConfig{ DatabaseFileName: defaultSqliteDatabasePath, }, - LogDir: defaultLogDir, - MaxLogFiles: defaultMaxLogFiles, - MaxLogFileSize: defaultMaxLogFileSize, - DebugLevel: defaultLogLevel, - TLSCertPath: DefaultTLSCertPath, - TLSKeyPath: DefaultTLSKeyPath, - TLSValidity: DefaultAutogenValidity, - MacaroonPath: DefaultMacaroonPath, - MaxL402Cost: l402.DefaultMaxCostSats, - MaxL402Fee: l402.DefaultMaxRoutingFeeSats, - LoopOutMaxParts: defaultLoopOutMaxParts, - TotalPaymentTimeout: defaultTotalPaymentTimeout, - MaxPaymentRetries: defaultMaxPaymentRetries, - EnableExperimental: false, - MigrationRPCBatchSize: defaultRPCBatchSize, + LogDir: defaultLogDir, + MaxLogFiles: defaultMaxLogFiles, + MaxLogFileSize: defaultMaxLogFileSize, + DebugLevel: defaultLogLevel, + TLSCertPath: DefaultTLSCertPath, + TLSKeyPath: DefaultTLSKeyPath, + TLSValidity: DefaultAutogenValidity, + MacaroonPath: DefaultMacaroonPath, + MaxL402Cost: l402.DefaultMaxCostSats, + MaxL402Fee: l402.DefaultMaxRoutingFeeSats, + LoopOutMaxParts: defaultLoopOutMaxParts, + TotalPaymentTimeout: defaultTotalPaymentTimeout, + MaxPaymentRetries: defaultMaxPaymentRetries, + MaxStaticAddrHtlcFeePercentage: defaultMaxStaticAddrHtlcFeePercentage, + MaxStaticAddrHtlcBackupFeePercentage: defaultMaxStaticAddrHtlcBackupFeePercentage, + EnableExperimental: false, + MigrationRPCBatchSize: defaultRPCBatchSize, Lnd: &lndConfig{ Host: "localhost:10009", MacaroonPath: DefaultLndMacaroonPath, diff --git a/loopd/utils.go b/loopd/utils.go index e6c7547f4..2aa4083a2 100644 --- a/loopd/utils.go +++ b/loopd/utils.go @@ -40,16 +40,18 @@ func getClient(cfg *Config, swapDb loopdb.SwapStore, } clientConfig := &loop.ClientConfig{ - ServerAddress: cfg.Server.Host, - ProxyAddress: cfg.Server.Proxy, - SwapServerNoTLS: cfg.Server.NoTLS, - TLSPathServer: cfg.Server.TLSPath, - Lnd: lnd, - MaxL402Cost: btcutil.Amount(cfg.MaxL402Cost), - MaxL402Fee: btcutil.Amount(cfg.MaxL402Fee), - LoopOutMaxParts: cfg.LoopOutMaxParts, - TotalPaymentTimeout: cfg.TotalPaymentTimeout, - MaxPaymentRetries: cfg.MaxPaymentRetries, + ServerAddress: cfg.Server.Host, + ProxyAddress: cfg.Server.Proxy, + SwapServerNoTLS: cfg.Server.NoTLS, + TLSPathServer: cfg.Server.TLSPath, + Lnd: lnd, + MaxL402Cost: btcutil.Amount(cfg.MaxL402Cost), + MaxL402Fee: btcutil.Amount(cfg.MaxL402Fee), + LoopOutMaxParts: cfg.LoopOutMaxParts, + TotalPaymentTimeout: cfg.TotalPaymentTimeout, + MaxPaymentRetries: cfg.MaxPaymentRetries, + MaxStaticAddrHtlcFeePercentage: cfg.MaxStaticAddrHtlcFeePercentage, + MaxStaticAddrHtlcBackupFeePercentage: cfg.MaxStaticAddrHtlcBackupFeePercentage, } if cfg.MaxL402Cost == defaultCost && cfg.MaxLSATCost != 0 { From e72d40b6306e4b1790cdd35f9020ba8ffd9fe8ba Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 30 Oct 2024 13:21:21 +0100 Subject: [PATCH 47/67] staticaddr: loopin --- staticaddr/loopin/loopin.go | 590 ++++++++++++++++++++++++++++++++++++ 1 file changed, 590 insertions(+) create mode 100644 staticaddr/loopin/loopin.go diff --git a/staticaddr/loopin/loopin.go b/staticaddr/loopin/loopin.go new file mode 100644 index 000000000..4318c4b6e --- /dev/null +++ b/staticaddr/loopin/loopin.go @@ -0,0 +1,590 @@ +package loopin + +import ( + "context" + "errors" + "fmt" + "reflect" + "sync" + "time" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/staticaddr/version" + "github.com/lightninglabs/loop/swap" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lntypes" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" + "github.com/lightningnetwork/lnd/zpay32" +) + +// StaticAddressLoopIn represents the in-memory loop-in information. +type StaticAddressLoopIn struct { + // SwapHash is the hashed preimage of the swap invoice. It represents + // the primary identifier of the swap. + SwapHash lntypes.Hash + + // SwapPreimage is the preimage that is used for the swap. + SwapPreimage lntypes.Preimage + + // HtlcCltvExpiry is the expiry of the swap. + HtlcCltvExpiry int32 + + // MaxSwapFee is the swap fee in sats that the user accepted when + // initiating the swap. It is the upper limit for the QuotedSwapFee. + MaxSwapFee btcutil.Amount + + // InitiationHeight is the height at which the swap was initiated. + InitiationHeight uint32 + + // InitiationTime is the time at which the swap was initiated. + InitiationTime time.Time + + // ProtocolVersion is the protocol version of the static address. + ProtocolVersion version.AddressProtocolVersion + + // Label contains an optional label for the swap. + Label string + + // Htlc key fields. + + // ClientPubkey is the pubkey of the client that is used for the swap. + ClientPubkey *btcec.PublicKey + + // ServerPubkey is the pubkey of the server that is used for the swap. + ServerPubkey *btcec.PublicKey + + // HtlcKeyLocator is the locator of the server's htlc key. + HtlcKeyLocator keychain.KeyLocator + + // Static address loop-in fields. + + // SwapInvoice is the invoice that needs to be paid by the server to + // complete the loop-in swap. + SwapInvoice string + + // LastHop is an optional parameter that specifies the last hop to be + // used for a loop in swap. + LastHop []byte + + // The swap payment timeout allows the user to specify an upper limit + // for the amount of time the server is allowed to take to fulfill the + // off-chain swap payment. If the timeout is reached the swap will be + // aborted on the server side and the client can retry the swap with + // different parameters. + PaymentTimeoutSeconds uint32 + + // QuotedSwapFee is the swap fee in sats that the server returned in the + // swap quote. + QuotedSwapFee btcutil.Amount + + // The outpoints in the format txid:vout that are part of the loop-in + // swap. + DepositOutpoints []string + + // state is the current state of the swap. + state fsm.StateType + + // Non-persistent convenience fields. + + // Initiator is an optional identification string that will be appended + // to the user agent string sent to the server to give information about + // the usage of loop. This initiator part is meant for user interfaces + // to add their name to give the full picture of the binary used + // (loopd, lit) and the method used for triggering the swap + // (loop cli, autolooper, lit ui, other 3rd party ui). + Initiator string + + // Private indicates whether the destination node should be considered + // private. In which case, loop will generate hop hints to assist with + // probing and payment. + Private bool + + // Optional route hints to reach the destination through private + // channels. + RouteHints [][]zpay32.HopHint + + // Deposits are the deposits that are part of the loop-in swap. They + // implicitly carry the swap amount. + Deposits []*deposit.Deposit + + // AddressParams are the parameters of the address that is used for the + // swap. + AddressParams *address.Parameters + + // Address is the address script that is used for the swap. + Address *script.StaticAddress + + // HTLC fields. + + // HtlcTxFeeRate is the fee rate that is used for the htlc transaction. + HtlcTxFeeRate chainfee.SatPerKWeight + + // HtlcTxHighFeeRate is the fee rate that is used for the htlc + // transaction. + HtlcTxHighFeeRate chainfee.SatPerKWeight + + // HtlcTxExtremelyHighFeeRate is the fee rate that is used for the htlc + // transaction. + HtlcTxExtremelyHighFeeRate chainfee.SatPerKWeight + + // HtlcTimeoutSweepTxHash is the hash of the htlc timeout sweep tx. + HtlcTimeoutSweepTxHash *chainhash.Hash + + // HtlcTimeoutSweepAddress + HtlcTimeoutSweepAddress btcutil.Address + + mu sync.Mutex +} + +func (l *StaticAddressLoopIn) getHtlc(chainParams *chaincfg.Params) (*swap.Htlc, + error) { + + return swap.NewHtlcV2( + l.HtlcCltvExpiry, pubkeyTo33ByteSlice(l.ClientPubkey), + pubkeyTo33ByteSlice(l.ServerPubkey), l.SwapHash, chainParams, + ) +} + +// createMusig2Sessions creates a musig2 session for a number of deposits. +func (l *StaticAddressLoopIn) createMusig2Sessions(ctx context.Context, + signer lndclient.SignerClient) ([]*input.MuSig2SessionInfo, [][]byte, + error) { + + musig2Sessions := make([]*input.MuSig2SessionInfo, len(l.Deposits)) + clientNonces := make([][]byte, len(l.Deposits)) + + // Create the sessions and nonces from the deposits. + for i := 0; i < len(l.Deposits); i++ { + session, err := l.createMusig2Session(ctx, signer) + if err != nil { + return nil, nil, err + } + + musig2Sessions[i] = session + clientNonces[i] = session.PublicNonce[:] + } + + return musig2Sessions, clientNonces, nil +} + +// Musig2CreateSession creates a musig2 session for the deposit. +func (l *StaticAddressLoopIn) createMusig2Session(ctx context.Context, + signer lndclient.SignerClient) (*input.MuSig2SessionInfo, error) { + + signers := [][]byte{ + l.AddressParams.ClientPubkey.SerializeCompressed(), + l.AddressParams.ServerPubkey.SerializeCompressed(), + } + + expiryLeaf := l.Address.TimeoutLeaf + + rootHash := expiryLeaf.TapHash() + + return signer.MuSig2CreateSession( + ctx, input.MuSig2Version100RC2, &l.AddressParams.KeyLocator, + signers, lndclient.MuSig2TaprootTweakOpt(rootHash[:], false), + ) +} + +// createSweeplessSweepTx creates the sweepless sweep transaction that the +// server wishes to publish. It spends the deposit outpoints to a +// server-specified sweep address. +func (l *StaticAddressLoopIn) createSweeplessSweepTx(address btcutil.Address, + feeRate chainfee.SatPerKWeight) (*wire.MsgTx, error) { + // Create the tx. + msgTx := wire.NewMsgTx(2) + + // Add the deposit inputs to the transaction in the order the server + // signed them. + outpoints := l.Outpoints() + for _, outpoint := range outpoints { + msgTx.AddTxIn(&wire.TxIn{ + PreviousOutPoint: outpoint, + }) + } + + // Calculate tx fee for the server provided fee rate. + weight, err := sweeplessSweepWeight(len(outpoints), address) + if err != nil { + return nil, err + } + fee := feeRate.FeeForWeight(weight) + + pkscript, err := txscript.PayToAddrScript(address) + if err != nil { + return nil, err + } + + // Create the sweep output. + sweepOutput := &wire.TxOut{ + Value: int64(l.TotalDepositAmount()) - int64(fee), + PkScript: pkscript, + } + + msgTx.AddTxOut(sweepOutput) + + return msgTx, nil +} + +// sweeplessSweepWeight returns weight units for a sweepless sweep transaction +// with N taproot inputs and one sweep output. +func sweeplessSweepWeight(numInputs int, + sweepAddress btcutil.Address) (lntypes.WeightUnit, error) { + + var weightEstimator input.TxWeightEstimator + for i := 0; i < numInputs; i++ { + weightEstimator.AddTaprootKeySpendInput( + txscript.SigHashDefault, + ) + } + + // Get the weight of the sweep output. + switch sweepAddress.(type) { + case *btcutil.AddressWitnessPubKeyHash: + weightEstimator.AddP2WKHOutput() + + case *btcutil.AddressTaproot: + weightEstimator.AddP2TROutput() + + default: + return 0, fmt.Errorf("invalid sweep address type %T", + sweepAddress) + } + + return weightEstimator.Weight(), nil +} + +// signMusig2Tx adds the server nonces to the musig2 sessions and signs the +// transaction. +func (l *StaticAddressLoopIn) signMusig2Tx(ctx context.Context, + tx *wire.MsgTx, signer lndclient.SignerClient, + musig2sessions []*input.MuSig2SessionInfo, + counterPartyNonces [][musig2.PubNonceSize]byte) ([][]byte, error) { + + prevOuts, err := l.toPrevOuts(l.Deposits, l.AddressParams.PkScript) + if err != nil { + return nil, err + } + prevOutFetcher := txscript.NewMultiPrevOutFetcher(prevOuts) + + outpoints := l.Outpoints() + sigHashes := txscript.NewTxSigHashes(tx, prevOutFetcher) + sigs := make([][]byte, len(outpoints)) + + for idx, outpoint := range outpoints { + if !reflect.DeepEqual(tx.TxIn[idx].PreviousOutPoint, + outpoint) { + + return nil, fmt.Errorf("tx input does not match " + + "deposits") + } + + taprootSigHash, err := txscript.CalcTaprootSignatureHash( + sigHashes, txscript.SigHashDefault, tx, idx, + prevOutFetcher, + ) + if err != nil { + return nil, err + } + + var digest [32]byte + copy(digest[:], taprootSigHash) + + // Register the server's nonce before attempting to create our + // partial signature. + haveAllNonces, err := signer.MuSig2RegisterNonces( + ctx, musig2sessions[idx].SessionID, + [][musig2.PubNonceSize]byte{counterPartyNonces[idx]}, + ) + if err != nil { + return nil, err + } + + // Sanity check that we have all the nonces. + if !haveAllNonces { + return nil, fmt.Errorf("invalid MuSig2 session: " + + "nonces missing") + } + + // Since our MuSig2 session has all nonces, we can now create + // the local partial signature by signing the sig hash. + sig, err := signer.MuSig2Sign( + ctx, musig2sessions[idx].SessionID, digest, false, + ) + if err != nil { + return nil, err + } + + sigs[idx] = sig + } + + return sigs, nil +} + +// createHtlcTx creates the transaction that spend the deposit outpoints into +// a htlc outpoint. +func (l *StaticAddressLoopIn) createHtlcTx(chainParams *chaincfg.Params, + feeRate chainfee.SatPerKWeight, maxFeePercentage float64) (*wire.MsgTx, + error) { + + // First Create the tx. + msgTx := wire.NewMsgTx(2) + + // Add the deposit inputs to the transaction in the order the server + // signed them. + outpoints := l.Outpoints() + for _, outpoint := range outpoints { + msgTx.AddTxIn(&wire.TxIn{ + PreviousOutPoint: outpoint, + }) + } + + // Calculate htlc tx fee for server provided fee rate. + weight := l.htlcWeight() + fee := feeRate.FeeForWeight(weight) + + // Check if the server breaches our fee limits. + amt := float64(l.TotalDepositAmount()) + feeLimit := btcutil.Amount(amt * maxFeePercentage) + + if fee > feeLimit { + return nil, fmt.Errorf("htlc tx fee %v exceeds max fee %v", + fee, feeLimit) + } + + htlc, err := l.getHtlc(chainParams) + if err != nil { + return nil, err + } + + pkscript, err := txscript.PayToAddrScript(htlc.Address) + if err != nil { + return nil, err + } + + // Create the sweep output + sweepOutput := &wire.TxOut{ + Value: int64(l.TotalDepositAmount()) - int64(fee), + PkScript: pkscript, + } + + msgTx.AddTxOut(sweepOutput) + + return msgTx, nil +} + +// isHtlcTimedOut returns true if the htlc's cltv expiry is reached. In this +// case the client is able to broadcast a timeout refund transaction that can be +// included in blocks greater than height. +func (l *StaticAddressLoopIn) isHtlcTimedOut(height int32) bool { + return height >= l.HtlcCltvExpiry +} + +// htlcWeight returns the weight for the htlc transaction. +func (l *StaticAddressLoopIn) htlcWeight() lntypes.WeightUnit { + var weightEstimator input.TxWeightEstimator + for i := 0; i < len(l.Deposits); i++ { + weightEstimator.AddTaprootKeySpendInput( + txscript.SigHashDefault, + ) + } + + weightEstimator.AddP2WSHOutput() + + return weightEstimator.Weight() +} + +// createHtlcSweepTx creates the htlc sweep transaction for the timeout path of +// the loop-in htlc. +func (l *StaticAddressLoopIn) createHtlcSweepTx(ctx context.Context, + signer lndclient.SignerClient, sweepAddress btcutil.Address, + feeRate chainfee.SatPerKWeight, network *chaincfg.Params, + blockHeight uint32, maxFeePercentage float64) (*wire.MsgTx, error) { + + if network == nil { + return nil, errors.New("no network provided") + } + + htlc, err := l.getHtlc(network) + if err != nil { + return nil, err + } + + // Create the sweep transaction. + sweepTx := wire.NewMsgTx(2) + sweepTx.LockTime = blockHeight + + var weightEstimator input.TxWeightEstimator + weightEstimator.AddP2TROutput() + + err = htlc.AddSuccessToEstimator(&weightEstimator) + if err != nil { + return nil, err + } + + htlcTx, err := l.createHtlcTx( + network, l.HtlcTxFeeRate, maxFeePercentage, + ) + if err != nil { + return nil, err + } + + // Add the htlc input. + sweepTx.AddTxIn(&wire.TxIn{ + PreviousOutPoint: wire.OutPoint{ + Hash: htlcTx.TxHash(), + Index: 0, + }, + SignatureScript: htlc.SigScript, + Sequence: htlc.SuccessSequence(), + }) + + // Add the sweep output. + sweepPkScript, err := txscript.PayToAddrScript(sweepAddress) + if err != nil { + return nil, err + } + + fee := feeRate.FeeForWeight(weightEstimator.Weight()) + + htlcOutValue := htlcTx.TxOut[0].Value + output := &wire.TxOut{ + Value: htlcOutValue - int64(fee), + PkScript: sweepPkScript, + } + + sweepTx.AddTxOut(output) + + signDesc := lndclient.SignDescriptor{ + WitnessScript: htlc.TimeoutScript(), + Output: &wire.TxOut{ + Value: htlcOutValue, + PkScript: htlc.PkScript, + }, + HashType: htlc.SigHash(), + InputIndex: 0, + KeyDesc: keychain.KeyDescriptor{ + KeyLocator: l.HtlcKeyLocator, + }, + } + signDesc.SignMethod = input.WitnessV0SignMethod + + rawSigs, err := signer.SignOutputRaw( + ctx, sweepTx, []*lndclient.SignDescriptor{&signDesc}, nil, + ) + if err != nil { + return nil, fmt.Errorf("sign output error: %w", err) + } + sig := rawSigs[0] + + // Add witness stack to the tx input. + sweepTx.TxIn[0].Witness, err = htlc.GenTimeoutWitness(sig) + if err != nil { + return nil, err + } + + return sweepTx, nil +} + +// pubkeyTo33ByteSlice converts a pubkey to a 33 byte slice. +func pubkeyTo33ByteSlice(pubkey *btcec.PublicKey) [33]byte { + var pubkeyBytes [33]byte + copy(pubkeyBytes[:], pubkey.SerializeCompressed()) + + return pubkeyBytes +} + +// TotalDepositAmount returns the total amount of the deposits. +func (l *StaticAddressLoopIn) TotalDepositAmount() btcutil.Amount { + var total btcutil.Amount + if len(l.Deposits) == 0 { + return total + } + + for _, d := range l.Deposits { + total += d.Value + } + return total +} + +// RemainingPaymentTimeSeconds returns the remaining time in seconds until the +// payment timeout is reached. The remaining time is calculated from the +// initiation time of the swap. If more than the swaps configured payment +// timeout has passed, the remaining time will be negative. +func (l *StaticAddressLoopIn) RemainingPaymentTimeSeconds() int64 { + elapsedSinceInitiation := time.Since(l.InitiationTime).Seconds() + + return int64(l.PaymentTimeoutSeconds) - int64(elapsedSinceInitiation) +} + +// Outpoints returns the wire outpoints of the deposits. +func (l *StaticAddressLoopIn) Outpoints() []wire.OutPoint { + outpoints := make([]wire.OutPoint, len(l.Deposits)) + for i, d := range l.Deposits { + outpoints[i] = wire.OutPoint{ + Hash: d.Hash, + Index: d.Index, + } + } + + return outpoints +} + +func (l *StaticAddressLoopIn) toPrevOuts(deposits []*deposit.Deposit, + pkScript []byte) (map[wire.OutPoint]*wire.TxOut, error) { + + prevOuts := make(map[wire.OutPoint]*wire.TxOut, len(deposits)) + for _, d := range deposits { + outpoint := wire.OutPoint{ + Hash: d.Hash, + Index: d.Index, + } + txOut := &wire.TxOut{ + Value: int64(d.Value), + PkScript: pkScript, + } + if _, ok := prevOuts[outpoint]; ok { + return nil, fmt.Errorf("duplicate outpoint %v", + outpoint) + } + prevOuts[outpoint] = txOut + } + + return prevOuts, nil +} + +// GetState returns the current state of the loop-in swap. +func (l *StaticAddressLoopIn) GetState() fsm.StateType { + l.mu.Lock() + defer l.mu.Unlock() + + return l.state +} + +// SetState sets the current state of the loop-in swap. +func (l *StaticAddressLoopIn) SetState(state fsm.StateType) { + l.mu.Lock() + defer l.mu.Unlock() + + l.state = state +} + +// IsInState returns true if the deposit is in the given state. +func (l *StaticAddressLoopIn) IsInState(state fsm.StateType) bool { + l.mu.Lock() + defer l.mu.Unlock() + + return l.state == state +} From 32690c521aa45de0fcddb26e1b638b0932a4e4ac Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Wed, 30 Oct 2024 13:20:52 +0100 Subject: [PATCH 48/67] staticaddr: sql_store --- staticaddr/loopin/sql_store.go | 370 +++++++++++++++++++++++++++++++++ 1 file changed, 370 insertions(+) create mode 100644 staticaddr/loopin/sql_store.go diff --git a/staticaddr/loopin/sql_store.go b/staticaddr/loopin/sql_store.go new file mode 100644 index 000000000..06caae632 --- /dev/null +++ b/staticaddr/loopin/sql_store.go @@ -0,0 +1,370 @@ +package loopin + +import ( + "context" + "database/sql" + "errors" + "strings" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/loopdb" + "github.com/lightninglabs/loop/loopdb/sqlc" + "github.com/lightninglabs/loop/staticaddr/version" + "github.com/lightningnetwork/lnd/clock" + "github.com/lightningnetwork/lnd/keychain" + "github.com/lightningnetwork/lnd/lntypes" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" +) + +const outpointSeparator = ";" + +var ( + // ErrInvalidOutpoint is returned when an outpoint contains the outpoint + // separator. + ErrInvalidOutpoint = errors.New("outpoint contains outpoint separator") +) + +// Querier is the interface that contains all the queries generated by sqlc for +// the static_address_swaps table. +type Querier interface { + // InsertSwap inserts a new base swap. + InsertSwap(ctx context.Context, arg sqlc.InsertSwapParams) error + + // InsertHtlcKeys inserts the htlc keys for a swap. + InsertHtlcKeys(ctx context.Context, arg sqlc.InsertHtlcKeysParams) error + + // InsertStaticAddressLoopIn inserts a new static address loop-in swap. + InsertStaticAddressLoopIn(ctx context.Context, + arg sqlc.InsertStaticAddressLoopInParams) error + + // InsertStaticAddressMetaUpdate inserts metadata about loop-in + // updates. + InsertStaticAddressMetaUpdate(ctx context.Context, + arg sqlc.InsertStaticAddressMetaUpdateParams) error + + // UpdateStaticAddressLoopIn updates a loop-in swap. + UpdateStaticAddressLoopIn(ctx context.Context, + arg sqlc.UpdateStaticAddressLoopInParams) error + + // GetStaticAddressLoopInSwap retrieves a loop-in swap by its swap hash. + GetStaticAddressLoopInSwap(ctx context.Context, + swapHash []byte) (sqlc.GetStaticAddressLoopInSwapRow, error) + + // GetStaticAddressLoopInSwapsByStates retrieves all swaps with the + // given states. The states string is an input for the IN primitive in + // sqlite, hence the format needs to be '{State1,State2,...}'. + GetStaticAddressLoopInSwapsByStates(ctx context.Context, + states sql.NullString) ([]sqlc.GetStaticAddressLoopInSwapsByStatesRow, + error) + + // GetLoopInSwapUpdates retrieves all updates for a loop-in swap. + GetLoopInSwapUpdates(ctx context.Context, + swapHash []byte) ([]sqlc.StaticAddressSwapUpdate, error) + + // IsStored returns true if a swap with the given hash is stored in the + // database, false otherwise. + IsStored(ctx context.Context, swapHash []byte) (bool, error) +} + +// BaseDB is the interface that contains all the queries generated by sqlc for +// the static_address_swaps table and transaction functionality. +type BaseDB interface { + Querier + + // ExecTx allows for executing a function in the context of a database + // transaction. + ExecTx(ctx context.Context, txOptions loopdb.TxOptions, + txBody func(Querier) error) error +} + +// SqlStore is the backing store for static address loop-ins. +type SqlStore struct { + baseDB BaseDB + clock clock.Clock + network *chaincfg.Params +} + +// NewSqlStore constructs a new SQLStore from a BaseDB. The BaseDB is agnostic +// to the underlying driver which can be postgres or sqlite. +func NewSqlStore(db BaseDB, clock clock.Clock, + network *chaincfg.Params) *SqlStore { + + return &SqlStore{ + baseDB: db, + clock: clock, + network: network, + } +} + +// GetStaticAddressLoopInSwapsByStates returns all static address loop-ins from +// the db that are in the given states. +func (s *SqlStore) GetStaticAddressLoopInSwapsByStates(ctx context.Context, + states []fsm.StateType) ([]*StaticAddressLoopIn, error) { + + var ( + err error + rows []sqlc.GetStaticAddressLoopInSwapsByStatesRow + updates []sqlc.StaticAddressSwapUpdate + loopIn *StaticAddressLoopIn + ) + joinedStates := toJointStringStates(states) + joinedNullStringStates := sql.NullString{ + String: joinedStates, + Valid: joinedStates != "", + } + rows, err = s.baseDB.GetStaticAddressLoopInSwapsByStates( + ctx, joinedNullStringStates, + ) + if err != nil { + return nil, err + } + + loopIns := make([]*StaticAddressLoopIn, 0, len(rows)) + for _, row := range rows { + updates, err = s.baseDB.GetLoopInSwapUpdates( + ctx, row.SwapHash, + ) + if err != nil { + return nil, err + } + + loopIn, err = toStaticAddressLoopIn( + ctx, s.network, sqlc.GetStaticAddressLoopInSwapRow(row), + updates, + ) + if err != nil { + return nil, err + } + + loopIns = append(loopIns, loopIn) + } + + return loopIns, nil +} + +func toJointStringStates(states []fsm.StateType) string { + return "{" + strings.Join(toStrings(states), ",") + "}" +} + +func toStrings(states []fsm.StateType) []string { + stringStates := make([]string, len(states)) + for i, state := range states { + stringStates[i] = string(state) + } + + return stringStates +} + +// CreateLoopIn inserts a new loop-in swap into the database. Basic loop-in +// parameters are stored in the swaps table, htlc key information is stored in +// the htlc_keys table, and loop-in specific information is stored in the +// static_address_swaps table. +func (s *SqlStore) CreateLoopIn(ctx context.Context, + loopIn *StaticAddressLoopIn) error { + + swapArgs := sqlc.InsertSwapParams{ + SwapHash: loopIn.SwapHash[:], + Preimage: loopIn.SwapPreimage[:], + InitiationTime: loopIn.InitiationTime, + AmountRequested: int64(loopIn.TotalDepositAmount()), + CltvExpiry: loopIn.HtlcCltvExpiry, + MaxSwapFee: int64(loopIn.MaxSwapFee), + InitiationHeight: int32(loopIn.InitiationHeight), + ProtocolVersion: int32(loopIn.ProtocolVersion), + Label: loopIn.Label, + } + + htlcKeyArgs := sqlc.InsertHtlcKeysParams{ + SwapHash: loopIn.SwapHash[:], + SenderScriptPubkey: loopIn.ClientPubkey.SerializeCompressed(), + ReceiverScriptPubkey: loopIn.ServerPubkey.SerializeCompressed(), + ClientKeyFamily: int32(loopIn.HtlcKeyLocator.Family), + ClientKeyIndex: int32(loopIn.HtlcKeyLocator.Index), + } + + // Sanity check, if any of the outpoints contain the outpoint separator. + // If so, we reject the loop-in to prevent potential issues with + // parsing. + for _, outpoint := range loopIn.DepositOutpoints { + if strings.Contains(outpoint, outpointSeparator) { + return ErrInvalidOutpoint + } + } + + joinedOutpoints := strings.Join( + loopIn.DepositOutpoints, outpointSeparator, + ) + staticAddressLoopInParams := sqlc.InsertStaticAddressLoopInParams{ + SwapHash: loopIn.SwapHash[:], + SwapInvoice: loopIn.SwapInvoice, + LastHop: loopIn.LastHop, + QuotedSwapFeeSatoshis: int64(loopIn.QuotedSwapFee), + HtlcTimeoutSweepAddress: loopIn.HtlcTimeoutSweepAddress.String(), + HtlcTxFeeRateSatKw: int64(loopIn.HtlcTxFeeRate), + DepositOutpoints: joinedOutpoints, + PaymentTimeoutSeconds: int32(loopIn.PaymentTimeoutSeconds), + } + + updateArgs := sqlc.InsertStaticAddressMetaUpdateParams{ + SwapHash: loopIn.SwapHash[:], + UpdateTimestamp: s.clock.Now(), + UpdateState: string(loopIn.GetState()), + } + + return s.baseDB.ExecTx(ctx, loopdb.NewSqlWriteOpts(), + func(q Querier) error { + err := q.InsertSwap(ctx, swapArgs) + if err != nil { + return err + } + + err = q.InsertHtlcKeys(ctx, htlcKeyArgs) + if err != nil { + return err + } + + err = q.InsertStaticAddressLoopIn( + ctx, staticAddressLoopInParams, + ) + if err != nil { + return err + } + + return q.InsertStaticAddressMetaUpdate(ctx, updateArgs) + }) +} + +// UpdateLoopIn updates the loop-in in the database. +func (s *SqlStore) UpdateLoopIn(ctx context.Context, + loopIn *StaticAddressLoopIn) error { + + var htlcTimeoutSweepTxID string + if loopIn.HtlcTimeoutSweepTxHash != nil { + htlcTimeoutSweepTxID = loopIn.HtlcTimeoutSweepTxHash.String() + } + + updateParams := sqlc.UpdateStaticAddressLoopInParams{ + SwapHash: loopIn.SwapHash[:], + HtlcTxFeeRateSatKw: int64(loopIn.HtlcTxFeeRate), + HtlcTimeoutSweepTxID: sql.NullString{ + String: htlcTimeoutSweepTxID, + Valid: htlcTimeoutSweepTxID != "", + }, + } + + updateArgs := sqlc.InsertStaticAddressMetaUpdateParams{ + SwapHash: loopIn.SwapHash[:], + UpdateState: string(loopIn.GetState()), + UpdateTimestamp: s.clock.Now(), + } + + return s.baseDB.ExecTx(ctx, loopdb.NewSqlWriteOpts(), + func(q Querier) error { + err := q.UpdateStaticAddressLoopIn(ctx, updateParams) + if err != nil { + return err + } + + return q.InsertStaticAddressMetaUpdate(ctx, updateArgs) + }, + ) +} + +// IsStored returns true if a swap with the given hash is stored in the +// database, false otherwise. +func (s *SqlStore) IsStored(ctx context.Context, swapHash lntypes.Hash) (bool, + error) { + + return s.baseDB.IsStored(ctx, swapHash[:]) +} + +// toStaticAddressLoopIn converts sql rows to an instant out struct. +func toStaticAddressLoopIn(_ context.Context, network *chaincfg.Params, + row sqlc.GetStaticAddressLoopInSwapRow, + updates []sqlc.StaticAddressSwapUpdate) (*StaticAddressLoopIn, error) { + + swapHash, err := lntypes.MakeHash(row.SwapHash) + if err != nil { + return nil, err + } + + swapPreImage, err := lntypes.MakePreimage(row.Preimage) + if err != nil { + return nil, err + } + + clientKey, err := btcec.ParsePubKey(row.SenderScriptPubkey) + if err != nil { + return nil, err + } + + serverKey, err := btcec.ParsePubKey(row.ReceiverScriptPubkey) + if err != nil { + return nil, err + } + + var htlcTimeoutSweepTxHash *chainhash.Hash + if row.HtlcTimeoutSweepTxID.Valid { + htlcTimeoutSweepTxHash, err = chainhash.NewHashFromStr( + row.HtlcTimeoutSweepTxID.String, + ) + if err != nil { + return nil, err + } + } + + depositOutpoints := strings.Split( + row.DepositOutpoints, outpointSeparator, + ) + + timeoutAddressString := row.HtlcTimeoutSweepAddress + var timeoutAddress btcutil.Address + if timeoutAddressString != "" { + timeoutAddress, err = btcutil.DecodeAddress( + timeoutAddressString, network, + ) + if err != nil { + return nil, err + } + } + + loopIn := &StaticAddressLoopIn{ + SwapHash: swapHash, + SwapPreimage: swapPreImage, + HtlcCltvExpiry: row.CltvExpiry, + MaxSwapFee: btcutil.Amount(row.MaxSwapFee), + InitiationHeight: uint32(row.InitiationHeight), + InitiationTime: row.InitiationTime, + ProtocolVersion: version.AddressProtocolVersion( + row.ProtocolVersion, + ), + Label: row.Label, + ClientPubkey: clientKey, + ServerPubkey: serverKey, + HtlcKeyLocator: keychain.KeyLocator{ + Family: keychain.KeyFamily(row.ClientKeyFamily), + Index: uint32(row.ClientKeyIndex), + }, + SwapInvoice: row.SwapInvoice, + PaymentTimeoutSeconds: uint32(row.PaymentTimeoutSeconds), + LastHop: row.LastHop, + QuotedSwapFee: btcutil.Amount(row.QuotedSwapFeeSatoshis), + DepositOutpoints: depositOutpoints, + HtlcTxFeeRate: chainfee.SatPerKWeight( + row.HtlcTxFeeRateSatKw, + ), + HtlcTimeoutSweepAddress: timeoutAddress, + HtlcTimeoutSweepTxHash: htlcTimeoutSweepTxHash, + } + + if len(updates) > 0 { + lastUpdate := updates[len(updates)-1] + loopIn.SetState(fsm.StateType(lastUpdate.UpdateState)) + } + + return loopIn, nil +} From 22b22e01a6ba5868d39ef6c5e6f8b16f0a626d97 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Thu, 24 Oct 2024 12:18:02 +0200 Subject: [PATCH 49/67] staticaddr: swap manager and fsm In this commit we add the static address loop-in state machine and its orchestration through the manager. --- staticaddr/loopin/actions.go | 1069 ++++++++++++++++++++++++++++++++ staticaddr/loopin/fsm.go | 365 +++++++++++ staticaddr/loopin/interface.go | 72 +++ staticaddr/loopin/manager.go | 458 ++++++++++++++ 4 files changed, 1964 insertions(+) create mode 100644 staticaddr/loopin/actions.go create mode 100644 staticaddr/loopin/fsm.go create mode 100644 staticaddr/loopin/interface.go create mode 100644 staticaddr/loopin/manager.go diff --git a/staticaddr/loopin/actions.go b/staticaddr/loopin/actions.go new file mode 100644 index 000000000..48ff03974 --- /dev/null +++ b/staticaddr/loopin/actions.go @@ -0,0 +1,1069 @@ +package loopin + +import ( + "context" + "crypto/rand" + "errors" + "fmt" + "strings" + "time" + + "github.com/btcsuite/btcd/btcec/v2" + "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" + "github.com/btcsuite/btcd/btcutil" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcwallet/chain" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/version" + "github.com/lightninglabs/loop/swap" + looprpc "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightningnetwork/lnd/chainntnfs" + "github.com/lightningnetwork/lnd/input" + "github.com/lightningnetwork/lnd/invoices" + "github.com/lightningnetwork/lnd/lnrpc/invoicesrpc" + "github.com/lightningnetwork/lnd/lnrpc/walletrpc" + "github.com/lightningnetwork/lnd/lntypes" + "github.com/lightningnetwork/lnd/lnwallet" + "github.com/lightningnetwork/lnd/lnwallet/chainfee" + "github.com/lightningnetwork/lnd/lnwire" +) + +const ( + defaultConfTarget = 3 + + DefaultPaymentTimeoutSeconds = 60 +) + +var ( + // ErrFeeTooHigh is returned if the server sets a fee rate for the htlc + // tx that is too high. We prevent here against a low htlc timeout sweep + // amount. + ErrFeeTooHigh = errors.New("server htlc tx fee is higher than the " + + "configured allowed maximum") + + // ErrBackupFeeTooHigh is returned if the server sets a fee rate for the + // htlc backup tx that is too high. We prevent here against a low htlc + // timeout sweep amount. + ErrBackupFeeTooHigh = errors.New("server htlc backup tx fee is " + + "higher than the configured allowed maximum") +) + +// InitHtlcAction is executed if all loop-in information has been validated. We +// assemble a loop-in request and send it to the server. +func (f *FSM) InitHtlcAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + // Lock the deposits and transition them to the LoopingIn state. + err := f.cfg.DepositManager.TransitionDeposits( + ctx, f.loopIn.Deposits, deposit.OnLoopInInitiated, + deposit.LoopingIn, + ) + if err != nil { + err = fmt.Errorf("unable to loop-in deposits: %w", err) + + return f.HandleError(err) + } + + // Calculate the swap invoice amount. The server needs to pay us the + // sum of all deposits minus the fees that the server charges for the + // swap. + swapInvoiceAmt := f.loopIn.TotalDepositAmount() - f.loopIn.QuotedSwapFee + + // Generate random preimage. + var swapPreimage lntypes.Preimage + if _, err = rand.Read(swapPreimage[:]); err != nil { + err = fmt.Errorf("unable to create random swap preimage: %w", + err) + + return f.HandleError(err) + } + f.loopIn.SwapPreimage = swapPreimage + f.loopIn.SwapHash = swapPreimage.Hash() + + // Derive a client key for the HTLC. + keyDesc, err := f.cfg.WalletKit.DeriveNextKey( + ctx, swap.StaticAddressKeyFamily, + ) + if err != nil { + err = fmt.Errorf("unable to derive client htlc key: %w", err) + + return f.HandleError(err) + } + f.loopIn.ClientPubkey = keyDesc.PubKey + f.loopIn.HtlcKeyLocator = keyDesc.KeyLocator + + // Create the swap invoice in lnd. + _, swapInvoice, err := f.cfg.LndClient.AddInvoice( + ctx, &invoicesrpc.AddInvoiceData{ + Preimage: &swapPreimage, + Value: lnwire.NewMSatFromSatoshis(swapInvoiceAmt), + Memo: "static address loop-in", + Expiry: 3600 * 24 * 365, + RouteHints: f.loopIn.RouteHints, + }, + ) + if err != nil { + err = fmt.Errorf("unable to create swap invoice: %w", err) + + return f.HandleError(err) + } + f.loopIn.SwapInvoice = swapInvoice + + f.loopIn.ProtocolVersion = version.AddressProtocolVersion( + version.CurrentRPCProtocolVersion(), + ) + + loopInReq := &looprpc.ServerStaticAddressLoopInRequest{ + SwapHash: f.loopIn.SwapHash[:], + DepositOutpoints: f.loopIn.DepositOutpoints, + HtlcClientPubKey: f.loopIn.ClientPubkey.SerializeCompressed(), + SwapInvoice: f.loopIn.SwapInvoice, + ProtocolVersion: version.CurrentRPCProtocolVersion(), + UserAgent: loop.UserAgent(f.loopIn.Initiator), + PaymentTimeoutSeconds: f.loopIn.PaymentTimeoutSeconds, + } + if f.loopIn.LastHop != nil { + loopInReq.LastHop = f.loopIn.LastHop + } + + loopInResp, err := f.cfg.Server.ServerStaticAddressLoopIn( + ctx, loopInReq, + ) + if err != nil { + err = fmt.Errorf("unable to initiate the loop-in with the "+ + "server: %w", err) + + return f.HandleError(err) + } + + // Pushing empty sigs signals the server that we abandoned the swap + // attempt. + pushEmptySigs := func() { + _, err = f.cfg.Server.PushStaticAddressHtlcSigs( + ctx, &looprpc.PushStaticAddressHtlcSigsRequest{ + SwapHash: f.loopIn.SwapHash[:], + }, + ) + if err != nil { + log.Warnf("unable to push htlc tx sigs to server: %w", + err) + } + } + + serverPubkey, err := btcec.ParsePubKey(loopInResp.HtlcServerPubKey) + if err != nil { + pushEmptySigs() + err = fmt.Errorf("unable to parse server pubkey: %w", err) + + return f.HandleError(err) + } + f.loopIn.ServerPubkey = serverPubkey + + // Validate if the response parameters are outside our allowed range + // preventing us from continuing with a swap. + err = f.cfg.ValidateLoopInContract( + int32(f.loopIn.InitiationHeight), loopInResp.HtlcExpiry, + ) + if err != nil { + pushEmptySigs() + err = fmt.Errorf("server response parameters are outside "+ + "our allowed range: %w", err) + + return f.HandleError(err) + } + + f.loopIn.HtlcCltvExpiry = loopInResp.HtlcExpiry + f.htlcServerNonces, err = toNonces(loopInResp.StandardHtlcInfo.Nonces) + if err != nil { + pushEmptySigs() + err = fmt.Errorf("unable to convert server nonces: %w", err) + + return f.HandleError(err) + } + f.htlcServerNoncesHighFee, err = toNonces( + loopInResp.HighFeeHtlcInfo.Nonces, + ) + if err != nil { + pushEmptySigs() + + return f.HandleError(err) + } + f.htlcServerNoncesExtremelyHighFee, err = toNonces( + loopInResp.ExtremeFeeHtlcInfo.Nonces, + ) + if err != nil { + pushEmptySigs() + + return f.HandleError(err) + } + + // We need to defend against the server setting high fees for the htlc + // tx since we might have to sweep the timeout path. We maximally allow + // a configured percentage of the swap value to be spent on fees. + amt := float64(f.loopIn.TotalDepositAmount()) + maxHtlcTxFee := btcutil.Amount(amt * + f.cfg.MaxStaticAddrHtlcFeePercentage) + + maxHtlcTxBackupFee := btcutil.Amount(amt * + f.cfg.MaxStaticAddrHtlcBackupFeePercentage) + + feeRate := chainfee.SatPerKWeight(loopInResp.StandardHtlcInfo.FeeRate) + fee := feeRate.FeeForWeight(f.loopIn.htlcWeight()) + if fee > maxHtlcTxFee { + // Abort the swap by pushing empty sigs to the server. + pushEmptySigs() + + log.Errorf("server htlc tx fee is higher than the configured "+ + "allowed maximum: %v > %v", fee, maxHtlcTxFee) + + return f.HandleError(ErrFeeTooHigh) + } + f.loopIn.HtlcTxFeeRate = feeRate + + highFeeRate := chainfee.SatPerKWeight(loopInResp.HighFeeHtlcInfo.FeeRate) + fee = highFeeRate.FeeForWeight(f.loopIn.htlcWeight()) + if fee > maxHtlcTxBackupFee { + // Abort the swap by pushing empty sigs to the server. + pushEmptySigs() + + log.Errorf("server htlc backup tx fee is higher than the "+ + "configured allowed maximum: %v > %v", fee, + maxHtlcTxBackupFee) + + return f.HandleError(ErrFeeTooHigh) + } + f.loopIn.HtlcTxHighFeeRate = highFeeRate + + extremelyHighFeeRate := chainfee.SatPerKWeight( + loopInResp.ExtremeFeeHtlcInfo.FeeRate, + ) + fee = extremelyHighFeeRate.FeeForWeight(f.loopIn.htlcWeight()) + if fee > maxHtlcTxBackupFee { + // Abort the swap by pushing empty sigs to the server. + pushEmptySigs() + + log.Errorf("server htlc backup tx fee is higher than the "+ + "configured allowed maximum: %v > %v", fee, + maxHtlcTxBackupFee) + + return f.HandleError(ErrFeeTooHigh) + } + f.loopIn.HtlcTxExtremelyHighFeeRate = extremelyHighFeeRate + + // Derive the sweep address for the htlc timeout sweep tx. + sweepAddress, err := f.cfg.WalletKit.NextAddr( + ctx, lnwallet.DefaultAccountName, + walletrpc.AddressType_TAPROOT_PUBKEY, false, + ) + if err != nil { + pushEmptySigs() + err = fmt.Errorf("unable to derive htlc timeout sweep "+ + "address: %w", err) + + return f.HandleError(err) + } + f.loopIn.HtlcTimeoutSweepAddress = sweepAddress + + // Once the htlc tx is initiated, we store the loop-in in the database. + err = f.cfg.Store.CreateLoopIn(ctx, f.loopIn) + if err != nil { + pushEmptySigs() + err = fmt.Errorf("unable to store loop-in in db: %w", err) + + return f.HandleError(err) + } + + return OnHtlcInitiated +} + +// SignHtlcTxAction is called if the htlc was initialized and the server +// provided the necessary information to construct the htlc tx. We sign the htlc +// tx and send the signatures to the server. +func (f *FSM) SignHtlcTxAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + var err error + + f.loopIn.AddressParams, err = + f.cfg.AddressManager.GetStaticAddressParameters(ctx) + + if err != nil { + err = fmt.Errorf("unable to get static address parameters: "+ + "%w", err) + + return f.HandleError(err) + } + + f.loopIn.Address, err = f.cfg.AddressManager.GetStaticAddress(ctx) + if err != nil { + err = fmt.Errorf("unable to get static address: %w", err) + + return f.HandleError(err) + } + + // Create a musig2 session for each deposit and different htlc tx fee + // rates. + createSession := f.loopIn.createMusig2Sessions + htlcSessions, clientHtlcNonces, err := createSession(ctx, f.cfg.Signer) + if err != nil { + err = fmt.Errorf("unable to create musig2 sessions: %w", err) + + return f.HandleError(err) + } + defer f.cleanUpSessions(ctx, htlcSessions) + + htlcSessionsHighFee, highFeeNonces, err := createSession( + ctx, f.cfg.Signer, + ) + if err != nil { + return f.HandleError(err) + } + defer f.cleanUpSessions(ctx, htlcSessionsHighFee) + + htlcSessionsExtremelyHighFee, extremelyHighNonces, err := createSession( + ctx, f.cfg.Signer, + ) + if err != nil { + err = fmt.Errorf("unable to convert nonces: %w", err) + return f.HandleError(err) + } + defer f.cleanUpSessions(ctx, htlcSessionsExtremelyHighFee) + + // Create the htlc txns for different fee rates. + htlcTx, err := f.loopIn.createHtlcTx( + f.cfg.ChainParams, f.loopIn.HtlcTxFeeRate, + f.cfg.MaxStaticAddrHtlcFeePercentage, + ) + if err != nil { + return f.HandleError(err) + } + htlcTxHighFee, err := f.loopIn.createHtlcTx( + f.cfg.ChainParams, f.loopIn.HtlcTxHighFeeRate, + f.cfg.MaxStaticAddrHtlcBackupFeePercentage, + ) + if err != nil { + return f.HandleError(err) + } + htlcTxExtremelyHighFee, err := f.loopIn.createHtlcTx( + f.cfg.ChainParams, f.loopIn.HtlcTxExtremelyHighFeeRate, + f.cfg.MaxStaticAddrHtlcBackupFeePercentage, + ) + if err != nil { + err = fmt.Errorf("unable to create the htlc tx: %w", err) + return f.HandleError(err) + } + + // Next we'll get our htlc tx signatures for different fee rates. + htlcSigs, err := f.loopIn.signMusig2Tx( + ctx, htlcTx, f.cfg.Signer, htlcSessions, f.htlcServerNonces, + ) + if err != nil { + err = fmt.Errorf("unable to sign htlc tx: %w", err) + return f.HandleError(err) + } + + htlcSigsHighFee, err := f.loopIn.signMusig2Tx( + ctx, htlcTxHighFee, f.cfg.Signer, htlcSessionsHighFee, + f.htlcServerNoncesHighFee, + ) + if err != nil { + return f.HandleError(err) + } + htlcSigsExtremelyHighFee, err := f.loopIn.signMusig2Tx( + ctx, htlcTxExtremelyHighFee, f.cfg.Signer, + htlcSessionsExtremelyHighFee, f.htlcServerNoncesExtremelyHighFee, + ) + if err != nil { + return f.HandleError(err) + } + + // Push htlc tx sigs to server. + pushHtlcReq := &looprpc.PushStaticAddressHtlcSigsRequest{ + SwapHash: f.loopIn.SwapHash[:], + StandardHtlcInfo: &looprpc.ClientHtlcSigningInfo{ + Nonces: clientHtlcNonces, + Sigs: htlcSigs, + }, + HighFeeHtlcInfo: &looprpc.ClientHtlcSigningInfo{ + Nonces: highFeeNonces, + Sigs: htlcSigsHighFee, + }, + ExtremeFeeHtlcInfo: &looprpc.ClientHtlcSigningInfo{ + Nonces: extremelyHighNonces, + Sigs: htlcSigsExtremelyHighFee, + }, + } + _, err = f.cfg.Server.PushStaticAddressHtlcSigs(ctx, pushHtlcReq) + if err != nil { + err = fmt.Errorf("unable to push htlc tx sigs to server: %w", + err) + + return f.HandleError(err) + } + + // Note: + // From here on we need to monitor for the htlc tx hitting the chain + // until the invoice is settled because the server can now publish the + // htlc tx without paying the invoice. In this case we need to wait till + // the htlc times out and then sweep it back to us. + return OnHtlcTxSigned +} + +// cleanUpSessions releases allocated memory of the musig2 sessions. +func (f *FSM) cleanUpSessions(ctx context.Context, + sessions []*input.MuSig2SessionInfo) { + + for _, s := range sessions { + err := f.cfg.Signer.MuSig2Cleanup(ctx, s.SessionID) + if err != nil { + f.Warnf("unable to cleanup musig2 session: %v", err) + } + } +} + +// MonitorInvoiceAndHtlcTxAction is called after the htlc tx has been signed by +// us. The server from here on has the ability to publish the htlc tx. If the +// server publishes the htlc tx without paying the invoice, we have to monitor +// for the timeout path and sweep the funds back to us. If, while waiting for +// the htlc timeout, our invoice gets paid, the swap is considered successful, +// and we can stop monitoring the htlc confirmation and continue to sign the +// sweepless sweep. +func (f *FSM) MonitorInvoiceAndHtlcTxAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + // Subscribe to the state of the swap invoice. If upon restart recovery, + // we land here and observe that the invoice is already canceled, it can + // only be the case where a user-provided payment timeout was hit, the + // invoice got canceled and the timeout of the htlc was not reached yet. + // So we want to wait until the htlc timeout path opens up so that we + // could sweep the funds back to us if the server published it without + // paying the invoice. + subscribeCtx, cancelInvoiceSubscription := context.WithCancel(ctx) + defer cancelInvoiceSubscription() + + invoiceUpdateChan, invoiceErrChan, err := + f.cfg.InvoicesClient.SubscribeSingleInvoice( + subscribeCtx, f.loopIn.SwapHash, + ) + if err != nil { + err = fmt.Errorf("unable to subscribe to swap "+ + "invoice: %w", err) + + return f.HandleError(err) + } + + htlc, err := f.loopIn.getHtlc(f.cfg.ChainParams) + if err != nil { + err = fmt.Errorf("unable to get htlc: %w", err) + + return f.HandleError(err) + } + + // Subscribe to htlc tx confirmation. + reorgChan := make(chan struct{}, 1) + registerHtlcConf := func() (chan *chainntnfs.TxConfirmation, chan error, + error) { + + return f.cfg.ChainNotifier.RegisterConfirmationsNtfn( + ctx, nil, htlc.PkScript, defaultConfTarget, + int32(f.loopIn.InitiationHeight), + lndclient.WithReOrgChan(reorgChan), + ) + } + + htlcConfChan, htlcErrConfChan, err := registerHtlcConf() + if err != nil { + err = fmt.Errorf("unable to monitor htlc tx confirmation: %w", + err) + + return f.HandleError(err) + } + + // Subscribe to new blocks. + registerBlocks := f.cfg.ChainNotifier.RegisterBlockEpochNtfn + blockChan, blockChanErr, err := registerBlocks(ctx) + if err != nil { + err = fmt.Errorf("unable to subscribe to new blocks: %w", err) + + return f.HandleError(err) + } + + htlcConfirmed := false + + invoice, err := f.cfg.LndClient.LookupInvoice(ctx, f.loopIn.SwapHash) + if err != nil { + err = fmt.Errorf("unable to look up invoice by swap hash: %w", + err) + + return f.HandleError(err) + } + + // Create the swap payment timeout timer. If it runs out we cancel the + // invoice, but keep monitoring the htlc confirmation. + // If the invoice was canceled, e.g. before a restart, we don't need to + // set a new deadline. + var deadlineChan <-chan time.Time + if invoice.State != invoices.ContractCanceled { + // If the invoice is still live we set the timeout to the + // remaining payment time. If too much time has elapsed, e.g. + // after a restart, we set the timeout to 0 to cancel the + // invoice and unlock the deposits immediately. + remainingTimeSeconds := f.loopIn.RemainingPaymentTimeSeconds() + + // If the invoice isn't cancelled yet and the payment timeout + // elapsed, we set the timeout to 0 to cancel the invoice and + // unlock the deposits immediately. Otherwise, we start the + // timer with the remaining seconds to timeout. + timeout := time.Duration(0) * time.Second + if remainingTimeSeconds > 0 { + timeout = time.Duration(remainingTimeSeconds) * + time.Second + } + + deadlineChan = time.NewTimer(timeout).C + } else { + // If the invoice was canceled previously we end our + // subscription to invoice updates. + cancelInvoiceSubscription() + } + + cancelInvoice := func() { + f.Errorf("timeout waiting for invoice to be " + + "paid, canceling invoice") + + // Cancel the lndclient invoice subscription. + cancelInvoiceSubscription() + + err = f.cfg.InvoicesClient.CancelInvoice(ctx, f.loopIn.SwapHash) + if err != nil { + f.Warnf("unable to cancel invoice "+ + "for swap hash: %v", err) + } + } + + for { + select { + case <-htlcConfChan: + f.Infof("htlc tx confirmed") + + htlcConfirmed = true + + case err = <-htlcErrConfChan: + f.Errorf("htlc tx conf chan error: %v", err) + + case <-reorgChan: + // A reorg happened. We invalidate a previous htlc + // confirmation and re-register for the next + // confirmation. + htlcConfirmed = false + + htlcConfChan, htlcErrConfChan, err = registerHtlcConf() + if err != nil { + f.Errorf("unable to monitor htlc tx "+ + "confirmation: %v", err) + } + + case <-deadlineChan: + // If the server didn't pay the invoice on time, we + // cancel the invoice and keep monitoring the htlc tx + // confirmation. We also need to unlock the deposits to + // re-enable them for loop-ins and withdrawals. + cancelInvoice() + + event := f.UnlockDepositsAction(ctx, nil) + if event != fsm.OnError { + f.Errorf("unable to unlock deposits after " + + "payment deadline") + } + + case currentHeight := <-blockChan: + // If the htlc is confirmed but blockChan fires before + // htlcConfChan, we would wrongfully assume that the + // htlc tx was not confirmed which would lead to + // returning OnSwapTimedOut in the code below. This in + // turn would prevent us from sweeping the htlc timeout + // path back to us. + // Hence, we delay the timeout check here by one block + // to ensure that htlcConfChan fires first. + if !f.loopIn.isHtlcTimedOut(currentHeight - 1) { + // If the htlc hasn't timed out yet, we continue + // monitoring the htlc confirmation and the + // invoice settlement. + continue + } + + f.Infof("htlc timed out at block height %v", + currentHeight) + + // If the timeout path opened up we consider the swap + // failed and cancel the invoice. + cancelInvoice() + + if !htlcConfirmed { + f.Infof("swap timed out, htlc not confirmed") + + // If the htlc hasn't confirmed but the timeout + // path opened up, and we didn't receive the + // swap payment, we consider the swap attempt to + // be failed. We cancelled the invoice, but + // don't need to unlock the deposits because + // that happened when the payment deadline was + // reached. + return OnSwapTimedOut + } + + // If the htlc has confirmed and the timeout path has + // opened up we sweep the funds back to us. + err = f.cfg.DepositManager.TransitionDeposits( + ctx, f.loopIn.Deposits, + deposit.OnSweepingHtlcTimeout, + deposit.SweepHtlcTimeout, + ) + if err != nil { + log.Errorf("unable to transition "+ + "deposits to the htlc timeout "+ + "sweeping state: %w", err) + } + + return OnSweepHtlcTimeout + + case err = <-blockChanErr: + f.Errorf("block subscription error: %v", err) + + return f.HandleError(err) + + case update := <-invoiceUpdateChan: + switch update.State { + case invoices.ContractOpen: + case invoices.ContractAccepted: + case invoices.ContractSettled: + f.Debugf("received off-chain payment update "+ + "%v", update.State) + + return OnPaymentReceived + + case invoices.ContractCanceled: + // If the invoice was canceled we only log here + // since we still need to monitor until the htlc + // timed out. + log.Warnf("invoice for swap hash %v canceled", + f.loopIn.SwapHash) + + default: + err = fmt.Errorf("unexpected invoice state %v "+ + "for swap hash %v canceled", + update.State, f.loopIn.SwapHash) + + return f.HandleError(err) + } + + case err = <-invoiceErrChan: + f.Errorf("invoice subscription error: %v", err) + + case <-ctx.Done(): + return f.HandleError(ctx.Err()) + } + } +} + +// SweepHtlcTimeoutAction is called if the server published the htlc tx without +// paying the invoice. We wait for the timeout path to open up and sweep the +// funds back to us. +func (f *FSM) SweepHtlcTimeoutAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + for { + err := f.createAndPublishHtlcTimeoutSweepTx(ctx) + if err == nil { + break + } + + f.Errorf("unable to create and publish htlc timeout sweep "+ + "tx: %v, retrying in %v", err, time.Hour.String()) + + select { + case <-ctx.Done(): + f.Errorf(ctx.Err().Error()) + + default: + <-time.After(1 * time.Hour) + } + } + + return OnHtlcTimeoutSweepPublished +} + +// MonitorHtlcTimeoutSweepAction is called after the htlc timeout sweep tx has +// been published. We monitor the confirmation of the htlc timeout sweep tx and +// finalize the deposits once swept. +func (f *FSM) MonitorHtlcTimeoutSweepAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + f.Infof("monitoring htlc timeout sweep tx %v", + f.loopIn.HtlcTimeoutSweepTxHash) + + timeoutSweepPkScript, err := txscript.PayToAddrScript( + f.loopIn.HtlcTimeoutSweepAddress, + ) + if err != nil { + err = fmt.Errorf("unable to convert timeout sweep address to "+ + "pkscript: %w", err) + + return f.HandleError(err) + } + + htlcTimeoutTxidChan, errChan, err := + f.cfg.ChainNotifier.RegisterConfirmationsNtfn( + ctx, f.loopIn.HtlcTimeoutSweepTxHash, + timeoutSweepPkScript, defaultConfTarget, + int32(f.loopIn.InitiationHeight), + ) + + if err != nil { + err = fmt.Errorf("unable to register to the htlc timeout "+ + "sweep tx: %w", err) + + return f.HandleError(err) + } + + for { + select { + case err := <-errChan: + return f.HandleError(err) + + case conf := <-htlcTimeoutTxidChan: + err = f.cfg.DepositManager.TransitionDeposits( + ctx, f.loopIn.Deposits, + deposit.OnHtlcTimeoutSwept, + deposit.HtlcTimeoutSwept, + ) + if err != nil { + err = fmt.Errorf("unable to transition the "+ + "deposits to the htlc timeout swept "+ + "state: %w", err) + + return f.HandleError(err) + } + + f.Infof("htlc timeout sweep tx got %d confirmations "+ + "at block %d", defaultConfTarget, + conf.BlockHeight-defaultConfTarget+1) + + return OnHtlcTimeoutSwept + + case <-ctx.Done(): + return f.HandleError(ctx.Err()) + } + } +} + +// PaymentReceivedAction is called if the invoice was settled. We finalize the +// deposits by transitioning them to the LoopedIn state. +func (f *FSM) PaymentReceivedAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + // Unlock the deposits and transition them to the LoopedIn state. + err := f.cfg.DepositManager.TransitionDeposits( + ctx, f.loopIn.Deposits, deposit.OnLoopedIn, deposit.LoopedIn, + ) + if err != nil { + err = fmt.Errorf("payment received, but unable to transition "+ + "deposits into the final state: %w", err) + + return f.HandleError(err) + } + + return OnFetchSignPushSweeplessSweepTx +} + +// FetchSignPushSweeplessSweepTxAction requests server nonces, fee rate and +// destination address for the sweepless sweep transaction. It then creates the +// sweep transaction and signs it with the server and client nonces. If signing +// succeeds it pushes the signatures to the server. +func (f *FSM) FetchSignPushSweeplessSweepTxAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + // Fetch the sweepless sweep tx details from server. + fetchReq := &looprpc.FetchSweeplessSweepTxRequest{ + SwapHash: f.loopIn.SwapHash[:], + } + fetchResp, err := f.cfg.Server.FetchSweeplessSweepTx(ctx, fetchReq) + if err != nil { + err = fmt.Errorf("unable to fetch sweepless sweep tx: %w", err) + + return f.HandleError(err) + } + + address, err := btcutil.DecodeAddress( + fetchResp.SweepAddr, f.cfg.ChainParams, + ) + if err != nil { + f.Warnf("unable to decode sweep address: %v", err) + } + + // Standard fee. + feeRate := chainfee.SatPerKWeight(fetchResp.StandardFeeInfo.FeeRate) + serverNonces, err := toNonces(fetchResp.StandardFeeInfo.Nonces) + if err != nil { + err = fmt.Errorf("unable to convert server nonces: %w", err) + + return f.HandleError(err) + } + + // High fee. + highFeeRate := chainfee.SatPerKWeight(fetchResp.HighFeeInfo.FeeRate) + serverHighFeeNonces, err := toNonces(fetchResp.HighFeeInfo.Nonces) + if err != nil { + err = fmt.Errorf("unable to convert high fee server "+ + "nonces: %w", err) + + return f.HandleError(err) + } + + // Extremely high fee. + extremeFeeRate := chainfee.SatPerKWeight( + fetchResp.ExtremeFeeInfo.FeeRate, + ) + serverExtremeNonces, err := toNonces( + fetchResp.ExtremeFeeInfo.Nonces, + ) + if err != nil { + err = fmt.Errorf("unable to convert extremely high fee "+ + "server nonces: %w", err) + + return f.HandleError(err) + } + + // Standard sessions. + sessions, nonces, err := f.loopIn.createMusig2Sessions( + ctx, f.cfg.Signer, + ) + if err != nil { + return f.HandleError(err) + } + clientNonces, err := toNonces(nonces) + if err != nil { + return f.HandleError(err) + } + + // High fee sessions. + highFeeSessions, highFeeClientNonces, err := + f.loopIn.createMusig2Sessions(ctx, f.cfg.Signer) + + if err != nil { + return f.HandleError(err) + } + highClientNonces, err := toNonces(highFeeClientNonces) + if err != nil { + return f.HandleError(err) + } + + // Extremely high sessions. + extremeSessions, extremeClientNonces, err := + f.loopIn.createMusig2Sessions(ctx, f.cfg.Signer) + + if err != nil { + return f.HandleError(err) + } + extremelyHighClientNonces, err := toNonces(extremeClientNonces) + if err != nil { + return f.HandleError(err) + } + + // Create standard fee. + sweepTx, err := f.loopIn.createSweeplessSweepTx(address, feeRate) + if err != nil { + err = fmt.Errorf("unable to create sweepless sweep tx: %w", err) + return f.HandleError(err) + } + + // Create high fee. + highFeeSweepTx, err := f.loopIn.createSweeplessSweepTx( + address, highFeeRate, + ) + if err != nil { + err = fmt.Errorf("unable to create high fee sweepless sweep "+ + "tx: %w", err) + + return f.HandleError(err) + } + + // Create extremely high fee. + extremelyHighFeeSweepTx, err := f.loopIn.createSweeplessSweepTx( + address, extremeFeeRate, + ) + if err != nil { + err = fmt.Errorf("unable to create extremely high fee "+ + "sweepless sweep tx: %w", err) + + return f.HandleError(err) + } + + // Sign standard. + sweeplessClientSigs, err := f.loopIn.signMusig2Tx( + ctx, sweepTx, f.cfg.Signer, sessions, serverNonces, + ) + if err != nil { + err = fmt.Errorf("unable to sign sweepless sweep tx: %w", err) + return f.HandleError(err) + } + + // Sign high fee. + highFeeSigs, err := f.loopIn.signMusig2Tx( + ctx, highFeeSweepTx, f.cfg.Signer, highFeeSessions, + serverHighFeeNonces, + ) + if err != nil { + err = fmt.Errorf("unable to sign high fee sweepless sweep "+ + "tx: %w", err) + + return f.HandleError(err) + } + + // Sign extremely high fee. + extremelyHighSigs, err := f.loopIn.signMusig2Tx( + ctx, extremelyHighFeeSweepTx, f.cfg.Signer, extremeSessions, + serverExtremeNonces, + ) + if err != nil { + err = fmt.Errorf("unable to sign extremely high fee "+ + "sweepless sweep tx: %w", err) + + return f.HandleError(err) + } + + // Push sweepless sigs to the server. + req := &looprpc.PushStaticAddressSweeplessSigsRequest{ + SwapHash: f.loopIn.SwapHash[:], + StandardSigningInfo: &looprpc.ClientSweeplessSigningInfo{ + Nonces: fromNonces(clientNonces), + Sigs: sweeplessClientSigs, + }, + HighFeeSigningInfo: &looprpc.ClientSweeplessSigningInfo{ + Nonces: fromNonces(highClientNonces), + Sigs: highFeeSigs, + }, + ExtremeFeeSigningInfo: &looprpc.ClientSweeplessSigningInfo{ + Nonces: fromNonces(extremelyHighClientNonces), + Sigs: extremelyHighSigs, + }, + } + _, err = f.cfg.Server.PushStaticAddressSweeplessSigs(ctx, req) + if err != nil { + err = fmt.Errorf("unable to push sweepless sweep sigs: %w", err) + + return f.HandleError(err) + } + + return OnSweeplessSweepSigned +} + +// UnlockDepositsAction is called if the loop-in failed and its deposits should +// be available in a future loop-in request. +func (f *FSM) UnlockDepositsAction(ctx context.Context, + _ fsm.EventContext) fsm.EventType { + + err := f.cfg.DepositManager.TransitionDeposits( + ctx, f.loopIn.Deposits, fsm.OnError, deposit.Deposited, + ) + if err != nil { + err = fmt.Errorf("unable to unlock deposits: %w", err) + + return f.HandleError(err) + } + + return fsm.OnError +} + +// createAndPublishHtlcTimeoutSweepTx creates and publishes the htlc timeout +// sweep transaction. +func (f *FSM) createAndPublishHtlcTimeoutSweepTx(ctx context.Context) error { + // Get a fee rate. + feeRate, err := f.cfg.WalletKit.EstimateFeeRate(ctx, defaultConfTarget) + if err != nil { + return err + } + + getInfo, err := f.cfg.LndClient.GetInfo(ctx) + if err != nil { + return err + } + + // Create htlc timeout transaction. + timeoutTx, err := f.loopIn.createHtlcSweepTx( + ctx, f.cfg.Signer, f.loopIn.HtlcTimeoutSweepAddress, feeRate, + f.cfg.ChainParams, getInfo.BlockHeight, + f.cfg.MaxStaticAddrHtlcFeePercentage, + ) + if err != nil { + return fmt.Errorf("unable to create htlc timeout sweep tx: %w", + err) + } + + // Broadcast htlc timeout transaction. + txLabel := fmt.Sprintf( + "htlc-timeout-sweep-%v", f.loopIn.SwapHash, + ) + + err = f.cfg.WalletKit.PublishTransaction(ctx, timeoutTx, txLabel) + if err != nil { + e := err.Error() + if !strings.Contains(e, "output already spent") || + strings.Contains(e, chain.ErrInsufficientFee.Error()) { + + f.Errorf("%v: %v", txLabel, err) + f.LastActionError = err + return err + } + } else { + f.Debugf("published htlc timeout sweep with txid: %v", + timeoutTx.TxHash()) + + hash := timeoutTx.TxHash() + f.loopIn.HtlcTimeoutSweepTxHash = &hash + } + + return nil +} + +// toNonces converts a byte slice to a 66 byte slice. +func toNonces(nonces [][]byte) ([][musig2.PubNonceSize]byte, error) { + res := make([][musig2.PubNonceSize]byte, 0, len(nonces)) + for _, n := range nonces { + nonce, err := byteSliceTo66ByteSlice(n) + if err != nil { + return nil, err + } + + res = append(res, nonce) + } + + return res, nil +} + +// byteSliceTo66ByteSlice converts a byte slice to a 66 byte slice. +func byteSliceTo66ByteSlice(b []byte) ([musig2.PubNonceSize]byte, error) { + if len(b) != musig2.PubNonceSize { + return [musig2.PubNonceSize]byte{}, + fmt.Errorf("invalid byte slice length") + } + + var res [musig2.PubNonceSize]byte + copy(res[:], b) + + return res, nil +} + +func fromNonces(nonces [][musig2.PubNonceSize]byte) [][]byte { + result := make([][]byte, 0, len(nonces)) + for _, nonce := range nonces { + temp := make([]byte, musig2.PubNonceSize) + copy(temp, nonce[:]) + result = append(result, temp) + } + + return result +} diff --git a/staticaddr/loopin/fsm.go b/staticaddr/loopin/fsm.go new file mode 100644 index 000000000..400184794 --- /dev/null +++ b/staticaddr/loopin/fsm.go @@ -0,0 +1,365 @@ +package loopin + +import ( + "context" + "fmt" + + "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/version" +) + +// FSM embeds an FSM and extends it with a static address loop-in and a config. +type FSM struct { + *fsm.StateMachine + + cfg *Config + + // loopIn stores the loop-in details that are relevant during the + // lifetime of the swap. + loopIn *StaticAddressLoopIn + + // MuSig2 data must not be re-used across restarts, hence it is not + // persisted. + // + // htlcServerNonces contains all the nonces that the server generated + // for the htlc musig2 sessions. + htlcServerNonces [][musig2.PubNonceSize]byte + + // htlcServerNoncesHighFee contains all the high fee nonces that the + // server generated for the htlc musig2 sessions. + htlcServerNoncesHighFee [][musig2.PubNonceSize]byte + + // htlcServerNoncesExtremelyHighFee contains all the extremely high fee + // nonces that the server generated for the htlc musig2 sessions. + htlcServerNoncesExtremelyHighFee [][musig2.PubNonceSize]byte +} + +// NewFSM creates a new loop-in state machine. +func NewFSM(ctx context.Context, loopIn *StaticAddressLoopIn, cfg *Config, + recoverStateMachine bool) (*FSM, error) { + + loopInFsm := &FSM{ + cfg: cfg, + loopIn: loopIn, + } + + params, err := cfg.AddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return nil, fmt.Errorf("unable to get static address "+ + "parameters: %w", err) + } + + loopInStates := loopInFsm.LoopInStatesV0() + switch params.ProtocolVersion { + case version.ProtocolVersion_V0: + + default: + return nil, deposit.ErrProtocolVersionNotSupported + } + + if recoverStateMachine { + loopInFsm.StateMachine = fsm.NewStateMachineWithState( + loopInStates, loopIn.GetState(), + deposit.DefaultObserverSize, + ) + } else { + loopInFsm.StateMachine = fsm.NewStateMachine( + loopInStates, deposit.DefaultObserverSize, + ) + } + + loopInFsm.ActionEntryFunc = loopInFsm.updateLoopIn + + return loopInFsm, nil +} + +// States that the loop-in fsm can transition to. +var ( + // InitHtlcTx initiates the htlc tx creation with the server. + InitHtlcTx = fsm.StateType("InitHtlcTx") + + // SignHtlcTx partially signs the htlc transaction with the received + // server nonces. The client doesn't hold a final signature hence can't + // publish the htlc. + SignHtlcTx = fsm.StateType("SignHtlcTx") + + // MonitorInvoiceAndHtlcTx monitors the swap invoice payment and the + // htlc transaction confirmation. + // Since the client provided its partial signature to spend to the htlc + // pkScript, the server could publish the htlc transaction prematurely. + // We need to monitor the htlc transaction to sweep our timeout path in + // this case. + // If the server pays the swap invoice as expected we can stop to + // monitor the htlc timeout path. + MonitorInvoiceAndHtlcTx = fsm.StateType("MonitorInvoiceAndHtlcTx") + + // PaymentReceived is the state where the swap invoice was paid by the + // server. The client can now sign the sweepless sweep transaction. + PaymentReceived = fsm.StateType("PaymentReceived") + + // SweepHtlcTimeout is the state where the htlc timeout path is + // published because the server did not pay the invoice on time. + SweepHtlcTimeout = fsm.StateType("SweepHtlcTimeout") + + // MonitorHtlcTimeoutSweep monitors the htlc timeout sweep transaction + // confirmation. + MonitorHtlcTimeoutSweep = fsm.StateType("MonitorHtlcTimeoutSweep") + + // HtlcTimeoutSwept is the state where the htlc timeout sweep + // transaction was sufficiently confirmed. + HtlcTimeoutSwept = fsm.StateType("HtlcTimeoutSwept") + + // FetchSignPushSweeplessSweepTx is the state where the client fetches, + // signs and pushes the sweepless sweep tx signatures to the server. + FetchSignPushSweeplessSweepTx = fsm.StateType("FetchSignPushSweeplessSweepTx") //nolint:lll + + // Succeeded is the state the swap is in if it was successful. + Succeeded = fsm.StateType("Succeeded") + + // SucceededSweeplessSigFailed is the state the swap is in if the swap + // payment was received but the client failed to sign the sweepless + // sweep transaction. This is considered a successful case from the + // client's perspective. + SucceededSweeplessSigFailed = fsm.StateType("SucceededSweeplessSigFailed") //nolint:lll + + // UnlockDeposits is the state where the deposits are reset. This + // happens when the state machine encountered an error and the swap + // process needs to start from the beginning. + UnlockDeposits = fsm.StateType("UnlockDeposits") + + // Failed is the state the swap is in if it failed. + Failed = fsm.StateType("Failed") +) + +var PendingStates = []fsm.StateType{ + InitHtlcTx, SignHtlcTx, MonitorInvoiceAndHtlcTx, PaymentReceived, + SweepHtlcTimeout, MonitorHtlcTimeoutSweep, FetchSignPushSweeplessSweepTx, + UnlockDeposits, +} + +var FinalStates = []fsm.StateType{ + HtlcTimeoutSwept, Succeeded, SucceededSweeplessSigFailed, Failed, +} + +var AllStates = append(PendingStates, FinalStates...) + +// Events. +var ( + OnInitHtlc = fsm.EventType("OnInitHtlc") + OnHtlcInitiated = fsm.EventType("OnHtlcInitiated") + OnHtlcTxSigned = fsm.EventType("OnHtlcTxSigned") + OnSweepHtlcTimeout = fsm.EventType("OnSweepHtlcTimeout") + OnHtlcTimeoutSweepPublished = fsm.EventType("OnHtlcTimeoutSweepPublished") + OnHtlcTimeoutSwept = fsm.EventType("OnHtlcTimeoutSwept") + OnPaymentReceived = fsm.EventType("OnPaymentReceived") + OnPaymentDeadlineExceeded = fsm.EventType("OnPaymentDeadlineExceeded") + OnSwapTimedOut = fsm.EventType("OnSwapTimedOut") + OnFetchSignPushSweeplessSweepTx = fsm.EventType("OnFetchSignPushSweeplessSweepTx") + OnSweeplessSweepSigned = fsm.EventType("OnSweeplessSweepSigned") + OnRecover = fsm.EventType("OnRecover") +) + +// LoopInStatesV0 returns the state and transition map for the loop-in state +// machine. +func (f *FSM) LoopInStatesV0() fsm.States { + return fsm.States{ + fsm.EmptyState: fsm.State{ + Transitions: fsm.Transitions{ + OnInitHtlc: InitHtlcTx, + }, + Action: fsm.NoOpAction, + }, + InitHtlcTx: fsm.State{ + Transitions: fsm.Transitions{ + OnHtlcInitiated: SignHtlcTx, + OnRecover: UnlockDeposits, + fsm.OnError: UnlockDeposits, + }, + Action: f.InitHtlcAction, + }, + SignHtlcTx: fsm.State{ + Transitions: fsm.Transitions{ + OnHtlcTxSigned: MonitorInvoiceAndHtlcTx, + OnRecover: UnlockDeposits, + fsm.OnError: UnlockDeposits, + }, + Action: f.SignHtlcTxAction, + }, + MonitorInvoiceAndHtlcTx: fsm.State{ + Transitions: fsm.Transitions{ + OnPaymentReceived: PaymentReceived, + OnSweepHtlcTimeout: SweepHtlcTimeout, + OnSwapTimedOut: Failed, + OnRecover: MonitorInvoiceAndHtlcTx, + fsm.OnError: UnlockDeposits, + }, + Action: f.MonitorInvoiceAndHtlcTxAction, + }, + SweepHtlcTimeout: fsm.State{ + Transitions: fsm.Transitions{ + OnHtlcTimeoutSweepPublished: MonitorHtlcTimeoutSweep, + OnRecover: SweepHtlcTimeout, + fsm.OnError: Failed, + }, + Action: f.SweepHtlcTimeoutAction, + }, + MonitorHtlcTimeoutSweep: fsm.State{ + Transitions: fsm.Transitions{ + OnHtlcTimeoutSwept: HtlcTimeoutSwept, + OnRecover: MonitorHtlcTimeoutSweep, + fsm.OnError: Failed, + }, + Action: f.MonitorHtlcTimeoutSweepAction, + }, + PaymentReceived: fsm.State{ + Transitions: fsm.Transitions{ + OnFetchSignPushSweeplessSweepTx: FetchSignPushSweeplessSweepTx, + OnRecover: SucceededSweeplessSigFailed, + fsm.OnError: SucceededSweeplessSigFailed, + }, + Action: f.PaymentReceivedAction, + }, + FetchSignPushSweeplessSweepTx: fsm.State{ + Transitions: fsm.Transitions{ + OnSweeplessSweepSigned: Succeeded, + OnRecover: SucceededSweeplessSigFailed, + fsm.OnError: SucceededSweeplessSigFailed, + }, + Action: f.FetchSignPushSweeplessSweepTxAction, + }, + HtlcTimeoutSwept: fsm.State{ + Action: fsm.NoOpAction, + }, + Succeeded: fsm.State{ + Action: fsm.NoOpAction, + }, + SucceededSweeplessSigFailed: fsm.State{ + Action: fsm.NoOpAction, + }, + UnlockDeposits: fsm.State{ + Transitions: fsm.Transitions{ + OnRecover: UnlockDeposits, + fsm.OnError: Failed, + }, + Action: f.UnlockDepositsAction, + }, + Failed: fsm.State{ + Action: fsm.NoOpAction, + }, + } +} + +// updateLoopIn is called after every action and updates the loop-in in the db. +func (f *FSM) updateLoopIn(ctx context.Context, notification fsm.Notification) { + f.Infof("Current: %v", notification.NextState) + + // Skip the update if the loop-in is not yet initialized. This happens + // on the entry action of the fsm. + if f.loopIn == nil { + return + } + + f.loopIn.SetState(notification.NextState) + + // Check if we can skip updating the loop-in in the database. + if isUpdateSkipped(notification, f.loopIn) { + return + } + + stored, err := f.cfg.Store.IsStored(ctx, f.loopIn.SwapHash) + if err != nil { + f.Errorf("Error checking if loop-in is stored: %v", err) + + return + } + + if !stored { + f.Warnf("Loop-in not stored in db, can't update") + + return + } + + err = f.cfg.Store.UpdateLoopIn(ctx, f.loopIn) + if err != nil { + f.Errorf("Error updating loop-in: %v", err) + + return + } +} + +// isUpdateSkipped returns true if the loop-in should not be updated for the +// given notification. +func isUpdateSkipped(notification fsm.Notification, + l *StaticAddressLoopIn) bool { + + prevState := notification.PreviousState + + // Skip if we are in the empty state because no loop-in has been + // persisted yet. + if l.IsInState(fsm.EmptyState) { + return true + } + + // We don't update in self-loops, e.g. in the case of recovery. + if l.IsInState(prevState) { + return true + } + + // If we transitioned from the empty state to InitHtlcTx there's still + // no loop-in persisted, so we don't need to update it. + if prevState == fsm.EmptyState && l.IsInState(InitHtlcTx) { + return true + } + + return false +} + +// Infof logs an info message with the loop-in swap hash. +func (f *FSM) Infof(format string, args ...interface{}) { + if f.loopIn == nil { + log.Infof(format, args...) + return + } + log.Infof( + "StaticAddr loop-in %s: %s", f.loopIn.SwapHash.String(), + fmt.Sprintf(format, args...), + ) +} + +// Debugf logs a debug message with the loop-in swap hash. +func (f *FSM) Debugf(format string, args ...interface{}) { + if f.loopIn == nil { + log.Infof(format, args...) + return + } + log.Debugf( + "StaticAddr loop-in %s: %s", f.loopIn.SwapHash.String(), + fmt.Sprintf(format, args...), + ) +} + +// Warnf logs a warning message with the loop-in swap hash. +func (f *FSM) Warnf(format string, args ...interface{}) { + if f.loopIn == nil { + log.Warnf(format, args...) + return + } + log.Warnf( + "StaticAddr loop-in %s: %s", f.loopIn.SwapHash.String(), + fmt.Sprintf(format, args...), + ) +} + +// Errorf logs an error message with the loop-in swap hash. +func (f *FSM) Errorf(format string, args ...interface{}) { + if f.loopIn == nil { + log.Errorf(format, args...) + return + } + log.Errorf( + "StaticAddr loop-in %s: %s", f.loopIn.SwapHash.String(), + fmt.Sprintf(format, args...), + ) +} diff --git a/staticaddr/loopin/interface.go b/staticaddr/loopin/interface.go new file mode 100644 index 000000000..88bd543bb --- /dev/null +++ b/staticaddr/loopin/interface.go @@ -0,0 +1,72 @@ +package loopin + +import ( + "context" + + "github.com/btcsuite/btcd/btcutil" + "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/staticaddr/address" + "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightningnetwork/lnd/lntypes" + "github.com/lightningnetwork/lnd/routing/route" + "github.com/lightningnetwork/lnd/zpay32" +) + +type ( + // ValidateLoopInContract validates the contract parameters against our + // request. + ValidateLoopInContract func(height int32, htlcExpiry int32) error +) + +// AddressManager handles fetching of address parameters. +type AddressManager interface { + // GetStaticAddressParameters returns the static address parameters. + GetStaticAddressParameters(ctx context.Context) (*address.Parameters, + error) + + // GetStaticAddress returns the deposit address for the given client and + // server public keys. + GetStaticAddress(ctx context.Context) (*script.StaticAddress, error) +} + +// DepositManager handles the interaction of loop-ins with deposits. +type DepositManager interface { + // AllStringOutpointsActiveDeposits returns all deposits that have the + // given outpoints and are in the given state. If any of the outpoints + // does not correspond to an active deposit, the function returns false. + AllStringOutpointsActiveDeposits(outpoints []string, + stateFilter fsm.StateType) ([]*deposit.Deposit, bool) + + // TransitionDeposits transitions the given deposits to the next state + // based on the given event. It returns an error if the transition is + // invalid. + TransitionDeposits(ctx context.Context, deposits []*deposit.Deposit, + event fsm.EventType, expectedFinalState fsm.StateType) error +} + +// StaticAddressLoopInStore provides access to the static address loop-in DB. +type StaticAddressLoopInStore interface { + // CreateLoopIn creates a loop-in record in the database. + CreateLoopIn(ctx context.Context, loopIn *StaticAddressLoopIn) error + + // UpdateLoopIn updates a loop-in record in the database. + UpdateLoopIn(ctx context.Context, loopIn *StaticAddressLoopIn) error + + // GetStaticAddressLoopInSwapsByStates returns all loop-ins with given + // states. + GetStaticAddressLoopInSwapsByStates(ctx context.Context, + states []fsm.StateType) ([]*StaticAddressLoopIn, error) + + // IsStored checks if the loop-in is already stored in the database. + IsStored(ctx context.Context, swapHash lntypes.Hash) (bool, error) +} + +type QuoteGetter interface { + // GetLoopInQuote returns a quote for a loop-in swap. + GetLoopInQuote(ctx context.Context, amt btcutil.Amount, + pubKey route.Vertex, lastHop *route.Vertex, + routeHints [][]zpay32.HopHint, + initiator string, numDeposits uint32) (*loop.LoopInQuote, error) +} diff --git a/staticaddr/loopin/manager.go b/staticaddr/loopin/manager.go new file mode 100644 index 000000000..35768d170 --- /dev/null +++ b/staticaddr/loopin/manager.go @@ -0,0 +1,458 @@ +package loopin + +import ( + "context" + "fmt" + "sync/atomic" + "time" + + "github.com/btcsuite/btcd/chaincfg" + "github.com/lightninglabs/lndclient" + "github.com/lightninglabs/loop" + "github.com/lightninglabs/loop/fsm" + "github.com/lightninglabs/loop/labels" + "github.com/lightninglabs/loop/staticaddr/deposit" + looprpc "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightningnetwork/lnd/lntypes" + "github.com/lightningnetwork/lnd/routing/route" +) + +// Config contains the services required for the loop-in manager. +type Config struct { + // Server is the client that is used to communicate with the static + // address server. + Server looprpc.StaticAddressServerClient + + // AddressManager gives the withdrawal manager access to static address + // parameters. + AddressManager AddressManager + + // DepositManager gives the withdrawal manager access to the deposits + // enabling it to create and manage loop-ins. + DepositManager DepositManager + + // LndClient is used to add invoices and select hop hints. + LndClient lndclient.LightningClient + + // InvoicesClient is used to subscribe to invoice settlements and + // cancel invoices. + InvoicesClient lndclient.InvoicesClient + + // SwapClient is used to get loop in quotes. + QuoteGetter QuoteGetter + + // NodePubKey is used to get a loo-in quote. + NodePubkey route.Vertex + + // WalletKit is the wallet client that is used to derive new keys from + // lnd's wallet. + WalletKit lndclient.WalletKitClient + + // ChainParams is the chain configuration(mainnet, testnet...) this + // manager uses. + ChainParams *chaincfg.Params + + // Chain is the chain notifier that is used to listen for new + // blocks. + ChainNotifier lndclient.ChainNotifierClient + + // Signer is the signer client that is used to sign transactions. + Signer lndclient.SignerClient + + // Store is the database store that is used to store static address + // loop-in related records. + Store StaticAddressLoopInStore + + // ValidateLoopInContract validates the contract parameters against our + // request. + ValidateLoopInContract ValidateLoopInContract + + // MaxStaticAddrHtlcFeePercentage is the percentage of the swap amount + // that we allow the server to charge for the htlc transaction. + // Although highly unlikely, this is a defense against the server + // publishing the htlc without paying the swap invoice, forcing us to + // sweep the timeout path. + MaxStaticAddrHtlcFeePercentage float64 + + // MaxStaticAddrHtlcBackupFeePercentage is the percentage of the swap + // amount that we allow the server to charge for the htlc backup + // transactions. This is a defense against the server publishing the + // htlc backup without paying the swap invoice, forcing us to sweep the + // timeout path. This value is elevated compared to + // MaxStaticAddrHtlcFeePercentage since it serves the server as backup + // transaction in case of fee spikes. + MaxStaticAddrHtlcBackupFeePercentage float64 +} + +// newSwapRequest is used to send a loop-in request to the manager main loop. +type newSwapRequest struct { + loopInRequest *loop.StaticAddressLoopInRequest + respChan chan *newSwapResponse +} + +// newSwapResponse is used to return the loop-in swap and error to the server. +type newSwapResponse struct { + loopIn *StaticAddressLoopIn + err error +} + +// Manager manages the address state machines. +type Manager struct { + cfg *Config + + // initChan signals the daemon that the address manager has completed + // its initialization. + initChan chan struct{} + + // newLoopInChan receives swap requests from the server and initiates + // loop-in swaps. + newLoopInChan chan *newSwapRequest + + // exitChan signals the manager's subroutines that the main looop ctx + // has been canceled. + exitChan chan struct{} + + // errChan forwards errors from the loop-in manager to the server. + errChan chan error + + // currentHeight stores the currently best known block height. + currentHeight atomic.Uint32 + + activeLoopIns map[lntypes.Hash]*FSM +} + +// NewManager creates a new deposit withdrawal manager. +func NewManager(cfg *Config) *Manager { + return &Manager{ + cfg: cfg, + initChan: make(chan struct{}), + newLoopInChan: make(chan *newSwapRequest), + exitChan: make(chan struct{}), + errChan: make(chan error), + activeLoopIns: make(map[lntypes.Hash]*FSM), + } +} + +// Run runs the static address loop-in manager. +func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { + m.currentHeight.Store(currentHeight) + + registerBlockNtfn := m.cfg.ChainNotifier.RegisterBlockEpochNtfn + newBlockChan, newBlockErrChan, err := registerBlockNtfn(ctx) + if err != nil { + return err + } + + // Upon start of the loop-in manager we reinstate all previous loop-ins + // that are not yet completed. + err = m.recoverLoopIns(ctx) + if err != nil { + return err + } + + // Communicate to the caller that the address manager has completed its + // initialization. + close(m.initChan) + + var loopIn *StaticAddressLoopIn + for { + select { + case height := <-newBlockChan: + m.currentHeight.Store(uint32(height)) + + case err = <-newBlockErrChan: + return err + + case request := <-m.newLoopInChan: + loopIn, err = m.initiateLoopIn( + ctx, request.loopInRequest, + ) + if err != nil { + log.Errorf("Error initiating loop-in swap: %v", + err) + } + + // We forward the initialized loop-in and error to + // DeliverLoopInRequest. + resp := &newSwapResponse{ + loopIn: loopIn, + err: err, + } + select { + case request.respChan <- resp: + + case <-ctx.Done(): + // Noify subroutines that the main loop has been + // canceled. + close(m.exitChan) + + return ctx.Err() + } + + case <-ctx.Done(): + return ctx.Err() + } + } +} + +// recover stars a loop-in state machine for each non-final loop-in to pick up +// work where it was left off before the restart. +func (m *Manager) recoverLoopIns(ctx context.Context) error { + log.Infof("Recovering static address loop-ins...") + + // Recover loop-ins. + // Recover pending static address loop-ins. + pendingLoopIns, err := m.cfg.Store.GetStaticAddressLoopInSwapsByStates( + ctx, PendingStates, + ) + if err != nil { + return err + } + + for _, loopIn := range pendingLoopIns { + log.Debugf("Recovering loopIn %x", loopIn.SwapHash[:]) + + // Retrieve all deposits regardless of deposit state. If any of + // the deposits is not active in the in-mem map of the deposits + // manager we log it, but continue to recover the loop-in. + var allActive bool + loopIn.Deposits, allActive = + m.cfg.DepositManager.AllStringOutpointsActiveDeposits( + loopIn.DepositOutpoints, fsm.EmptyState, + ) + + if !allActive { + log.Errorf("one or more deposits are not active") + } + + loopIn.AddressParams, err = + m.cfg.AddressManager.GetStaticAddressParameters(ctx) + + if err != nil { + return err + } + + loopIn.Address, err = m.cfg.AddressManager.GetStaticAddress( + ctx, + ) + if err != nil { + return err + } + + // Create a state machine for a given loop-in. + var ( + recovery = true + fsm *FSM + ) + fsm, err = NewFSM(ctx, loopIn, m.cfg, recovery) + if err != nil { + return err + } + + // Send the OnRecover event to the state machine. + swapHash := loopIn.SwapHash + go func() { + err = fsm.SendEvent(ctx, OnRecover, nil) + if err != nil { + log.Errorf("Error sending OnStart event: %v", + err) + } + + m.activeLoopIns[swapHash] = fsm + }() + } + + return nil +} + +// WaitInitComplete waits until the static address loop-in manager has completed +// its setup. +func (m *Manager) WaitInitComplete() { + defer log.Debugf("Static address loop-in manager initiation complete.") + <-m.initChan +} + +// DeliverLoopInRequest forwards a loop-in request from the server to the +// manager run loop to initiate a new loop-in swap. +func (m *Manager) DeliverLoopInRequest(ctx context.Context, + req *loop.StaticAddressLoopInRequest) (*StaticAddressLoopIn, error) { + + request := &newSwapRequest{ + loopInRequest: req, + respChan: make(chan *newSwapResponse), + } + + // Send the new loop-in request to the manager run loop. + select { + case m.newLoopInChan <- request: + + case <-m.exitChan: + return nil, fmt.Errorf("loop-in manager has been canceled") + + case <-ctx.Done(): + return nil, fmt.Errorf("context canceled while initiating " + + "a loop-in swap") + } + + // Wait for the response from the manager run loop. + select { + case resp := <-request.respChan: + return resp.loopIn, resp.err + + case <-m.exitChan: + return nil, fmt.Errorf("loop-in manager has been canceled") + + case <-ctx.Done(): + return nil, fmt.Errorf("context canceled while waiting for " + + "loop-in swap response") + } +} + +// initiateLoopIn initiates a loop-in swap. It passes the request to the server +// along with all relevant loop-in information. +func (m *Manager) initiateLoopIn(ctx context.Context, + req *loop.StaticAddressLoopInRequest) (*StaticAddressLoopIn, error) { + + // Validate the loop-in request. + if len(req.DepositOutpoints) == 0 { + return nil, fmt.Errorf("no deposit outpoints provided") + } + + // Retrieve all deposits referenced by the outpoints and ensure that + // they are in state Deposited. + deposits, active := m.cfg.DepositManager.AllStringOutpointsActiveDeposits( //nolint:lll + req.DepositOutpoints, deposit.Deposited, + ) + if !active { + return nil, fmt.Errorf("one or more deposits are not in "+ + "state %s", deposit.Deposited) + } + + // Calculate the total deposit amount. + tmp := &StaticAddressLoopIn{ + Deposits: deposits, + } + totalDepositAmount := tmp.TotalDepositAmount() + + // Check that the label is valid. + err := labels.Validate(req.Label) + if err != nil { + return nil, fmt.Errorf("invalid label: %w", err) + } + + // Private and route hints are mutually exclusive as setting private + // means we retrieve our own route hints from the connected node. + if len(req.RouteHints) != 0 && req.Private { + return nil, fmt.Errorf("private and route hints are mutually " + + "exclusive") + } + + // If private is set, we generate route hints. + if req.Private { + // If last_hop is set, we'll only add channels with peers set to + // the last_hop parameter. + includeNodes := make(map[route.Vertex]struct{}) + if req.LastHop != nil { + includeNodes[*req.LastHop] = struct{}{} + } + + // Because the Private flag is set, we'll generate our own set + // of hop hints. + req.RouteHints, err = loop.SelectHopHints( + ctx, m.cfg.LndClient, totalDepositAmount, + loop.DefaultMaxHopHints, includeNodes, + ) + if err != nil { + return nil, fmt.Errorf("unable to generate hop "+ + "hints: %w", err) + } + } + + // Request current server loop in terms and use these to calculate the + // swap fee that we should subtract from the swap amount in the payment + // request that we send to the server. We pass nil as optional route + // hints as hop hint selection when generating invoices with private + // channels is an LND side black box feature. Advanced users will quote + // directly anyway and there they have the option to add specific route + // hints. + // The quote call will also request a probe from the server to ensure + // feasibility of a loop-in for the totalDepositAmount. + numDeposits := uint32(len(deposits)) + quote, err := m.cfg.QuoteGetter.GetLoopInQuote( + ctx, totalDepositAmount, m.cfg.NodePubkey, req.LastHop, + req.RouteHints, req.Initiator, numDeposits, + ) + if err != nil { + return nil, fmt.Errorf("unable to get loop in quote: %w", err) + } + + // If the previously accepted quote fee is lower than what is quoted now + // we abort the swap. + if quote.SwapFee > req.MaxSwapFee { + log.Warnf("Swap fee %v exceeding maximum of %v", + quote.SwapFee, req.MaxSwapFee) + + return nil, loop.ErrSwapFeeTooHigh + } + + paymentTimeoutSeconds := uint32(DefaultPaymentTimeoutSeconds) + if req.PaymentTimeoutSeconds != 0 { + paymentTimeoutSeconds = req.PaymentTimeoutSeconds + } + + swap := &StaticAddressLoopIn{ + DepositOutpoints: req.DepositOutpoints, + Deposits: deposits, + Label: req.Label, + Initiator: req.Initiator, + InitiationTime: time.Now(), + RouteHints: req.RouteHints, + QuotedSwapFee: quote.SwapFee, + MaxSwapFee: req.MaxSwapFee, + PaymentTimeoutSeconds: paymentTimeoutSeconds, + } + if req.LastHop != nil { + swap.LastHop = req.LastHop[:] + } + + swap.InitiationHeight = m.currentHeight.Load() + + return m.startLoopInFsm(ctx, swap) +} + +// startLoopInFsm initiates a loop-in state machine based on the user-provided +// swap information, sends that info to the server and waits for the server to +// return htlc signature information. It then creates the loop-in object in the +// database. +func (m *Manager) startLoopInFsm(ctx context.Context, + loopIn *StaticAddressLoopIn) (*StaticAddressLoopIn, error) { + + // Create a state machine for a given deposit. + recovery := false + loopInFsm, err := NewFSM(ctx, loopIn, m.cfg, recovery) + if err != nil { + return nil, err + } + + // Send the start event to the state machine. + go func() { + err = loopInFsm.SendEvent(ctx, OnInitHtlc, nil) + if err != nil { + log.Errorf("Error sending OnNewRequest event: %v", err) + } + }() + + // If an error occurs before SignHtlcTx is reached we consider the swap + // failed and abort early. + err = loopInFsm.DefaultObserver.WaitForState( + ctx, time.Minute, SignHtlcTx, + fsm.WithAbortEarlyOnErrorOption(), + ) + if err != nil { + return nil, err + } + + m.activeLoopIns[loopIn.SwapHash] = loopInFsm + + return loopIn, nil +} From bb5a6a53a611a3d32d429e17b522df777957cbf2 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 30 Jul 2024 16:14:24 +0200 Subject: [PATCH 50/67] unit: manager mocks for static address loop-in --- staticaddr/address/manager_test.go | 44 ++++++++++++++++++++++++++++++ staticaddr/deposit/manager_test.go | 44 ++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/staticaddr/address/manager_test.go b/staticaddr/address/manager_test.go index 9548640d8..101cef582 100644 --- a/staticaddr/address/manager_test.go +++ b/staticaddr/address/manager_test.go @@ -32,6 +32,50 @@ type mockStaticAddressClient struct { mock.Mock } +func (m *mockStaticAddressClient) ServerStaticAddressLoopIn(ctx context.Context, + in *swapserverrpc.ServerStaticAddressLoopInRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.ServerStaticAddressLoopInResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.ServerStaticAddressLoopInResponse), + args.Error(1) +} + +func (m *mockStaticAddressClient) PushStaticAddressSweeplessSigs(ctx context.Context, + in *swapserverrpc.PushStaticAddressSweeplessSigsRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.PushStaticAddressSweeplessSigsResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.PushStaticAddressSweeplessSigsResponse), + args.Error(1) +} + +func (m *mockStaticAddressClient) FetchSweeplessSweepTx(ctx context.Context, + in *swapserverrpc.FetchSweeplessSweepTxRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.FetchSweeplessSweepTxResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.FetchSweeplessSweepTxResponse), + args.Error(1) +} + +func (m *mockStaticAddressClient) PushStaticAddressHtlcSigs(ctx context.Context, + in *swapserverrpc.PushStaticAddressHtlcSigsRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.PushStaticAddressHtlcSigsResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.PushStaticAddressHtlcSigsResponse), + args.Error(1) +} + func (m *mockStaticAddressClient) ServerWithdrawDeposits(ctx context.Context, in *swapserverrpc.ServerWithdrawRequest, opts ...grpc.CallOption) (*swapserverrpc.ServerWithdrawResponse, diff --git a/staticaddr/deposit/manager_test.go b/staticaddr/deposit/manager_test.go index 49c3d4691..009f0c4fe 100644 --- a/staticaddr/deposit/manager_test.go +++ b/staticaddr/deposit/manager_test.go @@ -51,6 +51,50 @@ type mockStaticAddressClient struct { mock.Mock } +func (m *mockStaticAddressClient) ServerStaticAddressLoopIn(ctx context.Context, + in *swapserverrpc.ServerStaticAddressLoopInRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.ServerStaticAddressLoopInResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.ServerStaticAddressLoopInResponse), + args.Error(1) +} + +func (m *mockStaticAddressClient) PushStaticAddressSweeplessSigs(ctx context.Context, + in *swapserverrpc.PushStaticAddressSweeplessSigsRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.PushStaticAddressSweeplessSigsResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.PushStaticAddressSweeplessSigsResponse), + args.Error(1) +} + +func (m *mockStaticAddressClient) FetchSweeplessSweepTx(ctx context.Context, + in *swapserverrpc.FetchSweeplessSweepTxRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.FetchSweeplessSweepTxResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.FetchSweeplessSweepTxResponse), + args.Error(1) +} + +func (m *mockStaticAddressClient) PushStaticAddressHtlcSigs(ctx context.Context, + in *swapserverrpc.PushStaticAddressHtlcSigsRequest, + opts ...grpc.CallOption) ( + *swapserverrpc.PushStaticAddressHtlcSigsResponse, error) { + + args := m.Called(ctx, in, opts) + + return args.Get(0).(*swapserverrpc.PushStaticAddressHtlcSigsResponse), + args.Error(1) +} + func (m *mockStaticAddressClient) ServerWithdrawDeposits(ctx context.Context, in *swapserverrpc.ServerWithdrawRequest, opts ...grpc.CallOption) (*swapserverrpc.ServerWithdrawResponse, From d8ec87d823ad4ababf2a4cac24d3874a42b34de1 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 30 Jul 2024 15:41:11 +0200 Subject: [PATCH 51/67] loopd: static address loop-in support --- loopd/daemon.go | 55 ++++++++++++++++++++ loopd/perms/perms.go | 7 +++ loopd/swapclient_server.go | 103 ++++++++++++++++++++++++++++++++++--- 3 files changed, 157 insertions(+), 8 deletions(-) diff --git a/loopd/daemon.go b/loopd/daemon.go index 50405613c..96af9d902 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -24,6 +24,7 @@ import ( "github.com/lightninglabs/loop/notifications" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/loopin" "github.com/lightninglabs/loop/staticaddr/withdraw" loop_swaprpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightninglabs/loop/sweepbatcher" @@ -541,6 +542,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { staticAddressManager *address.Manager depositManager *deposit.Manager withdrawalManager *withdraw.Manager + staticLoopInManager *loopin.Manager ) // Create the reservation and instantout managers. @@ -618,6 +620,30 @@ func (d *Daemon) initialize(withMacaroonService bool) error { Signer: d.lnd.Signer, } withdrawalManager = withdraw.NewManager(withdrawalCfg) + + // Static address loop-in manager setup. + staticAddressLoopInStore := loopin.NewSqlStore( + loopdb.NewTypedStore[loopin.Querier](baseDb), + clock.NewDefaultClock(), d.lnd.ChainParams, + ) + + staticLoopInManager = loopin.NewManager(&loopin.Config{ + Server: staticAddressClient, + QuoteGetter: swapClient.Server, + LndClient: d.lnd.Client, + InvoicesClient: d.lnd.Invoices, + NodePubkey: d.lnd.NodePubkey, + AddressManager: staticAddressManager, + DepositManager: depositManager, + Store: staticAddressLoopInStore, + WalletKit: d.lnd.WalletKit, + ChainNotifier: d.lnd.ChainNotifier, + ChainParams: d.lnd.ChainParams, + Signer: d.lnd.Signer, + ValidateLoopInContract: loop.ValidateLoopInContract, + MaxStaticAddrHtlcFeePercentage: d.cfg.MaxStaticAddrHtlcFeePercentage, + MaxStaticAddrHtlcBackupFeePercentage: d.cfg.MaxStaticAddrHtlcBackupFeePercentage, + }) } // Now finally fully initialize the swap client RPC server instance. @@ -636,6 +662,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { staticAddressManager: staticAddressManager, depositManager: depositManager, withdrawalManager: withdrawalManager, + staticLoopInManager: staticLoopInManager, } // Retrieve all currently existing swaps from the database. @@ -845,6 +872,34 @@ func (d *Daemon) initialize(withMacaroonService bool) error { withdrawalManager.WaitInitComplete() } + // Start the static address loop-in manager. + if staticLoopInManager != nil { + d.wg.Add(1) + go func() { + defer d.wg.Done() + + // Lnd's GetInfo call supplies us with the current block + // height. + info, err := d.lnd.Client.GetInfo(d.mainCtx) + if err != nil { + d.internalErrChan <- err + + return + } + + log.Info("Starting static address loop-in manager...") + err = staticLoopInManager.Run( + d.mainCtx, info.BlockHeight, + ) + if err != nil && !errors.Is(context.Canceled, err) { + d.internalErrChan <- err + } + log.Info("Starting static address loop-in manager " + + "stopped") + }() + staticLoopInManager.WaitInitComplete() + } + // Last, start our internal error handler. This will return exactly one // error or nil on the main error channel to inform the caller that // something went wrong or that shutdown is complete. We don't add to diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index 98ffb5927..d47257e82 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -101,6 +101,13 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "loop", Action: "in", }}, + "/looprpc.SwapClient/StaticAddressLoopIn": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetLsatTokens": {{ Entity: "auth", Action: "read", diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 8982dd8e2..88500ef5c 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -28,6 +28,7 @@ import ( "github.com/lightninglabs/loop/looprpc" "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/staticaddr/loopin" "github.com/lightninglabs/loop/staticaddr/withdraw" "github.com/lightninglabs/loop/swap" "github.com/lightninglabs/loop/swapserverrpc" @@ -91,6 +92,7 @@ type swapClientServer struct { staticAddressManager *address.Manager depositManager *deposit.Manager withdrawalManager *withdraw.Manager + staticLoopInManager *loopin.Manager swaps map[lntypes.Hash]loop.SwapInfo subscribers map[int]chan<- interface{} statusChan chan loop.SwapInfo @@ -1481,6 +1483,57 @@ func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, ) } +// StaticAddressLoopIn initiates a loop-in request using static address +// deposits. +func (s *swapClientServer) StaticAddressLoopIn(ctx context.Context, + in *looprpc.StaticAddressLoopInRequest) ( + *looprpc.StaticAddressLoopInResponse, error) { + + log.Infof("Static loop-in request received") + + routeHints, err := unmarshallRouteHints(in.RouteHints) + if err != nil { + return nil, err + } + + req := &loop.StaticAddressLoopInRequest{ + DepositOutpoints: in.Outpoints, + MaxSwapFee: btcutil.Amount(in.MaxSwapFeeSatoshis), + Label: in.Label, + Initiator: in.Initiator, + Private: in.Private, + RouteHints: routeHints, + PaymentTimeoutSeconds: in.PaymentTimeoutSeconds, + } + + if in.LastHop != nil { + lastHop, err := route.NewVertexFromBytes(in.LastHop) + if err != nil { + return nil, err + } + req.LastHop = &lastHop + } + + loopIn, err := s.staticLoopInManager.DeliverLoopInRequest(ctx, req) + if err != nil { + return nil, err + } + + return &looprpc.StaticAddressLoopInResponse{ + SwapHash: loopIn.SwapHash[:], + State: string(loopIn.GetState()), + Amount: uint64(loopIn.TotalDepositAmount()), + HtlcCltv: loopIn.HtlcCltvExpiry, + MaxSwapFeeSatoshis: int64(loopIn.MaxSwapFee), + InitiationHeight: loopIn.InitiationHeight, + ProtocolVersion: loopIn.ProtocolVersion.String(), + Initiator: loopIn.Initiator, + Label: loopIn.Label, + PaymentTimeoutSeconds: loopIn.PaymentTimeoutSeconds, + QuotedSwapFeeSatoshis: int64(loopIn.QuotedSwapFee), + }, nil +} + func (s *swapClientServer) depositSummary(ctx context.Context, deposits []*deposit.Deposit, stateFilter looprpc.DepositState, outpointsFilter []string) (*looprpc.StaticAddressSummaryResponse, @@ -1492,6 +1545,8 @@ func (s *swapClientServer) depositSummary(ctx context.Context, valueDeposited int64 valueExpired int64 valueWithdrawn int64 + valueLoopedIn int64 + htlcTimeoutSwept int64 ) // Value unconfirmed. @@ -1517,6 +1572,12 @@ func (s *swapClientServer) depositSummary(ctx context.Context, case deposit.Withdrawn: valueWithdrawn += value + + case deposit.LoopedIn: + valueLoopedIn += value + + case deposit.HtlcTimeoutSwept: + htlcTimeoutSwept += value } } @@ -1545,7 +1606,7 @@ func (s *swapClientServer) depositSummary(ctx context.Context, return true } - return d.GetState() == toServerState(stateFilter) + return d.IsInState(toServerState(stateFilter)) } clientDeposits = filter(deposits, f) } @@ -1563,13 +1624,15 @@ func (s *swapClientServer) depositSummary(ctx context.Context, } return &looprpc.StaticAddressSummaryResponse{ - StaticAddress: address.String(), - TotalNumDeposits: uint32(totalNumDeposits), - ValueUnconfirmedSatoshis: valueUnconfirmed, - ValueDepositedSatoshis: valueDeposited, - ValueExpiredSatoshis: valueExpired, - ValueWithdrawnSatoshis: valueWithdrawn, - FilteredDeposits: clientDeposits, + StaticAddress: address.String(), + TotalNumDeposits: uint32(totalNumDeposits), + ValueUnconfirmedSatoshis: valueUnconfirmed, + ValueDepositedSatoshis: valueDeposited, + ValueExpiredSatoshis: valueExpired, + ValueWithdrawnSatoshis: valueWithdrawn, + ValueLoopedInSatoshis: valueLoopedIn, + ValueHtlcTimeoutSweepsSatoshis: htlcTimeoutSwept, + FilteredDeposits: clientDeposits, }, nil } @@ -1612,6 +1675,18 @@ func toClientState(state fsm.StateType) looprpc.DepositState { case deposit.PublishExpirySweep: return looprpc.DepositState_PUBLISH_EXPIRED + case deposit.LoopingIn: + return looprpc.DepositState_LOOPING_IN + + case deposit.LoopedIn: + return looprpc.DepositState_LOOPED_IN + + case deposit.SweepHtlcTimeout: + return looprpc.DepositState_SWEEP_HTLC_TIMEOUT + + case deposit.HtlcTimeoutSwept: + return looprpc.DepositState_HTLC_TIMEOUT_SWEPT + case deposit.WaitForExpirySweep: return looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP @@ -1637,6 +1712,18 @@ func toServerState(state looprpc.DepositState) fsm.StateType { case looprpc.DepositState_PUBLISH_EXPIRED: return deposit.PublishExpirySweep + case looprpc.DepositState_LOOPING_IN: + return deposit.LoopingIn + + case looprpc.DepositState_LOOPED_IN: + return deposit.LoopedIn + + case looprpc.DepositState_SWEEP_HTLC_TIMEOUT: + return deposit.SweepHtlcTimeout + + case looprpc.DepositState_HTLC_TIMEOUT_SWEPT: + return deposit.HtlcTimeoutSwept + case looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP: return deposit.WaitForExpirySweep From 701b187ac24d191f16d5ab1827315216ec85846c Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 30 Jul 2024 15:47:29 +0200 Subject: [PATCH 52/67] cmd: static address loop-in --- cmd/loop/loopin.go | 3 - cmd/loop/main.go | 6 + cmd/loop/quote.go | 6 +- cmd/loop/staticaddr.go | 241 +++++++++++++++++++++++++++++++++++++++-- 4 files changed, 242 insertions(+), 14 deletions(-) diff --git a/cmd/loop/loopin.go b/cmd/loop/loopin.go index 2d84a5e8d..52e889009 100644 --- a/cmd/loop/loopin.go +++ b/cmd/loop/loopin.go @@ -52,9 +52,6 @@ var ( Name: "in", Usage: "perform an on-chain to off-chain swap (loop in)", ArgsUsage: "amt", - Subcommands: []cli.Command{ - staticAddressCommands, - }, Description: ` Send the amount in satoshis specified by the amt argument off-chain. diff --git a/cmd/loop/main.go b/cmd/loop/main.go index 88ddd67f5..77d788824 100644 --- a/cmd/loop/main.go +++ b/cmd/loop/main.go @@ -280,6 +280,12 @@ func displayInDetails(req *looprpc.QuoteRequest, "wallet.\n\n") } + if req.DepositOutpoints != nil { + fmt.Printf("On-chain fees for static address loop-ins are not " + + "included.\nThey were already paid when the deposits " + + "were created.\n\n") + } + printQuoteInResp(req, resp, verbose) fmt.Printf("\nCONTINUE SWAP? (y/n): ") diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index f92b7243c..ec2cdb657 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -228,7 +228,11 @@ func printQuoteInResp(req *looprpc.QuoteRequest, totalFee := resp.HtlcPublishFeeSat + resp.SwapFeeSat - fmt.Printf(satAmtFmt, "Send on-chain:", req.Amt) + if req.DepositOutpoints != nil { + fmt.Printf(satAmtFmt, "Previously deposited on-chain:", req.Amt) + } else { + fmt.Printf(satAmtFmt, "Send on-chain:", req.Amt) + } fmt.Printf(satAmtFmt, "Receive off-chain:", req.Amt-totalFee) switch { diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index dcd02834c..de8d3a57a 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -9,21 +9,55 @@ import ( "strings" "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/looprpc" + "github.com/lightninglabs/loop/staticaddr/loopin" + "github.com/lightninglabs/loop/swapserverrpc" + "github.com/lightningnetwork/lnd/routing/route" "github.com/urfave/cli" ) var staticAddressCommands = cli.Command{ Name: "static", ShortName: "s", - Usage: "manage static loop-in addresses", - Category: "StaticAddress", + Usage: "perform on-chain to off-chain swaps using static addresses.", Subcommands: []cli.Command{ newStaticAddressCommand, listUnspentCommand, withdrawalCommand, summaryCommand, }, + Description: ` + Requests a loop-in swap based on static address deposits. After the + creation of a static address funds can be send to it. Once the funds are + confirmed on-chain they can be swapped instantaneously. If deposited + funds are not needed they can we withdrawn back to the local lnd wallet. + `, + Flags: []cli.Flag{ + cli.StringSliceFlag{ + Name: "utxo", + Usage: "specify the utxos of deposits as " + + "outpoints(tx:idx) that should be looped in.", + }, + cli.BoolFlag{ + Name: "all", + Usage: "loop in all static address deposits.", + }, + cli.DurationFlag{ + Name: "payment_timeout", + Usage: "the maximum time in seconds that the server " + + "is allowed to take for the swap payment. " + + "The client can retry the swap with adjusted " + + "parameters after the payment timed out.", + }, + lastHopFlag, + labelFlag, + routeHintsFlag, + privateFlag, + forceFlag, + verboseFlag, + }, + Action: staticAddressLoopIn, } var newStaticAddressCommand = cli.Command{ @@ -169,10 +203,11 @@ func withdraw(ctx *cli.Context) error { return fmt.Errorf("unknown withdrawal request") } - resp, err := client.WithdrawDeposits(ctxb, &looprpc.WithdrawDepositsRequest{ - Outpoints: outpoints, - All: isAllSelected, - }) + resp, err := client.WithdrawDeposits(ctxb, + &looprpc.WithdrawDepositsRequest{ + Outpoints: outpoints, + All: isAllSelected, + }) if err != nil { return err } @@ -194,10 +229,14 @@ var summaryCommand = cli.Command{ cli.StringFlag{ Name: "filter", Usage: "specify a filter to only display deposits in " + - "the specified state. The state can be one " + - "of [deposited|withdrawing|withdrawn|" + - "publish_expired_deposit|" + - "wait_for_expiry_sweep|expired|failed].", + "the specified state. Leaving out the filter " + + "returns all deposits.\nThe state can be one " + + "of the following: \n" + + "deposited\nwithdrawing\nwithdrawn\n" + + "looping_in\nlooped_in\n" + + "publish_expired_deposit\n" + + "sweep_htlc_timeout\nhtlc_timeout_swept\n" + + "wait_for_expiry_sweep\nexpired\nfailed\n.", }, }, Action: summary, @@ -229,9 +268,21 @@ func summary(ctx *cli.Context) error { case "withdrawn": filterState = looprpc.DepositState_WITHDRAWN + case "looping_in": + filterState = looprpc.DepositState_LOOPING_IN + + case "looped_in": + filterState = looprpc.DepositState_LOOPED_IN + case "publish_expired_deposit": filterState = looprpc.DepositState_PUBLISH_EXPIRED + case "sweep_htlc_timeout": + filterState = looprpc.DepositState_SWEEP_HTLC_TIMEOUT + + case "htlc_timeout_swept": + filterState = looprpc.DepositState_HTLC_TIMEOUT_SWEPT + case "wait_for_expiry_sweep": filterState = looprpc.DepositState_WAIT_FOR_EXPIRY_SWEEP @@ -294,3 +345,173 @@ func NewProtoOutPoint(op string) (*looprpc.OutPoint, error) { OutputIndex: uint32(outputIndex), }, nil } + +func staticAddressLoopIn(ctx *cli.Context) error { + if ctx.NumFlags() == 0 && ctx.NArg() == 0 { + return cli.ShowAppHelp(ctx) + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + var ( + ctxb = context.Background() + isAllSelected = ctx.IsSet("all") + isUtxoSelected = ctx.IsSet("utxo") + label = ctx.String("static-loop-in") + hints []*swapserverrpc.RouteHint + lastHop []byte + paymentTimeoutSeconds = uint32(loopin.DefaultPaymentTimeoutSeconds) + ) + + // Validate our label early so that we can fail before getting a quote. + if err := labels.Validate(label); err != nil { + return err + } + + // Private and route hints are mutually exclusive as setting private + // means we retrieve our own route hints from the connected node. + hints, err = validateRouteHints(ctx) + if err != nil { + return err + } + + if ctx.IsSet(lastHopFlag.Name) { + lastHopVertex, err := route.NewVertexFromStr( + ctx.String(lastHopFlag.Name), + ) + if err != nil { + return err + } + + lastHop = lastHopVertex[:] + } + + // Get the amount we need to quote for. + summaryResp, err := client.GetStaticAddressSummary( + ctxb, &looprpc.StaticAddressSummaryRequest{ + StateFilter: looprpc.DepositState_DEPOSITED, + }, + ) + if err != nil { + return err + } + + var depositOutpoints []string + switch { + case isAllSelected == isUtxoSelected: + return errors.New("must select either all or some utxos") + + case isAllSelected: + depositOutpoints = depositsToOutpoints( + summaryResp.FilteredDeposits, + ) + + case isUtxoSelected: + depositOutpoints = ctx.StringSlice("utxo") + + default: + return fmt.Errorf("unknown quote request") + } + + if containsDuplicates(depositOutpoints) { + return errors.New("duplicate outpoints detected") + } + + quoteReq := &looprpc.QuoteRequest{ + LoopInRouteHints: hints, + LoopInLastHop: lastHop, + Private: ctx.Bool(privateFlag.Name), + DepositOutpoints: depositOutpoints, + } + quote, err := client.GetLoopInQuote(ctxb, quoteReq) + if err != nil { + return err + } + + limits := getInLimits(quote) + + // populate the quote request with the sum of selected deposits and + // prompt the user for acceptance. + quoteReq.Amt, err = sumDeposits( + depositOutpoints, summaryResp.FilteredDeposits, + ) + if err != nil { + return err + } + + if !(ctx.Bool("force") || ctx.Bool("f")) { + err = displayInDetails(quoteReq, quote, ctx.Bool("verbose")) + if err != nil { + return err + } + } + + if ctx.IsSet("payment_timeout") { + paymentTimeoutSeconds = uint32(ctx.Duration("payment_timeout").Seconds()) + } + + req := &looprpc.StaticAddressLoopInRequest{ + Outpoints: depositOutpoints, + MaxSwapFeeSatoshis: int64(limits.maxSwapFee), + LastHop: lastHop, + Label: ctx.String(labelFlag.Name), + Initiator: defaultInitiator, + RouteHints: hints, + Private: ctx.Bool("private"), + PaymentTimeoutSeconds: paymentTimeoutSeconds, + } + + resp, err := client.StaticAddressLoopIn(ctxb, req) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + +func containsDuplicates(outpoints []string) bool { + found := make(map[string]struct{}) + for _, outpoint := range outpoints { + if _, ok := found[outpoint]; ok { + return true + } + found[outpoint] = struct{}{} + } + + return false +} + +func sumDeposits(outpoints []string, deposits []*looprpc.Deposit) (int64, + error) { + + var sum int64 + depositMap := make(map[string]*looprpc.Deposit) + for _, deposit := range deposits { + depositMap[deposit.Outpoint] = deposit + } + + for _, outpoint := range outpoints { + if _, ok := depositMap[outpoint]; !ok { + return 0, fmt.Errorf("deposit %v not found", outpoint) + } + + sum += depositMap[outpoint].Value + } + + return sum, nil +} + +func depositsToOutpoints(deposits []*looprpc.Deposit) []string { + outpoints := make([]string, 0, len(deposits)) + for _, deposit := range deposits { + outpoints = append(outpoints, deposit.Outpoint) + } + + return outpoints +} From dc21d43aae17b7d5ff9677db91b44c8b4251188a Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 5 Nov 2024 10:15:10 +0100 Subject: [PATCH 53/67] staticaddr: cmd listdeposits and listswaps --- cmd/loop/quote.go | 4 +- cmd/loop/staticaddr.go | 105 +++- loopd/perms/perms.go | 14 + loopd/swapclient_server.go | 304 ++++++---- looprpc/client.pb.go | 982 ++++++++++++++++++++++++++++++++- looprpc/client.proto | 147 ++++- looprpc/client.swagger.json | 88 +++ looprpc/client_grpc.pb.go | 84 +++ looprpc/swapclient.pb.json.go | 50 ++ staticaddr/loopin/interface.go | 3 + staticaddr/loopin/manager.go | 35 ++ 11 files changed, 1675 insertions(+), 141 deletions(-) diff --git a/cmd/loop/quote.go b/cmd/loop/quote.go index ec2cdb657..599a7fbca 100644 --- a/cmd/loop/quote.go +++ b/cmd/loop/quote.go @@ -139,8 +139,8 @@ func quoteIn(ctx *cli.Context) error { func depositAmount(ctx context.Context, client looprpc.SwapClientClient, depositOutpoints []string) (btcutil.Amount, error) { - addressSummary, err := client.GetStaticAddressSummary( - ctx, &looprpc.StaticAddressSummaryRequest{ + addressSummary, err := client.ListStaticAddressDeposits( + ctx, &looprpc.ListStaticAddressDepositsRequest{ Outpoints: depositOutpoints, }, ) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index de8d3a57a..f52ba47f3 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -11,6 +11,7 @@ import ( "github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/looprpc" + "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/loopin" "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/routing/route" @@ -24,6 +25,8 @@ var staticAddressCommands = cli.Command{ Subcommands: []cli.Command{ newStaticAddressCommand, listUnspentCommand, + listDepositsCommand, + listStaticAddressSwapsCommand, withdrawalCommand, summaryCommand, }, @@ -217,6 +220,36 @@ func withdraw(ctx *cli.Context) error { return nil } +var listDepositsCommand = cli.Command{ + Name: "listdeposits", + Usage: "Display a summary of static address related information.", + Description: ` + `, + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "filter", + Usage: "specify a filter to only display deposits in " + + "the specified state. Leaving out the filter " + + "returns all deposits.\nThe state can be one " + + "of the following: \n" + + "deposited\nwithdrawing\nwithdrawn\n" + + "looping_in\nlooped_in\n" + + "publish_expired_deposit\n" + + "sweep_htlc_timeout\nhtlc_timeout_swept\n" + + "wait_for_expiry_sweep\nexpired\nfailed\n.", + }, + }, + Action: listDeposits, +} + +var listStaticAddressSwapsCommand = cli.Command{ + Name: "listswaps", + Usage: "Display a summary of static address related information.", + Description: ` + `, + Action: listStaticAddressSwaps, +} + var summaryCommand = cli.Command{ Name: "summary", ShortName: "s", @@ -242,10 +275,10 @@ var summaryCommand = cli.Command{ Action: summary, } -func summary(ctx *cli.Context) error { +func listDeposits(ctx *cli.Context) error { ctxb := context.Background() if ctx.NArg() > 0 { - return cli.ShowCommandHelp(ctx, "summary") + return cli.ShowCommandHelp(ctx, "listdeposits") } client, cleanup, err := getClient(ctx) @@ -293,8 +326,8 @@ func summary(ctx *cli.Context) error { filterState = looprpc.DepositState_UNKNOWN_STATE } - resp, err := client.GetStaticAddressSummary( - ctxb, &looprpc.StaticAddressSummaryRequest{ + resp, err := client.ListStaticAddressDeposits( + ctxb, &looprpc.ListStaticAddressDepositsRequest{ StateFilter: filterState, }, ) @@ -307,6 +340,54 @@ func summary(ctx *cli.Context) error { return nil } +func listStaticAddressSwaps(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "listswaps") + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + resp, err := client.ListStaticAddressSwaps( + ctxb, &looprpc.ListStaticAddressSwapsRequest{}, + ) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + +func summary(ctx *cli.Context) error { + ctxb := context.Background() + if ctx.NArg() > 0 { + return cli.ShowCommandHelp(ctx, "summary") + } + + client, cleanup, err := getClient(ctx) + if err != nil { + return err + } + defer cleanup() + + resp, err := client.GetStaticAddressSummary( + ctxb, &looprpc.StaticAddressSummaryRequest{}, + ) + if err != nil { + return err + } + + printRespJSON(resp) + + return nil +} + func utxosToOutpoints(utxos []string) ([]*looprpc.OutPoint, error) { outpoints := make([]*looprpc.OutPoint, 0, len(utxos)) if len(utxos) == 0 { @@ -391,8 +472,8 @@ func staticAddressLoopIn(ctx *cli.Context) error { } // Get the amount we need to quote for. - summaryResp, err := client.GetStaticAddressSummary( - ctxb, &looprpc.StaticAddressSummaryRequest{ + depositList, err := client.ListStaticAddressDeposits( + ctxb, &looprpc.ListStaticAddressDepositsRequest{ StateFilter: looprpc.DepositState_DEPOSITED, }, ) @@ -400,6 +481,14 @@ func staticAddressLoopIn(ctx *cli.Context) error { return err } + if len(depositList.FilteredDeposits) == 0 { + errString := fmt.Sprintf("no confirmed deposits available, "+ + "deposits need at least %v confirmations", + deposit.DefaultConfTarget) + + return errors.New(errString) + } + var depositOutpoints []string switch { case isAllSelected == isUtxoSelected: @@ -407,7 +496,7 @@ func staticAddressLoopIn(ctx *cli.Context) error { case isAllSelected: depositOutpoints = depositsToOutpoints( - summaryResp.FilteredDeposits, + depositList.FilteredDeposits, ) case isUtxoSelected: @@ -437,7 +526,7 @@ func staticAddressLoopIn(ctx *cli.Context) error { // populate the quote request with the sum of selected deposits and // prompt the user for acceptance. quoteReq.Amt, err = sumDeposits( - depositOutpoints, summaryResp.FilteredDeposits, + depositOutpoints, depositList.FilteredDeposits, ) if err != nil { return err diff --git a/loopd/perms/perms.go b/loopd/perms/perms.go index d47257e82..6a0586f5d 100644 --- a/loopd/perms/perms.go +++ b/loopd/perms/perms.go @@ -94,6 +94,20 @@ var RequiredPermissions = map[string][]bakery.Op{ Entity: "loop", Action: "in", }}, + "/looprpc.SwapClient/ListStaticAddressDeposits": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, + "/looprpc.SwapClient/ListStaticAddressSwaps": {{ + Entity: "swap", + Action: "read", + }, { + Entity: "loop", + Action: "in", + }}, "/looprpc.SwapClient/GetStaticAddressSummary": {{ Entity: "swap", Action: "read", diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 88500ef5c..809ad7a5a 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -763,11 +763,11 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, } // Retrieve deposits to calculate their total value. - var summary *looprpc.StaticAddressSummaryResponse + var depositList *looprpc.ListStaticAddressDepositsResponse amount := btcutil.Amount(req.Amt) if len(req.DepositOutpoints) > 0 { - summary, err = s.GetStaticAddressSummary( - ctx, &looprpc.StaticAddressSummaryRequest{ + depositList, err = s.ListStaticAddressDeposits( + ctx, &looprpc.ListStaticAddressDepositsRequest{ Outpoints: req.DepositOutpoints, }, ) @@ -775,14 +775,14 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, return nil, err } - if summary == nil { + if depositList == nil { return nil, fmt.Errorf("no summary returned for " + "deposit outpoints") } // The requested amount should be 0 here if the request // contained deposit outpoints. - if amount != 0 && len(summary.FilteredDeposits) > 0 { + if amount != 0 && len(depositList.FilteredDeposits) > 0 { return nil, fmt.Errorf("amount should be 0 for " + "deposit quotes") } @@ -790,8 +790,8 @@ func (s *swapClientServer) GetLoopInQuote(ctx context.Context, // In case we quote for deposits we send the server both the // total value and the number of deposits. This is so the server // can probe the total amount and calculate the per input fee. - if amount == 0 && len(summary.FilteredDeposits) > 0 { - for _, deposit := range summary.FilteredDeposits { + if amount == 0 && len(depositList.FilteredDeposits) > 0 { + for _, deposit := range depositList.FilteredDeposits { amount += btcutil.Amount(deposit.Value) } } @@ -1459,15 +1459,16 @@ func (s *swapClientServer) WithdrawDeposits(ctx context.Context, }, err } -// GetStaticAddressSummary returns a summary static address related information. -// Amongst deposits and withdrawals and their total values it also includes a -// list of detailed deposit information filtered by their state. -func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, - req *looprpc.StaticAddressSummaryRequest) ( - *looprpc.StaticAddressSummaryResponse, error) { +// ListStaticAddressDeposits returns a list of all sufficiently confirmed +// deposits behind the static address and displays properties like value, +// state or blocks til expiry. +func (s *swapClientServer) ListStaticAddressDeposits(ctx context.Context, + req *looprpc.ListStaticAddressDepositsRequest) ( + *looprpc.ListStaticAddressDepositsResponse, error) { + outpoints := req.Outpoints if req.StateFilter != looprpc.DepositState_UNKNOWN_STATE && - len(req.Outpoints) > 0 { + len(outpoints) > 0 { return nil, fmt.Errorf("can either filter by state or " + "outpoints") @@ -1478,69 +1479,118 @@ func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, return nil, err } - return s.depositSummary( - ctx, allDeposits, req.StateFilter, req.Outpoints, - ) -} + // Deposits filtered by state or outpoints. + var filteredDeposits []*looprpc.Deposit + if len(outpoints) > 0 { + f := func(d *deposit.Deposit) bool { + for _, outpoint := range outpoints { + if outpoint == d.OutPoint.String() { + return true + } + } + return false + } + filteredDeposits = filter(allDeposits, f) -// StaticAddressLoopIn initiates a loop-in request using static address -// deposits. -func (s *swapClientServer) StaticAddressLoopIn(ctx context.Context, - in *looprpc.StaticAddressLoopInRequest) ( - *looprpc.StaticAddressLoopInResponse, error) { + if len(outpoints) != len(filteredDeposits) { + return nil, fmt.Errorf("not all outpoints found in " + + "deposits") + } + } else { + f := func(d *deposit.Deposit) bool { + if req.StateFilter == looprpc.DepositState_UNKNOWN_STATE { + // Per default, we return deposits in all + // states. + return true + } - log.Infof("Static loop-in request received") + return d.IsInState(toServerState(req.StateFilter)) + } + filteredDeposits = filter(allDeposits, f) + } - routeHints, err := unmarshallRouteHints(in.RouteHints) + // Calculate the blocks until expiry for each deposit. + lndInfo, err := s.lnd.Client.GetInfo(ctx) if err != nil { return nil, err } - req := &loop.StaticAddressLoopInRequest{ - DepositOutpoints: in.Outpoints, - MaxSwapFee: btcutil.Amount(in.MaxSwapFeeSatoshis), - Label: in.Label, - Initiator: in.Initiator, - Private: in.Private, - RouteHints: routeHints, - PaymentTimeoutSeconds: in.PaymentTimeoutSeconds, + bestBlockHeight := int64(lndInfo.BlockHeight) + params, err := s.staticAddressManager.GetStaticAddressParameters(ctx) + if err != nil { + return nil, err } - - if in.LastHop != nil { - lastHop, err := route.NewVertexFromBytes(in.LastHop) - if err != nil { - return nil, err - } - req.LastHop = &lastHop + for i := 0; i < len(filteredDeposits); i++ { + filteredDeposits[i].BlocksUntilExpiry = + filteredDeposits[i].ConfirmationHeight + + int64(params.Expiry) - bestBlockHeight } - loopIn, err := s.staticLoopInManager.DeliverLoopInRequest(ctx, req) + return &looprpc.ListStaticAddressDepositsResponse{ + FilteredDeposits: filteredDeposits, + }, nil +} + +// ListStaticAddressSwaps returns a list of all swaps that are currently pending +// or previously succeeded. +func (s *swapClientServer) ListStaticAddressSwaps(ctx context.Context, + _ *looprpc.ListStaticAddressSwapsRequest) ( + *looprpc.ListStaticAddressSwapsResponse, error) { + + swaps, err := s.staticLoopInManager.GetAllSwaps(ctx) if err != nil { return nil, err } - return &looprpc.StaticAddressLoopInResponse{ - SwapHash: loopIn.SwapHash[:], - State: string(loopIn.GetState()), - Amount: uint64(loopIn.TotalDepositAmount()), - HtlcCltv: loopIn.HtlcCltvExpiry, - MaxSwapFeeSatoshis: int64(loopIn.MaxSwapFee), - InitiationHeight: loopIn.InitiationHeight, - ProtocolVersion: loopIn.ProtocolVersion.String(), - Initiator: loopIn.Initiator, - Label: loopIn.Label, - PaymentTimeoutSeconds: loopIn.PaymentTimeoutSeconds, - QuotedSwapFeeSatoshis: int64(loopIn.QuotedSwapFee), + if len(swaps) == 0 { + return &looprpc.ListStaticAddressSwapsResponse{}, nil + } + + var clientSwaps []*looprpc.StaticAddressLoopInSwap + for _, swp := range swaps { + chainParams, err := s.network.ChainParams() + if err != nil { + return nil, fmt.Errorf("error getting chain params") + } + swapPayReq, err := zpay32.Decode(swp.SwapInvoice, chainParams) + if err != nil { + return nil, fmt.Errorf("error decoding swap invoice: "+ + "%v", err) + } + swap := &looprpc.StaticAddressLoopInSwap{ + SwapHash: swp.SwapHash[:], + DepositOutpoints: swp.DepositOutpoints, + State: toClientStaticAddressLoopInState( + swp.GetState(), + ), + SwapAmountSatoshis: int64(swp.TotalDepositAmount()), + PaymentRequestAmountSatoshis: int64( + swapPayReq.MilliSat.ToSatoshis(), + ), + } + + clientSwaps = append(clientSwaps, swap) + } + + return &looprpc.ListStaticAddressSwapsResponse{ + Swaps: clientSwaps, }, nil } -func (s *swapClientServer) depositSummary(ctx context.Context, - deposits []*deposit.Deposit, stateFilter looprpc.DepositState, - outpointsFilter []string) (*looprpc.StaticAddressSummaryResponse, - error) { +// GetStaticAddressSummary returns a summary static address related information. +// Amongst deposits and withdrawals and their total values it also includes a +// list of detailed deposit information filtered by their state. +func (s *swapClientServer) GetStaticAddressSummary(ctx context.Context, + _ *looprpc.StaticAddressSummaryRequest) ( + *looprpc.StaticAddressSummaryResponse, error) { + + allDeposits, err := s.depositManager.GetAllDeposits(ctx) + if err != nil { + return nil, err + } var ( - totalNumDeposits = len(deposits) + totalNumDeposits = len(allDeposits) valueUnconfirmed int64 valueDeposited int64 valueExpired int64 @@ -1561,7 +1611,7 @@ func (s *swapClientServer) depositSummary(ctx context.Context, } // Confirmed total values by category. - for _, d := range deposits { + for _, d := range allDeposits { value := int64(d.Value) switch d.GetState() { case deposit.Deposited: @@ -1581,36 +1631,6 @@ func (s *swapClientServer) depositSummary(ctx context.Context, } } - // Deposits filtered by state or outpoints. - var clientDeposits []*looprpc.Deposit - if len(outpointsFilter) > 0 { - f := func(d *deposit.Deposit) bool { - for _, outpoint := range outpointsFilter { - if outpoint == d.OutPoint.String() { - return true - } - } - return false - } - clientDeposits = filter(deposits, f) - - if len(outpointsFilter) != len(clientDeposits) { - return nil, fmt.Errorf("not all outpoints found in " + - "deposits") - } - } else { - f := func(d *deposit.Deposit) bool { - if stateFilter == looprpc.DepositState_UNKNOWN_STATE { - // Per default, we return deposits in all - // states. - return true - } - - return d.IsInState(toServerState(stateFilter)) - } - clientDeposits = filter(deposits, f) - } - params, err := s.staticAddressManager.GetStaticAddressParameters(ctx) if err != nil { return nil, err @@ -1625,6 +1645,7 @@ func (s *swapClientServer) depositSummary(ctx context.Context, return &looprpc.StaticAddressSummaryResponse{ StaticAddress: address.String(), + RelativeExpiryBlocks: uint64(params.Expiry), TotalNumDeposits: uint32(totalNumDeposits), ValueUnconfirmedSatoshis: valueUnconfirmed, ValueDepositedSatoshis: valueDeposited, @@ -1632,7 +1653,57 @@ func (s *swapClientServer) depositSummary(ctx context.Context, ValueWithdrawnSatoshis: valueWithdrawn, ValueLoopedInSatoshis: valueLoopedIn, ValueHtlcTimeoutSweepsSatoshis: htlcTimeoutSwept, - FilteredDeposits: clientDeposits, + }, nil +} + +// StaticAddressLoopIn initiates a loop-in request using static address +// deposits. +func (s *swapClientServer) StaticAddressLoopIn(ctx context.Context, + in *looprpc.StaticAddressLoopInRequest) ( + *looprpc.StaticAddressLoopInResponse, error) { + + log.Infof("Static loop-in request received") + + routeHints, err := unmarshallRouteHints(in.RouteHints) + if err != nil { + return nil, err + } + + req := &loop.StaticAddressLoopInRequest{ + DepositOutpoints: in.Outpoints, + MaxSwapFee: btcutil.Amount(in.MaxSwapFeeSatoshis), + Label: in.Label, + Initiator: in.Initiator, + Private: in.Private, + RouteHints: routeHints, + PaymentTimeoutSeconds: in.PaymentTimeoutSeconds, + } + + if in.LastHop != nil { + lastHop, err := route.NewVertexFromBytes(in.LastHop) + if err != nil { + return nil, err + } + req.LastHop = &lastHop + } + + loopIn, err := s.staticLoopInManager.DeliverLoopInRequest(ctx, req) + if err != nil { + return nil, err + } + + return &looprpc.StaticAddressLoopInResponse{ + SwapHash: loopIn.SwapHash[:], + State: string(loopIn.GetState()), + Amount: uint64(loopIn.TotalDepositAmount()), + HtlcCltv: loopIn.HtlcCltvExpiry, + MaxSwapFeeSatoshis: int64(loopIn.MaxSwapFee), + InitiationHeight: loopIn.InitiationHeight, + ProtocolVersion: loopIn.ProtocolVersion.String(), + Initiator: loopIn.Initiator, + Label: loopIn.Label, + PaymentTimeoutSeconds: loopIn.PaymentTimeoutSeconds, + QuotedSwapFeeSatoshis: int64(loopIn.QuotedSwapFee), }, nil } @@ -1648,8 +1719,10 @@ func filter(deposits []*deposit.Deposit, f filterFunc) []*looprpc.Deposit { hash := d.Hash outpoint := wire.NewOutPoint(&hash, d.Index).String() deposit := &looprpc.Deposit{ - Id: d.ID[:], - State: toClientState(d.GetState()), + Id: d.ID[:], + State: toClientDepositState( + d.GetState(), + ), Outpoint: outpoint, Value: int64(d.Value), ConfirmationHeight: d.ConfirmationHeight, @@ -1661,7 +1734,7 @@ func filter(deposits []*deposit.Deposit, f filterFunc) []*looprpc.Deposit { return clientDeposits } -func toClientState(state fsm.StateType) looprpc.DepositState { +func toClientDepositState(state fsm.StateType) looprpc.DepositState { switch state { case deposit.Deposited: return looprpc.DepositState_DEPOSITED @@ -1698,6 +1771,51 @@ func toClientState(state fsm.StateType) looprpc.DepositState { } } +func toClientStaticAddressLoopInState( + state fsm.StateType) looprpc.StaticAddressLoopInSwapState { + + switch state { + case loopin.InitHtlcTx: + return looprpc.StaticAddressLoopInSwapState_INIT_HTLC + + case loopin.SignHtlcTx: + return looprpc.StaticAddressLoopInSwapState_SIGN_HTLC_TX + + case loopin.MonitorInvoiceAndHtlcTx: + return looprpc.StaticAddressLoopInSwapState_MONITOR_INVOICE_HTLC_TX + + case loopin.PaymentReceived: + return looprpc.StaticAddressLoopInSwapState_PAYMENT_RECEIVED + + case loopin.SweepHtlcTimeout: + return looprpc.StaticAddressLoopInSwapState_SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT + + case loopin.MonitorHtlcTimeoutSweep: + return looprpc.StaticAddressLoopInSwapState_MONITOR_HTLC_TIMEOUT_SWEEP + + case loopin.HtlcTimeoutSwept: + return looprpc.StaticAddressLoopInSwapState_HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT + + case loopin.FetchSignPushSweeplessSweepTx: + return looprpc.StaticAddressLoopInSwapState_FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX + + case loopin.Succeeded: + return looprpc.StaticAddressLoopInSwapState_SUCCEEDED + + case loopin.SucceededSweeplessSigFailed: + return looprpc.StaticAddressLoopInSwapState_SUCCEEDED_SWEEPLESS_SIG_FAILED + + case loopin.UnlockDeposits: + return looprpc.StaticAddressLoopInSwapState_UNLOCK_DEPOSITS + + case loopin.Failed: + return looprpc.StaticAddressLoopInSwapState_FAILED_STATIC_ADDRESS_SWAP + + default: + return looprpc.StaticAddressLoopInSwapState_UNKNOWN_STATIC_ADDRESS_SWAP_STATE + } +} + func toServerState(state looprpc.DepositState) fsm.StateType { switch state { case looprpc.DepositState_DEPOSITED: diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 1506d54d0..7d879499c 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -534,6 +534,85 @@ func (DepositState) EnumDescriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{6} } +type StaticAddressLoopInSwapState int32 + +const ( + StaticAddressLoopInSwapState_UNKNOWN_STATIC_ADDRESS_SWAP_STATE StaticAddressLoopInSwapState = 0 + StaticAddressLoopInSwapState_INIT_HTLC StaticAddressLoopInSwapState = 1 + StaticAddressLoopInSwapState_SIGN_HTLC_TX StaticAddressLoopInSwapState = 2 + StaticAddressLoopInSwapState_MONITOR_INVOICE_HTLC_TX StaticAddressLoopInSwapState = 3 + StaticAddressLoopInSwapState_PAYMENT_RECEIVED StaticAddressLoopInSwapState = 4 + StaticAddressLoopInSwapState_SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT StaticAddressLoopInSwapState = 5 + StaticAddressLoopInSwapState_MONITOR_HTLC_TIMEOUT_SWEEP StaticAddressLoopInSwapState = 6 + StaticAddressLoopInSwapState_HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT StaticAddressLoopInSwapState = 7 + StaticAddressLoopInSwapState_FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX StaticAddressLoopInSwapState = 8 + StaticAddressLoopInSwapState_SUCCEEDED StaticAddressLoopInSwapState = 9 + StaticAddressLoopInSwapState_SUCCEEDED_SWEEPLESS_SIG_FAILED StaticAddressLoopInSwapState = 10 + StaticAddressLoopInSwapState_UNLOCK_DEPOSITS StaticAddressLoopInSwapState = 11 + StaticAddressLoopInSwapState_FAILED_STATIC_ADDRESS_SWAP StaticAddressLoopInSwapState = 12 +) + +// Enum value maps for StaticAddressLoopInSwapState. +var ( + StaticAddressLoopInSwapState_name = map[int32]string{ + 0: "UNKNOWN_STATIC_ADDRESS_SWAP_STATE", + 1: "INIT_HTLC", + 2: "SIGN_HTLC_TX", + 3: "MONITOR_INVOICE_HTLC_TX", + 4: "PAYMENT_RECEIVED", + 5: "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", + 6: "MONITOR_HTLC_TIMEOUT_SWEEP", + 7: "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", + 8: "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX", + 9: "SUCCEEDED", + 10: "SUCCEEDED_SWEEPLESS_SIG_FAILED", + 11: "UNLOCK_DEPOSITS", + 12: "FAILED_STATIC_ADDRESS_SWAP", + } + StaticAddressLoopInSwapState_value = map[string]int32{ + "UNKNOWN_STATIC_ADDRESS_SWAP_STATE": 0, + "INIT_HTLC": 1, + "SIGN_HTLC_TX": 2, + "MONITOR_INVOICE_HTLC_TX": 3, + "PAYMENT_RECEIVED": 4, + "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT": 5, + "MONITOR_HTLC_TIMEOUT_SWEEP": 6, + "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT": 7, + "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX": 8, + "SUCCEEDED": 9, + "SUCCEEDED_SWEEPLESS_SIG_FAILED": 10, + "UNLOCK_DEPOSITS": 11, + "FAILED_STATIC_ADDRESS_SWAP": 12, + } +) + +func (x StaticAddressLoopInSwapState) Enum() *StaticAddressLoopInSwapState { + p := new(StaticAddressLoopInSwapState) + *p = x + return p +} + +func (x StaticAddressLoopInSwapState) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StaticAddressLoopInSwapState) Descriptor() protoreflect.EnumDescriptor { + return file_client_proto_enumTypes[7].Descriptor() +} + +func (StaticAddressLoopInSwapState) Type() protoreflect.EnumType { + return &file_client_proto_enumTypes[7] +} + +func (x StaticAddressLoopInSwapState) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StaticAddressLoopInSwapState.Descriptor instead. +func (StaticAddressLoopInSwapState) EnumDescriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{7} +} + type ListSwapsFilter_SwapTypeFilter int32 const ( @@ -570,11 +649,11 @@ func (x ListSwapsFilter_SwapTypeFilter) String() string { } func (ListSwapsFilter_SwapTypeFilter) Descriptor() protoreflect.EnumDescriptor { - return file_client_proto_enumTypes[7].Descriptor() + return file_client_proto_enumTypes[8].Descriptor() } func (ListSwapsFilter_SwapTypeFilter) Type() protoreflect.EnumType { - return &file_client_proto_enumTypes[7] + return &file_client_proto_enumTypes[8] } func (x ListSwapsFilter_SwapTypeFilter) Number() protoreflect.EnumNumber { @@ -4521,7 +4600,7 @@ func (x *OutPoint) GetOutputIndex() uint32 { return 0 } -type StaticAddressSummaryRequest struct { +type ListStaticAddressDepositsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4532,8 +4611,8 @@ type StaticAddressSummaryRequest struct { Outpoints []string `protobuf:"bytes,2,rep,name=outpoints,proto3" json:"outpoints,omitempty"` } -func (x *StaticAddressSummaryRequest) Reset() { - *x = StaticAddressSummaryRequest{} +func (x *ListStaticAddressDepositsRequest) Reset() { + *x = ListStaticAddressDepositsRequest{} if protoimpl.UnsafeEnabled { mi := &file_client_proto_msgTypes[53] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4541,13 +4620,13 @@ func (x *StaticAddressSummaryRequest) Reset() { } } -func (x *StaticAddressSummaryRequest) String() string { +func (x *ListStaticAddressDepositsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*StaticAddressSummaryRequest) ProtoMessage() {} +func (*ListStaticAddressDepositsRequest) ProtoMessage() {} -func (x *StaticAddressSummaryRequest) ProtoReflect() protoreflect.Message { +func (x *ListStaticAddressDepositsRequest) ProtoReflect() protoreflect.Message { mi := &file_client_proto_msgTypes[53] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4559,25 +4638,197 @@ func (x *StaticAddressSummaryRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use StaticAddressSummaryRequest.ProtoReflect.Descriptor instead. -func (*StaticAddressSummaryRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use ListStaticAddressDepositsRequest.ProtoReflect.Descriptor instead. +func (*ListStaticAddressDepositsRequest) Descriptor() ([]byte, []int) { return file_client_proto_rawDescGZIP(), []int{53} } -func (x *StaticAddressSummaryRequest) GetStateFilter() DepositState { +func (x *ListStaticAddressDepositsRequest) GetStateFilter() DepositState { if x != nil { return x.StateFilter } return DepositState_UNKNOWN_STATE } -func (x *StaticAddressSummaryRequest) GetOutpoints() []string { +func (x *ListStaticAddressDepositsRequest) GetOutpoints() []string { if x != nil { return x.Outpoints } return nil } +type ListStaticAddressDepositsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of all deposits that match the filtered state. + FilteredDeposits []*Deposit `protobuf:"bytes,1,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` +} + +func (x *ListStaticAddressDepositsResponse) Reset() { + *x = ListStaticAddressDepositsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[54] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressDepositsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressDepositsResponse) ProtoMessage() {} + +func (x *ListStaticAddressDepositsResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[54] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressDepositsResponse.ProtoReflect.Descriptor instead. +func (*ListStaticAddressDepositsResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{54} +} + +func (x *ListStaticAddressDepositsResponse) GetFilteredDeposits() []*Deposit { + if x != nil { + return x.FilteredDeposits + } + return nil +} + +type ListStaticAddressSwapsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *ListStaticAddressSwapsRequest) Reset() { + *x = ListStaticAddressSwapsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[55] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressSwapsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressSwapsRequest) ProtoMessage() {} + +func (x *ListStaticAddressSwapsRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[55] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressSwapsRequest.ProtoReflect.Descriptor instead. +func (*ListStaticAddressSwapsRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{55} +} + +type ListStaticAddressSwapsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A list of all swaps known static address loop-in swaps. + Swaps []*StaticAddressLoopInSwap `protobuf:"bytes,1,rep,name=swaps,proto3" json:"swaps,omitempty"` +} + +func (x *ListStaticAddressSwapsResponse) Reset() { + *x = ListStaticAddressSwapsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[56] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListStaticAddressSwapsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListStaticAddressSwapsResponse) ProtoMessage() {} + +func (x *ListStaticAddressSwapsResponse) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[56] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListStaticAddressSwapsResponse.ProtoReflect.Descriptor instead. +func (*ListStaticAddressSwapsResponse) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{56} +} + +func (x *ListStaticAddressSwapsResponse) GetSwaps() []*StaticAddressLoopInSwap { + if x != nil { + return x.Swaps + } + return nil +} + +type StaticAddressSummaryRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *StaticAddressSummaryRequest) Reset() { + *x = StaticAddressSummaryRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[57] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressSummaryRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressSummaryRequest) ProtoMessage() {} + +func (x *StaticAddressSummaryRequest) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[57] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressSummaryRequest.ProtoReflect.Descriptor instead. +func (*StaticAddressSummaryRequest) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{57} +} + type StaticAddressSummaryResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4585,9 +4836,12 @@ type StaticAddressSummaryResponse struct { // The static address of the client. StaticAddress string `protobuf:"bytes,1,opt,name=static_address,json=staticAddress,proto3" json:"static_address,omitempty"` + // The CSV expiry of the static address. + RelativeExpiryBlocks uint64 `protobuf:"varint,2,opt,name=relative_expiry_blocks,json=relativeExpiryBlocks,proto3" json:"relative_expiry_blocks,omitempty"` // The total number of deposits. - TotalNumDeposits uint32 `protobuf:"varint,2,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` + TotalNumDeposits uint32 `protobuf:"varint,3,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` // The total value of unconfirmed deposits. +<<<<<<< HEAD ValueUnconfirmedSatoshis int64 `protobuf:"varint,3,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` // The total value of confirmed deposits. ValueDepositedSatoshis int64 `protobuf:"varint,4,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` @@ -4601,12 +4855,25 @@ type StaticAddressSummaryResponse struct { ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,8,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` // A list of all deposits that match the filtered state. FilteredDeposits []*Deposit `protobuf:"bytes,9,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` +======= + ValueUnconfirmedSatoshis int64 `protobuf:"varint,4,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` + // The total value of confirmed deposits. + ValueDepositedSatoshis int64 `protobuf:"varint,5,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` + // The total value of all expired deposits. + ValueExpiredSatoshis int64 `protobuf:"varint,6,opt,name=value_expired_satoshis,json=valueExpiredSatoshis,proto3" json:"value_expired_satoshis,omitempty"` + // The total value of all deposits that have been withdrawn. + ValueWithdrawnSatoshis int64 `protobuf:"varint,7,opt,name=value_withdrawn_satoshis,json=valueWithdrawnSatoshis,proto3" json:"value_withdrawn_satoshis,omitempty"` + // The total value of all loop-ins that have been finalized. + ValueLoopedInSatoshis int64 `protobuf:"varint,8,opt,name=value_looped_in_satoshis,json=valueLoopedInSatoshis,proto3" json:"value_looped_in_satoshis,omitempty"` + // The total value of all htlc timeout sweeps that the client swept. + ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,9,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressSummaryResponse) Reset() { *x = StaticAddressSummaryResponse{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[54] + mi := &file_client_proto_msgTypes[58] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4619,7 +4886,7 @@ func (x *StaticAddressSummaryResponse) String() string { func (*StaticAddressSummaryResponse) ProtoMessage() {} func (x *StaticAddressSummaryResponse) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[54] + mi := &file_client_proto_msgTypes[58] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4632,7 +4899,7 @@ func (x *StaticAddressSummaryResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressSummaryResponse.ProtoReflect.Descriptor instead. func (*StaticAddressSummaryResponse) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{54} + return file_client_proto_rawDescGZIP(), []int{58} } func (x *StaticAddressSummaryResponse) GetStaticAddress() string { @@ -4642,6 +4909,13 @@ func (x *StaticAddressSummaryResponse) GetStaticAddress() string { return "" } +func (x *StaticAddressSummaryResponse) GetRelativeExpiryBlocks() uint64 { + if x != nil { + return x.RelativeExpiryBlocks + } + return 0 +} + func (x *StaticAddressSummaryResponse) GetTotalNumDeposits() uint32 { if x != nil { return x.TotalNumDeposits @@ -4673,6 +4947,7 @@ func (x *StaticAddressSummaryResponse) GetValueExpiredSatoshis() int64 { func (x *StaticAddressSummaryResponse) GetValueWithdrawnSatoshis() int64 { if x != nil { return x.ValueWithdrawnSatoshis +<<<<<<< HEAD } return 0 } @@ -4687,15 +4962,24 @@ func (x *StaticAddressSummaryResponse) GetValueLoopedInSatoshis() int64 { func (x *StaticAddressSummaryResponse) GetValueHtlcTimeoutSweepsSatoshis() int64 { if x != nil { return x.ValueHtlcTimeoutSweepsSatoshis +======= +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } return 0 } -func (x *StaticAddressSummaryResponse) GetFilteredDeposits() []*Deposit { +func (x *StaticAddressSummaryResponse) GetValueLoopedInSatoshis() int64 { if x != nil { - return x.FilteredDeposits + return x.ValueLoopedInSatoshis } - return nil + return 0 +} + +func (x *StaticAddressSummaryResponse) GetValueHtlcTimeoutSweepsSatoshis() int64 { + if x != nil { + return x.ValueHtlcTimeoutSweepsSatoshis + } + return 0 } type Deposit struct { @@ -4713,12 +4997,15 @@ type Deposit struct { Value int64 `protobuf:"varint,4,opt,name=value,proto3" json:"value,omitempty"` // The block height at which the deposit was confirmed. ConfirmationHeight int64 `protobuf:"varint,5,opt,name=confirmation_height,json=confirmationHeight,proto3" json:"confirmation_height,omitempty"` + // The number of blocks that are left until the deposit cannot be used for a + // loop-in swap anymore. + BlocksUntilExpiry int64 `protobuf:"varint,6,opt,name=blocks_until_expiry,json=blocksUntilExpiry,proto3" json:"blocks_until_expiry,omitempty"` } func (x *Deposit) Reset() { *x = Deposit{} if protoimpl.UnsafeEnabled { - mi := &file_client_proto_msgTypes[55] + mi := &file_client_proto_msgTypes[59] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4731,7 +5018,7 @@ func (x *Deposit) String() string { func (*Deposit) ProtoMessage() {} func (x *Deposit) ProtoReflect() protoreflect.Message { - mi := &file_client_proto_msgTypes[55] + mi := &file_client_proto_msgTypes[59] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4744,7 +5031,7 @@ func (x *Deposit) ProtoReflect() protoreflect.Message { // Deprecated: Use Deposit.ProtoReflect.Descriptor instead. func (*Deposit) Descriptor() ([]byte, []int) { - return file_client_proto_rawDescGZIP(), []int{55} + return file_client_proto_rawDescGZIP(), []int{59} } func (x *Deposit) GetId() []byte { @@ -4782,6 +5069,100 @@ func (x *Deposit) GetConfirmationHeight() int64 { return 0 } +<<<<<<< HEAD +======= +func (x *Deposit) GetBlocksUntilExpiry() int64 { + if x != nil { + return x.BlocksUntilExpiry + } + return 0 +} + +type StaticAddressLoopInSwap struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash of the swap. It represents the unique identifier of the swap. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + DepositOutpoints []string `protobuf:"bytes,2,rep,name=deposit_outpoints,json=depositOutpoints,proto3" json:"deposit_outpoints,omitempty"` + State StaticAddressLoopInSwapState `protobuf:"varint,3,opt,name=state,proto3,enum=looprpc.StaticAddressLoopInSwapState" json:"state,omitempty"` + // The swap amount of the swap. It is the sum of the values of the deposit + // outpoints that were used for this swap. + SwapAmountSatoshis int64 `protobuf:"varint,4,opt,name=swap_amount_satoshis,json=swapAmountSatoshis,proto3" json:"swap_amount_satoshis,omitempty"` + // The invoiced swap amount. It is the swap amount minus the quoted server + // fees. + PaymentRequestAmountSatoshis int64 `protobuf:"varint,5,opt,name=payment_request_amount_satoshis,json=paymentRequestAmountSatoshis,proto3" json:"payment_request_amount_satoshis,omitempty"` +} + +func (x *StaticAddressLoopInSwap) Reset() { + *x = StaticAddressLoopInSwap{} + if protoimpl.UnsafeEnabled { + mi := &file_client_proto_msgTypes[60] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *StaticAddressLoopInSwap) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*StaticAddressLoopInSwap) ProtoMessage() {} + +func (x *StaticAddressLoopInSwap) ProtoReflect() protoreflect.Message { + mi := &file_client_proto_msgTypes[60] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use StaticAddressLoopInSwap.ProtoReflect.Descriptor instead. +func (*StaticAddressLoopInSwap) Descriptor() ([]byte, []int) { + return file_client_proto_rawDescGZIP(), []int{60} +} + +func (x *StaticAddressLoopInSwap) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *StaticAddressLoopInSwap) GetDepositOutpoints() []string { + if x != nil { + return x.DepositOutpoints + } + return nil +} + +func (x *StaticAddressLoopInSwap) GetState() StaticAddressLoopInSwapState { + if x != nil { + return x.State + } + return StaticAddressLoopInSwapState_UNKNOWN_STATIC_ADDRESS_SWAP_STATE +} + +func (x *StaticAddressLoopInSwap) GetSwapAmountSatoshis() int64 { + if x != nil { + return x.SwapAmountSatoshis + } + return 0 +} + +func (x *StaticAddressLoopInSwap) GetPaymentRequestAmountSatoshis() int64 { + if x != nil { + return x.PaymentRequestAmountSatoshis + } + return 0 +} + +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) type StaticAddressLoopInRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -4823,7 +5204,11 @@ type StaticAddressLoopInRequest struct { func (x *StaticAddressLoopInRequest) Reset() { *x = StaticAddressLoopInRequest{} if protoimpl.UnsafeEnabled { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[56] +======= + mi := &file_client_proto_msgTypes[61] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4836,7 +5221,11 @@ func (x *StaticAddressLoopInRequest) String() string { func (*StaticAddressLoopInRequest) ProtoMessage() {} func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[56] +======= + mi := &file_client_proto_msgTypes[61] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4849,7 +5238,11 @@ func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressLoopInRequest.ProtoReflect.Descriptor instead. func (*StaticAddressLoopInRequest) Descriptor() ([]byte, []int) { +<<<<<<< HEAD return file_client_proto_rawDescGZIP(), []int{56} +======= + return file_client_proto_rawDescGZIP(), []int{61} +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressLoopInRequest) GetOutpoints() []string { @@ -4947,7 +5340,11 @@ type StaticAddressLoopInResponse struct { func (x *StaticAddressLoopInResponse) Reset() { *x = StaticAddressLoopInResponse{} if protoimpl.UnsafeEnabled { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[57] +======= + mi := &file_client_proto_msgTypes[62] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -4960,7 +5357,11 @@ func (x *StaticAddressLoopInResponse) String() string { func (*StaticAddressLoopInResponse) ProtoMessage() {} func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { +<<<<<<< HEAD mi := &file_client_proto_msgTypes[57] +======= + mi := &file_client_proto_msgTypes[62] +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4973,7 +5374,11 @@ func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressLoopInResponse.ProtoReflect.Descriptor instead. func (*StaticAddressLoopInResponse) Descriptor() ([]byte, []int) { +<<<<<<< HEAD return file_client_proto_rawDescGZIP(), []int{57} +======= + return file_client_proto_rawDescGZIP(), []int{62} +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressLoopInResponse) GetSwapHash() []byte { @@ -5590,6 +5995,7 @@ var file_client_proto_rawDesc = []byte{ 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, +<<<<<<< HEAD 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, @@ -5771,6 +6177,251 @@ var file_client_proto_rawDesc = []byte{ 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x32, 0x89, 0x10, 0x0a, 0x0a, 0x53, 0x77, +======= + 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x7a, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, + 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x22, 0x62, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, + 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x77, 0x61, + 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x05, 0x73, 0x77, 0x61, 0x70, + 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x22, 0x96, 0x04, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, + 0x76, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, + 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, + 0x6c, 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x1a, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, + 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, + 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, + 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, + 0x73, 0x68, 0x69, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x5f, 0x73, 0x61, + 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x53, 0x61, 0x74, 0x6f, + 0x73, 0x68, 0x69, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x6f, + 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x6f, 0x6f, + 0x70, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x4a, 0x0a, + 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, + 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, + 0x68, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x48, 0x74, 0x6c, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x73, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x07, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, + 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x45, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x99, 0x02, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, + 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, + 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x77, 0x61, 0x70, + 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x70, 0x61, + 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x1c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x22, 0xc3, 0x02, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, + 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, + 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, + 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, + 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, + 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, + 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, + 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, + 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x74, 0x76, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x74, 0x76, 0x12, + 0x37, 0x0a, 0x18, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x15, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, + 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, + 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, + 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, + 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, + 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, + 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, + 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, + 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, + 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, + 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, + 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, + 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, + 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, + 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, + 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, + 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, + 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, + 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, + 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, + 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, + 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, + 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, + 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, + 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, + 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, + 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, + 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, + 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, + 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, + 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, + 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, + 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, + 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, + 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, + 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, + 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, + 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, + 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, + 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, + 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, + 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, + 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, + 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, + 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, + 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, + 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, + 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, + 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, + 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, + 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, + 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, + 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, + 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, + 0x2a, 0xdc, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, + 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, + 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, + 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x4f, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x49, + 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x4f, 0x4f, 0x50, 0x45, 0x44, 0x5f, 0x49, 0x4e, + 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, + 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, + 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, + 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, + 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x2a, + 0x97, 0x03, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, + 0x12, 0x25, 0x0a, 0x21, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, + 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x5f, + 0x48, 0x54, 0x4c, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x48, + 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x4f, 0x4e, 0x49, + 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x54, 0x58, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, + 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, + 0x57, 0x45, 0x45, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, + 0x45, 0x53, 0x53, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, + 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, + 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, + 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, + 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x45, 0x54, + 0x43, 0x48, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x53, 0x57, 0x45, + 0x45, 0x50, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x58, 0x10, + 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x09, + 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x5f, 0x53, 0x57, + 0x45, 0x45, 0x50, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, + 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x53, 0x10, 0x0b, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, + 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x10, 0x0c, 0x32, 0xe8, 0x11, 0x0a, 0x0a, 0x53, 0x77, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, @@ -5886,6 +6537,7 @@ var file_client_proto_rawDesc = []byte{ 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, +<<<<<<< HEAD 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, @@ -5903,6 +6555,39 @@ var file_client_proto_rawDesc = []byte{ 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +======= + 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x4c, + 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, + 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, + 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, + 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } var ( @@ -5917,6 +6602,7 @@ func file_client_proto_rawDescGZIP() []byte { return file_client_proto_rawDescData } +<<<<<<< HEAD var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 8) var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 58) var file_client_proto_goTypes = []any{ @@ -6003,11 +6689,106 @@ var file_client_proto_depIdxs = []int32{ 30, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 30, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats 35, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule +======= +var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 9) +var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 63) +var file_client_proto_goTypes = []any{ + (AddressType)(0), // 0: looprpc.AddressType + (SwapType)(0), // 1: looprpc.SwapType + (SwapState)(0), // 2: looprpc.SwapState + (FailureReason)(0), // 3: looprpc.FailureReason + (LiquidityRuleType)(0), // 4: looprpc.LiquidityRuleType + (AutoReason)(0), // 5: looprpc.AutoReason + (DepositState)(0), // 6: looprpc.DepositState + (StaticAddressLoopInSwapState)(0), // 7: looprpc.StaticAddressLoopInSwapState + (ListSwapsFilter_SwapTypeFilter)(0), // 8: looprpc.ListSwapsFilter.SwapTypeFilter + (*LoopOutRequest)(nil), // 9: looprpc.LoopOutRequest + (*LoopInRequest)(nil), // 10: looprpc.LoopInRequest + (*SwapResponse)(nil), // 11: looprpc.SwapResponse + (*MonitorRequest)(nil), // 12: looprpc.MonitorRequest + (*SwapStatus)(nil), // 13: looprpc.SwapStatus + (*ListSwapsRequest)(nil), // 14: looprpc.ListSwapsRequest + (*ListSwapsFilter)(nil), // 15: looprpc.ListSwapsFilter + (*ListSwapsResponse)(nil), // 16: looprpc.ListSwapsResponse + (*SwapInfoRequest)(nil), // 17: looprpc.SwapInfoRequest + (*TermsRequest)(nil), // 18: looprpc.TermsRequest + (*InTermsResponse)(nil), // 19: looprpc.InTermsResponse + (*OutTermsResponse)(nil), // 20: looprpc.OutTermsResponse + (*QuoteRequest)(nil), // 21: looprpc.QuoteRequest + (*InQuoteResponse)(nil), // 22: looprpc.InQuoteResponse + (*OutQuoteResponse)(nil), // 23: looprpc.OutQuoteResponse + (*ProbeRequest)(nil), // 24: looprpc.ProbeRequest + (*ProbeResponse)(nil), // 25: looprpc.ProbeResponse + (*TokensRequest)(nil), // 26: looprpc.TokensRequest + (*TokensResponse)(nil), // 27: looprpc.TokensResponse + (*FetchL402TokenRequest)(nil), // 28: looprpc.FetchL402TokenRequest + (*FetchL402TokenResponse)(nil), // 29: looprpc.FetchL402TokenResponse + (*L402Token)(nil), // 30: looprpc.L402Token + (*LoopStats)(nil), // 31: looprpc.LoopStats + (*GetInfoRequest)(nil), // 32: looprpc.GetInfoRequest + (*GetInfoResponse)(nil), // 33: looprpc.GetInfoResponse + (*GetLiquidityParamsRequest)(nil), // 34: looprpc.GetLiquidityParamsRequest + (*LiquidityParameters)(nil), // 35: looprpc.LiquidityParameters + (*LiquidityRule)(nil), // 36: looprpc.LiquidityRule + (*SetLiquidityParamsRequest)(nil), // 37: looprpc.SetLiquidityParamsRequest + (*SetLiquidityParamsResponse)(nil), // 38: looprpc.SetLiquidityParamsResponse + (*SuggestSwapsRequest)(nil), // 39: looprpc.SuggestSwapsRequest + (*Disqualified)(nil), // 40: looprpc.Disqualified + (*SuggestSwapsResponse)(nil), // 41: looprpc.SuggestSwapsResponse + (*AbandonSwapRequest)(nil), // 42: looprpc.AbandonSwapRequest + (*AbandonSwapResponse)(nil), // 43: looprpc.AbandonSwapResponse + (*ListReservationsRequest)(nil), // 44: looprpc.ListReservationsRequest + (*ListReservationsResponse)(nil), // 45: looprpc.ListReservationsResponse + (*ClientReservation)(nil), // 46: looprpc.ClientReservation + (*InstantOutRequest)(nil), // 47: looprpc.InstantOutRequest + (*InstantOutResponse)(nil), // 48: looprpc.InstantOutResponse + (*InstantOutQuoteRequest)(nil), // 49: looprpc.InstantOutQuoteRequest + (*InstantOutQuoteResponse)(nil), // 50: looprpc.InstantOutQuoteResponse + (*ListInstantOutsRequest)(nil), // 51: looprpc.ListInstantOutsRequest + (*ListInstantOutsResponse)(nil), // 52: looprpc.ListInstantOutsResponse + (*InstantOut)(nil), // 53: looprpc.InstantOut + (*NewStaticAddressRequest)(nil), // 54: looprpc.NewStaticAddressRequest + (*NewStaticAddressResponse)(nil), // 55: looprpc.NewStaticAddressResponse + (*ListUnspentDepositsRequest)(nil), // 56: looprpc.ListUnspentDepositsRequest + (*ListUnspentDepositsResponse)(nil), // 57: looprpc.ListUnspentDepositsResponse + (*Utxo)(nil), // 58: looprpc.Utxo + (*WithdrawDepositsRequest)(nil), // 59: looprpc.WithdrawDepositsRequest + (*WithdrawDepositsResponse)(nil), // 60: looprpc.WithdrawDepositsResponse + (*OutPoint)(nil), // 61: looprpc.OutPoint + (*ListStaticAddressDepositsRequest)(nil), // 62: looprpc.ListStaticAddressDepositsRequest + (*ListStaticAddressDepositsResponse)(nil), // 63: looprpc.ListStaticAddressDepositsResponse + (*ListStaticAddressSwapsRequest)(nil), // 64: looprpc.ListStaticAddressSwapsRequest + (*ListStaticAddressSwapsResponse)(nil), // 65: looprpc.ListStaticAddressSwapsResponse + (*StaticAddressSummaryRequest)(nil), // 66: looprpc.StaticAddressSummaryRequest + (*StaticAddressSummaryResponse)(nil), // 67: looprpc.StaticAddressSummaryResponse + (*Deposit)(nil), // 68: looprpc.Deposit + (*StaticAddressLoopInSwap)(nil), // 69: looprpc.StaticAddressLoopInSwap + (*StaticAddressLoopInRequest)(nil), // 70: looprpc.StaticAddressLoopInRequest + (*StaticAddressLoopInResponse)(nil), // 71: looprpc.StaticAddressLoopInResponse + (*swapserverrpc.RouteHint)(nil), // 72: looprpc.RouteHint +} +var file_client_proto_depIdxs = []int32{ + 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType + 72, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint + 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType + 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState + 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason + 15, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter + 8, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter + 13, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus + 72, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint + 72, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint + 30, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token + 31, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats + 31, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats + 36, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) 0, // 14: looprpc.LiquidityParameters.account_addr_type:type_name -> looprpc.AddressType 1, // 15: looprpc.LiquidityRule.swap_type:type_name -> looprpc.SwapType 4, // 16: looprpc.LiquidityRule.type:type_name -> looprpc.LiquidityRuleType - 34, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters + 35, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters 5, // 18: looprpc.Disqualified.reason:type_name -> looprpc.AutoReason +<<<<<<< HEAD 8, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest 9, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest 39, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified @@ -6078,6 +6859,84 @@ var file_client_proto_depIdxs = []int32{ 30, // [30:30] is the sub-list for extension type_name 30, // [30:30] is the sub-list for extension extendee 0, // [0:30] is the sub-list for field type_name +======= + 9, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest + 10, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest + 40, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified + 46, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation + 53, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut + 58, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo + 61, // 25: looprpc.WithdrawDepositsRequest.outpoints:type_name -> looprpc.OutPoint + 6, // 26: looprpc.ListStaticAddressDepositsRequest.state_filter:type_name -> looprpc.DepositState + 68, // 27: looprpc.ListStaticAddressDepositsResponse.filtered_deposits:type_name -> looprpc.Deposit + 69, // 28: looprpc.ListStaticAddressSwapsResponse.swaps:type_name -> looprpc.StaticAddressLoopInSwap + 6, // 29: looprpc.Deposit.state:type_name -> looprpc.DepositState + 7, // 30: looprpc.StaticAddressLoopInSwap.state:type_name -> looprpc.StaticAddressLoopInSwapState + 72, // 31: looprpc.StaticAddressLoopInRequest.route_hints:type_name -> looprpc.RouteHint + 9, // 32: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest + 10, // 33: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest + 12, // 34: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest + 14, // 35: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest + 17, // 36: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest + 42, // 37: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest + 18, // 38: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest + 21, // 39: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest + 18, // 40: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest + 21, // 41: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest + 24, // 42: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest + 26, // 43: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest + 26, // 44: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest + 28, // 45: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest + 32, // 46: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest + 34, // 47: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest + 37, // 48: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest + 39, // 49: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest + 44, // 50: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest + 47, // 51: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest + 49, // 52: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest + 51, // 53: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest + 54, // 54: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest + 56, // 55: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest + 59, // 56: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest + 62, // 57: looprpc.SwapClient.ListStaticAddressDeposits:input_type -> looprpc.ListStaticAddressDepositsRequest + 64, // 58: looprpc.SwapClient.ListStaticAddressSwaps:input_type -> looprpc.ListStaticAddressSwapsRequest + 66, // 59: looprpc.SwapClient.GetStaticAddressSummary:input_type -> looprpc.StaticAddressSummaryRequest + 70, // 60: looprpc.SwapClient.StaticAddressLoopIn:input_type -> looprpc.StaticAddressLoopInRequest + 11, // 61: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse + 11, // 62: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse + 13, // 63: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus + 16, // 64: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse + 13, // 65: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus + 43, // 66: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse + 20, // 67: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse + 23, // 68: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse + 19, // 69: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse + 22, // 70: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse + 25, // 71: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse + 27, // 72: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse + 27, // 73: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse + 29, // 74: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse + 33, // 75: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse + 35, // 76: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters + 38, // 77: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse + 41, // 78: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse + 45, // 79: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse + 48, // 80: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse + 50, // 81: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse + 52, // 82: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse + 55, // 83: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse + 57, // 84: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse + 60, // 85: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse + 63, // 86: looprpc.SwapClient.ListStaticAddressDeposits:output_type -> looprpc.ListStaticAddressDepositsResponse + 65, // 87: looprpc.SwapClient.ListStaticAddressSwaps:output_type -> looprpc.ListStaticAddressSwapsResponse + 67, // 88: looprpc.SwapClient.GetStaticAddressSummary:output_type -> looprpc.StaticAddressSummaryResponse + 71, // 89: looprpc.SwapClient.StaticAddressLoopIn:output_type -> looprpc.StaticAddressLoopInResponse + 61, // [61:90] is the sub-list for method output_type + 32, // [32:61] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func init() { file_client_proto_init() } @@ -6723,7 +7582,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[53].Exporter = func(v any, i int) any { - switch v := v.(*StaticAddressSummaryRequest); i { + switch v := v.(*ListStaticAddressDepositsRequest); i { case 0: return &v.state case 1: @@ -6735,7 +7594,7 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[54].Exporter = func(v any, i int) any { - switch v := v.(*StaticAddressSummaryResponse); i { + switch v := v.(*ListStaticAddressDepositsResponse); i { case 0: return &v.state case 1: @@ -6747,6 +7606,54 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[55].Exporter = func(v any, i int) any { + switch v := v.(*ListStaticAddressSwapsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[56].Exporter = func(v any, i int) any { + switch v := v.(*ListStaticAddressSwapsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[57].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressSummaryRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[58].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressSummaryResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[59].Exporter = func(v any, i int) any { switch v := v.(*Deposit); i { case 0: return &v.state @@ -6758,7 +7665,23 @@ func file_client_proto_init() { return nil } } +<<<<<<< HEAD file_client_proto_msgTypes[56].Exporter = func(v any, i int) any { +======= + file_client_proto_msgTypes[60].Exporter = func(v any, i int) any { + switch v := v.(*StaticAddressLoopInSwap); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_client_proto_msgTypes[61].Exporter = func(v any, i int) any { +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) switch v := v.(*StaticAddressLoopInRequest); i { case 0: return &v.state @@ -6770,7 +7693,11 @@ func file_client_proto_init() { return nil } } +<<<<<<< HEAD file_client_proto_msgTypes[57].Exporter = func(v any, i int) any { +======= + file_client_proto_msgTypes[62].Exporter = func(v any, i int) any { +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) switch v := v.(*StaticAddressLoopInResponse); i { case 0: return &v.state @@ -6788,8 +7715,13 @@ func file_client_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, +<<<<<<< HEAD NumEnums: 8, NumMessages: 58, +======= + NumEnums: 9, + NumMessages: 63, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) NumExtensions: 0, NumServices: 1, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index 8235f77f3..f1f44c42a 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -168,6 +168,20 @@ service SwapClient { rpc WithdrawDeposits (WithdrawDepositsRequest) returns (WithdrawDepositsResponse); + /* loop:`listdeposits` + ListStaticAddressDeposits returns a list of filtered static address + deposits. + */ + rpc ListStaticAddressDeposits (ListStaticAddressDepositsRequest) + returns (ListStaticAddressDepositsResponse); + + /* loop:`listswaps` + ListStaticAddressSwaps returns a list of filtered static address + swaps. + */ + rpc ListStaticAddressSwaps (ListStaticAddressSwapsRequest) + returns (ListStaticAddressSwapsResponse); + /* loop:`static summary` GetStaticAddressSummary returns a summary of static address related statistics. @@ -1599,7 +1613,7 @@ message OutPoint { uint32 output_index = 3; } -message StaticAddressSummaryRequest { +message ListStaticAddressDepositsRequest { /* Filters the list of all stored deposits by deposit state. */ @@ -1611,51 +1625,71 @@ message StaticAddressSummaryRequest { repeated string outpoints = 2; } +message ListStaticAddressDepositsResponse { + /* + A list of all deposits that match the filtered state. + */ + repeated Deposit filtered_deposits = 1; +} + +message ListStaticAddressSwapsRequest { +} + +message ListStaticAddressSwapsResponse { + /* + A list of all swaps known static address loop-in swaps. + */ + repeated StaticAddressLoopInSwap swaps = 1; +} + +message StaticAddressSummaryRequest { +} + message StaticAddressSummaryResponse { /* The static address of the client. */ string static_address = 1; + /* + The CSV expiry of the static address. + */ + uint64 relative_expiry_blocks = 2; + /* The total number of deposits. */ - uint32 total_num_deposits = 2; + uint32 total_num_deposits = 3; /* The total value of unconfirmed deposits. */ - int64 value_unconfirmed_satoshis = 3; + int64 value_unconfirmed_satoshis = 4; /* The total value of confirmed deposits. */ - int64 value_deposited_satoshis = 4; + int64 value_deposited_satoshis = 5; /* The total value of all expired deposits. */ - int64 value_expired_satoshis = 5; + int64 value_expired_satoshis = 6; /* The total value of all deposits that have been withdrawn. */ - int64 value_withdrawn_satoshis = 6; + int64 value_withdrawn_satoshis = 7; /* The total value of all loop-ins that have been finalized. */ - int64 value_looped_in_satoshis = 7; + int64 value_looped_in_satoshis = 8; /* The total value of all htlc timeout sweeps that the client swept. */ - int64 value_htlc_timeout_sweeps_satoshis = 8; - - /* - A list of all deposits that match the filtered state. - */ - repeated Deposit filtered_deposits = 9; + int64 value_htlc_timeout_sweeps_satoshis = 9; } enum DepositState { @@ -1751,6 +1785,93 @@ message Deposit { The block height at which the deposit was confirmed. */ int64 confirmation_height = 5; + + /* + The number of blocks that are left until the deposit cannot be used for a + loop-in swap anymore. + */ + int64 blocks_until_expiry = 6; +} + +message StaticAddressLoopInSwap { + /* + The swap hash of the swap. It represents the unique identifier of the swap. + */ + bytes swap_hash = 1; + + /* + */ + repeated string deposit_outpoints = 2; + + /* + */ + StaticAddressLoopInSwapState state = 3; + + /* + The swap amount of the swap. It is the sum of the values of the deposit + outpoints that were used for this swap. + */ + int64 swap_amount_satoshis = 4; + + /* + The invoiced swap amount. It is the swap amount minus the quoted server + fees. + */ + int64 payment_request_amount_satoshis = 5; +} + +enum StaticAddressLoopInSwapState { + /* + */ + UNKNOWN_STATIC_ADDRESS_SWAP_STATE = 0; + + /* + */ + INIT_HTLC = 1; + + /* + */ + SIGN_HTLC_TX = 2; + + /* + */ + MONITOR_INVOICE_HTLC_TX = 3; + + /* + */ + PAYMENT_RECEIVED = 4; + + /* + */ + SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT = 5; + + /* + */ + MONITOR_HTLC_TIMEOUT_SWEEP = 6; + + /* + */ + HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT = 7; + + /* + */ + FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX = 8; + + /* + */ + SUCCEEDED = 9; + + /* + */ + SUCCEEDED_SWEEPLESS_SIG_FAILED = 10; + + /* + */ + UNLOCK_DEPOSITS = 11; + + /* + */ + FAILED_STATIC_ADDRESS_SWAP = 12; } message StaticAddressLoopInRequest { diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index f9e56145c..fa7c3e80c 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -688,6 +688,11 @@ "type": "string", "format": "int64", "description": "The block height at which the deposit was confirmed." + }, + "blocks_until_expiry": { + "type": "string", + "format": "int64", + "description": "The number of blocks that are left until the deposit cannot be used for a\nloop-in swap anymore." } } }, @@ -1152,6 +1157,30 @@ } } }, + "looprpcListStaticAddressDepositsResponse": { + "type": "object", + "properties": { + "filtered_deposits": { + "type": "array", + "items": { + "$ref": "#/definitions/looprpcDeposit" + }, + "description": "A list of all deposits that match the filtered state." + } + } + }, + "looprpcListStaticAddressSwapsResponse": { + "type": "object", + "properties": { + "swaps": { + "type": "array", + "items": { + "$ref": "#/definitions/looprpcStaticAddressLoopInSwap" + }, + "description": "A list of all swaps known static address loop-in swaps." + } + } + }, "looprpcListSwapsFilter": { "type": "object", "properties": { @@ -1565,6 +1594,57 @@ } } }, +<<<<<<< HEAD +======= + "looprpcStaticAddressLoopInSwap": { + "type": "object", + "properties": { + "swap_hash": { + "type": "string", + "format": "byte", + "description": "The swap hash of the swap. It represents the unique identifier of the swap." + }, + "deposit_outpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "state": { + "$ref": "#/definitions/looprpcStaticAddressLoopInSwapState" + }, + "swap_amount_satoshis": { + "type": "string", + "format": "int64", + "description": "The swap amount of the swap. It is the sum of the values of the deposit\noutpoints that were used for this swap." + }, + "payment_request_amount_satoshis": { + "type": "string", + "format": "int64", + "description": "The invoiced swap amount. It is the swap amount minus the quoted server\nfees." + } + } + }, + "looprpcStaticAddressLoopInSwapState": { + "type": "string", + "enum": [ + "UNKNOWN_STATIC_ADDRESS_SWAP_STATE", + "INIT_HTLC", + "SIGN_HTLC_TX", + "MONITOR_INVOICE_HTLC_TX", + "PAYMENT_RECEIVED", + "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", + "MONITOR_HTLC_TIMEOUT_SWEEP", + "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", + "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX", + "SUCCEEDED", + "SUCCEEDED_SWEEPLESS_SIG_FAILED", + "UNLOCK_DEPOSITS", + "FAILED_STATIC_ADDRESS_SWAP" + ], + "default": "UNKNOWN_STATIC_ADDRESS_SWAP_STATE" + }, +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) "looprpcStaticAddressSummaryResponse": { "type": "object", "properties": { @@ -1572,6 +1652,11 @@ "type": "string", "description": "The static address of the client." }, + "relative_expiry_blocks": { + "type": "string", + "format": "uint64", + "description": "The CSV expiry of the static address." + }, "total_num_deposits": { "type": "integer", "format": "int64", @@ -1606,6 +1691,7 @@ "type": "string", "format": "int64", "description": "The total value of all htlc timeout sweeps that the client swept." +<<<<<<< HEAD }, "filtered_deposits": { "type": "array", @@ -1613,6 +1699,8 @@ "$ref": "#/definitions/looprpcDeposit" }, "description": "A list of all deposits that match the filtered state." +======= +>>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } } }, diff --git a/looprpc/client_grpc.pb.go b/looprpc/client_grpc.pb.go index f482738ee..9d5e3073b 100644 --- a/looprpc/client_grpc.pb.go +++ b/looprpc/client_grpc.pb.go @@ -115,6 +115,14 @@ type SwapClientClient interface { // loop:`static withdraw` // WithdrawDeposits withdraws a selection or all deposits of a static address. WithdrawDeposits(ctx context.Context, in *WithdrawDepositsRequest, opts ...grpc.CallOption) (*WithdrawDepositsResponse, error) + // loop:`listdeposits` + // ListStaticAddressDeposits returns a list of filtered static address + // deposits. + ListStaticAddressDeposits(ctx context.Context, in *ListStaticAddressDepositsRequest, opts ...grpc.CallOption) (*ListStaticAddressDepositsResponse, error) + // loop:`listswaps` + // ListStaticAddressSwaps returns a list of filtered static address + // swaps. + ListStaticAddressSwaps(ctx context.Context, in *ListStaticAddressSwapsRequest, opts ...grpc.CallOption) (*ListStaticAddressSwapsResponse, error) // loop:`static summary` // GetStaticAddressSummary returns a summary of static address related // statistics. @@ -380,6 +388,24 @@ func (c *swapClientClient) WithdrawDeposits(ctx context.Context, in *WithdrawDep return out, nil } +func (c *swapClientClient) ListStaticAddressDeposits(ctx context.Context, in *ListStaticAddressDepositsRequest, opts ...grpc.CallOption) (*ListStaticAddressDepositsResponse, error) { + out := new(ListStaticAddressDepositsResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListStaticAddressDeposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *swapClientClient) ListStaticAddressSwaps(ctx context.Context, in *ListStaticAddressSwapsRequest, opts ...grpc.CallOption) (*ListStaticAddressSwapsResponse, error) { + out := new(ListStaticAddressSwapsResponse) + err := c.cc.Invoke(ctx, "/looprpc.SwapClient/ListStaticAddressSwaps", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *swapClientClient) GetStaticAddressSummary(ctx context.Context, in *StaticAddressSummaryRequest, opts ...grpc.CallOption) (*StaticAddressSummaryResponse, error) { out := new(StaticAddressSummaryResponse) err := c.cc.Invoke(ctx, "/looprpc.SwapClient/GetStaticAddressSummary", in, out, opts...) @@ -499,6 +525,14 @@ type SwapClientServer interface { // loop:`static withdraw` // WithdrawDeposits withdraws a selection or all deposits of a static address. WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) + // loop:`listdeposits` + // ListStaticAddressDeposits returns a list of filtered static address + // deposits. + ListStaticAddressDeposits(context.Context, *ListStaticAddressDepositsRequest) (*ListStaticAddressDepositsResponse, error) + // loop:`listswaps` + // ListStaticAddressSwaps returns a list of filtered static address + // swaps. + ListStaticAddressSwaps(context.Context, *ListStaticAddressSwapsRequest) (*ListStaticAddressSwapsResponse, error) // loop:`static summary` // GetStaticAddressSummary returns a summary of static address related // statistics. @@ -588,6 +622,12 @@ func (UnimplementedSwapClientServer) ListUnspentDeposits(context.Context, *ListU func (UnimplementedSwapClientServer) WithdrawDeposits(context.Context, *WithdrawDepositsRequest) (*WithdrawDepositsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method WithdrawDeposits not implemented") } +func (UnimplementedSwapClientServer) ListStaticAddressDeposits(context.Context, *ListStaticAddressDepositsRequest) (*ListStaticAddressDepositsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStaticAddressDeposits not implemented") +} +func (UnimplementedSwapClientServer) ListStaticAddressSwaps(context.Context, *ListStaticAddressSwapsRequest) (*ListStaticAddressSwapsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListStaticAddressSwaps not implemented") +} func (UnimplementedSwapClientServer) GetStaticAddressSummary(context.Context, *StaticAddressSummaryRequest) (*StaticAddressSummaryResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetStaticAddressSummary not implemented") } @@ -1060,6 +1100,42 @@ func _SwapClient_WithdrawDeposits_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _SwapClient_ListStaticAddressDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStaticAddressDepositsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).ListStaticAddressDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/ListStaticAddressDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).ListStaticAddressDeposits(ctx, req.(*ListStaticAddressDepositsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _SwapClient_ListStaticAddressSwaps_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListStaticAddressSwapsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(SwapClientServer).ListStaticAddressSwaps(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.SwapClient/ListStaticAddressSwaps", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(SwapClientServer).ListStaticAddressSwaps(ctx, req.(*ListStaticAddressSwapsRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _SwapClient_GetStaticAddressSummary_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(StaticAddressSummaryRequest) if err := dec(in); err != nil { @@ -1199,6 +1275,14 @@ var SwapClient_ServiceDesc = grpc.ServiceDesc{ MethodName: "WithdrawDeposits", Handler: _SwapClient_WithdrawDeposits_Handler, }, + { + MethodName: "ListStaticAddressDeposits", + Handler: _SwapClient_ListStaticAddressDeposits_Handler, + }, + { + MethodName: "ListStaticAddressSwaps", + Handler: _SwapClient_ListStaticAddressSwaps_Handler, + }, { MethodName: "GetStaticAddressSummary", Handler: _SwapClient_GetStaticAddressSummary_Handler, diff --git a/looprpc/swapclient.pb.json.go b/looprpc/swapclient.pb.json.go index 41a721233..19ee76d58 100644 --- a/looprpc/swapclient.pb.json.go +++ b/looprpc/swapclient.pb.json.go @@ -663,6 +663,56 @@ func RegisterSwapClientJSONCallbacks(registry map[string]func(ctx context.Contex callback(string(respBytes), nil) } + registry["looprpc.SwapClient.ListStaticAddressDeposits"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &ListStaticAddressDepositsRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.ListStaticAddressDeposits(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } + + registry["looprpc.SwapClient.ListStaticAddressSwaps"] = func(ctx context.Context, + conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { + + req := &ListStaticAddressSwapsRequest{} + err := marshaler.Unmarshal([]byte(reqJSON), req) + if err != nil { + callback("", err) + return + } + + client := NewSwapClientClient(conn) + resp, err := client.ListStaticAddressSwaps(ctx, req) + if err != nil { + callback("", err) + return + } + + respBytes, err := marshaler.Marshal(resp) + if err != nil { + callback("", err) + return + } + callback(string(respBytes), nil) + } + registry["looprpc.SwapClient.GetStaticAddressSummary"] = func(ctx context.Context, conn *grpc.ClientConn, reqJSON string, callback func(string, error)) { diff --git a/staticaddr/loopin/interface.go b/staticaddr/loopin/interface.go index 88bd543bb..453101527 100644 --- a/staticaddr/loopin/interface.go +++ b/staticaddr/loopin/interface.go @@ -33,6 +33,9 @@ type AddressManager interface { // DepositManager handles the interaction of loop-ins with deposits. type DepositManager interface { + // GetAllDeposits returns all known deposits from the database store. + GetAllDeposits(ctx context.Context) ([]*deposit.Deposit, error) + // AllStringOutpointsActiveDeposits returns all deposits that have the // given outpoints and are in the given state. If any of the outpoints // does not correspond to an active deposit, the function returns false. diff --git a/staticaddr/loopin/manager.go b/staticaddr/loopin/manager.go index 35768d170..5313c29c2 100644 --- a/staticaddr/loopin/manager.go +++ b/staticaddr/loopin/manager.go @@ -456,3 +456,38 @@ func (m *Manager) startLoopInFsm(ctx context.Context, return loopIn, nil } + +// GetAllSwaps returns all static address loop-in swaps from the database store. +func (m *Manager) GetAllSwaps(ctx context.Context) ([]*StaticAddressLoopIn, + error) { + + swaps, err := m.cfg.Store.GetStaticAddressLoopInSwapsByStates( + ctx, AllStates, + ) + if err != nil { + return nil, err + } + + allDeposits, err := m.cfg.DepositManager.GetAllDeposits(ctx) + if err != nil { + return nil, err + } + + var depositLookup = make(map[string]*deposit.Deposit) + for i, d := range allDeposits { + depositLookup[d.OutPoint.String()] = allDeposits[i] + } + + for i, s := range swaps { + var deposits []*deposit.Deposit + for _, outpoint := range s.DepositOutpoints { + if d, ok := depositLookup[outpoint]; ok { + deposits = append(deposits, d) + } + } + + swaps[i].Deposits = deposits + } + + return swaps, nil +} From b8698e2e20505fb217f7081ea9f92f7fe5276ead Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 5 Nov 2024 15:13:00 +0100 Subject: [PATCH 54/67] staticaddr: separate file for rpc service --- swapserverrpc/server.pb.go | 1986 +++------------------------ swapserverrpc/server.proto | 238 ---- swapserverrpc/server_grpc.pb.go | 294 ---- swapserverrpc/staticaddr.pb.go | 1698 +++++++++++++++++++++++ swapserverrpc/staticaddr.proto | 248 ++++ swapserverrpc/staticaddr_grpc.pb.go | 309 +++++ 6 files changed, 2445 insertions(+), 2328 deletions(-) create mode 100644 swapserverrpc/staticaddr.pb.go create mode 100644 swapserverrpc/staticaddr.proto create mode 100644 swapserverrpc/staticaddr_grpc.pb.go diff --git a/swapserverrpc/server.pb.go b/swapserverrpc/server.pb.go index 33a7a2cbe..6cb975040 100644 --- a/swapserverrpc/server.pb.go +++ b/swapserverrpc/server.pb.go @@ -411,52 +411,6 @@ func (RoutingPlugin) EnumDescriptor() ([]byte, []int) { return file_server_proto_rawDescGZIP(), []int{4} } -// StaticAddressProtocolVersion represents the static address protocol version -// the client adheres to. -type StaticAddressProtocolVersion int32 - -const ( - // V0 is the initially released static address protocol version. - StaticAddressProtocolVersion_V0 StaticAddressProtocolVersion = 0 -) - -// Enum value maps for StaticAddressProtocolVersion. -var ( - StaticAddressProtocolVersion_name = map[int32]string{ - 0: "V0", - } - StaticAddressProtocolVersion_value = map[string]int32{ - "V0": 0, - } -) - -func (x StaticAddressProtocolVersion) Enum() *StaticAddressProtocolVersion { - p := new(StaticAddressProtocolVersion) - *p = x - return p -} - -func (x StaticAddressProtocolVersion) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (StaticAddressProtocolVersion) Descriptor() protoreflect.EnumDescriptor { - return file_server_proto_enumTypes[5].Descriptor() -} - -func (StaticAddressProtocolVersion) Type() protoreflect.EnumType { - return &file_server_proto_enumTypes[5] -} - -func (x StaticAddressProtocolVersion) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use StaticAddressProtocolVersion.Descriptor instead. -func (StaticAddressProtocolVersion) EnumDescriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{5} -} - type ServerLoopOutRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2924,1102 +2878,7 @@ type SubscribeNotificationsResponse_ReservationNotification struct { func (*SubscribeNotificationsResponse_ReservationNotification) isSubscribeNotificationsResponse_Notification() { } -type ServerNewAddressRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The protocol version that the client adheres to. - ProtocolVersion StaticAddressProtocolVersion `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.StaticAddressProtocolVersion" json:"protocol_version,omitempty"` - // The client key for the MuSig2 static address output. - ClientKey []byte `protobuf:"bytes,2,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` -} - -func (x *ServerNewAddressRequest) Reset() { - *x = ServerNewAddressRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[36] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerNewAddressRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerNewAddressRequest) ProtoMessage() {} - -func (x *ServerNewAddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[36] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerNewAddressRequest.ProtoReflect.Descriptor instead. -func (*ServerNewAddressRequest) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{36} -} - -func (x *ServerNewAddressRequest) GetProtocolVersion() StaticAddressProtocolVersion { - if x != nil { - return x.ProtocolVersion - } - return StaticAddressProtocolVersion_V0 -} - -func (x *ServerNewAddressRequest) GetClientKey() []byte { - if x != nil { - return x.ClientKey - } - return nil -} - -type ServerNewAddressResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Params *ServerAddressParameters `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *ServerNewAddressResponse) Reset() { - *x = ServerNewAddressResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[37] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerNewAddressResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerNewAddressResponse) ProtoMessage() {} - -func (x *ServerNewAddressResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[37] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerNewAddressResponse.ProtoReflect.Descriptor instead. -func (*ServerNewAddressResponse) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{37} -} - -func (x *ServerNewAddressResponse) GetParams() *ServerAddressParameters { - if x != nil { - return x.Params - } - return nil -} - -type ServerAddressParameters struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The server key for the MuSig2 static address output. - ServerKey []byte `protobuf:"bytes,1,opt,name=server_key,json=serverKey,proto3" json:"server_key,omitempty"` - // The CSV expiry of the static address output. - Expiry uint32 `protobuf:"varint,2,opt,name=expiry,proto3" json:"expiry,omitempty"` -} - -func (x *ServerAddressParameters) Reset() { - *x = ServerAddressParameters{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[38] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerAddressParameters) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerAddressParameters) ProtoMessage() {} - -func (x *ServerAddressParameters) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[38] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerAddressParameters.ProtoReflect.Descriptor instead. -func (*ServerAddressParameters) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{38} -} - -func (x *ServerAddressParameters) GetServerKey() []byte { - if x != nil { - return x.ServerKey - } - return nil -} - -func (x *ServerAddressParameters) GetExpiry() uint32 { - if x != nil { - return x.Expiry - } - return 0 -} - -type ServerWithdrawRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The deposit outpoints the client wishes to withdraw. - Outpoints []*PrevoutInfo `protobuf:"bytes,1,rep,name=outpoints,proto3" json:"outpoints,omitempty"` - // The nonces that the client used to generate the withdrawal tx sigs. - ClientNonces [][]byte `protobuf:"bytes,2,rep,name=client_nonces,json=clientNonces,proto3" json:"client_nonces,omitempty"` - // The address that the client wants to sweep the static address deposits - // to. - ClientSweepAddr string `protobuf:"bytes,3,opt,name=client_sweep_addr,json=clientSweepAddr,proto3" json:"client_sweep_addr,omitempty"` - // The fee rate in sat/kw that the client wants to use for the sweep. - TxFeeRate uint64 `protobuf:"varint,4,opt,name=tx_fee_rate,json=txFeeRate,proto3" json:"tx_fee_rate,omitempty"` -} - -func (x *ServerWithdrawRequest) Reset() { - *x = ServerWithdrawRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[39] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerWithdrawRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerWithdrawRequest) ProtoMessage() {} - -func (x *ServerWithdrawRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[39] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerWithdrawRequest.ProtoReflect.Descriptor instead. -func (*ServerWithdrawRequest) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{39} -} - -func (x *ServerWithdrawRequest) GetOutpoints() []*PrevoutInfo { - if x != nil { - return x.Outpoints - } - return nil -} - -func (x *ServerWithdrawRequest) GetClientNonces() [][]byte { - if x != nil { - return x.ClientNonces - } - return nil -} - -func (x *ServerWithdrawRequest) GetClientSweepAddr() string { - if x != nil { - return x.ClientSweepAddr - } - return "" -} - -func (x *ServerWithdrawRequest) GetTxFeeRate() uint64 { - if x != nil { - return x.TxFeeRate - } - return 0 -} - -type ServerWithdrawResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The sweep sigs that the server generated for the htlc. - Musig2SweepSigs [][]byte `protobuf:"bytes,1,rep,name=musig2_sweep_sigs,json=musig2SweepSigs,proto3" json:"musig2_sweep_sigs,omitempty"` - // The nonces that the server used to generate the sweepless sweep sigs. - ServerNonces [][]byte `protobuf:"bytes,2,rep,name=server_nonces,json=serverNonces,proto3" json:"server_nonces,omitempty"` -} - -func (x *ServerWithdrawResponse) Reset() { - *x = ServerWithdrawResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[40] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerWithdrawResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerWithdrawResponse) ProtoMessage() {} - -func (x *ServerWithdrawResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[40] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerWithdrawResponse.ProtoReflect.Descriptor instead. -func (*ServerWithdrawResponse) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{40} -} - -func (x *ServerWithdrawResponse) GetMusig2SweepSigs() [][]byte { - if x != nil { - return x.Musig2SweepSigs - } - return nil -} - -func (x *ServerWithdrawResponse) GetServerNonces() [][]byte { - if x != nil { - return x.ServerNonces - } - return nil -} - -type ServerStaticAddressLoopInRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The client's public key for the htlc output. - HtlcClientPubKey []byte `protobuf:"bytes,1,opt,name=htlc_client_pub_key,json=htlcClientPubKey,proto3" json:"htlc_client_pub_key,omitempty"` - // The hashed swap invoice preimage of the swap. - SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` - // The deposit outpoints the client wishes to loop in. They implicitly state - // the swap amount. - DepositOutpoints []string `protobuf:"bytes,3,rep,name=deposit_outpoints,json=depositOutpoints,proto3" json:"deposit_outpoints,omitempty"` - // The swap invoice that the client wants the server to pay. - SwapInvoice string `protobuf:"bytes,4,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"` - // An optional last hop the client wants to receive the invoice payment - // from. - LastHop []byte `protobuf:"bytes,5,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"` - // The protocol version that the client adheres to. - ProtocolVersion StaticAddressProtocolVersion `protobuf:"varint,6,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.StaticAddressProtocolVersion" json:"protocol_version,omitempty"` - // The user agent string that identifies the software running on the user's - // side. This can be changed in the user's client software but it _SHOULD_ - // conform to the following pattern: - // - // Agent-Name/semver-version(/additional-info) - // - // Examples: - // - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 - // loopd/v0.10.0-beta/commit=3b635823,initiator=easy-autoloop - UserAgent string `protobuf:"bytes,7,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` - // The swap payment timeout allows the user to specify an upper limit for - // the amount of time the server is allowed to take to fulfill the off-chain - // swap payment. If the timeout is reached the swap will be aborted on the - // server side and the client can retry the swap with different parameters. - PaymentTimeoutSeconds uint32 `protobuf:"varint,8,opt,name=payment_timeout_seconds,json=paymentTimeoutSeconds,proto3" json:"payment_timeout_seconds,omitempty"` -} - -func (x *ServerStaticAddressLoopInRequest) Reset() { - *x = ServerStaticAddressLoopInRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[41] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerStaticAddressLoopInRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerStaticAddressLoopInRequest) ProtoMessage() {} - -func (x *ServerStaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[41] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerStaticAddressLoopInRequest.ProtoReflect.Descriptor instead. -func (*ServerStaticAddressLoopInRequest) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{41} -} - -func (x *ServerStaticAddressLoopInRequest) GetHtlcClientPubKey() []byte { - if x != nil { - return x.HtlcClientPubKey - } - return nil -} - -func (x *ServerStaticAddressLoopInRequest) GetSwapHash() []byte { - if x != nil { - return x.SwapHash - } - return nil -} - -func (x *ServerStaticAddressLoopInRequest) GetDepositOutpoints() []string { - if x != nil { - return x.DepositOutpoints - } - return nil -} - -func (x *ServerStaticAddressLoopInRequest) GetSwapInvoice() string { - if x != nil { - return x.SwapInvoice - } - return "" -} - -func (x *ServerStaticAddressLoopInRequest) GetLastHop() []byte { - if x != nil { - return x.LastHop - } - return nil -} - -func (x *ServerStaticAddressLoopInRequest) GetProtocolVersion() StaticAddressProtocolVersion { - if x != nil { - return x.ProtocolVersion - } - return StaticAddressProtocolVersion_V0 -} - -func (x *ServerStaticAddressLoopInRequest) GetUserAgent() string { - if x != nil { - return x.UserAgent - } - return "" -} - -func (x *ServerStaticAddressLoopInRequest) GetPaymentTimeoutSeconds() uint32 { - if x != nil { - return x.PaymentTimeoutSeconds - } - return 0 -} - -type ServerStaticAddressLoopInResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The server's public key for the htlc output. - HtlcServerPubKey []byte `protobuf:"bytes,1,opt,name=htlc_server_pub_key,json=htlcServerPubKey,proto3" json:"htlc_server_pub_key,omitempty"` - // The cltv expiry height for the htlc. This is the height at which the - // htlc will expire and the client is free to claim the funds back. - HtlcExpiry int32 `protobuf:"varint,2,opt,name=htlc_expiry,json=htlcExpiry,proto3" json:"htlc_expiry,omitempty"` - // The info the server used to generate the standard fee partial htlc tx - // sigs. - StandardHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,3,opt,name=standard_htlc_info,json=standardHtlcInfo,proto3" json:"standard_htlc_info,omitempty"` - // The info the server used to generate the high fee partial htlc tx sigs. - HighFeeHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,4,opt,name=high_fee_htlc_info,json=highFeeHtlcInfo,proto3" json:"high_fee_htlc_info,omitempty"` - // The info the server used to generate the extreme fee partial htlc tx - // sigs. - ExtremeFeeHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,5,opt,name=extreme_fee_htlc_info,json=extremeFeeHtlcInfo,proto3" json:"extreme_fee_htlc_info,omitempty"` -} - -func (x *ServerStaticAddressLoopInResponse) Reset() { - *x = ServerStaticAddressLoopInResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[42] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerStaticAddressLoopInResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerStaticAddressLoopInResponse) ProtoMessage() {} - -func (x *ServerStaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[42] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerStaticAddressLoopInResponse.ProtoReflect.Descriptor instead. -func (*ServerStaticAddressLoopInResponse) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{42} -} - -func (x *ServerStaticAddressLoopInResponse) GetHtlcServerPubKey() []byte { - if x != nil { - return x.HtlcServerPubKey - } - return nil -} - -func (x *ServerStaticAddressLoopInResponse) GetHtlcExpiry() int32 { - if x != nil { - return x.HtlcExpiry - } - return 0 -} - -func (x *ServerStaticAddressLoopInResponse) GetStandardHtlcInfo() *ServerHtlcSigningInfo { - if x != nil { - return x.StandardHtlcInfo - } - return nil -} - -func (x *ServerStaticAddressLoopInResponse) GetHighFeeHtlcInfo() *ServerHtlcSigningInfo { - if x != nil { - return x.HighFeeHtlcInfo - } - return nil -} - -func (x *ServerStaticAddressLoopInResponse) GetExtremeFeeHtlcInfo() *ServerHtlcSigningInfo { - if x != nil { - return x.ExtremeFeeHtlcInfo - } - return nil -} - -type ServerHtlcSigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The nonces that the server used to generate the partial htlc tx sigs. - Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` - // The fee rate in sat/kw that the server wants to use for the htlc tx. - FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` -} - -func (x *ServerHtlcSigningInfo) Reset() { - *x = ServerHtlcSigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[43] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerHtlcSigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerHtlcSigningInfo) ProtoMessage() {} - -func (x *ServerHtlcSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[43] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerHtlcSigningInfo.ProtoReflect.Descriptor instead. -func (*ServerHtlcSigningInfo) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{43} -} - -func (x *ServerHtlcSigningInfo) GetNonces() [][]byte { - if x != nil { - return x.Nonces - } - return nil -} - -func (x *ServerHtlcSigningInfo) GetFeeRate() uint64 { - if x != nil { - return x.FeeRate - } - return 0 -} - -type PushStaticAddressHtlcSigsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The swap hash that the client wants to push the htlc sigs for. - SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` - // The nonces that the client used to generate the htlc sigs. - StandardHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,2,opt,name=standard_htlc_info,json=standardHtlcInfo,proto3" json:"standard_htlc_info,omitempty"` - // The nonces that the client used to generate the high fee htlc sigs. - HighFeeHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,3,opt,name=high_fee_htlc_info,json=highFeeHtlcInfo,proto3" json:"high_fee_htlc_info,omitempty"` - // The nonces that the client used to generate the extreme fee htlc sigs. - ExtremeFeeHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_htlc_info,json=extremeFeeHtlcInfo,proto3" json:"extreme_fee_htlc_info,omitempty"` -} - -func (x *PushStaticAddressHtlcSigsRequest) Reset() { - *x = PushStaticAddressHtlcSigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[44] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushStaticAddressHtlcSigsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushStaticAddressHtlcSigsRequest) ProtoMessage() {} - -func (x *PushStaticAddressHtlcSigsRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[44] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushStaticAddressHtlcSigsRequest.ProtoReflect.Descriptor instead. -func (*PushStaticAddressHtlcSigsRequest) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{44} -} - -func (x *PushStaticAddressHtlcSigsRequest) GetSwapHash() []byte { - if x != nil { - return x.SwapHash - } - return nil -} - -func (x *PushStaticAddressHtlcSigsRequest) GetStandardHtlcInfo() *ClientHtlcSigningInfo { - if x != nil { - return x.StandardHtlcInfo - } - return nil -} - -func (x *PushStaticAddressHtlcSigsRequest) GetHighFeeHtlcInfo() *ClientHtlcSigningInfo { - if x != nil { - return x.HighFeeHtlcInfo - } - return nil -} - -func (x *PushStaticAddressHtlcSigsRequest) GetExtremeFeeHtlcInfo() *ClientHtlcSigningInfo { - if x != nil { - return x.ExtremeFeeHtlcInfo - } - return nil -} - -type ClientHtlcSigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The nonces that the client used to generate the partial htlc tx sigs. - Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` - // The musig2 htlc sigs that the client generated for the htlc tx. - Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` -} - -func (x *ClientHtlcSigningInfo) Reset() { - *x = ClientHtlcSigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[45] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientHtlcSigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientHtlcSigningInfo) ProtoMessage() {} - -func (x *ClientHtlcSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[45] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientHtlcSigningInfo.ProtoReflect.Descriptor instead. -func (*ClientHtlcSigningInfo) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{45} -} - -func (x *ClientHtlcSigningInfo) GetNonces() [][]byte { - if x != nil { - return x.Nonces - } - return nil -} - -func (x *ClientHtlcSigningInfo) GetSigs() [][]byte { - if x != nil { - return x.Sigs - } - return nil -} - -type PushStaticAddressHtlcSigsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PushStaticAddressHtlcSigsResponse) Reset() { - *x = PushStaticAddressHtlcSigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[46] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushStaticAddressHtlcSigsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushStaticAddressHtlcSigsResponse) ProtoMessage() {} - -func (x *PushStaticAddressHtlcSigsResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[46] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushStaticAddressHtlcSigsResponse.ProtoReflect.Descriptor instead. -func (*PushStaticAddressHtlcSigsResponse) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{46} -} - -type FetchSweeplessSweepTxRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The swap hash of the swap that the client wants to fetch the sweepless - // sweep tx for. - SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` -} - -func (x *FetchSweeplessSweepTxRequest) Reset() { - *x = FetchSweeplessSweepTxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[47] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchSweeplessSweepTxRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchSweeplessSweepTxRequest) ProtoMessage() {} - -func (x *FetchSweeplessSweepTxRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[47] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchSweeplessSweepTxRequest.ProtoReflect.Descriptor instead. -func (*FetchSweeplessSweepTxRequest) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{47} -} - -func (x *FetchSweeplessSweepTxRequest) GetSwapHash() []byte { - if x != nil { - return x.SwapHash - } - return nil -} - -type FetchSweeplessSweepTxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address that the server wants to sweep the static address deposits - // to. - SweepAddr string `protobuf:"bytes,1,opt,name=sweep_addr,json=sweepAddr,proto3" json:"sweep_addr,omitempty"` - // The info the server used to generate the standard fee partial sweepless - // tx sigs. - StandardFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_fee_info,json=standardFeeInfo,proto3" json:"standard_fee_info,omitempty"` - // The info the server used to generate the high fee partial sweepless tx - // sigs. - HighFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_info,json=highFeeInfo,proto3" json:"high_fee_info,omitempty"` - // The info the server used to generate the extreme fee partial sweepless tx - // sigs. - ExtremeFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_info,json=extremeFeeInfo,proto3" json:"extreme_fee_info,omitempty"` -} - -func (x *FetchSweeplessSweepTxResponse) Reset() { - *x = FetchSweeplessSweepTxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[48] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchSweeplessSweepTxResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchSweeplessSweepTxResponse) ProtoMessage() {} - -func (x *FetchSweeplessSweepTxResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[48] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchSweeplessSweepTxResponse.ProtoReflect.Descriptor instead. -func (*FetchSweeplessSweepTxResponse) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{48} -} - -func (x *FetchSweeplessSweepTxResponse) GetSweepAddr() string { - if x != nil { - return x.SweepAddr - } - return "" -} - -func (x *FetchSweeplessSweepTxResponse) GetStandardFeeInfo() *ServerSweeplessSigningInfo { - if x != nil { - return x.StandardFeeInfo - } - return nil -} - -func (x *FetchSweeplessSweepTxResponse) GetHighFeeInfo() *ServerSweeplessSigningInfo { - if x != nil { - return x.HighFeeInfo - } - return nil -} - -func (x *FetchSweeplessSweepTxResponse) GetExtremeFeeInfo() *ServerSweeplessSigningInfo { - if x != nil { - return x.ExtremeFeeInfo - } - return nil -} - -type ServerSweeplessSigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The nonces that the server used to generate the partial sweepless tx - // sigs. - Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` - // The fee rate in sat/kw that the server wants to use for the sweepless tx. - FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` -} - -func (x *ServerSweeplessSigningInfo) Reset() { - *x = ServerSweeplessSigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[49] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerSweeplessSigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerSweeplessSigningInfo) ProtoMessage() {} - -func (x *ServerSweeplessSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[49] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerSweeplessSigningInfo.ProtoReflect.Descriptor instead. -func (*ServerSweeplessSigningInfo) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{49} -} - -func (x *ServerSweeplessSigningInfo) GetNonces() [][]byte { - if x != nil { - return x.Nonces - } - return nil -} - -func (x *ServerSweeplessSigningInfo) GetFeeRate() uint64 { - if x != nil { - return x.FeeRate - } - return 0 -} - -type PushStaticAddressSweeplessSigsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The swap hash of the swap that the client wants to push the sweepless - // sigs for. - SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` - // The info the client used to generate the standard fee partial sweepless - // tx sigs. - StandardSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_signing_info,json=standardSigningInfo,proto3" json:"standard_signing_info,omitempty"` - // The info the client used to generate the high fee partial sweepless tx - // sigs. - HighFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_signing_info,json=highFeeSigningInfo,proto3" json:"high_fee_signing_info,omitempty"` - // The info the client used to generate the extreme fee partial sweepless - // tx sigs. - ExtremeFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_signing_info,json=extremeFeeSigningInfo,proto3" json:"extreme_fee_signing_info,omitempty"` -} - -func (x *PushStaticAddressSweeplessSigsRequest) Reset() { - *x = PushStaticAddressSweeplessSigsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[50] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushStaticAddressSweeplessSigsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushStaticAddressSweeplessSigsRequest) ProtoMessage() {} - -func (x *PushStaticAddressSweeplessSigsRequest) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[50] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushStaticAddressSweeplessSigsRequest.ProtoReflect.Descriptor instead. -func (*PushStaticAddressSweeplessSigsRequest) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{50} -} - -func (x *PushStaticAddressSweeplessSigsRequest) GetSwapHash() []byte { - if x != nil { - return x.SwapHash - } - return nil -} - -func (x *PushStaticAddressSweeplessSigsRequest) GetStandardSigningInfo() *ClientSweeplessSigningInfo { - if x != nil { - return x.StandardSigningInfo - } - return nil -} - -func (x *PushStaticAddressSweeplessSigsRequest) GetHighFeeSigningInfo() *ClientSweeplessSigningInfo { - if x != nil { - return x.HighFeeSigningInfo - } - return nil -} - -func (x *PushStaticAddressSweeplessSigsRequest) GetExtremeFeeSigningInfo() *ClientSweeplessSigningInfo { - if x != nil { - return x.ExtremeFeeSigningInfo - } - return nil -} - -type ClientSweeplessSigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The nonces that the client used to generate the partial sweepless tx - // sigs. - Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` - // The musig2 htlc sigs that the client generated for the sweepless tx. - Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` -} - -func (x *ClientSweeplessSigningInfo) Reset() { - *x = ClientSweeplessSigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[51] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ClientSweeplessSigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ClientSweeplessSigningInfo) ProtoMessage() {} - -func (x *ClientSweeplessSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[51] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ClientSweeplessSigningInfo.ProtoReflect.Descriptor instead. -func (*ClientSweeplessSigningInfo) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{51} -} - -func (x *ClientSweeplessSigningInfo) GetNonces() [][]byte { - if x != nil { - return x.Nonces - } - return nil -} - -func (x *ClientSweeplessSigningInfo) GetSigs() [][]byte { - if x != nil { - return x.Sigs - } - return nil -} - -type PushStaticAddressSweeplessSigsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *PushStaticAddressSweeplessSigsResponse) Reset() { - *x = PushStaticAddressSweeplessSigsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_server_proto_msgTypes[52] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PushStaticAddressSweeplessSigsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PushStaticAddressSweeplessSigsResponse) ProtoMessage() {} - -func (x *PushStaticAddressSweeplessSigsResponse) ProtoReflect() protoreflect.Message { - mi := &file_server_proto_msgTypes[52] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PushStaticAddressSweeplessSigsResponse.ProtoReflect.Descriptor instead. -func (*PushStaticAddressSweeplessSigsResponse) Descriptor() ([]byte, []int) { - return file_server_proto_rawDescGZIP(), []int{52} -} - -var File_server_proto protoreflect.FileDescriptor +var File_server_proto protoreflect.FileDescriptor var file_server_proto_rawDesc = []byte{ 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, @@ -4361,178 +3220,7 @@ var file_server_proto_rawDesc = []byte{ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, - 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, - 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, - 0x54, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x17, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, - 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0xbc, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, - 0x72, 0x65, 0x76, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, - 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, - 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1e, 0x0a, 0x0b, 0x74, 0x78, 0x5f, 0x66, 0x65, 0x65, - 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x74, 0x78, 0x46, - 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0x69, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x75, 0x73, 0x69, 0x67, 0x32, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, - 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0f, 0x6d, 0x75, 0x73, - 0x69, 0x67, 0x32, 0x53, 0x77, 0x65, 0x65, 0x70, 0x53, 0x69, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, - 0x73, 0x22, 0x82, 0x03, 0x0a, 0x20, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x13, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x10, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, - 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, - 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, - 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, - 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, - 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x50, 0x0a, - 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, - 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, - 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, - 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, - 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xe1, 0x02, 0x0a, 0x21, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x13, - 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x5f, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x68, 0x74, 0x6c, 0x63, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68, - 0x74, 0x6c, 0x63, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, - 0x52, 0x0a, 0x68, 0x74, 0x6c, 0x63, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x12, - 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, - 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, - 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x12, 0x68, 0x69, - 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x48, - 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, - 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, - 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, - 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4a, 0x0a, 0x15, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, - 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, - 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xad, 0x02, 0x0a, 0x20, 0x50, 0x75, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, - 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, - 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, - 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x4c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6e, - 0x64, 0x61, 0x72, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x48, 0x74, - 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, 0x12, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0f, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x48, 0x74, - 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, - 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x50, - 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x3b, 0x0a, 0x1c, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, - 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x22, 0xa7, 0x02, - 0x0a, 0x1d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, - 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x1d, 0x0a, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4f, - 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, - 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, - 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x47, 0x0a, 0x0d, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, - 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x68, 0x69, 0x67, - 0x68, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4d, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x72, - 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, - 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4f, 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, - 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, - 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xd3, 0x02, 0x0a, 0x25, 0x50, 0x75, 0x73, - 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, - 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, - 0x57, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x53, 0x69, 0x67, - 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x56, 0x0a, 0x15, 0x68, 0x69, 0x67, 0x68, - 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, - 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, - 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x68, 0x69, - 0x67, 0x68, 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x5c, 0x0a, 0x18, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, - 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, - 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x48, - 0x0a, 0x1a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, - 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, 0x28, 0x0a, 0x26, 0x50, 0x75, 0x73, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, - 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x2a, 0xef, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x6f, 0x6e, 0x2a, 0xef, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, @@ -4603,148 +3291,104 @@ var file_server_proto_rawDesc = []byte{ 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x05, 0x2a, 0x27, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, - 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x57, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x2a, 0x26, - 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, - 0x0a, 0x02, 0x56, 0x30, 0x10, 0x00, 0x32, 0xc9, 0x0b, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, - 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, - 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, - 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, - 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, - 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, - 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x49, - 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, - 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, - 0x01, 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, + 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x57, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x32, 0xc9, + 0x0b, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4f, 0x0a, + 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x22, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4f, + 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, + 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x6c, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, + 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, + 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, + 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, + 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x4c, + 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x21, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0d, + 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1c, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, + 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, + 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, + 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x67, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, + 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, - 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, - 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, - 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, - 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, - 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, - 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, - 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x52, 0x65, - 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, - 0x74, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, - 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, - 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, - 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x52, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, - 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, - 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, - 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, - 0x12, 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, - 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, - 0x73, 0x12, 0x42, 0x0a, 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x12, 0x19, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, - 0x30, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, - 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, + 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, + 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, + 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x60, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, + 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, + 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, + 0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, + 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x4d, + 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x12, 0x1b, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, + 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, + 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, + 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x19, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, + 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, + 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, + 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x30, 0x01, 0x32, 0x9d, 0x05, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, - 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x1e, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, - 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x29, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x12, - 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, - 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x12, - 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, - 0x01, 0x0a, 0x1e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, - 0x73, 0x12, 0x2e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, - 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, - 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, - 0x6f, 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, - 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, + 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, + 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -4759,77 +3403,59 @@ func file_server_proto_rawDescGZIP() []byte { return file_server_proto_rawDescData } -var file_server_proto_enumTypes = make([]protoimpl.EnumInfo, 6) -var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 53) +var file_server_proto_enumTypes = make([]protoimpl.EnumInfo, 5) +var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 36) var file_server_proto_goTypes = []interface{}{ - (ProtocolVersion)(0), // 0: looprpc.ProtocolVersion - (ServerSwapState)(0), // 1: looprpc.ServerSwapState - (RoutePaymentType)(0), // 2: looprpc.RoutePaymentType - (PaymentFailureReason)(0), // 3: looprpc.PaymentFailureReason - (RoutingPlugin)(0), // 4: looprpc.RoutingPlugin - (StaticAddressProtocolVersion)(0), // 5: looprpc.StaticAddressProtocolVersion - (*ServerLoopOutRequest)(nil), // 6: looprpc.ServerLoopOutRequest - (*ServerLoopOutResponse)(nil), // 7: looprpc.ServerLoopOutResponse - (*ServerLoopOutQuoteRequest)(nil), // 8: looprpc.ServerLoopOutQuoteRequest - (*ServerLoopOutQuote)(nil), // 9: looprpc.ServerLoopOutQuote - (*ServerLoopOutTermsRequest)(nil), // 10: looprpc.ServerLoopOutTermsRequest - (*ServerLoopOutTerms)(nil), // 11: looprpc.ServerLoopOutTerms - (*ServerLoopInRequest)(nil), // 12: looprpc.ServerLoopInRequest - (*ServerLoopInResponse)(nil), // 13: looprpc.ServerLoopInResponse - (*ServerLoopInQuoteRequest)(nil), // 14: looprpc.ServerLoopInQuoteRequest - (*ServerLoopInQuoteResponse)(nil), // 15: looprpc.ServerLoopInQuoteResponse - (*ServerLoopInTermsRequest)(nil), // 16: looprpc.ServerLoopInTermsRequest - (*ServerLoopInTerms)(nil), // 17: looprpc.ServerLoopInTerms - (*ServerLoopOutPushPreimageRequest)(nil), // 18: looprpc.ServerLoopOutPushPreimageRequest - (*ServerLoopOutPushPreimageResponse)(nil), // 19: looprpc.ServerLoopOutPushPreimageResponse - (*SubscribeUpdatesRequest)(nil), // 20: looprpc.SubscribeUpdatesRequest - (*SubscribeLoopOutUpdatesResponse)(nil), // 21: looprpc.SubscribeLoopOutUpdatesResponse - (*SubscribeLoopInUpdatesResponse)(nil), // 22: looprpc.SubscribeLoopInUpdatesResponse - (*RouteCancel)(nil), // 23: looprpc.RouteCancel - (*HtlcAttempt)(nil), // 24: looprpc.HtlcAttempt - (*CancelLoopOutSwapRequest)(nil), // 25: looprpc.CancelLoopOutSwapRequest - (*CancelLoopOutSwapResponse)(nil), // 26: looprpc.CancelLoopOutSwapResponse - (*ServerProbeRequest)(nil), // 27: looprpc.ServerProbeRequest - (*ServerProbeResponse)(nil), // 28: looprpc.ServerProbeResponse - (*RecommendRoutingPluginReq)(nil), // 29: looprpc.RecommendRoutingPluginReq - (*RecommendRoutingPluginRes)(nil), // 30: looprpc.RecommendRoutingPluginRes - (*ReportRoutingResultReq)(nil), // 31: looprpc.ReportRoutingResultReq - (*ReportRoutingResultRes)(nil), // 32: looprpc.ReportRoutingResultRes - (*MuSig2SignSweepReq)(nil), // 33: looprpc.MuSig2SignSweepReq - (*PrevoutInfo)(nil), // 34: looprpc.PrevoutInfo - (*MuSig2SignSweepRes)(nil), // 35: looprpc.MuSig2SignSweepRes - (*ServerPushKeyReq)(nil), // 36: looprpc.ServerPushKeyReq - (*ServerPushKeyRes)(nil), // 37: looprpc.ServerPushKeyRes - (*FetchL402Request)(nil), // 38: looprpc.FetchL402Request - (*FetchL402Response)(nil), // 39: looprpc.FetchL402Response - (*SubscribeNotificationsRequest)(nil), // 40: looprpc.SubscribeNotificationsRequest - (*SubscribeNotificationsResponse)(nil), // 41: looprpc.SubscribeNotificationsResponse - (*ServerNewAddressRequest)(nil), // 42: looprpc.ServerNewAddressRequest - (*ServerNewAddressResponse)(nil), // 43: looprpc.ServerNewAddressResponse - (*ServerAddressParameters)(nil), // 44: looprpc.ServerAddressParameters - (*ServerWithdrawRequest)(nil), // 45: looprpc.ServerWithdrawRequest - (*ServerWithdrawResponse)(nil), // 46: looprpc.ServerWithdrawResponse - (*ServerStaticAddressLoopInRequest)(nil), // 47: looprpc.ServerStaticAddressLoopInRequest - (*ServerStaticAddressLoopInResponse)(nil), // 48: looprpc.ServerStaticAddressLoopInResponse - (*ServerHtlcSigningInfo)(nil), // 49: looprpc.ServerHtlcSigningInfo - (*PushStaticAddressHtlcSigsRequest)(nil), // 50: looprpc.PushStaticAddressHtlcSigsRequest - (*ClientHtlcSigningInfo)(nil), // 51: looprpc.ClientHtlcSigningInfo - (*PushStaticAddressHtlcSigsResponse)(nil), // 52: looprpc.PushStaticAddressHtlcSigsResponse - (*FetchSweeplessSweepTxRequest)(nil), // 53: looprpc.FetchSweeplessSweepTxRequest - (*FetchSweeplessSweepTxResponse)(nil), // 54: looprpc.FetchSweeplessSweepTxResponse - (*ServerSweeplessSigningInfo)(nil), // 55: looprpc.ServerSweeplessSigningInfo - (*PushStaticAddressSweeplessSigsRequest)(nil), // 56: looprpc.PushStaticAddressSweeplessSigsRequest - (*ClientSweeplessSigningInfo)(nil), // 57: looprpc.ClientSweeplessSigningInfo - (*PushStaticAddressSweeplessSigsResponse)(nil), // 58: looprpc.PushStaticAddressSweeplessSigsResponse - (*RouteHint)(nil), // 59: looprpc.RouteHint - (*ServerReservationNotification)(nil), // 60: looprpc.ServerReservationNotification + (ProtocolVersion)(0), // 0: looprpc.ProtocolVersion + (ServerSwapState)(0), // 1: looprpc.ServerSwapState + (RoutePaymentType)(0), // 2: looprpc.RoutePaymentType + (PaymentFailureReason)(0), // 3: looprpc.PaymentFailureReason + (RoutingPlugin)(0), // 4: looprpc.RoutingPlugin + (*ServerLoopOutRequest)(nil), // 5: looprpc.ServerLoopOutRequest + (*ServerLoopOutResponse)(nil), // 6: looprpc.ServerLoopOutResponse + (*ServerLoopOutQuoteRequest)(nil), // 7: looprpc.ServerLoopOutQuoteRequest + (*ServerLoopOutQuote)(nil), // 8: looprpc.ServerLoopOutQuote + (*ServerLoopOutTermsRequest)(nil), // 9: looprpc.ServerLoopOutTermsRequest + (*ServerLoopOutTerms)(nil), // 10: looprpc.ServerLoopOutTerms + (*ServerLoopInRequest)(nil), // 11: looprpc.ServerLoopInRequest + (*ServerLoopInResponse)(nil), // 12: looprpc.ServerLoopInResponse + (*ServerLoopInQuoteRequest)(nil), // 13: looprpc.ServerLoopInQuoteRequest + (*ServerLoopInQuoteResponse)(nil), // 14: looprpc.ServerLoopInQuoteResponse + (*ServerLoopInTermsRequest)(nil), // 15: looprpc.ServerLoopInTermsRequest + (*ServerLoopInTerms)(nil), // 16: looprpc.ServerLoopInTerms + (*ServerLoopOutPushPreimageRequest)(nil), // 17: looprpc.ServerLoopOutPushPreimageRequest + (*ServerLoopOutPushPreimageResponse)(nil), // 18: looprpc.ServerLoopOutPushPreimageResponse + (*SubscribeUpdatesRequest)(nil), // 19: looprpc.SubscribeUpdatesRequest + (*SubscribeLoopOutUpdatesResponse)(nil), // 20: looprpc.SubscribeLoopOutUpdatesResponse + (*SubscribeLoopInUpdatesResponse)(nil), // 21: looprpc.SubscribeLoopInUpdatesResponse + (*RouteCancel)(nil), // 22: looprpc.RouteCancel + (*HtlcAttempt)(nil), // 23: looprpc.HtlcAttempt + (*CancelLoopOutSwapRequest)(nil), // 24: looprpc.CancelLoopOutSwapRequest + (*CancelLoopOutSwapResponse)(nil), // 25: looprpc.CancelLoopOutSwapResponse + (*ServerProbeRequest)(nil), // 26: looprpc.ServerProbeRequest + (*ServerProbeResponse)(nil), // 27: looprpc.ServerProbeResponse + (*RecommendRoutingPluginReq)(nil), // 28: looprpc.RecommendRoutingPluginReq + (*RecommendRoutingPluginRes)(nil), // 29: looprpc.RecommendRoutingPluginRes + (*ReportRoutingResultReq)(nil), // 30: looprpc.ReportRoutingResultReq + (*ReportRoutingResultRes)(nil), // 31: looprpc.ReportRoutingResultRes + (*MuSig2SignSweepReq)(nil), // 32: looprpc.MuSig2SignSweepReq + (*PrevoutInfo)(nil), // 33: looprpc.PrevoutInfo + (*MuSig2SignSweepRes)(nil), // 34: looprpc.MuSig2SignSweepRes + (*ServerPushKeyReq)(nil), // 35: looprpc.ServerPushKeyReq + (*ServerPushKeyRes)(nil), // 36: looprpc.ServerPushKeyRes + (*FetchL402Request)(nil), // 37: looprpc.FetchL402Request + (*FetchL402Response)(nil), // 38: looprpc.FetchL402Response + (*SubscribeNotificationsRequest)(nil), // 39: looprpc.SubscribeNotificationsRequest + (*SubscribeNotificationsResponse)(nil), // 40: looprpc.SubscribeNotificationsResponse + (*RouteHint)(nil), // 41: looprpc.RouteHint + (*ServerReservationNotification)(nil), // 42: looprpc.ServerReservationNotification } var file_server_proto_depIdxs = []int32{ 0, // 0: looprpc.ServerLoopOutRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 1: looprpc.ServerLoopOutQuoteRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 2: looprpc.ServerLoopOutTermsRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 3: looprpc.ServerLoopInRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 59, // 4: looprpc.ServerLoopInQuoteRequest.route_hints:type_name -> looprpc.RouteHint + 41, // 4: looprpc.ServerLoopInQuoteRequest.route_hints:type_name -> looprpc.RouteHint 0, // 5: looprpc.ServerLoopInQuoteRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 6: looprpc.ServerLoopInTermsRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 7: looprpc.ServerLoopOutPushPreimageRequest.protocol_version:type_name -> looprpc.ProtocolVersion @@ -4837,87 +3463,59 @@ var file_server_proto_depIdxs = []int32{ 1, // 9: looprpc.SubscribeLoopOutUpdatesResponse.state:type_name -> looprpc.ServerSwapState 1, // 10: looprpc.SubscribeLoopInUpdatesResponse.state:type_name -> looprpc.ServerSwapState 2, // 11: looprpc.RouteCancel.route_type:type_name -> looprpc.RoutePaymentType - 24, // 12: looprpc.RouteCancel.attempts:type_name -> looprpc.HtlcAttempt + 23, // 12: looprpc.RouteCancel.attempts:type_name -> looprpc.HtlcAttempt 3, // 13: looprpc.RouteCancel.failure:type_name -> looprpc.PaymentFailureReason 0, // 14: looprpc.CancelLoopOutSwapRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 23, // 15: looprpc.CancelLoopOutSwapRequest.route_cancel:type_name -> looprpc.RouteCancel + 22, // 15: looprpc.CancelLoopOutSwapRequest.route_cancel:type_name -> looprpc.RouteCancel 0, // 16: looprpc.ServerProbeRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 59, // 17: looprpc.ServerProbeRequest.route_hints:type_name -> looprpc.RouteHint + 41, // 17: looprpc.ServerProbeRequest.route_hints:type_name -> looprpc.RouteHint 0, // 18: looprpc.RecommendRoutingPluginReq.protocol_version:type_name -> looprpc.ProtocolVersion 4, // 19: looprpc.RecommendRoutingPluginRes.plugin:type_name -> looprpc.RoutingPlugin 0, // 20: looprpc.ReportRoutingResultReq.protocol_version:type_name -> looprpc.ProtocolVersion 4, // 21: looprpc.ReportRoutingResultReq.plugin:type_name -> looprpc.RoutingPlugin 0, // 22: looprpc.MuSig2SignSweepReq.protocol_version:type_name -> looprpc.ProtocolVersion - 34, // 23: looprpc.MuSig2SignSweepReq.prevout_info:type_name -> looprpc.PrevoutInfo + 33, // 23: looprpc.MuSig2SignSweepReq.prevout_info:type_name -> looprpc.PrevoutInfo 0, // 24: looprpc.ServerPushKeyReq.protocol_version:type_name -> looprpc.ProtocolVersion - 60, // 25: looprpc.SubscribeNotificationsResponse.reservation_notification:type_name -> looprpc.ServerReservationNotification - 5, // 26: looprpc.ServerNewAddressRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion - 44, // 27: looprpc.ServerNewAddressResponse.params:type_name -> looprpc.ServerAddressParameters - 34, // 28: looprpc.ServerWithdrawRequest.outpoints:type_name -> looprpc.PrevoutInfo - 5, // 29: looprpc.ServerStaticAddressLoopInRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion - 49, // 30: looprpc.ServerStaticAddressLoopInResponse.standard_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo - 49, // 31: looprpc.ServerStaticAddressLoopInResponse.high_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo - 49, // 32: looprpc.ServerStaticAddressLoopInResponse.extreme_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo - 51, // 33: looprpc.PushStaticAddressHtlcSigsRequest.standard_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo - 51, // 34: looprpc.PushStaticAddressHtlcSigsRequest.high_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo - 51, // 35: looprpc.PushStaticAddressHtlcSigsRequest.extreme_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo - 55, // 36: looprpc.FetchSweeplessSweepTxResponse.standard_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo - 55, // 37: looprpc.FetchSweeplessSweepTxResponse.high_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo - 55, // 38: looprpc.FetchSweeplessSweepTxResponse.extreme_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo - 57, // 39: looprpc.PushStaticAddressSweeplessSigsRequest.standard_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo - 57, // 40: looprpc.PushStaticAddressSweeplessSigsRequest.high_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo - 57, // 41: looprpc.PushStaticAddressSweeplessSigsRequest.extreme_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo - 10, // 42: looprpc.SwapServer.LoopOutTerms:input_type -> looprpc.ServerLoopOutTermsRequest - 6, // 43: looprpc.SwapServer.NewLoopOutSwap:input_type -> looprpc.ServerLoopOutRequest - 18, // 44: looprpc.SwapServer.LoopOutPushPreimage:input_type -> looprpc.ServerLoopOutPushPreimageRequest - 8, // 45: looprpc.SwapServer.LoopOutQuote:input_type -> looprpc.ServerLoopOutQuoteRequest - 16, // 46: looprpc.SwapServer.LoopInTerms:input_type -> looprpc.ServerLoopInTermsRequest - 12, // 47: looprpc.SwapServer.NewLoopInSwap:input_type -> looprpc.ServerLoopInRequest - 14, // 48: looprpc.SwapServer.LoopInQuote:input_type -> looprpc.ServerLoopInQuoteRequest - 20, // 49: looprpc.SwapServer.SubscribeLoopOutUpdates:input_type -> looprpc.SubscribeUpdatesRequest - 20, // 50: looprpc.SwapServer.SubscribeLoopInUpdates:input_type -> looprpc.SubscribeUpdatesRequest - 25, // 51: looprpc.SwapServer.CancelLoopOutSwap:input_type -> looprpc.CancelLoopOutSwapRequest - 27, // 52: looprpc.SwapServer.Probe:input_type -> looprpc.ServerProbeRequest - 29, // 53: looprpc.SwapServer.RecommendRoutingPlugin:input_type -> looprpc.RecommendRoutingPluginReq - 31, // 54: looprpc.SwapServer.ReportRoutingResult:input_type -> looprpc.ReportRoutingResultReq - 33, // 55: looprpc.SwapServer.MuSig2SignSweep:input_type -> looprpc.MuSig2SignSweepReq - 36, // 56: looprpc.SwapServer.PushKey:input_type -> looprpc.ServerPushKeyReq - 38, // 57: looprpc.SwapServer.FetchL402:input_type -> looprpc.FetchL402Request - 40, // 58: looprpc.SwapServer.SubscribeNotifications:input_type -> looprpc.SubscribeNotificationsRequest - 42, // 59: looprpc.StaticAddressServer.ServerNewAddress:input_type -> looprpc.ServerNewAddressRequest - 45, // 60: looprpc.StaticAddressServer.ServerWithdrawDeposits:input_type -> looprpc.ServerWithdrawRequest - 47, // 61: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:input_type -> looprpc.ServerStaticAddressLoopInRequest - 50, // 62: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:input_type -> looprpc.PushStaticAddressHtlcSigsRequest - 53, // 63: looprpc.StaticAddressServer.FetchSweeplessSweepTx:input_type -> looprpc.FetchSweeplessSweepTxRequest - 56, // 64: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:input_type -> looprpc.PushStaticAddressSweeplessSigsRequest - 11, // 65: looprpc.SwapServer.LoopOutTerms:output_type -> looprpc.ServerLoopOutTerms - 7, // 66: looprpc.SwapServer.NewLoopOutSwap:output_type -> looprpc.ServerLoopOutResponse - 19, // 67: looprpc.SwapServer.LoopOutPushPreimage:output_type -> looprpc.ServerLoopOutPushPreimageResponse - 9, // 68: looprpc.SwapServer.LoopOutQuote:output_type -> looprpc.ServerLoopOutQuote - 17, // 69: looprpc.SwapServer.LoopInTerms:output_type -> looprpc.ServerLoopInTerms - 13, // 70: looprpc.SwapServer.NewLoopInSwap:output_type -> looprpc.ServerLoopInResponse - 15, // 71: looprpc.SwapServer.LoopInQuote:output_type -> looprpc.ServerLoopInQuoteResponse - 21, // 72: looprpc.SwapServer.SubscribeLoopOutUpdates:output_type -> looprpc.SubscribeLoopOutUpdatesResponse - 22, // 73: looprpc.SwapServer.SubscribeLoopInUpdates:output_type -> looprpc.SubscribeLoopInUpdatesResponse - 26, // 74: looprpc.SwapServer.CancelLoopOutSwap:output_type -> looprpc.CancelLoopOutSwapResponse - 28, // 75: looprpc.SwapServer.Probe:output_type -> looprpc.ServerProbeResponse - 30, // 76: looprpc.SwapServer.RecommendRoutingPlugin:output_type -> looprpc.RecommendRoutingPluginRes - 32, // 77: looprpc.SwapServer.ReportRoutingResult:output_type -> looprpc.ReportRoutingResultRes - 35, // 78: looprpc.SwapServer.MuSig2SignSweep:output_type -> looprpc.MuSig2SignSweepRes - 37, // 79: looprpc.SwapServer.PushKey:output_type -> looprpc.ServerPushKeyRes - 39, // 80: looprpc.SwapServer.FetchL402:output_type -> looprpc.FetchL402Response - 41, // 81: looprpc.SwapServer.SubscribeNotifications:output_type -> looprpc.SubscribeNotificationsResponse - 43, // 82: looprpc.StaticAddressServer.ServerNewAddress:output_type -> looprpc.ServerNewAddressResponse - 46, // 83: looprpc.StaticAddressServer.ServerWithdrawDeposits:output_type -> looprpc.ServerWithdrawResponse - 48, // 84: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:output_type -> looprpc.ServerStaticAddressLoopInResponse - 52, // 85: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:output_type -> looprpc.PushStaticAddressHtlcSigsResponse - 54, // 86: looprpc.StaticAddressServer.FetchSweeplessSweepTx:output_type -> looprpc.FetchSweeplessSweepTxResponse - 58, // 87: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:output_type -> looprpc.PushStaticAddressSweeplessSigsResponse - 65, // [65:88] is the sub-list for method output_type - 42, // [42:65] is the sub-list for method input_type - 42, // [42:42] is the sub-list for extension type_name - 42, // [42:42] is the sub-list for extension extendee - 0, // [0:42] is the sub-list for field type_name + 42, // 25: looprpc.SubscribeNotificationsResponse.reservation_notification:type_name -> looprpc.ServerReservationNotification + 9, // 26: looprpc.SwapServer.LoopOutTerms:input_type -> looprpc.ServerLoopOutTermsRequest + 5, // 27: looprpc.SwapServer.NewLoopOutSwap:input_type -> looprpc.ServerLoopOutRequest + 17, // 28: looprpc.SwapServer.LoopOutPushPreimage:input_type -> looprpc.ServerLoopOutPushPreimageRequest + 7, // 29: looprpc.SwapServer.LoopOutQuote:input_type -> looprpc.ServerLoopOutQuoteRequest + 15, // 30: looprpc.SwapServer.LoopInTerms:input_type -> looprpc.ServerLoopInTermsRequest + 11, // 31: looprpc.SwapServer.NewLoopInSwap:input_type -> looprpc.ServerLoopInRequest + 13, // 32: looprpc.SwapServer.LoopInQuote:input_type -> looprpc.ServerLoopInQuoteRequest + 19, // 33: looprpc.SwapServer.SubscribeLoopOutUpdates:input_type -> looprpc.SubscribeUpdatesRequest + 19, // 34: looprpc.SwapServer.SubscribeLoopInUpdates:input_type -> looprpc.SubscribeUpdatesRequest + 24, // 35: looprpc.SwapServer.CancelLoopOutSwap:input_type -> looprpc.CancelLoopOutSwapRequest + 26, // 36: looprpc.SwapServer.Probe:input_type -> looprpc.ServerProbeRequest + 28, // 37: looprpc.SwapServer.RecommendRoutingPlugin:input_type -> looprpc.RecommendRoutingPluginReq + 30, // 38: looprpc.SwapServer.ReportRoutingResult:input_type -> looprpc.ReportRoutingResultReq + 32, // 39: looprpc.SwapServer.MuSig2SignSweep:input_type -> looprpc.MuSig2SignSweepReq + 35, // 40: looprpc.SwapServer.PushKey:input_type -> looprpc.ServerPushKeyReq + 37, // 41: looprpc.SwapServer.FetchL402:input_type -> looprpc.FetchL402Request + 39, // 42: looprpc.SwapServer.SubscribeNotifications:input_type -> looprpc.SubscribeNotificationsRequest + 10, // 43: looprpc.SwapServer.LoopOutTerms:output_type -> looprpc.ServerLoopOutTerms + 6, // 44: looprpc.SwapServer.NewLoopOutSwap:output_type -> looprpc.ServerLoopOutResponse + 18, // 45: looprpc.SwapServer.LoopOutPushPreimage:output_type -> looprpc.ServerLoopOutPushPreimageResponse + 8, // 46: looprpc.SwapServer.LoopOutQuote:output_type -> looprpc.ServerLoopOutQuote + 16, // 47: looprpc.SwapServer.LoopInTerms:output_type -> looprpc.ServerLoopInTerms + 12, // 48: looprpc.SwapServer.NewLoopInSwap:output_type -> looprpc.ServerLoopInResponse + 14, // 49: looprpc.SwapServer.LoopInQuote:output_type -> looprpc.ServerLoopInQuoteResponse + 20, // 50: looprpc.SwapServer.SubscribeLoopOutUpdates:output_type -> looprpc.SubscribeLoopOutUpdatesResponse + 21, // 51: looprpc.SwapServer.SubscribeLoopInUpdates:output_type -> looprpc.SubscribeLoopInUpdatesResponse + 25, // 52: looprpc.SwapServer.CancelLoopOutSwap:output_type -> looprpc.CancelLoopOutSwapResponse + 27, // 53: looprpc.SwapServer.Probe:output_type -> looprpc.ServerProbeResponse + 29, // 54: looprpc.SwapServer.RecommendRoutingPlugin:output_type -> looprpc.RecommendRoutingPluginRes + 31, // 55: looprpc.SwapServer.ReportRoutingResult:output_type -> looprpc.ReportRoutingResultRes + 34, // 56: looprpc.SwapServer.MuSig2SignSweep:output_type -> looprpc.MuSig2SignSweepRes + 36, // 57: looprpc.SwapServer.PushKey:output_type -> looprpc.ServerPushKeyRes + 38, // 58: looprpc.SwapServer.FetchL402:output_type -> looprpc.FetchL402Response + 40, // 59: looprpc.SwapServer.SubscribeNotifications:output_type -> looprpc.SubscribeNotificationsResponse + 43, // [43:60] is the sub-list for method output_type + 26, // [26:43] is the sub-list for method input_type + 26, // [26:26] is the sub-list for extension type_name + 26, // [26:26] is the sub-list for extension extendee + 0, // [0:26] is the sub-list for field type_name } func init() { file_server_proto_init() } @@ -5360,210 +3958,6 @@ func file_server_proto_init() { return nil } } - file_server_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerNewAddressRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerNewAddressResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerAddressParameters); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerWithdrawRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerWithdrawResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerStaticAddressLoopInRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerStaticAddressLoopInResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerHtlcSigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushStaticAddressHtlcSigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientHtlcSigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushStaticAddressHtlcSigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchSweeplessSweepTxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchSweeplessSweepTxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerSweeplessSigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushStaticAddressSweeplessSigsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ClientSweeplessSigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_server_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushStaticAddressSweeplessSigsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } file_server_proto_msgTypes[19].OneofWrappers = []interface{}{ (*CancelLoopOutSwapRequest_RouteCancel)(nil), @@ -5576,10 +3970,10 @@ func file_server_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_server_proto_rawDesc, - NumEnums: 6, - NumMessages: 53, + NumEnums: 5, + NumMessages: 36, NumExtensions: 0, - NumServices: 2, + NumServices: 1, }, GoTypes: file_server_proto_goTypes, DependencyIndexes: file_server_proto_depIdxs, diff --git a/swapserverrpc/server.proto b/swapserverrpc/server.proto index 9e54defbf..aa95e9d3c 100644 --- a/swapserverrpc/server.proto +++ b/swapserverrpc/server.proto @@ -669,241 +669,3 @@ message SubscribeNotificationsResponse { ServerReservationNotification reservation_notification = 1; } } - -// StaticAddressProtocolVersion represents the static address protocol version -// the client adheres to. -enum StaticAddressProtocolVersion { - // V0 is the initially released static address protocol version. - V0 = 0; -} - -service StaticAddressServer { - // ServerNewAddress generates a new static address for the client to use. - // The server will generate the address and return the server key and the - // address's CSV expiry. - rpc ServerNewAddress (ServerNewAddressRequest) - returns (ServerNewAddressResponse); - - // ServerWithdrawDeposits allows to cooperatively sweep deposits that - // haven't timed out yet to the client's wallet. The server will generate - // the partial sigs for the client's selected deposits. - rpc ServerWithdrawDeposits (ServerWithdrawRequest) - returns (ServerWithdrawResponse); - - // ServerStaticAddressLoopIn initiates a static address loop-in swap. The - // server will respond with htlc details that the client can use to - // construct and sign the htlc tx. - rpc ServerStaticAddressLoopIn (ServerStaticAddressLoopInRequest) - returns (ServerStaticAddressLoopInResponse); - - // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. - rpc PushStaticAddressHtlcSigs (PushStaticAddressHtlcSigsRequest) - returns (PushStaticAddressHtlcSigsResponse); - - // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to - // to sign it. - rpc FetchSweeplessSweepTx (FetchSweeplessSweepTxRequest) - returns (FetchSweeplessSweepTxResponse); - - // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx - // sigs to the server. - rpc PushStaticAddressSweeplessSigs (PushStaticAddressSweeplessSigsRequest) - returns (PushStaticAddressSweeplessSigsResponse); -} - -message ServerNewAddressRequest { - // The protocol version that the client adheres to. - StaticAddressProtocolVersion protocol_version = 1; - - // The client key for the MuSig2 static address output. - bytes client_key = 2; -} - -message ServerNewAddressResponse { - ServerAddressParameters params = 1; -} - -message ServerAddressParameters { - // The server key for the MuSig2 static address output. - bytes server_key = 1; - - // The CSV expiry of the static address output. - uint32 expiry = 2; -} - -message ServerWithdrawRequest { - // The deposit outpoints the client wishes to withdraw. - repeated PrevoutInfo outpoints = 1; - - // The nonces that the client used to generate the withdrawal tx sigs. - repeated bytes client_nonces = 2; - - // The address that the client wants to sweep the static address deposits - // to. - string client_sweep_addr = 3; - - // The fee rate in sat/kw that the client wants to use for the sweep. - uint64 tx_fee_rate = 4; -} - -message ServerWithdrawResponse { - // The sweep sigs that the server generated for the htlc. - repeated bytes musig2_sweep_sigs = 1; - - // The nonces that the server used to generate the sweepless sweep sigs. - repeated bytes server_nonces = 2; -} - -message ServerStaticAddressLoopInRequest { - // The client's public key for the htlc output. - bytes htlc_client_pub_key = 1; - - // The hashed swap invoice preimage of the swap. - bytes swap_hash = 2; - - // The deposit outpoints the client wishes to loop in. They implicitly state - // the swap amount. - repeated string deposit_outpoints = 3; - - // The swap invoice that the client wants the server to pay. - string swap_invoice = 4; - - // An optional last hop the client wants to receive the invoice payment - // from. - bytes last_hop = 5; - - // The protocol version that the client adheres to. - StaticAddressProtocolVersion protocol_version = 6; - - // The user agent string that identifies the software running on the user's - // side. This can be changed in the user's client software but it _SHOULD_ - // conform to the following pattern: - // Agent-Name/semver-version(/additional-info) - // Examples: - // loopd/v0.10.0-beta/commit=3b635821 - // litd/v0.2.0-alpha/commit=326d754 - // loopd/v0.10.0-beta/commit=3b635823,initiator=easy-autoloop - string user_agent = 7; - - // The swap payment timeout allows the user to specify an upper limit for - // the amount of time the server is allowed to take to fulfill the off-chain - // swap payment. If the timeout is reached the swap will be aborted on the - // server side and the client can retry the swap with different parameters. - uint32 payment_timeout_seconds = 8; -} - -message ServerStaticAddressLoopInResponse { - // The server's public key for the htlc output. - bytes htlc_server_pub_key = 1; - - // The cltv expiry height for the htlc. This is the height at which the - // htlc will expire and the client is free to claim the funds back. - int32 htlc_expiry = 2; - - // The info the server used to generate the standard fee partial htlc tx - // sigs. - ServerHtlcSigningInfo standard_htlc_info = 3; - - // The info the server used to generate the high fee partial htlc tx sigs. - ServerHtlcSigningInfo high_fee_htlc_info = 4; - - // The info the server used to generate the extreme fee partial htlc tx - // sigs. - ServerHtlcSigningInfo extreme_fee_htlc_info = 5; -} - -message ServerHtlcSigningInfo { - // The nonces that the server used to generate the partial htlc tx sigs. - repeated bytes nonces = 1; - - // The fee rate in sat/kw that the server wants to use for the htlc tx. - uint64 fee_rate = 2; -} - -message PushStaticAddressHtlcSigsRequest { - // The swap hash that the client wants to push the htlc sigs for. - bytes swap_hash = 1; - - // The nonces that the client used to generate the htlc sigs. - ClientHtlcSigningInfo standard_htlc_info = 2; - - // The nonces that the client used to generate the high fee htlc sigs. - ClientHtlcSigningInfo high_fee_htlc_info = 3; - - // The nonces that the client used to generate the extreme fee htlc sigs. - ClientHtlcSigningInfo extreme_fee_htlc_info = 4; -} - -message ClientHtlcSigningInfo { - // The nonces that the client used to generate the partial htlc tx sigs. - repeated bytes nonces = 1; - - // The musig2 htlc sigs that the client generated for the htlc tx. - repeated bytes sigs = 2; -} - -message PushStaticAddressHtlcSigsResponse { -} - -message FetchSweeplessSweepTxRequest { - // The swap hash of the swap that the client wants to fetch the sweepless - // sweep tx for. - bytes swap_hash = 1; -} - -message FetchSweeplessSweepTxResponse { - // The address that the server wants to sweep the static address deposits - // to. - string sweep_addr = 1; - - // The info the server used to generate the standard fee partial sweepless - // tx sigs. - ServerSweeplessSigningInfo standard_fee_info = 2; - - // The info the server used to generate the high fee partial sweepless tx - // sigs. - ServerSweeplessSigningInfo high_fee_info = 3; - - // The info the server used to generate the extreme fee partial sweepless tx - // sigs. - ServerSweeplessSigningInfo extreme_fee_info = 4; -} - -message ServerSweeplessSigningInfo { - // The nonces that the server used to generate the partial sweepless tx - // sigs. - repeated bytes nonces = 1; - - // The fee rate in sat/kw that the server wants to use for the sweepless tx. - uint64 fee_rate = 2; -} - -message PushStaticAddressSweeplessSigsRequest { - // The swap hash of the swap that the client wants to push the sweepless - // sigs for. - bytes swap_hash = 1; - - // The info the client used to generate the standard fee partial sweepless - // tx sigs. - ClientSweeplessSigningInfo standard_signing_info = 2; - - // The info the client used to generate the high fee partial sweepless tx - // sigs. - ClientSweeplessSigningInfo high_fee_signing_info = 3; - - // The info the client used to generate the extreme fee partial sweepless - // tx sigs. - ClientSweeplessSigningInfo extreme_fee_signing_info = 4; -} - -message ClientSweeplessSigningInfo { - // The nonces that the client used to generate the partial sweepless tx - // sigs. - repeated bytes nonces = 1; - - // The musig2 htlc sigs that the client generated for the sweepless tx. - repeated bytes sigs = 2; -} - -message PushStaticAddressSweeplessSigsResponse { -} diff --git a/swapserverrpc/server_grpc.pb.go b/swapserverrpc/server_grpc.pb.go index 11aed0d87..70c763d32 100644 --- a/swapserverrpc/server_grpc.pb.go +++ b/swapserverrpc/server_grpc.pb.go @@ -761,297 +761,3 @@ var SwapServer_ServiceDesc = grpc.ServiceDesc{ }, Metadata: "server.proto", } - -// StaticAddressServerClient is the client API for StaticAddressServer service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. -type StaticAddressServerClient interface { - // ServerNewAddress generates a new static address for the client to use. - // The server will generate the address and return the server key and the - // address's CSV expiry. - ServerNewAddress(ctx context.Context, in *ServerNewAddressRequest, opts ...grpc.CallOption) (*ServerNewAddressResponse, error) - // ServerWithdrawDeposits allows to cooperatively sweep deposits that - // haven't timed out yet to the client's wallet. The server will generate - // the partial sigs for the client's selected deposits. - ServerWithdrawDeposits(ctx context.Context, in *ServerWithdrawRequest, opts ...grpc.CallOption) (*ServerWithdrawResponse, error) - // ServerStaticAddressLoopIn initiates a static address loop-in swap. The - // server will respond with htlc details that the client can use to - // construct and sign the htlc tx. - ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) - // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. - PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) - // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to - // to sign it. - FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) - // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx - // sigs to the server. - PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) -} - -type staticAddressServerClient struct { - cc grpc.ClientConnInterface -} - -func NewStaticAddressServerClient(cc grpc.ClientConnInterface) StaticAddressServerClient { - return &staticAddressServerClient{cc} -} - -func (c *staticAddressServerClient) ServerNewAddress(ctx context.Context, in *ServerNewAddressRequest, opts ...grpc.CallOption) (*ServerNewAddressResponse, error) { - out := new(ServerNewAddressResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerNewAddress", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *staticAddressServerClient) ServerWithdrawDeposits(ctx context.Context, in *ServerWithdrawRequest, opts ...grpc.CallOption) (*ServerWithdrawResponse, error) { - out := new(ServerWithdrawResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerWithdrawDeposits", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *staticAddressServerClient) ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) { - out := new(ServerStaticAddressLoopInResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerStaticAddressLoopIn", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *staticAddressServerClient) PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) { - out := new(PushStaticAddressHtlcSigsResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressHtlcSigs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *staticAddressServerClient) FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) { - out := new(FetchSweeplessSweepTxResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *staticAddressServerClient) PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) { - out := new(PushStaticAddressSweeplessSigsResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// StaticAddressServerServer is the server API for StaticAddressServer service. -// All implementations must embed UnimplementedStaticAddressServerServer -// for forward compatibility -type StaticAddressServerServer interface { - // ServerNewAddress generates a new static address for the client to use. - // The server will generate the address and return the server key and the - // address's CSV expiry. - ServerNewAddress(context.Context, *ServerNewAddressRequest) (*ServerNewAddressResponse, error) - // ServerWithdrawDeposits allows to cooperatively sweep deposits that - // haven't timed out yet to the client's wallet. The server will generate - // the partial sigs for the client's selected deposits. - ServerWithdrawDeposits(context.Context, *ServerWithdrawRequest) (*ServerWithdrawResponse, error) - // ServerStaticAddressLoopIn initiates a static address loop-in swap. The - // server will respond with htlc details that the client can use to - // construct and sign the htlc tx. - ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) - // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. - PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) - // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to - // to sign it. - FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) - // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx - // sigs to the server. - PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) - mustEmbedUnimplementedStaticAddressServerServer() -} - -// UnimplementedStaticAddressServerServer must be embedded to have forward compatible implementations. -type UnimplementedStaticAddressServerServer struct { -} - -func (UnimplementedStaticAddressServerServer) ServerNewAddress(context.Context, *ServerNewAddressRequest) (*ServerNewAddressResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ServerNewAddress not implemented") -} -func (UnimplementedStaticAddressServerServer) ServerWithdrawDeposits(context.Context, *ServerWithdrawRequest) (*ServerWithdrawResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ServerWithdrawDeposits not implemented") -} -func (UnimplementedStaticAddressServerServer) ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ServerStaticAddressLoopIn not implemented") -} -func (UnimplementedStaticAddressServerServer) PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressHtlcSigs not implemented") -} -func (UnimplementedStaticAddressServerServer) FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchSweeplessSweepTx not implemented") -} -func (UnimplementedStaticAddressServerServer) PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressSweeplessSigs not implemented") -} -func (UnimplementedStaticAddressServerServer) mustEmbedUnimplementedStaticAddressServerServer() {} - -// UnsafeStaticAddressServerServer may be embedded to opt out of forward compatibility for this service. -// Use of this interface is not recommended, as added methods to StaticAddressServerServer will -// result in compilation errors. -type UnsafeStaticAddressServerServer interface { - mustEmbedUnimplementedStaticAddressServerServer() -} - -func RegisterStaticAddressServerServer(s grpc.ServiceRegistrar, srv StaticAddressServerServer) { - s.RegisterService(&StaticAddressServer_ServiceDesc, srv) -} - -func _StaticAddressServer_ServerNewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServerNewAddressRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).ServerNewAddress(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/ServerNewAddress", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).ServerNewAddress(ctx, req.(*ServerNewAddressRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StaticAddressServer_ServerWithdrawDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServerWithdrawRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).ServerWithdrawDeposits(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/ServerWithdrawDeposits", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).ServerWithdrawDeposits(ctx, req.(*ServerWithdrawRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StaticAddressServer_ServerStaticAddressLoopIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ServerStaticAddressLoopInRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).ServerStaticAddressLoopIn(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/ServerStaticAddressLoopIn", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).ServerStaticAddressLoopIn(ctx, req.(*ServerStaticAddressLoopInRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StaticAddressServer_PushStaticAddressHtlcSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushStaticAddressHtlcSigsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).PushStaticAddressHtlcSigs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/PushStaticAddressHtlcSigs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).PushStaticAddressHtlcSigs(ctx, req.(*PushStaticAddressHtlcSigsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StaticAddressServer_FetchSweeplessSweepTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchSweeplessSweepTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, req.(*FetchSweeplessSweepTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(PushStaticAddressSweeplessSigsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).PushStaticAddressSweeplessSigs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).PushStaticAddressSweeplessSigs(ctx, req.(*PushStaticAddressSweeplessSigsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -// StaticAddressServer_ServiceDesc is the grpc.ServiceDesc for StaticAddressServer service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var StaticAddressServer_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "looprpc.StaticAddressServer", - HandlerType: (*StaticAddressServerServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "ServerNewAddress", - Handler: _StaticAddressServer_ServerNewAddress_Handler, - }, - { - MethodName: "ServerWithdrawDeposits", - Handler: _StaticAddressServer_ServerWithdrawDeposits_Handler, - }, - { - MethodName: "ServerStaticAddressLoopIn", - Handler: _StaticAddressServer_ServerStaticAddressLoopIn_Handler, - }, - { - MethodName: "PushStaticAddressHtlcSigs", - Handler: _StaticAddressServer_PushStaticAddressHtlcSigs_Handler, - }, - { - MethodName: "FetchSweeplessSweepTx", - Handler: _StaticAddressServer_FetchSweeplessSweepTx_Handler, - }, - { - MethodName: "PushStaticAddressSweeplessSigs", - Handler: _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "server.proto", -} diff --git a/swapserverrpc/staticaddr.pb.go b/swapserverrpc/staticaddr.pb.go new file mode 100644 index 000000000..b038018a2 --- /dev/null +++ b/swapserverrpc/staticaddr.pb.go @@ -0,0 +1,1698 @@ +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.30.0 +// protoc v3.21.12 +// source: staticaddr.proto + +// We can't change this to swapserverrpc, it would be a breaking change because +// the package name is also contained in the HTTP URIs and old clients would +// call the wrong endpoints. Luckily with the go_package option we can have +// different golang and RPC package names to fix protobuf namespace conflicts. + +package swapserverrpc + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// StaticAddressProtocolVersion represents the static address protocol version +// the client adheres to. +type StaticAddressProtocolVersion int32 + +const ( + // V0 is the initially released static address protocol version. + StaticAddressProtocolVersion_V0 StaticAddressProtocolVersion = 0 +) + +// Enum value maps for StaticAddressProtocolVersion. +var ( + StaticAddressProtocolVersion_name = map[int32]string{ + 0: "V0", + } + StaticAddressProtocolVersion_value = map[string]int32{ + "V0": 0, + } +) + +func (x StaticAddressProtocolVersion) Enum() *StaticAddressProtocolVersion { + p := new(StaticAddressProtocolVersion) + *p = x + return p +} + +func (x StaticAddressProtocolVersion) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (StaticAddressProtocolVersion) Descriptor() protoreflect.EnumDescriptor { + return file_staticaddr_proto_enumTypes[0].Descriptor() +} + +func (StaticAddressProtocolVersion) Type() protoreflect.EnumType { + return &file_staticaddr_proto_enumTypes[0] +} + +func (x StaticAddressProtocolVersion) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use StaticAddressProtocolVersion.Descriptor instead. +func (StaticAddressProtocolVersion) EnumDescriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{0} +} + +type ServerNewAddressRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The protocol version that the client adheres to. + ProtocolVersion StaticAddressProtocolVersion `protobuf:"varint,1,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.StaticAddressProtocolVersion" json:"protocol_version,omitempty"` + // The client key for the MuSig2 static address output. + ClientKey []byte `protobuf:"bytes,2,opt,name=client_key,json=clientKey,proto3" json:"client_key,omitempty"` +} + +func (x *ServerNewAddressRequest) Reset() { + *x = ServerNewAddressRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNewAddressRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNewAddressRequest) ProtoMessage() {} + +func (x *ServerNewAddressRequest) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNewAddressRequest.ProtoReflect.Descriptor instead. +func (*ServerNewAddressRequest) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{0} +} + +func (x *ServerNewAddressRequest) GetProtocolVersion() StaticAddressProtocolVersion { + if x != nil { + return x.ProtocolVersion + } + return StaticAddressProtocolVersion_V0 +} + +func (x *ServerNewAddressRequest) GetClientKey() []byte { + if x != nil { + return x.ClientKey + } + return nil +} + +type ServerNewAddressResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Params *ServerAddressParameters `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *ServerNewAddressResponse) Reset() { + *x = ServerNewAddressResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerNewAddressResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerNewAddressResponse) ProtoMessage() {} + +func (x *ServerNewAddressResponse) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerNewAddressResponse.ProtoReflect.Descriptor instead. +func (*ServerNewAddressResponse) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{1} +} + +func (x *ServerNewAddressResponse) GetParams() *ServerAddressParameters { + if x != nil { + return x.Params + } + return nil +} + +type ServerAddressParameters struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The server key for the MuSig2 static address output. + ServerKey []byte `protobuf:"bytes,1,opt,name=server_key,json=serverKey,proto3" json:"server_key,omitempty"` + // The CSV expiry of the static address output. + Expiry uint32 `protobuf:"varint,2,opt,name=expiry,proto3" json:"expiry,omitempty"` +} + +func (x *ServerAddressParameters) Reset() { + *x = ServerAddressParameters{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerAddressParameters) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerAddressParameters) ProtoMessage() {} + +func (x *ServerAddressParameters) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerAddressParameters.ProtoReflect.Descriptor instead. +func (*ServerAddressParameters) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{2} +} + +func (x *ServerAddressParameters) GetServerKey() []byte { + if x != nil { + return x.ServerKey + } + return nil +} + +func (x *ServerAddressParameters) GetExpiry() uint32 { + if x != nil { + return x.Expiry + } + return 0 +} + +type ServerWithdrawRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The deposit outpoints the client wishes to withdraw. + Outpoints []*PrevoutInfo `protobuf:"bytes,1,rep,name=outpoints,proto3" json:"outpoints,omitempty"` + // The nonces that the client used to generate the withdrawal tx sigs. + ClientNonces [][]byte `protobuf:"bytes,2,rep,name=client_nonces,json=clientNonces,proto3" json:"client_nonces,omitempty"` + // The address that the client wants to sweep the static address deposits + // to. + ClientSweepAddr string `protobuf:"bytes,3,opt,name=client_sweep_addr,json=clientSweepAddr,proto3" json:"client_sweep_addr,omitempty"` + // The fee rate in sat/kw that the client wants to use for the sweep. + TxFeeRate uint64 `protobuf:"varint,4,opt,name=tx_fee_rate,json=txFeeRate,proto3" json:"tx_fee_rate,omitempty"` +} + +func (x *ServerWithdrawRequest) Reset() { + *x = ServerWithdrawRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerWithdrawRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerWithdrawRequest) ProtoMessage() {} + +func (x *ServerWithdrawRequest) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerWithdrawRequest.ProtoReflect.Descriptor instead. +func (*ServerWithdrawRequest) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{3} +} + +func (x *ServerWithdrawRequest) GetOutpoints() []*PrevoutInfo { + if x != nil { + return x.Outpoints + } + return nil +} + +func (x *ServerWithdrawRequest) GetClientNonces() [][]byte { + if x != nil { + return x.ClientNonces + } + return nil +} + +func (x *ServerWithdrawRequest) GetClientSweepAddr() string { + if x != nil { + return x.ClientSweepAddr + } + return "" +} + +func (x *ServerWithdrawRequest) GetTxFeeRate() uint64 { + if x != nil { + return x.TxFeeRate + } + return 0 +} + +type ServerWithdrawResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The sweep sigs that the server generated for the htlc. + Musig2SweepSigs [][]byte `protobuf:"bytes,1,rep,name=musig2_sweep_sigs,json=musig2SweepSigs,proto3" json:"musig2_sweep_sigs,omitempty"` + // The nonces that the server used to generate the sweepless sweep sigs. + ServerNonces [][]byte `protobuf:"bytes,2,rep,name=server_nonces,json=serverNonces,proto3" json:"server_nonces,omitempty"` +} + +func (x *ServerWithdrawResponse) Reset() { + *x = ServerWithdrawResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerWithdrawResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerWithdrawResponse) ProtoMessage() {} + +func (x *ServerWithdrawResponse) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerWithdrawResponse.ProtoReflect.Descriptor instead. +func (*ServerWithdrawResponse) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{4} +} + +func (x *ServerWithdrawResponse) GetMusig2SweepSigs() [][]byte { + if x != nil { + return x.Musig2SweepSigs + } + return nil +} + +func (x *ServerWithdrawResponse) GetServerNonces() [][]byte { + if x != nil { + return x.ServerNonces + } + return nil +} + +type ServerStaticAddressLoopInRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The client's public key for the htlc output. + HtlcClientPubKey []byte `protobuf:"bytes,1,opt,name=htlc_client_pub_key,json=htlcClientPubKey,proto3" json:"htlc_client_pub_key,omitempty"` + // The hashed swap invoice preimage of the swap. + SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The deposit outpoints the client wishes to loop in. They implicitly state + // the swap amount. + DepositOutpoints []string `protobuf:"bytes,3,rep,name=deposit_outpoints,json=depositOutpoints,proto3" json:"deposit_outpoints,omitempty"` + // The swap invoice that the client wants the server to pay. + SwapInvoice string `protobuf:"bytes,4,opt,name=swap_invoice,json=swapInvoice,proto3" json:"swap_invoice,omitempty"` + // An optional last hop the client wants to receive the invoice payment + // from. + LastHop []byte `protobuf:"bytes,5,opt,name=last_hop,json=lastHop,proto3" json:"last_hop,omitempty"` + // The protocol version that the client adheres to. + ProtocolVersion StaticAddressProtocolVersion `protobuf:"varint,6,opt,name=protocol_version,json=protocolVersion,proto3,enum=looprpc.StaticAddressProtocolVersion" json:"protocol_version,omitempty"` + // The user agent string that identifies the software running on the user's + // side. This can be changed in the user's client software but it _SHOULD_ + // conform to the following pattern: + // + // Agent-Name/semver-version(/additional-info) + // + // Examples: + // + // loopd/v0.10.0-beta/commit=3b635821 + // litd/v0.2.0-alpha/commit=326d754 + // loopd/v0.10.0-beta/commit=3b635823,initiator=easy-autoloop + UserAgent string `protobuf:"bytes,7,opt,name=user_agent,json=userAgent,proto3" json:"user_agent,omitempty"` + // The swap payment timeout allows the user to specify an upper limit for + // the amount of time the server is allowed to take to fulfill the off-chain + // swap payment. If the timeout is reached the swap will be aborted on the + // server side and the client can retry the swap with different parameters. + PaymentTimeoutSeconds uint32 `protobuf:"varint,8,opt,name=payment_timeout_seconds,json=paymentTimeoutSeconds,proto3" json:"payment_timeout_seconds,omitempty"` +} + +func (x *ServerStaticAddressLoopInRequest) Reset() { + *x = ServerStaticAddressLoopInRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerStaticAddressLoopInRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerStaticAddressLoopInRequest) ProtoMessage() {} + +func (x *ServerStaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerStaticAddressLoopInRequest.ProtoReflect.Descriptor instead. +func (*ServerStaticAddressLoopInRequest) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{5} +} + +func (x *ServerStaticAddressLoopInRequest) GetHtlcClientPubKey() []byte { + if x != nil { + return x.HtlcClientPubKey + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetDepositOutpoints() []string { + if x != nil { + return x.DepositOutpoints + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetSwapInvoice() string { + if x != nil { + return x.SwapInvoice + } + return "" +} + +func (x *ServerStaticAddressLoopInRequest) GetLastHop() []byte { + if x != nil { + return x.LastHop + } + return nil +} + +func (x *ServerStaticAddressLoopInRequest) GetProtocolVersion() StaticAddressProtocolVersion { + if x != nil { + return x.ProtocolVersion + } + return StaticAddressProtocolVersion_V0 +} + +func (x *ServerStaticAddressLoopInRequest) GetUserAgent() string { + if x != nil { + return x.UserAgent + } + return "" +} + +func (x *ServerStaticAddressLoopInRequest) GetPaymentTimeoutSeconds() uint32 { + if x != nil { + return x.PaymentTimeoutSeconds + } + return 0 +} + +type ServerStaticAddressLoopInResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The server's public key for the htlc output. + HtlcServerPubKey []byte `protobuf:"bytes,1,opt,name=htlc_server_pub_key,json=htlcServerPubKey,proto3" json:"htlc_server_pub_key,omitempty"` + // The cltv expiry height for the htlc. This is the height at which the + // htlc will expire and the client is free to claim the funds back. + HtlcExpiry int32 `protobuf:"varint,2,opt,name=htlc_expiry,json=htlcExpiry,proto3" json:"htlc_expiry,omitempty"` + // The info the server used to generate the standard fee partial htlc tx + // sigs. + StandardHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,3,opt,name=standard_htlc_info,json=standardHtlcInfo,proto3" json:"standard_htlc_info,omitempty"` + // The info the server used to generate the high fee partial htlc tx sigs. + HighFeeHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,4,opt,name=high_fee_htlc_info,json=highFeeHtlcInfo,proto3" json:"high_fee_htlc_info,omitempty"` + // The info the server used to generate the extreme fee partial htlc tx + // sigs. + ExtremeFeeHtlcInfo *ServerHtlcSigningInfo `protobuf:"bytes,5,opt,name=extreme_fee_htlc_info,json=extremeFeeHtlcInfo,proto3" json:"extreme_fee_htlc_info,omitempty"` +} + +func (x *ServerStaticAddressLoopInResponse) Reset() { + *x = ServerStaticAddressLoopInResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerStaticAddressLoopInResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerStaticAddressLoopInResponse) ProtoMessage() {} + +func (x *ServerStaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerStaticAddressLoopInResponse.ProtoReflect.Descriptor instead. +func (*ServerStaticAddressLoopInResponse) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{6} +} + +func (x *ServerStaticAddressLoopInResponse) GetHtlcServerPubKey() []byte { + if x != nil { + return x.HtlcServerPubKey + } + return nil +} + +func (x *ServerStaticAddressLoopInResponse) GetHtlcExpiry() int32 { + if x != nil { + return x.HtlcExpiry + } + return 0 +} + +func (x *ServerStaticAddressLoopInResponse) GetStandardHtlcInfo() *ServerHtlcSigningInfo { + if x != nil { + return x.StandardHtlcInfo + } + return nil +} + +func (x *ServerStaticAddressLoopInResponse) GetHighFeeHtlcInfo() *ServerHtlcSigningInfo { + if x != nil { + return x.HighFeeHtlcInfo + } + return nil +} + +func (x *ServerStaticAddressLoopInResponse) GetExtremeFeeHtlcInfo() *ServerHtlcSigningInfo { + if x != nil { + return x.ExtremeFeeHtlcInfo + } + return nil +} + +type ServerHtlcSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the server used to generate the partial htlc tx sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The fee rate in sat/kw that the server wants to use for the htlc tx. + FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` +} + +func (x *ServerHtlcSigningInfo) Reset() { + *x = ServerHtlcSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerHtlcSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerHtlcSigningInfo) ProtoMessage() {} + +func (x *ServerHtlcSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerHtlcSigningInfo.ProtoReflect.Descriptor instead. +func (*ServerHtlcSigningInfo) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{7} +} + +func (x *ServerHtlcSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ServerHtlcSigningInfo) GetFeeRate() uint64 { + if x != nil { + return x.FeeRate + } + return 0 +} + +type PushStaticAddressHtlcSigsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash that the client wants to push the htlc sigs for. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The nonces that the client used to generate the htlc sigs. + StandardHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,2,opt,name=standard_htlc_info,json=standardHtlcInfo,proto3" json:"standard_htlc_info,omitempty"` + // The nonces that the client used to generate the high fee htlc sigs. + HighFeeHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,3,opt,name=high_fee_htlc_info,json=highFeeHtlcInfo,proto3" json:"high_fee_htlc_info,omitempty"` + // The nonces that the client used to generate the extreme fee htlc sigs. + ExtremeFeeHtlcInfo *ClientHtlcSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_htlc_info,json=extremeFeeHtlcInfo,proto3" json:"extreme_fee_htlc_info,omitempty"` +} + +func (x *PushStaticAddressHtlcSigsRequest) Reset() { + *x = PushStaticAddressHtlcSigsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressHtlcSigsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressHtlcSigsRequest) ProtoMessage() {} + +func (x *PushStaticAddressHtlcSigsRequest) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressHtlcSigsRequest.ProtoReflect.Descriptor instead. +func (*PushStaticAddressHtlcSigsRequest) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{8} +} + +func (x *PushStaticAddressHtlcSigsRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *PushStaticAddressHtlcSigsRequest) GetStandardHtlcInfo() *ClientHtlcSigningInfo { + if x != nil { + return x.StandardHtlcInfo + } + return nil +} + +func (x *PushStaticAddressHtlcSigsRequest) GetHighFeeHtlcInfo() *ClientHtlcSigningInfo { + if x != nil { + return x.HighFeeHtlcInfo + } + return nil +} + +func (x *PushStaticAddressHtlcSigsRequest) GetExtremeFeeHtlcInfo() *ClientHtlcSigningInfo { + if x != nil { + return x.ExtremeFeeHtlcInfo + } + return nil +} + +type ClientHtlcSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the client used to generate the partial htlc tx sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The musig2 htlc sigs that the client generated for the htlc tx. + Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *ClientHtlcSigningInfo) Reset() { + *x = ClientHtlcSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientHtlcSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientHtlcSigningInfo) ProtoMessage() {} + +func (x *ClientHtlcSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientHtlcSigningInfo.ProtoReflect.Descriptor instead. +func (*ClientHtlcSigningInfo) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{9} +} + +func (x *ClientHtlcSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ClientHtlcSigningInfo) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +type PushStaticAddressHtlcSigsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PushStaticAddressHtlcSigsResponse) Reset() { + *x = PushStaticAddressHtlcSigsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressHtlcSigsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressHtlcSigsResponse) ProtoMessage() {} + +func (x *PushStaticAddressHtlcSigsResponse) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressHtlcSigsResponse.ProtoReflect.Descriptor instead. +func (*PushStaticAddressHtlcSigsResponse) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{10} +} + +type FetchSweeplessSweepTxRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash of the swap that the client wants to fetch the sweepless + // sweep tx for. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` +} + +func (x *FetchSweeplessSweepTxRequest) Reset() { + *x = FetchSweeplessSweepTxRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchSweeplessSweepTxRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchSweeplessSweepTxRequest) ProtoMessage() {} + +func (x *FetchSweeplessSweepTxRequest) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchSweeplessSweepTxRequest.ProtoReflect.Descriptor instead. +func (*FetchSweeplessSweepTxRequest) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{11} +} + +func (x *FetchSweeplessSweepTxRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +type FetchSweeplessSweepTxResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The address that the server wants to sweep the static address deposits + // to. + SweepAddr string `protobuf:"bytes,1,opt,name=sweep_addr,json=sweepAddr,proto3" json:"sweep_addr,omitempty"` + // The info the server used to generate the standard fee partial sweepless + // tx sigs. + StandardFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_fee_info,json=standardFeeInfo,proto3" json:"standard_fee_info,omitempty"` + // The info the server used to generate the high fee partial sweepless tx + // sigs. + HighFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_info,json=highFeeInfo,proto3" json:"high_fee_info,omitempty"` + // The info the server used to generate the extreme fee partial sweepless tx + // sigs. + ExtremeFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_info,json=extremeFeeInfo,proto3" json:"extreme_fee_info,omitempty"` +} + +func (x *FetchSweeplessSweepTxResponse) Reset() { + *x = FetchSweeplessSweepTxResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FetchSweeplessSweepTxResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FetchSweeplessSweepTxResponse) ProtoMessage() {} + +func (x *FetchSweeplessSweepTxResponse) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[12] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FetchSweeplessSweepTxResponse.ProtoReflect.Descriptor instead. +func (*FetchSweeplessSweepTxResponse) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{12} +} + +func (x *FetchSweeplessSweepTxResponse) GetSweepAddr() string { + if x != nil { + return x.SweepAddr + } + return "" +} + +func (x *FetchSweeplessSweepTxResponse) GetStandardFeeInfo() *ServerSweeplessSigningInfo { + if x != nil { + return x.StandardFeeInfo + } + return nil +} + +func (x *FetchSweeplessSweepTxResponse) GetHighFeeInfo() *ServerSweeplessSigningInfo { + if x != nil { + return x.HighFeeInfo + } + return nil +} + +func (x *FetchSweeplessSweepTxResponse) GetExtremeFeeInfo() *ServerSweeplessSigningInfo { + if x != nil { + return x.ExtremeFeeInfo + } + return nil +} + +type ServerSweeplessSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the server used to generate the partial sweepless tx + // sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The fee rate in sat/kw that the server wants to use for the sweepless tx. + FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` +} + +func (x *ServerSweeplessSigningInfo) Reset() { + *x = ServerSweeplessSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[13] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerSweeplessSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerSweeplessSigningInfo) ProtoMessage() {} + +func (x *ServerSweeplessSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[13] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerSweeplessSigningInfo.ProtoReflect.Descriptor instead. +func (*ServerSweeplessSigningInfo) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{13} +} + +func (x *ServerSweeplessSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ServerSweeplessSigningInfo) GetFeeRate() uint64 { + if x != nil { + return x.FeeRate + } + return 0 +} + +type PushStaticAddressSweeplessSigsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The swap hash of the swap that the client wants to push the sweepless + // sigs for. + SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The info the client used to generate the standard fee partial sweepless + // tx sigs. + StandardSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_signing_info,json=standardSigningInfo,proto3" json:"standard_signing_info,omitempty"` + // The info the client used to generate the high fee partial sweepless tx + // sigs. + HighFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_signing_info,json=highFeeSigningInfo,proto3" json:"high_fee_signing_info,omitempty"` + // The info the client used to generate the extreme fee partial sweepless + // tx sigs. + ExtremeFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_signing_info,json=extremeFeeSigningInfo,proto3" json:"extreme_fee_signing_info,omitempty"` +} + +func (x *PushStaticAddressSweeplessSigsRequest) Reset() { + *x = PushStaticAddressSweeplessSigsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[14] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressSweeplessSigsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressSweeplessSigsRequest) ProtoMessage() {} + +func (x *PushStaticAddressSweeplessSigsRequest) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[14] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressSweeplessSigsRequest.ProtoReflect.Descriptor instead. +func (*PushStaticAddressSweeplessSigsRequest) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{14} +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetStandardSigningInfo() *ClientSweeplessSigningInfo { + if x != nil { + return x.StandardSigningInfo + } + return nil +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetHighFeeSigningInfo() *ClientSweeplessSigningInfo { + if x != nil { + return x.HighFeeSigningInfo + } + return nil +} + +func (x *PushStaticAddressSweeplessSigsRequest) GetExtremeFeeSigningInfo() *ClientSweeplessSigningInfo { + if x != nil { + return x.ExtremeFeeSigningInfo + } + return nil +} + +type ClientSweeplessSigningInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The nonces that the client used to generate the partial sweepless tx + // sigs. + Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + // The musig2 htlc sigs that the client generated for the sweepless tx. + Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` +} + +func (x *ClientSweeplessSigningInfo) Reset() { + *x = ClientSweeplessSigningInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[15] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ClientSweeplessSigningInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ClientSweeplessSigningInfo) ProtoMessage() {} + +func (x *ClientSweeplessSigningInfo) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[15] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ClientSweeplessSigningInfo.ProtoReflect.Descriptor instead. +func (*ClientSweeplessSigningInfo) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{15} +} + +func (x *ClientSweeplessSigningInfo) GetNonces() [][]byte { + if x != nil { + return x.Nonces + } + return nil +} + +func (x *ClientSweeplessSigningInfo) GetSigs() [][]byte { + if x != nil { + return x.Sigs + } + return nil +} + +type PushStaticAddressSweeplessSigsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *PushStaticAddressSweeplessSigsResponse) Reset() { + *x = PushStaticAddressSweeplessSigsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_staticaddr_proto_msgTypes[16] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PushStaticAddressSweeplessSigsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PushStaticAddressSweeplessSigsResponse) ProtoMessage() {} + +func (x *PushStaticAddressSweeplessSigsResponse) ProtoReflect() protoreflect.Message { + mi := &file_staticaddr_proto_msgTypes[16] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use PushStaticAddressSweeplessSigsResponse.ProtoReflect.Descriptor instead. +func (*PushStaticAddressSweeplessSigsResponse) Descriptor() ([]byte, []int) { + return file_staticaddr_proto_rawDescGZIP(), []int{16} +} + +var File_staticaddr_proto protoreflect.FileDescriptor + +var file_staticaddr_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x61, 0x64, 0x64, 0x72, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x07, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x1a, 0x0c, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8a, 0x01, 0x0a, 0x17, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x50, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, + 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x63, 0x6c, 0x69, + 0x65, 0x6e, 0x74, 0x4b, 0x65, 0x79, 0x22, 0x54, 0x0a, 0x18, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, + 0x74, 0x65, 0x72, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x50, 0x0a, 0x17, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0xbc, + 0x01, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x32, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x76, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x23, 0x0a, 0x0d, + 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, + 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, + 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6c, + 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x1e, 0x0a, + 0x0b, 0x74, 0x78, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x74, 0x78, 0x46, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0x69, 0x0a, + 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x75, 0x73, 0x69, 0x67, + 0x32, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, 0x73, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0c, 0x52, 0x0f, 0x6d, 0x75, 0x73, 0x69, 0x67, 0x32, 0x53, 0x77, 0x65, 0x65, 0x70, 0x53, + 0x69, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0c, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x82, 0x03, 0x0a, 0x20, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2d, 0x0a, + 0x13, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x70, 0x75, 0x62, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x10, 0x68, 0x74, 0x6c, 0x63, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x0a, 0x09, + 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x4f, 0x75, 0x74, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x69, + 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x77, + 0x61, 0x70, 0x49, 0x6e, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, + 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, + 0x74, 0x48, 0x6f, 0x70, 0x12, 0x50, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, + 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, + 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, + 0x67, 0x65, 0x6e, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, + 0x41, 0x67, 0x65, 0x6e, 0x74, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, + 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xe1, 0x02, + 0x0a, 0x21, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x13, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x5f, 0x70, 0x75, 0x62, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x10, 0x68, 0x74, 0x6c, 0x63, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x62, 0x4b, + 0x65, 0x79, 0x12, 0x1f, 0x0a, 0x0b, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x68, 0x74, 0x6c, 0x63, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, + 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x10, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x4b, 0x0a, 0x12, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, + 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, + 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x68, + 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, + 0x0a, 0x15, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, + 0x6c, 0x63, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, + 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x65, + 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, + 0x6f, 0x22, 0x4a, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x48, 0x74, 0x6c, 0x63, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, + 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, 0xad, 0x02, + 0x0a, 0x20, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x4c, 0x0a, 0x12, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x5f, 0x68, 0x74, 0x6c, 0x63, + 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, + 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x73, 0x74, 0x61, + 0x6e, 0x64, 0x61, 0x72, 0x64, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x4b, 0x0a, + 0x12, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x68, 0x69, 0x67, 0x68, 0x46, + 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x51, 0x0a, 0x15, 0x65, 0x78, + 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, + 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x65, 0x78, 0x74, 0x72, 0x65, + 0x6d, 0x65, 0x46, 0x65, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x43, 0x0a, + 0x15, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, + 0x67, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x0a, 0x1c, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, + 0x48, 0x61, 0x73, 0x68, 0x22, 0xa7, 0x02, 0x0a, 0x1d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, + 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4f, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, + 0x64, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x46, + 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, + 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x0b, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x4d, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, + 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, + 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4f, + 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, + 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, + 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, + 0xd3, 0x02, 0x0a, 0x25, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, + 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, + 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x57, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, + 0x72, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6e, + 0x64, 0x61, 0x72, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x56, 0x0a, 0x15, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, + 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x18, 0x65, 0x78, 0x74, 0x72, 0x65, + 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, + 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, + 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, + 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x48, 0x0a, 0x1a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, + 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, + 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, + 0x28, 0x0a, 0x26, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x26, 0x0a, 0x1c, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, + 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x30, 0x10, + 0x00, 0x32, 0x9d, 0x05, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, + 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, + 0x19, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x72, 0x0a, 0x19, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x12, 0x29, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, + 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x12, 0x25, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, + 0x0a, 0x1e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, + 0x12, 0x2e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, + 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, + 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, + 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_staticaddr_proto_rawDescOnce sync.Once + file_staticaddr_proto_rawDescData = file_staticaddr_proto_rawDesc +) + +func file_staticaddr_proto_rawDescGZIP() []byte { + file_staticaddr_proto_rawDescOnce.Do(func() { + file_staticaddr_proto_rawDescData = protoimpl.X.CompressGZIP(file_staticaddr_proto_rawDescData) + }) + return file_staticaddr_proto_rawDescData +} + +var file_staticaddr_proto_enumTypes = make([]protoimpl.EnumInfo, 1) +var file_staticaddr_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_staticaddr_proto_goTypes = []interface{}{ + (StaticAddressProtocolVersion)(0), // 0: looprpc.StaticAddressProtocolVersion + (*ServerNewAddressRequest)(nil), // 1: looprpc.ServerNewAddressRequest + (*ServerNewAddressResponse)(nil), // 2: looprpc.ServerNewAddressResponse + (*ServerAddressParameters)(nil), // 3: looprpc.ServerAddressParameters + (*ServerWithdrawRequest)(nil), // 4: looprpc.ServerWithdrawRequest + (*ServerWithdrawResponse)(nil), // 5: looprpc.ServerWithdrawResponse + (*ServerStaticAddressLoopInRequest)(nil), // 6: looprpc.ServerStaticAddressLoopInRequest + (*ServerStaticAddressLoopInResponse)(nil), // 7: looprpc.ServerStaticAddressLoopInResponse + (*ServerHtlcSigningInfo)(nil), // 8: looprpc.ServerHtlcSigningInfo + (*PushStaticAddressHtlcSigsRequest)(nil), // 9: looprpc.PushStaticAddressHtlcSigsRequest + (*ClientHtlcSigningInfo)(nil), // 10: looprpc.ClientHtlcSigningInfo + (*PushStaticAddressHtlcSigsResponse)(nil), // 11: looprpc.PushStaticAddressHtlcSigsResponse + (*FetchSweeplessSweepTxRequest)(nil), // 12: looprpc.FetchSweeplessSweepTxRequest + (*FetchSweeplessSweepTxResponse)(nil), // 13: looprpc.FetchSweeplessSweepTxResponse + (*ServerSweeplessSigningInfo)(nil), // 14: looprpc.ServerSweeplessSigningInfo + (*PushStaticAddressSweeplessSigsRequest)(nil), // 15: looprpc.PushStaticAddressSweeplessSigsRequest + (*ClientSweeplessSigningInfo)(nil), // 16: looprpc.ClientSweeplessSigningInfo + (*PushStaticAddressSweeplessSigsResponse)(nil), // 17: looprpc.PushStaticAddressSweeplessSigsResponse + (*PrevoutInfo)(nil), // 18: looprpc.PrevoutInfo +} +var file_staticaddr_proto_depIdxs = []int32{ + 0, // 0: looprpc.ServerNewAddressRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion + 3, // 1: looprpc.ServerNewAddressResponse.params:type_name -> looprpc.ServerAddressParameters + 18, // 2: looprpc.ServerWithdrawRequest.outpoints:type_name -> looprpc.PrevoutInfo + 0, // 3: looprpc.ServerStaticAddressLoopInRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion + 8, // 4: looprpc.ServerStaticAddressLoopInResponse.standard_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo + 8, // 5: looprpc.ServerStaticAddressLoopInResponse.high_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo + 8, // 6: looprpc.ServerStaticAddressLoopInResponse.extreme_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo + 10, // 7: looprpc.PushStaticAddressHtlcSigsRequest.standard_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo + 10, // 8: looprpc.PushStaticAddressHtlcSigsRequest.high_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo + 10, // 9: looprpc.PushStaticAddressHtlcSigsRequest.extreme_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo + 14, // 10: looprpc.FetchSweeplessSweepTxResponse.standard_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo + 14, // 11: looprpc.FetchSweeplessSweepTxResponse.high_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo + 14, // 12: looprpc.FetchSweeplessSweepTxResponse.extreme_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo + 16, // 13: looprpc.PushStaticAddressSweeplessSigsRequest.standard_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo + 16, // 14: looprpc.PushStaticAddressSweeplessSigsRequest.high_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo + 16, // 15: looprpc.PushStaticAddressSweeplessSigsRequest.extreme_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo + 1, // 16: looprpc.StaticAddressServer.ServerNewAddress:input_type -> looprpc.ServerNewAddressRequest + 4, // 17: looprpc.StaticAddressServer.ServerWithdrawDeposits:input_type -> looprpc.ServerWithdrawRequest + 6, // 18: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:input_type -> looprpc.ServerStaticAddressLoopInRequest + 9, // 19: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:input_type -> looprpc.PushStaticAddressHtlcSigsRequest + 12, // 20: looprpc.StaticAddressServer.FetchSweeplessSweepTx:input_type -> looprpc.FetchSweeplessSweepTxRequest + 15, // 21: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:input_type -> looprpc.PushStaticAddressSweeplessSigsRequest + 2, // 22: looprpc.StaticAddressServer.ServerNewAddress:output_type -> looprpc.ServerNewAddressResponse + 5, // 23: looprpc.StaticAddressServer.ServerWithdrawDeposits:output_type -> looprpc.ServerWithdrawResponse + 7, // 24: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:output_type -> looprpc.ServerStaticAddressLoopInResponse + 11, // 25: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:output_type -> looprpc.PushStaticAddressHtlcSigsResponse + 13, // 26: looprpc.StaticAddressServer.FetchSweeplessSweepTx:output_type -> looprpc.FetchSweeplessSweepTxResponse + 17, // 27: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:output_type -> looprpc.PushStaticAddressSweeplessSigsResponse + 22, // [22:28] is the sub-list for method output_type + 16, // [16:22] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name +} + +func init() { file_staticaddr_proto_init() } +func file_staticaddr_proto_init() { + if File_staticaddr_proto != nil { + return + } + file_server_proto_init() + if !protoimpl.UnsafeEnabled { + file_staticaddr_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNewAddressRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerNewAddressResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerAddressParameters); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerWithdrawRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerWithdrawResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerStaticAddressLoopInRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerStaticAddressLoopInResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerHtlcSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressHtlcSigsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientHtlcSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressHtlcSigsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchSweeplessSweepTxRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FetchSweeplessSweepTxResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerSweeplessSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressSweeplessSigsRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ClientSweeplessSigningInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_staticaddr_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PushStaticAddressSweeplessSigsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_staticaddr_proto_rawDesc, + NumEnums: 1, + NumMessages: 17, + NumExtensions: 0, + NumServices: 1, + }, + GoTypes: file_staticaddr_proto_goTypes, + DependencyIndexes: file_staticaddr_proto_depIdxs, + EnumInfos: file_staticaddr_proto_enumTypes, + MessageInfos: file_staticaddr_proto_msgTypes, + }.Build() + File_staticaddr_proto = out.File + file_staticaddr_proto_rawDesc = nil + file_staticaddr_proto_goTypes = nil + file_staticaddr_proto_depIdxs = nil +} diff --git a/swapserverrpc/staticaddr.proto b/swapserverrpc/staticaddr.proto new file mode 100644 index 000000000..61968b248 --- /dev/null +++ b/swapserverrpc/staticaddr.proto @@ -0,0 +1,248 @@ +syntax = "proto3"; +import "server.proto"; + +// We can't change this to swapserverrpc, it would be a breaking change because +// the package name is also contained in the HTTP URIs and old clients would +// call the wrong endpoints. Luckily with the go_package option we can have +// different golang and RPC package names to fix protobuf namespace conflicts. +package looprpc; + +option go_package = "github.com/lightninglabs/loop/swapserverrpc"; + +// StaticAddressProtocolVersion represents the static address protocol version +// the client adheres to. +enum StaticAddressProtocolVersion { + // V0 is the initially released static address protocol version. + V0 = 0; +} + +service StaticAddressServer { + // ServerNewAddress generates a new static address for the client to use. + // The server will generate the address and return the server key and the + // address's CSV expiry. + rpc ServerNewAddress (ServerNewAddressRequest) + returns (ServerNewAddressResponse); + + // ServerWithdrawDeposits allows to cooperatively sweep deposits that + // haven't timed out yet to the client's wallet. The server will generate + // the partial sigs for the client's selected deposits. + rpc ServerWithdrawDeposits (ServerWithdrawRequest) + returns (ServerWithdrawResponse); + + // ServerStaticAddressLoopIn initiates a static address loop-in swap. The + // server will respond with htlc details that the client can use to + // construct and sign the htlc tx. + rpc ServerStaticAddressLoopIn (ServerStaticAddressLoopInRequest) + returns (ServerStaticAddressLoopInResponse); + + // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. + rpc PushStaticAddressHtlcSigs (PushStaticAddressHtlcSigsRequest) + returns (PushStaticAddressHtlcSigsResponse); + + // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to + // to sign it. + rpc FetchSweeplessSweepTx (FetchSweeplessSweepTxRequest) + returns (FetchSweeplessSweepTxResponse); + + // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx + // sigs to the server. + rpc PushStaticAddressSweeplessSigs (PushStaticAddressSweeplessSigsRequest) + returns (PushStaticAddressSweeplessSigsResponse); +} + +message ServerNewAddressRequest { + // The protocol version that the client adheres to. + StaticAddressProtocolVersion protocol_version = 1; + + // The client key for the MuSig2 static address output. + bytes client_key = 2; +} + +message ServerNewAddressResponse { + ServerAddressParameters params = 1; +} + +message ServerAddressParameters { + // The server key for the MuSig2 static address output. + bytes server_key = 1; + + // The CSV expiry of the static address output. + uint32 expiry = 2; +} + +message ServerWithdrawRequest { + // The deposit outpoints the client wishes to withdraw. + repeated PrevoutInfo outpoints = 1; + + // The nonces that the client used to generate the withdrawal tx sigs. + repeated bytes client_nonces = 2; + + // The address that the client wants to sweep the static address deposits + // to. + string client_sweep_addr = 3; + + // The fee rate in sat/kw that the client wants to use for the sweep. + uint64 tx_fee_rate = 4; +} + +message ServerWithdrawResponse { + // The sweep sigs that the server generated for the htlc. + repeated bytes musig2_sweep_sigs = 1; + + // The nonces that the server used to generate the sweepless sweep sigs. + repeated bytes server_nonces = 2; +} + +message ServerStaticAddressLoopInRequest { + // The client's public key for the htlc output. + bytes htlc_client_pub_key = 1; + + // The hashed swap invoice preimage of the swap. + bytes swap_hash = 2; + + // The deposit outpoints the client wishes to loop in. They implicitly state + // the swap amount. + repeated string deposit_outpoints = 3; + + // The swap invoice that the client wants the server to pay. + string swap_invoice = 4; + + // An optional last hop the client wants to receive the invoice payment + // from. + bytes last_hop = 5; + + // The protocol version that the client adheres to. + StaticAddressProtocolVersion protocol_version = 6; + + // The user agent string that identifies the software running on the user's + // side. This can be changed in the user's client software but it _SHOULD_ + // conform to the following pattern: + // Agent-Name/semver-version(/additional-info) + // Examples: + // loopd/v0.10.0-beta/commit=3b635821 + // litd/v0.2.0-alpha/commit=326d754 + // loopd/v0.10.0-beta/commit=3b635823,initiator=easy-autoloop + string user_agent = 7; + + // The swap payment timeout allows the user to specify an upper limit for + // the amount of time the server is allowed to take to fulfill the off-chain + // swap payment. If the timeout is reached the swap will be aborted on the + // server side and the client can retry the swap with different parameters. + uint32 payment_timeout_seconds = 8; +} + +message ServerStaticAddressLoopInResponse { + // The server's public key for the htlc output. + bytes htlc_server_pub_key = 1; + + // The cltv expiry height for the htlc. This is the height at which the + // htlc will expire and the client is free to claim the funds back. + int32 htlc_expiry = 2; + + // The info the server used to generate the standard fee partial htlc tx + // sigs. + ServerHtlcSigningInfo standard_htlc_info = 3; + + // The info the server used to generate the high fee partial htlc tx sigs. + ServerHtlcSigningInfo high_fee_htlc_info = 4; + + // The info the server used to generate the extreme fee partial htlc tx + // sigs. + ServerHtlcSigningInfo extreme_fee_htlc_info = 5; +} + +message ServerHtlcSigningInfo { + // The nonces that the server used to generate the partial htlc tx sigs. + repeated bytes nonces = 1; + + // The fee rate in sat/kw that the server wants to use for the htlc tx. + uint64 fee_rate = 2; +} + +message PushStaticAddressHtlcSigsRequest { + // The swap hash that the client wants to push the htlc sigs for. + bytes swap_hash = 1; + + // The nonces that the client used to generate the htlc sigs. + ClientHtlcSigningInfo standard_htlc_info = 2; + + // The nonces that the client used to generate the high fee htlc sigs. + ClientHtlcSigningInfo high_fee_htlc_info = 3; + + // The nonces that the client used to generate the extreme fee htlc sigs. + ClientHtlcSigningInfo extreme_fee_htlc_info = 4; +} + +message ClientHtlcSigningInfo { + // The nonces that the client used to generate the partial htlc tx sigs. + repeated bytes nonces = 1; + + // The musig2 htlc sigs that the client generated for the htlc tx. + repeated bytes sigs = 2; +} + +message PushStaticAddressHtlcSigsResponse { +} + +message FetchSweeplessSweepTxRequest { + // The swap hash of the swap that the client wants to fetch the sweepless + // sweep tx for. + bytes swap_hash = 1; +} + +message FetchSweeplessSweepTxResponse { + // The address that the server wants to sweep the static address deposits + // to. + string sweep_addr = 1; + + // The info the server used to generate the standard fee partial sweepless + // tx sigs. + ServerSweeplessSigningInfo standard_fee_info = 2; + + // The info the server used to generate the high fee partial sweepless tx + // sigs. + ServerSweeplessSigningInfo high_fee_info = 3; + + // The info the server used to generate the extreme fee partial sweepless tx + // sigs. + ServerSweeplessSigningInfo extreme_fee_info = 4; +} + +message ServerSweeplessSigningInfo { + // The nonces that the server used to generate the partial sweepless tx + // sigs. + repeated bytes nonces = 1; + + // The fee rate in sat/kw that the server wants to use for the sweepless tx. + uint64 fee_rate = 2; +} + +message PushStaticAddressSweeplessSigsRequest { + // The swap hash of the swap that the client wants to push the sweepless + // sigs for. + bytes swap_hash = 1; + + // The info the client used to generate the standard fee partial sweepless + // tx sigs. + ClientSweeplessSigningInfo standard_signing_info = 2; + + // The info the client used to generate the high fee partial sweepless tx + // sigs. + ClientSweeplessSigningInfo high_fee_signing_info = 3; + + // The info the client used to generate the extreme fee partial sweepless + // tx sigs. + ClientSweeplessSigningInfo extreme_fee_signing_info = 4; +} + +message ClientSweeplessSigningInfo { + // The nonces that the client used to generate the partial sweepless tx + // sigs. + repeated bytes nonces = 1; + + // The musig2 htlc sigs that the client generated for the sweepless tx. + repeated bytes sigs = 2; +} + +message PushStaticAddressSweeplessSigsResponse { +} diff --git a/swapserverrpc/staticaddr_grpc.pb.go b/swapserverrpc/staticaddr_grpc.pb.go new file mode 100644 index 000000000..c41f22449 --- /dev/null +++ b/swapserverrpc/staticaddr_grpc.pb.go @@ -0,0 +1,309 @@ +// Code generated by protoc-gen-go-grpc. DO NOT EDIT. + +package swapserverrpc + +import ( + context "context" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" +) + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +// Requires gRPC-Go v1.32.0 or later. +const _ = grpc.SupportPackageIsVersion7 + +// StaticAddressServerClient is the client API for StaticAddressServer service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type StaticAddressServerClient interface { + // ServerNewAddress generates a new static address for the client to use. + // The server will generate the address and return the server key and the + // address's CSV expiry. + ServerNewAddress(ctx context.Context, in *ServerNewAddressRequest, opts ...grpc.CallOption) (*ServerNewAddressResponse, error) + // ServerWithdrawDeposits allows to cooperatively sweep deposits that + // haven't timed out yet to the client's wallet. The server will generate + // the partial sigs for the client's selected deposits. + ServerWithdrawDeposits(ctx context.Context, in *ServerWithdrawRequest, opts ...grpc.CallOption) (*ServerWithdrawResponse, error) + // ServerStaticAddressLoopIn initiates a static address loop-in swap. The + // server will respond with htlc details that the client can use to + // construct and sign the htlc tx. + ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) + // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. + PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) + // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to + // to sign it. + FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) + // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx + // sigs to the server. + PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) +} + +type staticAddressServerClient struct { + cc grpc.ClientConnInterface +} + +func NewStaticAddressServerClient(cc grpc.ClientConnInterface) StaticAddressServerClient { + return &staticAddressServerClient{cc} +} + +func (c *staticAddressServerClient) ServerNewAddress(ctx context.Context, in *ServerNewAddressRequest, opts ...grpc.CallOption) (*ServerNewAddressResponse, error) { + out := new(ServerNewAddressResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerNewAddress", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) ServerWithdrawDeposits(ctx context.Context, in *ServerWithdrawRequest, opts ...grpc.CallOption) (*ServerWithdrawResponse, error) { + out := new(ServerWithdrawResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerWithdrawDeposits", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) { + out := new(ServerStaticAddressLoopInResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/ServerStaticAddressLoopIn", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) { + out := new(PushStaticAddressHtlcSigsResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressHtlcSigs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) { + out := new(FetchSweeplessSweepTxResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *staticAddressServerClient) PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) { + out := new(PushStaticAddressSweeplessSigsResponse) + err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// StaticAddressServerServer is the server API for StaticAddressServer service. +// All implementations must embed UnimplementedStaticAddressServerServer +// for forward compatibility +type StaticAddressServerServer interface { + // ServerNewAddress generates a new static address for the client to use. + // The server will generate the address and return the server key and the + // address's CSV expiry. + ServerNewAddress(context.Context, *ServerNewAddressRequest) (*ServerNewAddressResponse, error) + // ServerWithdrawDeposits allows to cooperatively sweep deposits that + // haven't timed out yet to the client's wallet. The server will generate + // the partial sigs for the client's selected deposits. + ServerWithdrawDeposits(context.Context, *ServerWithdrawRequest) (*ServerWithdrawResponse, error) + // ServerStaticAddressLoopIn initiates a static address loop-in swap. The + // server will respond with htlc details that the client can use to + // construct and sign the htlc tx. + ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) + // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. + PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) + // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to + // to sign it. + FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) + // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx + // sigs to the server. + PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) + mustEmbedUnimplementedStaticAddressServerServer() +} + +// UnimplementedStaticAddressServerServer must be embedded to have forward compatible implementations. +type UnimplementedStaticAddressServerServer struct { +} + +func (UnimplementedStaticAddressServerServer) ServerNewAddress(context.Context, *ServerNewAddressRequest) (*ServerNewAddressResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ServerNewAddress not implemented") +} +func (UnimplementedStaticAddressServerServer) ServerWithdrawDeposits(context.Context, *ServerWithdrawRequest) (*ServerWithdrawResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ServerWithdrawDeposits not implemented") +} +func (UnimplementedStaticAddressServerServer) ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ServerStaticAddressLoopIn not implemented") +} +func (UnimplementedStaticAddressServerServer) PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressHtlcSigs not implemented") +} +func (UnimplementedStaticAddressServerServer) FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method FetchSweeplessSweepTx not implemented") +} +func (UnimplementedStaticAddressServerServer) PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressSweeplessSigs not implemented") +} +func (UnimplementedStaticAddressServerServer) mustEmbedUnimplementedStaticAddressServerServer() {} + +// UnsafeStaticAddressServerServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to StaticAddressServerServer will +// result in compilation errors. +type UnsafeStaticAddressServerServer interface { + mustEmbedUnimplementedStaticAddressServerServer() +} + +func RegisterStaticAddressServerServer(s grpc.ServiceRegistrar, srv StaticAddressServerServer) { + s.RegisterService(&StaticAddressServer_ServiceDesc, srv) +} + +func _StaticAddressServer_ServerNewAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServerNewAddressRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).ServerNewAddress(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/ServerNewAddress", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).ServerNewAddress(ctx, req.(*ServerNewAddressRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_ServerWithdrawDeposits_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServerWithdrawRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).ServerWithdrawDeposits(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/ServerWithdrawDeposits", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).ServerWithdrawDeposits(ctx, req.(*ServerWithdrawRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_ServerStaticAddressLoopIn_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ServerStaticAddressLoopInRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).ServerStaticAddressLoopIn(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/ServerStaticAddressLoopIn", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).ServerStaticAddressLoopIn(ctx, req.(*ServerStaticAddressLoopInRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_PushStaticAddressHtlcSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushStaticAddressHtlcSigsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).PushStaticAddressHtlcSigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/PushStaticAddressHtlcSigs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).PushStaticAddressHtlcSigs(ctx, req.(*PushStaticAddressHtlcSigsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_FetchSweeplessSweepTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(FetchSweeplessSweepTxRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, req.(*FetchSweeplessSweepTxRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(PushStaticAddressSweeplessSigsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StaticAddressServerServer).PushStaticAddressSweeplessSigs(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StaticAddressServerServer).PushStaticAddressSweeplessSigs(ctx, req.(*PushStaticAddressSweeplessSigsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +// StaticAddressServer_ServiceDesc is the grpc.ServiceDesc for StaticAddressServer service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var StaticAddressServer_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "looprpc.StaticAddressServer", + HandlerType: (*StaticAddressServerServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ServerNewAddress", + Handler: _StaticAddressServer_ServerNewAddress_Handler, + }, + { + MethodName: "ServerWithdrawDeposits", + Handler: _StaticAddressServer_ServerWithdrawDeposits_Handler, + }, + { + MethodName: "ServerStaticAddressLoopIn", + Handler: _StaticAddressServer_ServerStaticAddressLoopIn_Handler, + }, + { + MethodName: "PushStaticAddressHtlcSigs", + Handler: _StaticAddressServer_PushStaticAddressHtlcSigs_Handler, + }, + { + MethodName: "FetchSweeplessSweepTx", + Handler: _StaticAddressServer_FetchSweeplessSweepTx_Handler, + }, + { + MethodName: "PushStaticAddressSweeplessSigs", + Handler: _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "staticaddr.proto", +} From 5e30133213152e20f41811104fdbb3eed4a7d63b Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 5 Nov 2024 15:17:15 +0100 Subject: [PATCH 55/67] staticaddr: change min deposit confs from 3 to 6 --- cmd/loop/staticaddr.go | 2 +- staticaddr/deposit/manager.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index f52ba47f3..703845e68 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -484,7 +484,7 @@ func staticAddressLoopIn(ctx *cli.Context) error { if len(depositList.FilteredDeposits) == 0 { errString := fmt.Sprintf("no confirmed deposits available, "+ "deposits need at least %v confirmations", - deposit.DefaultConfTarget) + deposit.MinConfs) return errors.New(errString) } diff --git a/staticaddr/deposit/manager.go b/staticaddr/deposit/manager.go index 64b7116fe..a2c02e6fd 100644 --- a/staticaddr/deposit/manager.go +++ b/staticaddr/deposit/manager.go @@ -26,7 +26,7 @@ const ( // MinConfs is the minimum number of confirmations we require for a // deposit to be considered available for loop-ins, coop-spends and // timeouts. - MinConfs = 3 + MinConfs = 6 // MaxConfs is unset since we don't require a max number of // confirmations for deposits. From ad122d204ea5624d6b6e29fc8d4ccf83f72868a5 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Tue, 5 Nov 2024 15:36:56 +0100 Subject: [PATCH 56/67] staticaddr: fix fsm logging --- staticaddr/loopin/fsm.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/staticaddr/loopin/fsm.go b/staticaddr/loopin/fsm.go index 400184794..8c16d1eb0 100644 --- a/staticaddr/loopin/fsm.go +++ b/staticaddr/loopin/fsm.go @@ -331,7 +331,7 @@ func (f *FSM) Infof(format string, args ...interface{}) { // Debugf logs a debug message with the loop-in swap hash. func (f *FSM) Debugf(format string, args ...interface{}) { if f.loopIn == nil { - log.Infof(format, args...) + log.Debugf(format, args...) return } log.Debugf( From 023d5936168d1ef40af58f6a70a8c141f33d4dc3 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:03:30 +0100 Subject: [PATCH 57/67] swapserverrpc: add new functions This commit adds a new notification to the proto, which is used by the server to request signatures for a deposit of a static loop in. --- swapserverrpc/server.pb.go | 648 +++++++++++++++++----------- swapserverrpc/server.proto | 18 + swapserverrpc/staticaddr.pb.go | 518 ++++++---------------- swapserverrpc/staticaddr.proto | 59 +-- swapserverrpc/staticaddr_grpc.pb.go | 40 -- 5 files changed, 547 insertions(+), 736 deletions(-) diff --git a/swapserverrpc/server.pb.go b/swapserverrpc/server.pb.go index 6cb975040..8d8402972 100644 --- a/swapserverrpc/server.pb.go +++ b/swapserverrpc/server.pb.go @@ -2818,6 +2818,7 @@ type SubscribeNotificationsResponse struct { // Types that are assignable to Notification: // // *SubscribeNotificationsResponse_ReservationNotification + // *SubscribeNotificationsResponse_StaticLoopInSweep Notification isSubscribeNotificationsResponse_Notification `protobuf_oneof:"notification"` } @@ -2867,6 +2868,13 @@ func (x *SubscribeNotificationsResponse) GetReservationNotification() *ServerRes return nil } +func (x *SubscribeNotificationsResponse) GetStaticLoopInSweep() *ServerStaticLoopInSweepNotification { + if x, ok := x.GetNotification().(*SubscribeNotificationsResponse_StaticLoopInSweep); ok { + return x.StaticLoopInSweep + } + return nil +} + type isSubscribeNotificationsResponse_Notification interface { isSubscribeNotificationsResponse_Notification() } @@ -2875,9 +2883,94 @@ type SubscribeNotificationsResponse_ReservationNotification struct { ReservationNotification *ServerReservationNotification `protobuf:"bytes,1,opt,name=reservation_notification,json=reservationNotification,proto3,oneof"` } +type SubscribeNotificationsResponse_StaticLoopInSweep struct { + StaticLoopInSweep *ServerStaticLoopInSweepNotification `protobuf:"bytes,2,opt,name=static_loop_in_sweep,json=staticLoopInSweep,proto3,oneof"` +} + func (*SubscribeNotificationsResponse_ReservationNotification) isSubscribeNotificationsResponse_Notification() { } +func (*SubscribeNotificationsResponse_StaticLoopInSweep) isSubscribeNotificationsResponse_Notification() { +} + +// ServerStaticLoopInSweepNotification is a request from the server to the +// client to cosign a transaction that contains deposits from a finished static +// loop ins. +type ServerStaticLoopInSweepNotification struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The psbt of the sweep transaction. + SweepTxPsbt []byte `protobuf:"bytes,1,opt,name=sweep_tx_psbt,json=sweepTxPsbt,proto3" json:"sweep_tx_psbt,omitempty"` + // The swap hash the deposits are associated with. + SwapHash []byte `protobuf:"bytes,2,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` + // The map of deposit txid:idx to the nonce used by the server. + DepositToNonces map[string][]byte `protobuf:"bytes,3,rep,name=deposit_to_nonces,json=depositToNonces,proto3" json:"deposit_to_nonces,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // The prevout information of the sweep txn. + PrevoutInfo []*PrevoutInfo `protobuf:"bytes,4,rep,name=prevout_info,json=prevoutInfo,proto3" json:"prevout_info,omitempty"` +} + +func (x *ServerStaticLoopInSweepNotification) Reset() { + *x = ServerStaticLoopInSweepNotification{} + if protoimpl.UnsafeEnabled { + mi := &file_server_proto_msgTypes[36] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ServerStaticLoopInSweepNotification) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ServerStaticLoopInSweepNotification) ProtoMessage() {} + +func (x *ServerStaticLoopInSweepNotification) ProtoReflect() protoreflect.Message { + mi := &file_server_proto_msgTypes[36] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ServerStaticLoopInSweepNotification.ProtoReflect.Descriptor instead. +func (*ServerStaticLoopInSweepNotification) Descriptor() ([]byte, []int) { + return file_server_proto_rawDescGZIP(), []int{36} +} + +func (x *ServerStaticLoopInSweepNotification) GetSweepTxPsbt() []byte { + if x != nil { + return x.SweepTxPsbt + } + return nil +} + +func (x *ServerStaticLoopInSweepNotification) GetSwapHash() []byte { + if x != nil { + return x.SwapHash + } + return nil +} + +func (x *ServerStaticLoopInSweepNotification) GetDepositToNonces() map[string][]byte { + if x != nil { + return x.DepositToNonces + } + return nil +} + +func (x *ServerStaticLoopInSweepNotification) GetPrevoutInfo() []*PrevoutInfo { + if x != nil { + return x.PrevoutInfo + } + return nil +} + var File_server_proto protoreflect.FileDescriptor var file_server_proto_rawDesc = []byte{ @@ -3210,7 +3303,7 @@ var file_server_proto_rawDesc = []byte{ 0x75, 0x65, 0x73, 0x74, 0x22, 0x13, 0x0a, 0x11, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x95, 0x01, 0x0a, 0x1e, 0x53, + 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xf6, 0x01, 0x0a, 0x1e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e, 0x6f, 0x74, @@ -3219,176 +3312,203 @@ var file_server_proto_rawDesc = []byte{ 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x17, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x0e, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2a, 0xef, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, - 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, - 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, - 0x5f, 0x53, 0x45, 0x47, 0x57, 0x49, 0x54, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, - 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x55, - 0x53, 0x48, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, - 0x14, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x4c, 0x4f, 0x4f, - 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x54, 0x4c, 0x43, 0x5f, - 0x56, 0x32, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, - 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, - 0x4f, 0x55, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, - 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x08, 0x12, 0x12, 0x0a, 0x0e, 0x52, 0x4f, 0x55, 0x54, 0x49, - 0x4e, 0x47, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x48, - 0x54, 0x4c, 0x43, 0x5f, 0x56, 0x33, 0x10, 0x0a, 0x12, 0x0a, 0x0a, 0x06, 0x4d, 0x55, 0x53, 0x49, - 0x47, 0x32, 0x10, 0x0b, 0x2a, 0x9e, 0x04, 0x0a, 0x0f, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, - 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x10, 0x53, 0x45, 0x52, 0x56, - 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, - 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, - 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x52, - 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x02, 0x12, 0x19, 0x0a, - 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, - 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4e, 0x4f, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x45, - 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4f, 0x46, 0x46, 0x5f, - 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, - 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, - 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, - 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x57, 0x41, 0x50, - 0x5f, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, - 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x48, 0x54, 0x4c, - 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, - 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x0a, 0x12, 0x1d, 0x0a, - 0x19, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, 0x4e, 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, - 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, - 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, - 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x52, 0x56, 0x45, - 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, - 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0d, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, - 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, - 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0e, 0x12, 0x27, 0x0a, 0x23, 0x53, 0x45, - 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x4d, 0x55, 0x4c, 0x54, - 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, - 0x53, 0x10, 0x0f, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, - 0x49, 0x4f, 0x4e, 0x10, 0x10, 0x2a, 0x4a, 0x0a, 0x10, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x52, 0x4f, 0x55, - 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, - 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x01, 0x12, 0x11, - 0x0a, 0x0d, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, - 0x02, 0x2a, 0xf1, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4e, - 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x4c, 0x4e, 0x44, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, - 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b, 0x4c, 0x4e, 0x44, 0x5f, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, - 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4c, 0x4e, 0x44, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x45, - 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x30, 0x0a, 0x2c, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, - 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, - 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x04, 0x12, 0x2b, 0x0a, 0x27, 0x4c, 0x4e, 0x44, 0x5f, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, - 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, - 0x4e, 0x43, 0x45, 0x10, 0x05, 0x2a, 0x27, 0x0a, 0x0d, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, - 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x57, 0x5f, 0x48, 0x49, 0x47, 0x48, 0x10, 0x01, 0x32, 0xc9, - 0x0b, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x4f, 0x0a, - 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x22, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4f, - 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, - 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x6c, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, - 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, - 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, - 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, - 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, - 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x4c, - 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x21, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0d, - 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1c, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, - 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, - 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, + 0x6f, 0x6e, 0x12, 0x5f, 0x0a, 0x14, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x6c, 0x6f, 0x6f, + 0x70, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x2c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, + 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x65, + 0x65, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, + 0x52, 0x11, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, + 0x65, 0x65, 0x70, 0x42, 0x0e, 0x0a, 0x0c, 0x6e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x22, 0xd2, 0x02, 0x0a, 0x23, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x0a, 0x0d, 0x73, + 0x77, 0x65, 0x65, 0x70, 0x5f, 0x74, 0x78, 0x5f, 0x70, 0x73, 0x62, 0x74, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x73, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x50, 0x73, 0x62, 0x74, 0x12, + 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x6d, 0x0a, 0x11, + 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x74, 0x6f, 0x5f, 0x6e, 0x6f, 0x6e, 0x63, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x41, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, 0x6f, 0x4e, + 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0f, 0x64, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x54, 0x6f, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x37, 0x0a, 0x0c, 0x70, + 0x72, 0x65, 0x76, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x65, 0x76, + 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x70, 0x72, 0x65, 0x76, 0x6f, 0x75, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x42, 0x0a, 0x14, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x54, + 0x6f, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0xef, 0x01, 0x0a, 0x0f, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0a, 0x0a, 0x06, + 0x4c, 0x45, 0x47, 0x41, 0x43, 0x59, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4d, 0x55, 0x4c, 0x54, + 0x49, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x19, 0x0a, 0x15, + 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, 0x5f, 0x53, 0x45, 0x47, 0x57, 0x49, 0x54, 0x5f, 0x4c, 0x4f, + 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x52, 0x45, 0x49, 0x4d, + 0x41, 0x47, 0x45, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, + 0x54, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, + 0x52, 0x59, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x04, 0x12, 0x0b, 0x0a, + 0x07, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x56, 0x32, 0x10, 0x05, 0x12, 0x11, 0x0a, 0x0d, 0x4d, 0x55, + 0x4c, 0x54, 0x49, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x06, 0x12, 0x13, 0x0a, + 0x0f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, + 0x10, 0x07, 0x12, 0x09, 0x0a, 0x05, 0x50, 0x52, 0x4f, 0x42, 0x45, 0x10, 0x08, 0x12, 0x12, 0x0a, + 0x0e, 0x52, 0x4f, 0x55, 0x54, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, + 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x56, 0x33, 0x10, 0x0a, 0x12, 0x0a, + 0x0a, 0x06, 0x4d, 0x55, 0x53, 0x49, 0x47, 0x32, 0x10, 0x0b, 0x2a, 0x9e, 0x04, 0x0a, 0x0f, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x14, + 0x0a, 0x10, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, + 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x01, 0x12, + 0x12, 0x0a, 0x0e, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, + 0x53, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, + 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x19, + 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, + 0x4e, 0x4f, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, 0x45, 0x52, + 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x56, 0x41, 0x4c, + 0x49, 0x44, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x05, + 0x12, 0x23, 0x0a, 0x1f, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x5f, 0x4f, 0x46, 0x46, 0x5f, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, + 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, + 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x07, + 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x44, 0x45, 0x41, 0x44, 0x4c, 0x49, 0x4e, 0x45, 0x10, + 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, + 0x45, 0x44, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x09, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, + 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, + 0x44, 0x10, 0x0a, 0x12, 0x1d, 0x0a, 0x19, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x55, 0x4e, + 0x45, 0x58, 0x50, 0x45, 0x43, 0x54, 0x45, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x10, 0x0b, 0x12, 0x19, 0x0a, 0x15, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x48, 0x54, 0x4c, + 0x43, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x10, 0x0c, 0x12, 0x1f, 0x0a, + 0x1b, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x50, + 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0d, 0x12, 0x20, + 0x0a, 0x1c, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x43, 0x4c, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x43, 0x41, 0x4e, 0x43, 0x45, 0x4c, 0x10, 0x0e, + 0x12, 0x27, 0x0a, 0x23, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, + 0x44, 0x5f, 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x50, 0x4c, 0x45, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, + 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x53, 0x10, 0x0f, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x52, + 0x56, 0x45, 0x52, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x49, 0x54, 0x49, + 0x41, 0x4c, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x10, 0x2a, 0x4a, 0x0a, 0x10, 0x52, + 0x6f, 0x75, 0x74, 0x65, 0x50, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, + 0x11, 0x0a, 0x0d, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, + 0x10, 0x00, 0x12, 0x10, 0x0a, 0x0c, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x5f, 0x52, 0x4f, 0x55, + 0x54, 0x45, 0x10, 0x01, 0x12, 0x11, 0x0a, 0x0d, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, + 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02, 0x2a, 0xf1, 0x01, 0x0a, 0x14, 0x50, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, + 0x12, 0x1b, 0x0a, 0x17, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, + 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1e, 0x0a, + 0x1a, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, + 0x1b, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x5f, 0x52, 0x4f, 0x55, 0x54, 0x45, 0x10, 0x02, 0x12, 0x1c, + 0x0a, 0x18, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x30, 0x0a, 0x2c, + 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x50, 0x41, 0x59, + 0x4d, 0x45, 0x4e, 0x54, 0x5f, 0x44, 0x45, 0x54, 0x41, 0x49, 0x4c, 0x53, 0x10, 0x04, 0x12, 0x2b, + 0x0a, 0x27, 0x4c, 0x4e, 0x44, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, + 0x54, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x05, 0x2a, 0x27, 0x0a, 0x0d, 0x52, + 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x08, 0x0a, 0x04, + 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x57, 0x5f, 0x48, 0x49, + 0x47, 0x48, 0x10, 0x01, 0x32, 0xc9, 0x0b, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x12, 0x4f, 0x0a, 0x0e, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, + 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6c, 0x0a, 0x13, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, + 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, - 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x67, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, - 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, + 0x70, 0x4f, 0x75, 0x74, 0x50, 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x50, + 0x75, 0x73, 0x68, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, + 0x75, 0x6f, 0x74, 0x65, 0x12, 0x4c, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, + 0x72, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, + 0x6d, 0x73, 0x12, 0x4c, 0x0a, 0x0d, 0x4e, 0x65, 0x77, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, + 0x77, 0x61, 0x70, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x54, 0x0a, 0x0b, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, + 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x67, 0x0a, 0x17, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, + 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, + 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x28, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, + 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, + 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, + 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, + 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, + 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, + 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, + 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, + 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, + 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, + 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, + 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, + 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, + 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, + 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, + 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, + 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, + 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, + 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, + 0x77, 0x65, 0x65, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, + 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, + 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x53, 0x69, + 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, 0x12, 0x3f, + 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, + 0x79, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x12, + 0x42, 0x0a, 0x09, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x12, 0x19, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, + 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, - 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x12, 0x65, 0x0a, 0x16, 0x53, 0x75, 0x62, - 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, - 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, + 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, - 0x12, 0x5a, 0x0a, 0x11, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x12, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x53, 0x77, 0x61, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x05, - 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x60, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, 0x75, - 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, - 0x6e, 0x64, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, - 0x65, 0x73, 0x12, 0x57, 0x0a, 0x13, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, 0x6e, - 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x52, 0x6f, 0x75, 0x74, 0x69, - 0x6e, 0x67, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x4d, - 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x12, 0x1b, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, - 0x69, 0x67, 0x6e, 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x75, 0x53, 0x69, 0x67, 0x32, 0x53, 0x69, 0x67, 0x6e, - 0x53, 0x77, 0x65, 0x65, 0x70, 0x52, 0x65, 0x73, 0x12, 0x3f, 0x0a, 0x07, 0x50, 0x75, 0x73, 0x68, - 0x4b, 0x65, 0x79, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x65, 0x72, 0x50, 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x19, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x50, - 0x75, 0x73, 0x68, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x12, 0x42, 0x0a, 0x09, 0x46, 0x65, 0x74, - 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, - 0x68, 0x4c, 0x34, 0x30, 0x32, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6b, 0x0a, - 0x16, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, - 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, - 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, - 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x33, + 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x30, 0x01, + 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, + 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3404,58 +3524,60 @@ func file_server_proto_rawDescGZIP() []byte { } var file_server_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_server_proto_msgTypes = make([]protoimpl.MessageInfo, 38) var file_server_proto_goTypes = []interface{}{ - (ProtocolVersion)(0), // 0: looprpc.ProtocolVersion - (ServerSwapState)(0), // 1: looprpc.ServerSwapState - (RoutePaymentType)(0), // 2: looprpc.RoutePaymentType - (PaymentFailureReason)(0), // 3: looprpc.PaymentFailureReason - (RoutingPlugin)(0), // 4: looprpc.RoutingPlugin - (*ServerLoopOutRequest)(nil), // 5: looprpc.ServerLoopOutRequest - (*ServerLoopOutResponse)(nil), // 6: looprpc.ServerLoopOutResponse - (*ServerLoopOutQuoteRequest)(nil), // 7: looprpc.ServerLoopOutQuoteRequest - (*ServerLoopOutQuote)(nil), // 8: looprpc.ServerLoopOutQuote - (*ServerLoopOutTermsRequest)(nil), // 9: looprpc.ServerLoopOutTermsRequest - (*ServerLoopOutTerms)(nil), // 10: looprpc.ServerLoopOutTerms - (*ServerLoopInRequest)(nil), // 11: looprpc.ServerLoopInRequest - (*ServerLoopInResponse)(nil), // 12: looprpc.ServerLoopInResponse - (*ServerLoopInQuoteRequest)(nil), // 13: looprpc.ServerLoopInQuoteRequest - (*ServerLoopInQuoteResponse)(nil), // 14: looprpc.ServerLoopInQuoteResponse - (*ServerLoopInTermsRequest)(nil), // 15: looprpc.ServerLoopInTermsRequest - (*ServerLoopInTerms)(nil), // 16: looprpc.ServerLoopInTerms - (*ServerLoopOutPushPreimageRequest)(nil), // 17: looprpc.ServerLoopOutPushPreimageRequest - (*ServerLoopOutPushPreimageResponse)(nil), // 18: looprpc.ServerLoopOutPushPreimageResponse - (*SubscribeUpdatesRequest)(nil), // 19: looprpc.SubscribeUpdatesRequest - (*SubscribeLoopOutUpdatesResponse)(nil), // 20: looprpc.SubscribeLoopOutUpdatesResponse - (*SubscribeLoopInUpdatesResponse)(nil), // 21: looprpc.SubscribeLoopInUpdatesResponse - (*RouteCancel)(nil), // 22: looprpc.RouteCancel - (*HtlcAttempt)(nil), // 23: looprpc.HtlcAttempt - (*CancelLoopOutSwapRequest)(nil), // 24: looprpc.CancelLoopOutSwapRequest - (*CancelLoopOutSwapResponse)(nil), // 25: looprpc.CancelLoopOutSwapResponse - (*ServerProbeRequest)(nil), // 26: looprpc.ServerProbeRequest - (*ServerProbeResponse)(nil), // 27: looprpc.ServerProbeResponse - (*RecommendRoutingPluginReq)(nil), // 28: looprpc.RecommendRoutingPluginReq - (*RecommendRoutingPluginRes)(nil), // 29: looprpc.RecommendRoutingPluginRes - (*ReportRoutingResultReq)(nil), // 30: looprpc.ReportRoutingResultReq - (*ReportRoutingResultRes)(nil), // 31: looprpc.ReportRoutingResultRes - (*MuSig2SignSweepReq)(nil), // 32: looprpc.MuSig2SignSweepReq - (*PrevoutInfo)(nil), // 33: looprpc.PrevoutInfo - (*MuSig2SignSweepRes)(nil), // 34: looprpc.MuSig2SignSweepRes - (*ServerPushKeyReq)(nil), // 35: looprpc.ServerPushKeyReq - (*ServerPushKeyRes)(nil), // 36: looprpc.ServerPushKeyRes - (*FetchL402Request)(nil), // 37: looprpc.FetchL402Request - (*FetchL402Response)(nil), // 38: looprpc.FetchL402Response - (*SubscribeNotificationsRequest)(nil), // 39: looprpc.SubscribeNotificationsRequest - (*SubscribeNotificationsResponse)(nil), // 40: looprpc.SubscribeNotificationsResponse - (*RouteHint)(nil), // 41: looprpc.RouteHint - (*ServerReservationNotification)(nil), // 42: looprpc.ServerReservationNotification + (ProtocolVersion)(0), // 0: looprpc.ProtocolVersion + (ServerSwapState)(0), // 1: looprpc.ServerSwapState + (RoutePaymentType)(0), // 2: looprpc.RoutePaymentType + (PaymentFailureReason)(0), // 3: looprpc.PaymentFailureReason + (RoutingPlugin)(0), // 4: looprpc.RoutingPlugin + (*ServerLoopOutRequest)(nil), // 5: looprpc.ServerLoopOutRequest + (*ServerLoopOutResponse)(nil), // 6: looprpc.ServerLoopOutResponse + (*ServerLoopOutQuoteRequest)(nil), // 7: looprpc.ServerLoopOutQuoteRequest + (*ServerLoopOutQuote)(nil), // 8: looprpc.ServerLoopOutQuote + (*ServerLoopOutTermsRequest)(nil), // 9: looprpc.ServerLoopOutTermsRequest + (*ServerLoopOutTerms)(nil), // 10: looprpc.ServerLoopOutTerms + (*ServerLoopInRequest)(nil), // 11: looprpc.ServerLoopInRequest + (*ServerLoopInResponse)(nil), // 12: looprpc.ServerLoopInResponse + (*ServerLoopInQuoteRequest)(nil), // 13: looprpc.ServerLoopInQuoteRequest + (*ServerLoopInQuoteResponse)(nil), // 14: looprpc.ServerLoopInQuoteResponse + (*ServerLoopInTermsRequest)(nil), // 15: looprpc.ServerLoopInTermsRequest + (*ServerLoopInTerms)(nil), // 16: looprpc.ServerLoopInTerms + (*ServerLoopOutPushPreimageRequest)(nil), // 17: looprpc.ServerLoopOutPushPreimageRequest + (*ServerLoopOutPushPreimageResponse)(nil), // 18: looprpc.ServerLoopOutPushPreimageResponse + (*SubscribeUpdatesRequest)(nil), // 19: looprpc.SubscribeUpdatesRequest + (*SubscribeLoopOutUpdatesResponse)(nil), // 20: looprpc.SubscribeLoopOutUpdatesResponse + (*SubscribeLoopInUpdatesResponse)(nil), // 21: looprpc.SubscribeLoopInUpdatesResponse + (*RouteCancel)(nil), // 22: looprpc.RouteCancel + (*HtlcAttempt)(nil), // 23: looprpc.HtlcAttempt + (*CancelLoopOutSwapRequest)(nil), // 24: looprpc.CancelLoopOutSwapRequest + (*CancelLoopOutSwapResponse)(nil), // 25: looprpc.CancelLoopOutSwapResponse + (*ServerProbeRequest)(nil), // 26: looprpc.ServerProbeRequest + (*ServerProbeResponse)(nil), // 27: looprpc.ServerProbeResponse + (*RecommendRoutingPluginReq)(nil), // 28: looprpc.RecommendRoutingPluginReq + (*RecommendRoutingPluginRes)(nil), // 29: looprpc.RecommendRoutingPluginRes + (*ReportRoutingResultReq)(nil), // 30: looprpc.ReportRoutingResultReq + (*ReportRoutingResultRes)(nil), // 31: looprpc.ReportRoutingResultRes + (*MuSig2SignSweepReq)(nil), // 32: looprpc.MuSig2SignSweepReq + (*PrevoutInfo)(nil), // 33: looprpc.PrevoutInfo + (*MuSig2SignSweepRes)(nil), // 34: looprpc.MuSig2SignSweepRes + (*ServerPushKeyReq)(nil), // 35: looprpc.ServerPushKeyReq + (*ServerPushKeyRes)(nil), // 36: looprpc.ServerPushKeyRes + (*FetchL402Request)(nil), // 37: looprpc.FetchL402Request + (*FetchL402Response)(nil), // 38: looprpc.FetchL402Response + (*SubscribeNotificationsRequest)(nil), // 39: looprpc.SubscribeNotificationsRequest + (*SubscribeNotificationsResponse)(nil), // 40: looprpc.SubscribeNotificationsResponse + (*ServerStaticLoopInSweepNotification)(nil), // 41: looprpc.ServerStaticLoopInSweepNotification + nil, // 42: looprpc.ServerStaticLoopInSweepNotification.DepositToNoncesEntry + (*RouteHint)(nil), // 43: looprpc.RouteHint + (*ServerReservationNotification)(nil), // 44: looprpc.ServerReservationNotification } var file_server_proto_depIdxs = []int32{ 0, // 0: looprpc.ServerLoopOutRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 1: looprpc.ServerLoopOutQuoteRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 2: looprpc.ServerLoopOutTermsRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 3: looprpc.ServerLoopInRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 41, // 4: looprpc.ServerLoopInQuoteRequest.route_hints:type_name -> looprpc.RouteHint + 43, // 4: looprpc.ServerLoopInQuoteRequest.route_hints:type_name -> looprpc.RouteHint 0, // 5: looprpc.ServerLoopInQuoteRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 6: looprpc.ServerLoopInTermsRequest.protocol_version:type_name -> looprpc.ProtocolVersion 0, // 7: looprpc.ServerLoopOutPushPreimageRequest.protocol_version:type_name -> looprpc.ProtocolVersion @@ -3468,7 +3590,7 @@ var file_server_proto_depIdxs = []int32{ 0, // 14: looprpc.CancelLoopOutSwapRequest.protocol_version:type_name -> looprpc.ProtocolVersion 22, // 15: looprpc.CancelLoopOutSwapRequest.route_cancel:type_name -> looprpc.RouteCancel 0, // 16: looprpc.ServerProbeRequest.protocol_version:type_name -> looprpc.ProtocolVersion - 41, // 17: looprpc.ServerProbeRequest.route_hints:type_name -> looprpc.RouteHint + 43, // 17: looprpc.ServerProbeRequest.route_hints:type_name -> looprpc.RouteHint 0, // 18: looprpc.RecommendRoutingPluginReq.protocol_version:type_name -> looprpc.ProtocolVersion 4, // 19: looprpc.RecommendRoutingPluginRes.plugin:type_name -> looprpc.RoutingPlugin 0, // 20: looprpc.ReportRoutingResultReq.protocol_version:type_name -> looprpc.ProtocolVersion @@ -3476,46 +3598,49 @@ var file_server_proto_depIdxs = []int32{ 0, // 22: looprpc.MuSig2SignSweepReq.protocol_version:type_name -> looprpc.ProtocolVersion 33, // 23: looprpc.MuSig2SignSweepReq.prevout_info:type_name -> looprpc.PrevoutInfo 0, // 24: looprpc.ServerPushKeyReq.protocol_version:type_name -> looprpc.ProtocolVersion - 42, // 25: looprpc.SubscribeNotificationsResponse.reservation_notification:type_name -> looprpc.ServerReservationNotification - 9, // 26: looprpc.SwapServer.LoopOutTerms:input_type -> looprpc.ServerLoopOutTermsRequest - 5, // 27: looprpc.SwapServer.NewLoopOutSwap:input_type -> looprpc.ServerLoopOutRequest - 17, // 28: looprpc.SwapServer.LoopOutPushPreimage:input_type -> looprpc.ServerLoopOutPushPreimageRequest - 7, // 29: looprpc.SwapServer.LoopOutQuote:input_type -> looprpc.ServerLoopOutQuoteRequest - 15, // 30: looprpc.SwapServer.LoopInTerms:input_type -> looprpc.ServerLoopInTermsRequest - 11, // 31: looprpc.SwapServer.NewLoopInSwap:input_type -> looprpc.ServerLoopInRequest - 13, // 32: looprpc.SwapServer.LoopInQuote:input_type -> looprpc.ServerLoopInQuoteRequest - 19, // 33: looprpc.SwapServer.SubscribeLoopOutUpdates:input_type -> looprpc.SubscribeUpdatesRequest - 19, // 34: looprpc.SwapServer.SubscribeLoopInUpdates:input_type -> looprpc.SubscribeUpdatesRequest - 24, // 35: looprpc.SwapServer.CancelLoopOutSwap:input_type -> looprpc.CancelLoopOutSwapRequest - 26, // 36: looprpc.SwapServer.Probe:input_type -> looprpc.ServerProbeRequest - 28, // 37: looprpc.SwapServer.RecommendRoutingPlugin:input_type -> looprpc.RecommendRoutingPluginReq - 30, // 38: looprpc.SwapServer.ReportRoutingResult:input_type -> looprpc.ReportRoutingResultReq - 32, // 39: looprpc.SwapServer.MuSig2SignSweep:input_type -> looprpc.MuSig2SignSweepReq - 35, // 40: looprpc.SwapServer.PushKey:input_type -> looprpc.ServerPushKeyReq - 37, // 41: looprpc.SwapServer.FetchL402:input_type -> looprpc.FetchL402Request - 39, // 42: looprpc.SwapServer.SubscribeNotifications:input_type -> looprpc.SubscribeNotificationsRequest - 10, // 43: looprpc.SwapServer.LoopOutTerms:output_type -> looprpc.ServerLoopOutTerms - 6, // 44: looprpc.SwapServer.NewLoopOutSwap:output_type -> looprpc.ServerLoopOutResponse - 18, // 45: looprpc.SwapServer.LoopOutPushPreimage:output_type -> looprpc.ServerLoopOutPushPreimageResponse - 8, // 46: looprpc.SwapServer.LoopOutQuote:output_type -> looprpc.ServerLoopOutQuote - 16, // 47: looprpc.SwapServer.LoopInTerms:output_type -> looprpc.ServerLoopInTerms - 12, // 48: looprpc.SwapServer.NewLoopInSwap:output_type -> looprpc.ServerLoopInResponse - 14, // 49: looprpc.SwapServer.LoopInQuote:output_type -> looprpc.ServerLoopInQuoteResponse - 20, // 50: looprpc.SwapServer.SubscribeLoopOutUpdates:output_type -> looprpc.SubscribeLoopOutUpdatesResponse - 21, // 51: looprpc.SwapServer.SubscribeLoopInUpdates:output_type -> looprpc.SubscribeLoopInUpdatesResponse - 25, // 52: looprpc.SwapServer.CancelLoopOutSwap:output_type -> looprpc.CancelLoopOutSwapResponse - 27, // 53: looprpc.SwapServer.Probe:output_type -> looprpc.ServerProbeResponse - 29, // 54: looprpc.SwapServer.RecommendRoutingPlugin:output_type -> looprpc.RecommendRoutingPluginRes - 31, // 55: looprpc.SwapServer.ReportRoutingResult:output_type -> looprpc.ReportRoutingResultRes - 34, // 56: looprpc.SwapServer.MuSig2SignSweep:output_type -> looprpc.MuSig2SignSweepRes - 36, // 57: looprpc.SwapServer.PushKey:output_type -> looprpc.ServerPushKeyRes - 38, // 58: looprpc.SwapServer.FetchL402:output_type -> looprpc.FetchL402Response - 40, // 59: looprpc.SwapServer.SubscribeNotifications:output_type -> looprpc.SubscribeNotificationsResponse - 43, // [43:60] is the sub-list for method output_type - 26, // [26:43] is the sub-list for method input_type - 26, // [26:26] is the sub-list for extension type_name - 26, // [26:26] is the sub-list for extension extendee - 0, // [0:26] is the sub-list for field type_name + 44, // 25: looprpc.SubscribeNotificationsResponse.reservation_notification:type_name -> looprpc.ServerReservationNotification + 41, // 26: looprpc.SubscribeNotificationsResponse.static_loop_in_sweep:type_name -> looprpc.ServerStaticLoopInSweepNotification + 42, // 27: looprpc.ServerStaticLoopInSweepNotification.deposit_to_nonces:type_name -> looprpc.ServerStaticLoopInSweepNotification.DepositToNoncesEntry + 33, // 28: looprpc.ServerStaticLoopInSweepNotification.prevout_info:type_name -> looprpc.PrevoutInfo + 9, // 29: looprpc.SwapServer.LoopOutTerms:input_type -> looprpc.ServerLoopOutTermsRequest + 5, // 30: looprpc.SwapServer.NewLoopOutSwap:input_type -> looprpc.ServerLoopOutRequest + 17, // 31: looprpc.SwapServer.LoopOutPushPreimage:input_type -> looprpc.ServerLoopOutPushPreimageRequest + 7, // 32: looprpc.SwapServer.LoopOutQuote:input_type -> looprpc.ServerLoopOutQuoteRequest + 15, // 33: looprpc.SwapServer.LoopInTerms:input_type -> looprpc.ServerLoopInTermsRequest + 11, // 34: looprpc.SwapServer.NewLoopInSwap:input_type -> looprpc.ServerLoopInRequest + 13, // 35: looprpc.SwapServer.LoopInQuote:input_type -> looprpc.ServerLoopInQuoteRequest + 19, // 36: looprpc.SwapServer.SubscribeLoopOutUpdates:input_type -> looprpc.SubscribeUpdatesRequest + 19, // 37: looprpc.SwapServer.SubscribeLoopInUpdates:input_type -> looprpc.SubscribeUpdatesRequest + 24, // 38: looprpc.SwapServer.CancelLoopOutSwap:input_type -> looprpc.CancelLoopOutSwapRequest + 26, // 39: looprpc.SwapServer.Probe:input_type -> looprpc.ServerProbeRequest + 28, // 40: looprpc.SwapServer.RecommendRoutingPlugin:input_type -> looprpc.RecommendRoutingPluginReq + 30, // 41: looprpc.SwapServer.ReportRoutingResult:input_type -> looprpc.ReportRoutingResultReq + 32, // 42: looprpc.SwapServer.MuSig2SignSweep:input_type -> looprpc.MuSig2SignSweepReq + 35, // 43: looprpc.SwapServer.PushKey:input_type -> looprpc.ServerPushKeyReq + 37, // 44: looprpc.SwapServer.FetchL402:input_type -> looprpc.FetchL402Request + 39, // 45: looprpc.SwapServer.SubscribeNotifications:input_type -> looprpc.SubscribeNotificationsRequest + 10, // 46: looprpc.SwapServer.LoopOutTerms:output_type -> looprpc.ServerLoopOutTerms + 6, // 47: looprpc.SwapServer.NewLoopOutSwap:output_type -> looprpc.ServerLoopOutResponse + 18, // 48: looprpc.SwapServer.LoopOutPushPreimage:output_type -> looprpc.ServerLoopOutPushPreimageResponse + 8, // 49: looprpc.SwapServer.LoopOutQuote:output_type -> looprpc.ServerLoopOutQuote + 16, // 50: looprpc.SwapServer.LoopInTerms:output_type -> looprpc.ServerLoopInTerms + 12, // 51: looprpc.SwapServer.NewLoopInSwap:output_type -> looprpc.ServerLoopInResponse + 14, // 52: looprpc.SwapServer.LoopInQuote:output_type -> looprpc.ServerLoopInQuoteResponse + 20, // 53: looprpc.SwapServer.SubscribeLoopOutUpdates:output_type -> looprpc.SubscribeLoopOutUpdatesResponse + 21, // 54: looprpc.SwapServer.SubscribeLoopInUpdates:output_type -> looprpc.SubscribeLoopInUpdatesResponse + 25, // 55: looprpc.SwapServer.CancelLoopOutSwap:output_type -> looprpc.CancelLoopOutSwapResponse + 27, // 56: looprpc.SwapServer.Probe:output_type -> looprpc.ServerProbeResponse + 29, // 57: looprpc.SwapServer.RecommendRoutingPlugin:output_type -> looprpc.RecommendRoutingPluginRes + 31, // 58: looprpc.SwapServer.ReportRoutingResult:output_type -> looprpc.ReportRoutingResultRes + 34, // 59: looprpc.SwapServer.MuSig2SignSweep:output_type -> looprpc.MuSig2SignSweepRes + 36, // 60: looprpc.SwapServer.PushKey:output_type -> looprpc.ServerPushKeyRes + 38, // 61: looprpc.SwapServer.FetchL402:output_type -> looprpc.FetchL402Response + 40, // 62: looprpc.SwapServer.SubscribeNotifications:output_type -> looprpc.SubscribeNotificationsResponse + 46, // [46:63] is the sub-list for method output_type + 29, // [29:46] is the sub-list for method input_type + 29, // [29:29] is the sub-list for extension type_name + 29, // [29:29] is the sub-list for extension extendee + 0, // [0:29] is the sub-list for field type_name } func init() { file_server_proto_init() } @@ -3958,12 +4083,25 @@ func file_server_proto_init() { return nil } } + file_server_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ServerStaticLoopInSweepNotification); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } file_server_proto_msgTypes[19].OneofWrappers = []interface{}{ (*CancelLoopOutSwapRequest_RouteCancel)(nil), } file_server_proto_msgTypes[35].OneofWrappers = []interface{}{ (*SubscribeNotificationsResponse_ReservationNotification)(nil), + (*SubscribeNotificationsResponse_StaticLoopInSweep)(nil), } type x struct{} out := protoimpl.TypeBuilder{ @@ -3971,7 +4109,7 @@ func file_server_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_server_proto_rawDesc, NumEnums: 5, - NumMessages: 36, + NumMessages: 38, NumExtensions: 0, NumServices: 1, }, diff --git a/swapserverrpc/server.proto b/swapserverrpc/server.proto index aa95e9d3c..23195a874 100644 --- a/swapserverrpc/server.proto +++ b/swapserverrpc/server.proto @@ -667,5 +667,23 @@ message SubscribeNotificationsRequest { message SubscribeNotificationsResponse { oneof notification { ServerReservationNotification reservation_notification = 1; + ServerStaticLoopInSweepNotification static_loop_in_sweep = 2; } } + +// ServerStaticLoopInSweepNotification is a request from the server to the +// client to cosign a transaction that contains deposits from a finished static +// loop ins. +message ServerStaticLoopInSweepNotification { + // The psbt of the sweep transaction. + bytes sweep_tx_psbt = 1; + + // The swap hash the deposits are associated with. + bytes swap_hash = 2; + + // The map of deposit txid:idx to the nonce used by the server. + map deposit_to_nonces = 3; + + // The prevout information of the sweep txn. + repeated PrevoutInfo prevout_info = 4; +} diff --git a/swapserverrpc/staticaddr.pb.go b/swapserverrpc/staticaddr.pb.go index b038018a2..63b39652d 100644 --- a/swapserverrpc/staticaddr.pb.go +++ b/swapserverrpc/staticaddr.pb.go @@ -805,192 +805,6 @@ func (*PushStaticAddressHtlcSigsResponse) Descriptor() ([]byte, []int) { return file_staticaddr_proto_rawDescGZIP(), []int{10} } -type FetchSweeplessSweepTxRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The swap hash of the swap that the client wants to fetch the sweepless - // sweep tx for. - SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` -} - -func (x *FetchSweeplessSweepTxRequest) Reset() { - *x = FetchSweeplessSweepTxRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_staticaddr_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchSweeplessSweepTxRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchSweeplessSweepTxRequest) ProtoMessage() {} - -func (x *FetchSweeplessSweepTxRequest) ProtoReflect() protoreflect.Message { - mi := &file_staticaddr_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchSweeplessSweepTxRequest.ProtoReflect.Descriptor instead. -func (*FetchSweeplessSweepTxRequest) Descriptor() ([]byte, []int) { - return file_staticaddr_proto_rawDescGZIP(), []int{11} -} - -func (x *FetchSweeplessSweepTxRequest) GetSwapHash() []byte { - if x != nil { - return x.SwapHash - } - return nil -} - -type FetchSweeplessSweepTxResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The address that the server wants to sweep the static address deposits - // to. - SweepAddr string `protobuf:"bytes,1,opt,name=sweep_addr,json=sweepAddr,proto3" json:"sweep_addr,omitempty"` - // The info the server used to generate the standard fee partial sweepless - // tx sigs. - StandardFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_fee_info,json=standardFeeInfo,proto3" json:"standard_fee_info,omitempty"` - // The info the server used to generate the high fee partial sweepless tx - // sigs. - HighFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_info,json=highFeeInfo,proto3" json:"high_fee_info,omitempty"` - // The info the server used to generate the extreme fee partial sweepless tx - // sigs. - ExtremeFeeInfo *ServerSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_info,json=extremeFeeInfo,proto3" json:"extreme_fee_info,omitempty"` -} - -func (x *FetchSweeplessSweepTxResponse) Reset() { - *x = FetchSweeplessSweepTxResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_staticaddr_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *FetchSweeplessSweepTxResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*FetchSweeplessSweepTxResponse) ProtoMessage() {} - -func (x *FetchSweeplessSweepTxResponse) ProtoReflect() protoreflect.Message { - mi := &file_staticaddr_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use FetchSweeplessSweepTxResponse.ProtoReflect.Descriptor instead. -func (*FetchSweeplessSweepTxResponse) Descriptor() ([]byte, []int) { - return file_staticaddr_proto_rawDescGZIP(), []int{12} -} - -func (x *FetchSweeplessSweepTxResponse) GetSweepAddr() string { - if x != nil { - return x.SweepAddr - } - return "" -} - -func (x *FetchSweeplessSweepTxResponse) GetStandardFeeInfo() *ServerSweeplessSigningInfo { - if x != nil { - return x.StandardFeeInfo - } - return nil -} - -func (x *FetchSweeplessSweepTxResponse) GetHighFeeInfo() *ServerSweeplessSigningInfo { - if x != nil { - return x.HighFeeInfo - } - return nil -} - -func (x *FetchSweeplessSweepTxResponse) GetExtremeFeeInfo() *ServerSweeplessSigningInfo { - if x != nil { - return x.ExtremeFeeInfo - } - return nil -} - -type ServerSweeplessSigningInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The nonces that the server used to generate the partial sweepless tx - // sigs. - Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` - // The fee rate in sat/kw that the server wants to use for the sweepless tx. - FeeRate uint64 `protobuf:"varint,2,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` -} - -func (x *ServerSweeplessSigningInfo) Reset() { - *x = ServerSweeplessSigningInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_staticaddr_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ServerSweeplessSigningInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ServerSweeplessSigningInfo) ProtoMessage() {} - -func (x *ServerSweeplessSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_staticaddr_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ServerSweeplessSigningInfo.ProtoReflect.Descriptor instead. -func (*ServerSweeplessSigningInfo) Descriptor() ([]byte, []int) { - return file_staticaddr_proto_rawDescGZIP(), []int{13} -} - -func (x *ServerSweeplessSigningInfo) GetNonces() [][]byte { - if x != nil { - return x.Nonces - } - return nil -} - -func (x *ServerSweeplessSigningInfo) GetFeeRate() uint64 { - if x != nil { - return x.FeeRate - } - return 0 -} - type PushStaticAddressSweeplessSigsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -999,21 +813,20 @@ type PushStaticAddressSweeplessSigsRequest struct { // The swap hash of the swap that the client wants to push the sweepless // sigs for. SwapHash []byte `protobuf:"bytes,1,opt,name=swap_hash,json=swapHash,proto3" json:"swap_hash,omitempty"` - // The info the client used to generate the standard fee partial sweepless - // tx sigs. - StandardSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,2,opt,name=standard_signing_info,json=standardSigningInfo,proto3" json:"standard_signing_info,omitempty"` - // The info the client used to generate the high fee partial sweepless tx - // sigs. - HighFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,3,opt,name=high_fee_signing_info,json=highFeeSigningInfo,proto3" json:"high_fee_signing_info,omitempty"` - // The info the client used to generate the extreme fee partial sweepless - // tx sigs. - ExtremeFeeSigningInfo *ClientSweeplessSigningInfo `protobuf:"bytes,4,opt,name=extreme_fee_signing_info,json=extremeFeeSigningInfo,proto3" json:"extreme_fee_signing_info,omitempty"` + // The txid of the sweep tx that the client wants to push the sweepless + // sigs for. + Txid []byte `protobuf:"bytes,2,opt,name=txid,proto3" json:"txid,omitempty"` + // A map of deposits in format txid:idx to the nonces. + SigningInfo map[string]*ClientSweeplessSigningInfo `protobuf:"bytes,3,rep,name=signing_info,json=signingInfo,proto3" json:"signing_info,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // An optional error message that the client can provide, e.g. if the + // client does not consider the swap finished yet.bool + ErrorMessage string `protobuf:"bytes,4,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"` } func (x *PushStaticAddressSweeplessSigsRequest) Reset() { *x = PushStaticAddressSweeplessSigsRequest{} if protoimpl.UnsafeEnabled { - mi := &file_staticaddr_proto_msgTypes[14] + mi := &file_staticaddr_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1026,7 +839,7 @@ func (x *PushStaticAddressSweeplessSigsRequest) String() string { func (*PushStaticAddressSweeplessSigsRequest) ProtoMessage() {} func (x *PushStaticAddressSweeplessSigsRequest) ProtoReflect() protoreflect.Message { - mi := &file_staticaddr_proto_msgTypes[14] + mi := &file_staticaddr_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1039,7 +852,7 @@ func (x *PushStaticAddressSweeplessSigsRequest) ProtoReflect() protoreflect.Mess // Deprecated: Use PushStaticAddressSweeplessSigsRequest.ProtoReflect.Descriptor instead. func (*PushStaticAddressSweeplessSigsRequest) Descriptor() ([]byte, []int) { - return file_staticaddr_proto_rawDescGZIP(), []int{14} + return file_staticaddr_proto_rawDescGZIP(), []int{11} } func (x *PushStaticAddressSweeplessSigsRequest) GetSwapHash() []byte { @@ -1049,25 +862,25 @@ func (x *PushStaticAddressSweeplessSigsRequest) GetSwapHash() []byte { return nil } -func (x *PushStaticAddressSweeplessSigsRequest) GetStandardSigningInfo() *ClientSweeplessSigningInfo { +func (x *PushStaticAddressSweeplessSigsRequest) GetTxid() []byte { if x != nil { - return x.StandardSigningInfo + return x.Txid } return nil } -func (x *PushStaticAddressSweeplessSigsRequest) GetHighFeeSigningInfo() *ClientSweeplessSigningInfo { +func (x *PushStaticAddressSweeplessSigsRequest) GetSigningInfo() map[string]*ClientSweeplessSigningInfo { if x != nil { - return x.HighFeeSigningInfo + return x.SigningInfo } return nil } -func (x *PushStaticAddressSweeplessSigsRequest) GetExtremeFeeSigningInfo() *ClientSweeplessSigningInfo { +func (x *PushStaticAddressSweeplessSigsRequest) GetErrorMessage() string { if x != nil { - return x.ExtremeFeeSigningInfo + return x.ErrorMessage } - return nil + return "" } type ClientSweeplessSigningInfo struct { @@ -1077,15 +890,15 @@ type ClientSweeplessSigningInfo struct { // The nonces that the client used to generate the partial sweepless tx // sigs. - Nonces [][]byte `protobuf:"bytes,1,rep,name=nonces,proto3" json:"nonces,omitempty"` + Nonce []byte `protobuf:"bytes,1,opt,name=nonce,proto3" json:"nonce,omitempty"` // The musig2 htlc sigs that the client generated for the sweepless tx. - Sigs [][]byte `protobuf:"bytes,2,rep,name=sigs,proto3" json:"sigs,omitempty"` + Sig []byte `protobuf:"bytes,2,opt,name=sig,proto3" json:"sig,omitempty"` } func (x *ClientSweeplessSigningInfo) Reset() { *x = ClientSweeplessSigningInfo{} if protoimpl.UnsafeEnabled { - mi := &file_staticaddr_proto_msgTypes[15] + mi := &file_staticaddr_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1098,7 +911,7 @@ func (x *ClientSweeplessSigningInfo) String() string { func (*ClientSweeplessSigningInfo) ProtoMessage() {} func (x *ClientSweeplessSigningInfo) ProtoReflect() protoreflect.Message { - mi := &file_staticaddr_proto_msgTypes[15] + mi := &file_staticaddr_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1111,19 +924,19 @@ func (x *ClientSweeplessSigningInfo) ProtoReflect() protoreflect.Message { // Deprecated: Use ClientSweeplessSigningInfo.ProtoReflect.Descriptor instead. func (*ClientSweeplessSigningInfo) Descriptor() ([]byte, []int) { - return file_staticaddr_proto_rawDescGZIP(), []int{15} + return file_staticaddr_proto_rawDescGZIP(), []int{12} } -func (x *ClientSweeplessSigningInfo) GetNonces() [][]byte { +func (x *ClientSweeplessSigningInfo) GetNonce() []byte { if x != nil { - return x.Nonces + return x.Nonce } return nil } -func (x *ClientSweeplessSigningInfo) GetSigs() [][]byte { +func (x *ClientSweeplessSigningInfo) GetSig() []byte { if x != nil { - return x.Sigs + return x.Sig } return nil } @@ -1137,7 +950,7 @@ type PushStaticAddressSweeplessSigsResponse struct { func (x *PushStaticAddressSweeplessSigsResponse) Reset() { *x = PushStaticAddressSweeplessSigsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_staticaddr_proto_msgTypes[16] + mi := &file_staticaddr_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1150,7 +963,7 @@ func (x *PushStaticAddressSweeplessSigsResponse) String() string { func (*PushStaticAddressSweeplessSigsResponse) ProtoMessage() {} func (x *PushStaticAddressSweeplessSigsResponse) ProtoReflect() protoreflect.Message { - mi := &file_staticaddr_proto_msgTypes[16] + mi := &file_staticaddr_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1163,7 +976,7 @@ func (x *PushStaticAddressSweeplessSigsResponse) ProtoReflect() protoreflect.Mes // Deprecated: Use PushStaticAddressSweeplessSigsResponse.ProtoReflect.Descriptor instead. func (*PushStaticAddressSweeplessSigsResponse) Descriptor() ([]byte, []int) { - return file_staticaddr_proto_rawDescGZIP(), []int{16} + return file_staticaddr_proto_rawDescGZIP(), []int{13} } var File_staticaddr_proto protoreflect.FileDescriptor @@ -1286,111 +1099,76 @@ var file_staticaddr_proto_rawDesc = []byte{ 0x0a, 0x04, 0x73, 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, 0x23, 0x0a, 0x21, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3b, 0x0a, 0x1c, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, - 0x48, 0x61, 0x73, 0x68, 0x22, 0xa7, 0x02, 0x0a, 0x1d, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, - 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x77, 0x65, 0x65, 0x70, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x77, 0x65, 0x65, - 0x70, 0x41, 0x64, 0x64, 0x72, 0x12, 0x4f, 0x0a, 0x11, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, - 0x64, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x46, - 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x47, 0x0a, 0x0d, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, - 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x0b, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x4d, 0x0a, 0x10, 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, - 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0e, - 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x4f, - 0x0a, 0x1a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, - 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, - 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, - 0x6e, 0x63, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x22, - 0xd3, 0x02, 0x0a, 0x25, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, - 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, - 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x57, 0x0a, 0x15, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, - 0x72, 0x64, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, - 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x13, 0x73, 0x74, 0x61, 0x6e, - 0x64, 0x61, 0x72, 0x64, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x56, 0x0a, 0x15, 0x68, 0x69, 0x67, 0x68, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x52, 0x12, 0x68, 0x69, 0x67, 0x68, 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, - 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x5c, 0x0a, 0x18, 0x65, 0x78, 0x74, 0x72, 0x65, - 0x6d, 0x65, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, - 0x6e, 0x66, 0x6f, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, - 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x15, - 0x65, 0x78, 0x74, 0x72, 0x65, 0x6d, 0x65, 0x46, 0x65, 0x65, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, - 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x48, 0x0a, 0x1a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, - 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0c, 0x52, 0x06, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, - 0x69, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x04, 0x73, 0x69, 0x67, 0x73, 0x22, - 0x28, 0x0a, 0x26, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc6, 0x02, 0x0a, 0x25, 0x50, 0x75, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, + 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x12, + 0x0a, 0x04, 0x74, 0x78, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x74, 0x78, + 0x69, 0x64, 0x12, 0x62, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x69, 0x6e, + 0x66, 0x6f, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x26, 0x0a, 0x1c, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x06, 0x0a, 0x02, 0x56, 0x30, 0x10, - 0x00, 0x32, 0x9d, 0x05, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x12, 0x57, 0x0a, 0x10, 0x53, 0x65, 0x72, - 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, - 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, - 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, - 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, - 0x19, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x72, 0x0a, 0x19, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x12, 0x29, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, - 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, - 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, - 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x12, 0x25, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, - 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x46, 0x65, 0x74, 0x63, 0x68, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x77, - 0x65, 0x65, 0x70, 0x54, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x1e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, - 0x12, 0x2e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, - 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x2f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, - 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, - 0x6f, 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, + 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x73, 0x69, 0x67, 0x6e, 0x69, + 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, + 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x63, 0x0a, 0x10, 0x53, + 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x39, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, + 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0x44, 0x0a, 0x1a, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, + 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x6e, 0x69, 0x6e, 0x67, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, + 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x6e, + 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x03, 0x73, 0x69, 0x67, 0x22, 0x28, 0x0a, 0x26, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x2a, 0x26, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, + 0x12, 0x06, 0x0a, 0x02, 0x56, 0x30, 0x10, 0x00, 0x32, 0xb5, 0x04, 0x0a, 0x13, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, + 0x12, 0x57, 0x0a, 0x10, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x4e, 0x65, 0x77, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x16, 0x53, 0x65, 0x72, + 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x73, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x65, 0x72, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, + 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, + 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x50, 0x75, 0x73, 0x68, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, + 0x63, 0x53, 0x69, 0x67, 0x73, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x48, 0x74, 0x6c, 0x63, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x48, 0x74, 0x6c, 0x63, + 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x81, 0x01, 0x0a, + 0x1e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x12, + 0x2e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x2f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x65, 0x65, 0x70, + 0x6c, 0x65, 0x73, 0x73, 0x53, 0x69, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, + 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, + 0x70, 0x2f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x72, 0x70, 0x63, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1406,7 +1184,7 @@ func file_staticaddr_proto_rawDescGZIP() []byte { } var file_staticaddr_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_staticaddr_proto_msgTypes = make([]protoimpl.MessageInfo, 17) +var file_staticaddr_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_staticaddr_proto_goTypes = []interface{}{ (StaticAddressProtocolVersion)(0), // 0: looprpc.StaticAddressProtocolVersion (*ServerNewAddressRequest)(nil), // 1: looprpc.ServerNewAddressRequest @@ -1420,18 +1198,16 @@ var file_staticaddr_proto_goTypes = []interface{}{ (*PushStaticAddressHtlcSigsRequest)(nil), // 9: looprpc.PushStaticAddressHtlcSigsRequest (*ClientHtlcSigningInfo)(nil), // 10: looprpc.ClientHtlcSigningInfo (*PushStaticAddressHtlcSigsResponse)(nil), // 11: looprpc.PushStaticAddressHtlcSigsResponse - (*FetchSweeplessSweepTxRequest)(nil), // 12: looprpc.FetchSweeplessSweepTxRequest - (*FetchSweeplessSweepTxResponse)(nil), // 13: looprpc.FetchSweeplessSweepTxResponse - (*ServerSweeplessSigningInfo)(nil), // 14: looprpc.ServerSweeplessSigningInfo - (*PushStaticAddressSweeplessSigsRequest)(nil), // 15: looprpc.PushStaticAddressSweeplessSigsRequest - (*ClientSweeplessSigningInfo)(nil), // 16: looprpc.ClientSweeplessSigningInfo - (*PushStaticAddressSweeplessSigsResponse)(nil), // 17: looprpc.PushStaticAddressSweeplessSigsResponse - (*PrevoutInfo)(nil), // 18: looprpc.PrevoutInfo + (*PushStaticAddressSweeplessSigsRequest)(nil), // 12: looprpc.PushStaticAddressSweeplessSigsRequest + (*ClientSweeplessSigningInfo)(nil), // 13: looprpc.ClientSweeplessSigningInfo + (*PushStaticAddressSweeplessSigsResponse)(nil), // 14: looprpc.PushStaticAddressSweeplessSigsResponse + nil, // 15: looprpc.PushStaticAddressSweeplessSigsRequest.SigningInfoEntry + (*PrevoutInfo)(nil), // 16: looprpc.PrevoutInfo } var file_staticaddr_proto_depIdxs = []int32{ 0, // 0: looprpc.ServerNewAddressRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion 3, // 1: looprpc.ServerNewAddressResponse.params:type_name -> looprpc.ServerAddressParameters - 18, // 2: looprpc.ServerWithdrawRequest.outpoints:type_name -> looprpc.PrevoutInfo + 16, // 2: looprpc.ServerWithdrawRequest.outpoints:type_name -> looprpc.PrevoutInfo 0, // 3: looprpc.ServerStaticAddressLoopInRequest.protocol_version:type_name -> looprpc.StaticAddressProtocolVersion 8, // 4: looprpc.ServerStaticAddressLoopInResponse.standard_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo 8, // 5: looprpc.ServerStaticAddressLoopInResponse.high_fee_htlc_info:type_name -> looprpc.ServerHtlcSigningInfo @@ -1439,29 +1215,23 @@ var file_staticaddr_proto_depIdxs = []int32{ 10, // 7: looprpc.PushStaticAddressHtlcSigsRequest.standard_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo 10, // 8: looprpc.PushStaticAddressHtlcSigsRequest.high_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo 10, // 9: looprpc.PushStaticAddressHtlcSigsRequest.extreme_fee_htlc_info:type_name -> looprpc.ClientHtlcSigningInfo - 14, // 10: looprpc.FetchSweeplessSweepTxResponse.standard_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo - 14, // 11: looprpc.FetchSweeplessSweepTxResponse.high_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo - 14, // 12: looprpc.FetchSweeplessSweepTxResponse.extreme_fee_info:type_name -> looprpc.ServerSweeplessSigningInfo - 16, // 13: looprpc.PushStaticAddressSweeplessSigsRequest.standard_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo - 16, // 14: looprpc.PushStaticAddressSweeplessSigsRequest.high_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo - 16, // 15: looprpc.PushStaticAddressSweeplessSigsRequest.extreme_fee_signing_info:type_name -> looprpc.ClientSweeplessSigningInfo - 1, // 16: looprpc.StaticAddressServer.ServerNewAddress:input_type -> looprpc.ServerNewAddressRequest - 4, // 17: looprpc.StaticAddressServer.ServerWithdrawDeposits:input_type -> looprpc.ServerWithdrawRequest - 6, // 18: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:input_type -> looprpc.ServerStaticAddressLoopInRequest - 9, // 19: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:input_type -> looprpc.PushStaticAddressHtlcSigsRequest - 12, // 20: looprpc.StaticAddressServer.FetchSweeplessSweepTx:input_type -> looprpc.FetchSweeplessSweepTxRequest - 15, // 21: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:input_type -> looprpc.PushStaticAddressSweeplessSigsRequest - 2, // 22: looprpc.StaticAddressServer.ServerNewAddress:output_type -> looprpc.ServerNewAddressResponse - 5, // 23: looprpc.StaticAddressServer.ServerWithdrawDeposits:output_type -> looprpc.ServerWithdrawResponse - 7, // 24: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:output_type -> looprpc.ServerStaticAddressLoopInResponse - 11, // 25: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:output_type -> looprpc.PushStaticAddressHtlcSigsResponse - 13, // 26: looprpc.StaticAddressServer.FetchSweeplessSweepTx:output_type -> looprpc.FetchSweeplessSweepTxResponse - 17, // 27: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:output_type -> looprpc.PushStaticAddressSweeplessSigsResponse - 22, // [22:28] is the sub-list for method output_type - 16, // [16:22] is the sub-list for method input_type - 16, // [16:16] is the sub-list for extension type_name - 16, // [16:16] is the sub-list for extension extendee - 0, // [0:16] is the sub-list for field type_name + 15, // 10: looprpc.PushStaticAddressSweeplessSigsRequest.signing_info:type_name -> looprpc.PushStaticAddressSweeplessSigsRequest.SigningInfoEntry + 13, // 11: looprpc.PushStaticAddressSweeplessSigsRequest.SigningInfoEntry.value:type_name -> looprpc.ClientSweeplessSigningInfo + 1, // 12: looprpc.StaticAddressServer.ServerNewAddress:input_type -> looprpc.ServerNewAddressRequest + 4, // 13: looprpc.StaticAddressServer.ServerWithdrawDeposits:input_type -> looprpc.ServerWithdrawRequest + 6, // 14: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:input_type -> looprpc.ServerStaticAddressLoopInRequest + 9, // 15: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:input_type -> looprpc.PushStaticAddressHtlcSigsRequest + 12, // 16: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:input_type -> looprpc.PushStaticAddressSweeplessSigsRequest + 2, // 17: looprpc.StaticAddressServer.ServerNewAddress:output_type -> looprpc.ServerNewAddressResponse + 5, // 18: looprpc.StaticAddressServer.ServerWithdrawDeposits:output_type -> looprpc.ServerWithdrawResponse + 7, // 19: looprpc.StaticAddressServer.ServerStaticAddressLoopIn:output_type -> looprpc.ServerStaticAddressLoopInResponse + 11, // 20: looprpc.StaticAddressServer.PushStaticAddressHtlcSigs:output_type -> looprpc.PushStaticAddressHtlcSigsResponse + 14, // 21: looprpc.StaticAddressServer.PushStaticAddressSweeplessSigs:output_type -> looprpc.PushStaticAddressSweeplessSigsResponse + 17, // [17:22] is the sub-list for method output_type + 12, // [12:17] is the sub-list for method input_type + 12, // [12:12] is the sub-list for extension type_name + 12, // [12:12] is the sub-list for extension extendee + 0, // [0:12] is the sub-list for field type_name } func init() { file_staticaddr_proto_init() } @@ -1604,42 +1374,6 @@ func file_staticaddr_proto_init() { } } file_staticaddr_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchSweeplessSweepTxRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_staticaddr_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FetchSweeplessSweepTxResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_staticaddr_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ServerSweeplessSigningInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_staticaddr_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PushStaticAddressSweeplessSigsRequest); i { case 0: return &v.state @@ -1651,7 +1385,7 @@ func file_staticaddr_proto_init() { return nil } } - file_staticaddr_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { + file_staticaddr_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*ClientSweeplessSigningInfo); i { case 0: return &v.state @@ -1663,7 +1397,7 @@ func file_staticaddr_proto_init() { return nil } } - file_staticaddr_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { + file_staticaddr_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*PushStaticAddressSweeplessSigsResponse); i { case 0: return &v.state @@ -1682,7 +1416,7 @@ func file_staticaddr_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_staticaddr_proto_rawDesc, NumEnums: 1, - NumMessages: 17, + NumMessages: 15, NumExtensions: 0, NumServices: 1, }, diff --git a/swapserverrpc/staticaddr.proto b/swapserverrpc/staticaddr.proto index 61968b248..e32be2c63 100644 --- a/swapserverrpc/staticaddr.proto +++ b/swapserverrpc/staticaddr.proto @@ -39,11 +39,6 @@ service StaticAddressServer { rpc PushStaticAddressHtlcSigs (PushStaticAddressHtlcSigsRequest) returns (PushStaticAddressHtlcSigsResponse); - // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to - // to sign it. - rpc FetchSweeplessSweepTx (FetchSweeplessSweepTxRequest) - returns (FetchSweeplessSweepTxResponse); - // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx // sigs to the server. rpc PushStaticAddressSweeplessSigs (PushStaticAddressSweeplessSigsRequest) @@ -184,64 +179,30 @@ message ClientHtlcSigningInfo { message PushStaticAddressHtlcSigsResponse { } -message FetchSweeplessSweepTxRequest { - // The swap hash of the swap that the client wants to fetch the sweepless - // sweep tx for. - bytes swap_hash = 1; -} - -message FetchSweeplessSweepTxResponse { - // The address that the server wants to sweep the static address deposits - // to. - string sweep_addr = 1; - - // The info the server used to generate the standard fee partial sweepless - // tx sigs. - ServerSweeplessSigningInfo standard_fee_info = 2; - - // The info the server used to generate the high fee partial sweepless tx - // sigs. - ServerSweeplessSigningInfo high_fee_info = 3; - - // The info the server used to generate the extreme fee partial sweepless tx - // sigs. - ServerSweeplessSigningInfo extreme_fee_info = 4; -} - -message ServerSweeplessSigningInfo { - // The nonces that the server used to generate the partial sweepless tx - // sigs. - repeated bytes nonces = 1; - - // The fee rate in sat/kw that the server wants to use for the sweepless tx. - uint64 fee_rate = 2; -} - message PushStaticAddressSweeplessSigsRequest { // The swap hash of the swap that the client wants to push the sweepless // sigs for. bytes swap_hash = 1; - // The info the client used to generate the standard fee partial sweepless - // tx sigs. - ClientSweeplessSigningInfo standard_signing_info = 2; + // The txid of the sweep tx that the client wants to push the sweepless + // sigs for. + bytes txid = 2; - // The info the client used to generate the high fee partial sweepless tx - // sigs. - ClientSweeplessSigningInfo high_fee_signing_info = 3; + // A map of deposits in format txid:idx to the nonces. + map signing_info = 3; - // The info the client used to generate the extreme fee partial sweepless - // tx sigs. - ClientSweeplessSigningInfo extreme_fee_signing_info = 4; + // An optional error message that the client can provide, e.g. if the + // client does not consider the swap finished yet.bool + string error_message = 4; } message ClientSweeplessSigningInfo { // The nonces that the client used to generate the partial sweepless tx // sigs. - repeated bytes nonces = 1; + bytes nonce = 1; // The musig2 htlc sigs that the client generated for the sweepless tx. - repeated bytes sigs = 2; + bytes sig = 2; } message PushStaticAddressSweeplessSigsResponse { diff --git a/swapserverrpc/staticaddr_grpc.pb.go b/swapserverrpc/staticaddr_grpc.pb.go index c41f22449..e64cc9e05 100644 --- a/swapserverrpc/staticaddr_grpc.pb.go +++ b/swapserverrpc/staticaddr_grpc.pb.go @@ -32,9 +32,6 @@ type StaticAddressServerClient interface { ServerStaticAddressLoopIn(ctx context.Context, in *ServerStaticAddressLoopInRequest, opts ...grpc.CallOption) (*ServerStaticAddressLoopInResponse, error) // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. PushStaticAddressHtlcSigs(ctx context.Context, in *PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressHtlcSigsResponse, error) - // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to - // to sign it. - FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx // sigs to the server. PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) @@ -84,15 +81,6 @@ func (c *staticAddressServerClient) PushStaticAddressHtlcSigs(ctx context.Contex return out, nil } -func (c *staticAddressServerClient) FetchSweeplessSweepTx(ctx context.Context, in *FetchSweeplessSweepTxRequest, opts ...grpc.CallOption) (*FetchSweeplessSweepTxResponse, error) { - out := new(FetchSweeplessSweepTxResponse) - err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *staticAddressServerClient) PushStaticAddressSweeplessSigs(ctx context.Context, in *PushStaticAddressSweeplessSigsRequest, opts ...grpc.CallOption) (*PushStaticAddressSweeplessSigsResponse, error) { out := new(PushStaticAddressSweeplessSigsResponse) err := c.cc.Invoke(ctx, "/looprpc.StaticAddressServer/PushStaticAddressSweeplessSigs", in, out, opts...) @@ -120,9 +108,6 @@ type StaticAddressServerServer interface { ServerStaticAddressLoopIn(context.Context, *ServerStaticAddressLoopInRequest) (*ServerStaticAddressLoopInResponse, error) // PushStaticAddressHtlcSigs pushes the client's htlc tx sigs to the server. PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) - // FetchSweeplessSweepTx fetches the sweepless sweep tx for the client to - // to sign it. - FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) // PushStaticAddressSweeplessSigs pushes the client's sweepless sweep tx // sigs to the server. PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) @@ -145,9 +130,6 @@ func (UnimplementedStaticAddressServerServer) ServerStaticAddressLoopIn(context. func (UnimplementedStaticAddressServerServer) PushStaticAddressHtlcSigs(context.Context, *PushStaticAddressHtlcSigsRequest) (*PushStaticAddressHtlcSigsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressHtlcSigs not implemented") } -func (UnimplementedStaticAddressServerServer) FetchSweeplessSweepTx(context.Context, *FetchSweeplessSweepTxRequest) (*FetchSweeplessSweepTxResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method FetchSweeplessSweepTx not implemented") -} func (UnimplementedStaticAddressServerServer) PushStaticAddressSweeplessSigs(context.Context, *PushStaticAddressSweeplessSigsRequest) (*PushStaticAddressSweeplessSigsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method PushStaticAddressSweeplessSigs not implemented") } @@ -236,24 +218,6 @@ func _StaticAddressServer_PushStaticAddressHtlcSigs_Handler(srv interface{}, ctx return interceptor(ctx, in, info, handler) } -func _StaticAddressServer_FetchSweeplessSweepTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(FetchSweeplessSweepTxRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/looprpc.StaticAddressServer/FetchSweeplessSweepTx", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(StaticAddressServerServer).FetchSweeplessSweepTx(ctx, req.(*FetchSweeplessSweepTxRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PushStaticAddressSweeplessSigsRequest) if err := dec(in); err != nil { @@ -295,10 +259,6 @@ var StaticAddressServer_ServiceDesc = grpc.ServiceDesc{ MethodName: "PushStaticAddressHtlcSigs", Handler: _StaticAddressServer_PushStaticAddressHtlcSigs_Handler, }, - { - MethodName: "FetchSweeplessSweepTx", - Handler: _StaticAddressServer_FetchSweeplessSweepTx_Handler, - }, { MethodName: "PushStaticAddressSweeplessSigs", Handler: _StaticAddressServer_PushStaticAddressSweeplessSigs_Handler, From bdfc16dce279c324ad9589825a656c5e74e42882 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:03:44 +0100 Subject: [PATCH 58/67] notifications: add support for new ntfn This commit adds support for the new notification of type NotificationTypeStaticLoopInSweepRequest. This notification is sent when a sweep request is received from the server. --- notifications/manager.go | 60 +++++++++++++++++++++++++++++++++++----- 1 file changed, 53 insertions(+), 7 deletions(-) diff --git a/notifications/manager.go b/notifications/manager.go index 114ff87af..edbfd306f 100644 --- a/notifications/manager.go +++ b/notifications/manager.go @@ -20,6 +20,10 @@ const ( // NotificationTypeReservation is the notification type for reservation // notifications. NotificationTypeReservation + + // NotificationTypeStaticLoopInSweepRequest is the notification type for + // static loop in sweep requests. + NotificationTypeStaticLoopInSweepRequest ) // Client is the interface that the notification manager needs to implement in @@ -79,7 +83,8 @@ func (m *Manager) SubscribeReservations(ctx context.Context, m.addSubscriber(NotificationTypeReservation, sub) - // Start a goroutine to remove the subscriber when the context is canceled + // Start a goroutine to remove the subscriber when the context is + // canceled. go func() { <-ctx.Done() m.removeSubscriber(NotificationTypeReservation, sub) @@ -89,6 +94,34 @@ func (m *Manager) SubscribeReservations(ctx context.Context, return notifChan } +// SubscribeStaticLoopInSweepRequests subscribes to the static loop in sweep +// requests. +func (m *Manager) SubscribeStaticLoopInSweepRequests(ctx context.Context, +) <-chan *swapserverrpc.ServerStaticLoopInSweepNotification { + + notifChan := make( + chan *swapserverrpc.ServerStaticLoopInSweepNotification, 1, + ) + sub := subscriber{ + subCtx: ctx, + recvChan: notifChan, + } + + m.addSubscriber(NotificationTypeStaticLoopInSweepRequest, sub) + + // Start a goroutine to remove the subscriber when the context is + // canceled. + go func() { + <-ctx.Done() + m.removeSubscriber( + NotificationTypeStaticLoopInSweepRequest, sub, + ) + close(notifChan) + }() + + return notifChan +} + // Run starts the notification manager. It will keep on running until the // context is canceled. It will subscribe to notifications and forward them to // the subscribers. On a first successful connection to the server, it will @@ -160,7 +193,7 @@ func (m *Manager) subscribeNotifications(ctx context.Context, for { notification, err := notifStream.Recv() if err == nil && notification != nil { - log.Debugf("Received notification: %v", notification) + log.Tracef("Received notification: %v", notification) m.handleNotification(notification) continue } @@ -173,13 +206,13 @@ func (m *Manager) subscribeNotifications(ctx context.Context, // handleNotification handles an incoming notification from the server, // forwarding it to the appropriate subscribers. -func (m *Manager) handleNotification(notification *swapserverrpc. +func (m *Manager) handleNotification(ntfn *swapserverrpc. SubscribeNotificationsResponse) { - switch notification.Notification.(type) { - case *swapserverrpc.SubscribeNotificationsResponse_ReservationNotification: + switch ntfn.Notification.(type) { + case *swapserverrpc.SubscribeNotificationsResponse_ReservationNotification: // nolint: lll // We'll forward the reservation notification to all subscribers. - reservationNtfn := notification.GetReservationNotification() + reservationNtfn := ntfn.GetReservationNotification() m.Lock() defer m.Unlock() @@ -189,10 +222,23 @@ func (m *Manager) handleNotification(notification *swapserverrpc. recvChan <- reservationNtfn } + case *swapserverrpc.SubscribeNotificationsResponse_StaticLoopInSweep: // nolint: lll + // We'll forward the static loop in sweep request to all + // subscribers. + staticLoopInSweepRequestNtfn := ntfn.GetStaticLoopInSweep() + m.Lock() + defer m.Unlock() + + for _, sub := range m.subscribers[NotificationTypeStaticLoopInSweepRequest] { // nolint: lll + recvChan := sub.recvChan.(chan *swapserverrpc. + ServerStaticLoopInSweepNotification) + + recvChan <- staticLoopInSweepRequestNtfn + } default: log.Warnf("Received unknown notification type: %v", - notification) + ntfn) } } From fc90aa0f849645fda306f70950afa69e57cc6d8f Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:04:18 +0100 Subject: [PATCH 59/67] staticaddr/sql_store: Add fetching loop in by hash --- staticaddr/loopin/interface.go | 4 ++++ staticaddr/loopin/sql_store.go | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/staticaddr/loopin/interface.go b/staticaddr/loopin/interface.go index 453101527..b54949f61 100644 --- a/staticaddr/loopin/interface.go +++ b/staticaddr/loopin/interface.go @@ -64,6 +64,10 @@ type StaticAddressLoopInStore interface { // IsStored checks if the loop-in is already stored in the database. IsStored(ctx context.Context, swapHash lntypes.Hash) (bool, error) + + // GetLoopInByHash returns the loop-in swap with the given hash. + GetLoopInByHash(ctx context.Context, swapHash lntypes.Hash) ( + *StaticAddressLoopIn, error) } type QuoteGetter interface { diff --git a/staticaddr/loopin/sql_store.go b/staticaddr/loopin/sql_store.go index 06caae632..e6ba5aadd 100644 --- a/staticaddr/loopin/sql_store.go +++ b/staticaddr/loopin/sql_store.go @@ -100,6 +100,30 @@ func NewSqlStore(db BaseDB, clock clock.Clock, } } +// GetLoopInByHash returns the loop-in swap with the given hash. +func (s *SqlStore) GetLoopInByHash(ctx context.Context, + swapHash lntypes.Hash) (*StaticAddressLoopIn, error) { + + var ( + err error + row sqlc.GetStaticAddressLoopInSwapRow + updates []sqlc.StaticAddressSwapUpdate + ) + row, err = s.baseDB.GetStaticAddressLoopInSwap(ctx, swapHash[:]) + if err != nil { + return nil, err + } + + updates, err = s.baseDB.GetLoopInSwapUpdates(ctx, swapHash[:]) + if err != nil { + return nil, err + } + + return toStaticAddressLoopIn( + ctx, s.network, row, updates, + ) +} + // GetStaticAddressLoopInSwapsByStates returns all static address loop-ins from // the db that are in the given states. func (s *SqlStore) GetStaticAddressLoopInSwapsByStates(ctx context.Context, From c0e9d7a41eda02f8729bcb0e494655f29159a442 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:33:10 +0100 Subject: [PATCH 60/67] staticaddr/loopin: add listening for sweep request This commit adds the listening for sweep requests from the server. On a sweep request the loopin manager will fetch the loop in from the db, do sanity and safety checks and then sign the psbt for the input and send it back to the server. --- staticaddr/loopin/interface.go | 9 ++ staticaddr/loopin/manager.go | 261 +++++++++++++++++++++++++++++++++ 2 files changed, 270 insertions(+) diff --git a/staticaddr/loopin/interface.go b/staticaddr/loopin/interface.go index b54949f61..e4e73862c 100644 --- a/staticaddr/loopin/interface.go +++ b/staticaddr/loopin/interface.go @@ -9,6 +9,7 @@ import ( "github.com/lightninglabs/loop/staticaddr/address" "github.com/lightninglabs/loop/staticaddr/deposit" "github.com/lightninglabs/loop/staticaddr/script" + "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/routing/route" "github.com/lightningnetwork/lnd/zpay32" @@ -77,3 +78,11 @@ type QuoteGetter interface { routeHints [][]zpay32.HopHint, initiator string, numDeposits uint32) (*loop.LoopInQuote, error) } + +type NotificationManager interface { + // SubscribeStaticLoopInSweepRequests subscribes to the static loop in + // sweep requests. These are sent by the server to the client to request + // a sweep of a static loop in that has been finished. + SubscribeStaticLoopInSweepRequests(ctx context.Context, + ) <-chan *swapserverrpc.ServerStaticLoopInSweepNotification +} diff --git a/staticaddr/loopin/manager.go b/staticaddr/loopin/manager.go index 5313c29c2..150657700 100644 --- a/staticaddr/loopin/manager.go +++ b/staticaddr/loopin/manager.go @@ -1,22 +1,35 @@ package loopin import ( + "bytes" "context" "fmt" "sync/atomic" "time" + "github.com/btcsuite/btcd/btcec/v2/schnorr/musig2" + "github.com/btcsuite/btcd/btcutil/psbt" "github.com/btcsuite/btcd/chaincfg" + "github.com/btcsuite/btcd/chaincfg/chainhash" + "github.com/btcsuite/btcd/txscript" + "github.com/btcsuite/btcd/wire" "github.com/lightninglabs/lndclient" "github.com/lightninglabs/loop" "github.com/lightninglabs/loop/fsm" "github.com/lightninglabs/loop/labels" "github.com/lightninglabs/loop/staticaddr/deposit" + "github.com/lightninglabs/loop/swapserverrpc" looprpc "github.com/lightninglabs/loop/swapserverrpc" "github.com/lightningnetwork/lnd/lntypes" "github.com/lightningnetwork/lnd/routing/route" ) +const ( + // SwapNotFinishedMsg is the message that is sent to the server if a + // swap is not considered finished yet. + SwapNotFinishedMsg = "swap not finished yet" +) + // Config contains the services required for the loop-in manager. type Config struct { // Server is the client that is used to communicate with the static @@ -63,6 +76,10 @@ type Config struct { // loop-in related records. Store StaticAddressLoopInStore + // NotificationManager is the manager that handles the notification + // subscriptions. + NotificationManager NotificationManager + // ValidateLoopInContract validates the contract parameters against our // request. ValidateLoopInContract ValidateLoopInContract @@ -150,6 +167,12 @@ func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { return err } + // Register for notifications of loop-in sweep requests. + sweepReqs := m.cfg.NotificationManager. + SubscribeStaticLoopInSweepRequests( + ctx, + ) + // Communicate to the caller that the address manager has completed its // initialization. close(m.initChan) @@ -189,12 +212,204 @@ func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { return ctx.Err() } + case sweepReq := <-sweepReqs: + err = m.handleLoopInSweepReq(ctx, sweepReq) + if err != nil { + log.Errorf("Error handling loop-in sweep "+ + "request: %v", err) + } + case <-ctx.Done(): return ctx.Err() } } } +// notifyNotFinished notifies the server that a swap is not finished by +// sending the defined error message. +func (m *Manager) notifyNotFinished(ctx context.Context, swapHash lntypes.Hash, + txId chainhash.Hash) error { + + _, err := m.cfg.Server.PushStaticAddressSweeplessSigs( + ctx, &looprpc.PushStaticAddressSweeplessSigsRequest{ + SwapHash: swapHash[:], + Txid: txId[:], + ErrorMessage: SwapNotFinishedMsg, + }) + + return err +} + +// handleLoopInSweepReq handles a loop-in sweep request from the server. +// It first checks if the requested loop-in is finished as expected and if +// yes will send signature to the server for the provided psbt. +func (m *Manager) handleLoopInSweepReq(ctx context.Context, + req *swapserverrpc.ServerStaticLoopInSweepNotification) error { + + // First we'll check if the loop-ins are known to us and in + // the expected state. + swapHash, err := lntypes.MakeHash(req.SwapHash) + if err != nil { + return err + } + + // Fetch the loop-in from the store. + loopIn, err := m.cfg.Store.GetLoopInByHash(ctx, swapHash) + if err != nil { + return err + } + + loopIn.AddressParams, err = + m.cfg.AddressManager.GetStaticAddressParameters(ctx) + + if err != nil { + return err + } + + loopIn.Address, err = m.cfg.AddressManager.GetStaticAddress(ctx) + if err != nil { + return err + } + + reader := bytes.NewReader(req.SweepTxPsbt) + sweepPacket, err := psbt.NewFromRawBytes(reader, false) + if err != nil { + return err + } + + sweepTx := sweepPacket.UnsignedTx + + // If the loop-in is not in the Succeeded state we return an + // error. + if !loopIn.IsInState(Succeeded) { + // We'll notify the server that we don't consider the swap + // finished yet, so it can retry later. + _ = m.notifyNotFinished(ctx, swapHash, sweepTx.TxHash()) + return fmt.Errorf("loop-in %v not in Succeeded state", + swapHash) + } + + // Perform a sanity check on the number of unsigned tx inputs and + // prevout info. + if len(sweepTx.TxIn) != len(req.PrevoutInfo) { + return fmt.Errorf("expected %v inputs, got %v", + len(req.PrevoutInfo), len(sweepTx.TxIn)) + } + + // Check if all the deposits requested are part of the loop-in and + // find them in the requested sweep. + depositToIdxMap, err := mapDepositsToIndices(req, loopIn, sweepTx) + if err != nil { + return err + } + + prevoutMap := make(map[wire.OutPoint]*wire.TxOut, len(req.PrevoutInfo)) + + // Set all the prevouts in the prevout map. + for _, prevout := range req.PrevoutInfo { + txid, err := chainhash.NewHash(prevout.TxidBytes) + if err != nil { + return err + } + + prevoutMap[wire.OutPoint{ + Hash: *txid, + Index: prevout.OutputIndex, + }] = &wire.TxOut{ + Value: int64(prevout.Value), + PkScript: prevout.PkScript, + } + } + + prevOutputFetcher := txscript.NewMultiPrevOutFetcher( + prevoutMap, + ) + + sigHashes := txscript.NewTxSigHashes( + sweepPacket.UnsignedTx, prevOutputFetcher, + ) + + // We'll now sign for every deposit that is part of the loop-in. + responseMap := make( + map[string]*looprpc.ClientSweeplessSigningInfo, + len(req.DepositToNonces), + ) + + for depositOutpoint, nonce := range req.DepositToNonces { + taprootSigHash, err := txscript.CalcTaprootSignatureHash( + sigHashes, txscript.SigHashDefault, + sweepPacket.UnsignedTx, + depositToIdxMap[depositOutpoint], prevOutputFetcher, + ) + if err != nil { + return err + } + + var ( + serverNonce [musig2.PubNonceSize]byte + sigHash [32]byte + ) + + copy(serverNonce[:], nonce) + musig2Session, err := loopIn.createMusig2Session( + ctx, m.cfg.Signer, + ) + if err != nil { + return err + } + // We'll clean up the session if we don't get to signing. + defer func() { + err = m.cfg.Signer.MuSig2Cleanup( + ctx, musig2Session.SessionID, + ) + if err != nil { + log.Errorf("Error cleaning up musig2 session: "+ + " %v", err) + } + }() + + haveAllNonces, err := m.cfg.Signer.MuSig2RegisterNonces( + ctx, musig2Session.SessionID, + [][musig2.PubNonceSize]byte{serverNonce}, + ) + if err != nil { + return err + } + + if !haveAllNonces { + return fmt.Errorf("expected all nonces to be " + + "registered") + } + + copy(sigHash[:], taprootSigHash) + + // Since our MuSig2 session has all nonces, we can now create + // the local partial signature by signing the sig hash. + sig, err := m.cfg.Signer.MuSig2Sign( + ctx, musig2Session.SessionID, sigHash, false, + ) + if err != nil { + return err + } + + responseMap[depositOutpoint] = &looprpc.ClientSweeplessSigningInfo{ //nolint:lll + Nonce: musig2Session.PublicNonce[:], + Sig: sig, + } + } + + txHash := sweepTx.TxHash() + + _, err = m.cfg.Server.PushStaticAddressSweeplessSigs( + ctx, &looprpc.PushStaticAddressSweeplessSigsRequest{ + SwapHash: loopIn.SwapHash[:], + Txid: txHash[:], + SigningInfo: responseMap, + }, + ) + return err +} + // recover stars a loop-in state machine for each non-final loop-in to pick up // work where it was left off before the restart. func (m *Manager) recoverLoopIns(ctx context.Context) error { @@ -491,3 +706,49 @@ func (m *Manager) GetAllSwaps(ctx context.Context) ([]*StaticAddressLoopIn, return swaps, nil } + +// mapDepositsToIndices maps the deposit outpoints to their respective indices +// in the sweep transaction. +func mapDepositsToIndices(req *swapserverrpc.ServerStaticLoopInSweepNotification, //nolint:lll + loopIn *StaticAddressLoopIn, sweepTx *wire.MsgTx) (map[string]int, + error) { + + depositToIdxMap := make(map[string]int) + for reqOutpoint := range req.DepositToNonces { + hasDeposit := false + for _, depositOutpoint := range loopIn.DepositOutpoints { + if depositOutpoint == reqOutpoint { + hasDeposit = true + break + } + } + if !hasDeposit { + return nil, fmt.Errorf("deposit outpoint not part of " + + "loop-in") + } + + foundDepositInTx := false + + for i, txIn := range sweepTx.TxIn { + if txIn.PreviousOutPoint.String() == reqOutpoint { + // Check that the deposit does not exist in the + // map yet. + if _, ok := depositToIdxMap[reqOutpoint]; ok { + return nil, fmt.Errorf("deposit "+ + "outpoint %v already part of "+ + "sweep tx", reqOutpoint) + } + + depositToIdxMap[reqOutpoint] = i + foundDepositInTx = true + break + } + } + + if !foundDepositInTx { + return nil, fmt.Errorf("deposit outpoint %v not part "+ + "of sweep tx", reqOutpoint) + } + } + return depositToIdxMap, nil +} From f8862c7d5a2fa483b0f9aef54b523266725368e3 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:34:17 +0100 Subject: [PATCH 61/67] staticaddr/loopin: update fsm for server ntfn sigs This commit updates the loop in FSM to handle the new server based --- looprpc/client.pb.go | 785 ++++++++--------------------------- looprpc/client.proto | 12 +- looprpc/client.swagger.json | 16 +- staticaddr/loopin/actions.go | 195 +-------- staticaddr/loopin/fsm.go | 56 +-- 5 files changed, 197 insertions(+), 867 deletions(-) diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 7d879499c..969d67d3d 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -545,11 +545,10 @@ const ( StaticAddressLoopInSwapState_SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT StaticAddressLoopInSwapState = 5 StaticAddressLoopInSwapState_MONITOR_HTLC_TIMEOUT_SWEEP StaticAddressLoopInSwapState = 6 StaticAddressLoopInSwapState_HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT StaticAddressLoopInSwapState = 7 - StaticAddressLoopInSwapState_FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX StaticAddressLoopInSwapState = 8 - StaticAddressLoopInSwapState_SUCCEEDED StaticAddressLoopInSwapState = 9 - StaticAddressLoopInSwapState_SUCCEEDED_SWEEPLESS_SIG_FAILED StaticAddressLoopInSwapState = 10 - StaticAddressLoopInSwapState_UNLOCK_DEPOSITS StaticAddressLoopInSwapState = 11 - StaticAddressLoopInSwapState_FAILED_STATIC_ADDRESS_SWAP StaticAddressLoopInSwapState = 12 + StaticAddressLoopInSwapState_SUCCEEDED StaticAddressLoopInSwapState = 8 + StaticAddressLoopInSwapState_SUCCEEDED_TRANSITIONING_FAILED StaticAddressLoopInSwapState = 9 + StaticAddressLoopInSwapState_UNLOCK_DEPOSITS StaticAddressLoopInSwapState = 10 + StaticAddressLoopInSwapState_FAILED_STATIC_ADDRESS_SWAP StaticAddressLoopInSwapState = 11 ) // Enum value maps for StaticAddressLoopInSwapState. @@ -563,26 +562,24 @@ var ( 5: "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", 6: "MONITOR_HTLC_TIMEOUT_SWEEP", 7: "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", - 8: "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX", - 9: "SUCCEEDED", - 10: "SUCCEEDED_SWEEPLESS_SIG_FAILED", - 11: "UNLOCK_DEPOSITS", - 12: "FAILED_STATIC_ADDRESS_SWAP", + 8: "SUCCEEDED", + 9: "SUCCEEDED_TRANSITIONING_FAILED", + 10: "UNLOCK_DEPOSITS", + 11: "FAILED_STATIC_ADDRESS_SWAP", } StaticAddressLoopInSwapState_value = map[string]int32{ - "UNKNOWN_STATIC_ADDRESS_SWAP_STATE": 0, - "INIT_HTLC": 1, - "SIGN_HTLC_TX": 2, - "MONITOR_INVOICE_HTLC_TX": 3, - "PAYMENT_RECEIVED": 4, - "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT": 5, - "MONITOR_HTLC_TIMEOUT_SWEEP": 6, - "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT": 7, - "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX": 8, - "SUCCEEDED": 9, - "SUCCEEDED_SWEEPLESS_SIG_FAILED": 10, - "UNLOCK_DEPOSITS": 11, - "FAILED_STATIC_ADDRESS_SWAP": 12, + "UNKNOWN_STATIC_ADDRESS_SWAP_STATE": 0, + "INIT_HTLC": 1, + "SIGN_HTLC_TX": 2, + "MONITOR_INVOICE_HTLC_TX": 3, + "PAYMENT_RECEIVED": 4, + "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT": 5, + "MONITOR_HTLC_TIMEOUT_SWEEP": 6, + "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT": 7, + "SUCCEEDED": 8, + "SUCCEEDED_TRANSITIONING_FAILED": 9, + "UNLOCK_DEPOSITS": 10, + "FAILED_STATIC_ADDRESS_SWAP": 11, } ) @@ -4841,21 +4838,6 @@ type StaticAddressSummaryResponse struct { // The total number of deposits. TotalNumDeposits uint32 `protobuf:"varint,3,opt,name=total_num_deposits,json=totalNumDeposits,proto3" json:"total_num_deposits,omitempty"` // The total value of unconfirmed deposits. -<<<<<<< HEAD - ValueUnconfirmedSatoshis int64 `protobuf:"varint,3,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` - // The total value of confirmed deposits. - ValueDepositedSatoshis int64 `protobuf:"varint,4,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` - // The total value of all expired deposits. - ValueExpiredSatoshis int64 `protobuf:"varint,5,opt,name=value_expired_satoshis,json=valueExpiredSatoshis,proto3" json:"value_expired_satoshis,omitempty"` - // The total value of all deposits that have been withdrawn. - ValueWithdrawnSatoshis int64 `protobuf:"varint,6,opt,name=value_withdrawn_satoshis,json=valueWithdrawnSatoshis,proto3" json:"value_withdrawn_satoshis,omitempty"` - // The total value of all loop-ins that have been finalized. - ValueLoopedInSatoshis int64 `protobuf:"varint,7,opt,name=value_looped_in_satoshis,json=valueLoopedInSatoshis,proto3" json:"value_looped_in_satoshis,omitempty"` - // The total value of all htlc timeout sweeps that the client swept. - ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,8,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` - // A list of all deposits that match the filtered state. - FilteredDeposits []*Deposit `protobuf:"bytes,9,rep,name=filtered_deposits,json=filteredDeposits,proto3" json:"filtered_deposits,omitempty"` -======= ValueUnconfirmedSatoshis int64 `protobuf:"varint,4,opt,name=value_unconfirmed_satoshis,json=valueUnconfirmedSatoshis,proto3" json:"value_unconfirmed_satoshis,omitempty"` // The total value of confirmed deposits. ValueDepositedSatoshis int64 `protobuf:"varint,5,opt,name=value_deposited_satoshis,json=valueDepositedSatoshis,proto3" json:"value_deposited_satoshis,omitempty"` @@ -4867,7 +4849,6 @@ type StaticAddressSummaryResponse struct { ValueLoopedInSatoshis int64 `protobuf:"varint,8,opt,name=value_looped_in_satoshis,json=valueLoopedInSatoshis,proto3" json:"value_looped_in_satoshis,omitempty"` // The total value of all htlc timeout sweeps that the client swept. ValueHtlcTimeoutSweepsSatoshis int64 `protobuf:"varint,9,opt,name=value_htlc_timeout_sweeps_satoshis,json=valueHtlcTimeoutSweepsSatoshis,proto3" json:"value_htlc_timeout_sweeps_satoshis,omitempty"` ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressSummaryResponse) Reset() { @@ -4947,23 +4928,6 @@ func (x *StaticAddressSummaryResponse) GetValueExpiredSatoshis() int64 { func (x *StaticAddressSummaryResponse) GetValueWithdrawnSatoshis() int64 { if x != nil { return x.ValueWithdrawnSatoshis -<<<<<<< HEAD - } - return 0 -} - -func (x *StaticAddressSummaryResponse) GetValueLoopedInSatoshis() int64 { - if x != nil { - return x.ValueLoopedInSatoshis - } - return 0 -} - -func (x *StaticAddressSummaryResponse) GetValueHtlcTimeoutSweepsSatoshis() int64 { - if x != nil { - return x.ValueHtlcTimeoutSweepsSatoshis -======= ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } return 0 } @@ -5069,8 +5033,6 @@ func (x *Deposit) GetConfirmationHeight() int64 { return 0 } -<<<<<<< HEAD -======= func (x *Deposit) GetBlocksUntilExpiry() int64 { if x != nil { return x.BlocksUntilExpiry @@ -5162,7 +5124,6 @@ func (x *StaticAddressLoopInSwap) GetPaymentRequestAmountSatoshis() int64 { return 0 } ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) type StaticAddressLoopInRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5204,11 +5165,7 @@ type StaticAddressLoopInRequest struct { func (x *StaticAddressLoopInRequest) Reset() { *x = StaticAddressLoopInRequest{} if protoimpl.UnsafeEnabled { -<<<<<<< HEAD - mi := &file_client_proto_msgTypes[56] -======= mi := &file_client_proto_msgTypes[61] ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5221,11 +5178,7 @@ func (x *StaticAddressLoopInRequest) String() string { func (*StaticAddressLoopInRequest) ProtoMessage() {} func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { -<<<<<<< HEAD - mi := &file_client_proto_msgTypes[56] -======= mi := &file_client_proto_msgTypes[61] ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5238,11 +5191,7 @@ func (x *StaticAddressLoopInRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressLoopInRequest.ProtoReflect.Descriptor instead. func (*StaticAddressLoopInRequest) Descriptor() ([]byte, []int) { -<<<<<<< HEAD - return file_client_proto_rawDescGZIP(), []int{56} -======= return file_client_proto_rawDescGZIP(), []int{61} ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressLoopInRequest) GetOutpoints() []string { @@ -5340,11 +5289,7 @@ type StaticAddressLoopInResponse struct { func (x *StaticAddressLoopInResponse) Reset() { *x = StaticAddressLoopInResponse{} if protoimpl.UnsafeEnabled { -<<<<<<< HEAD - mi := &file_client_proto_msgTypes[57] -======= mi := &file_client_proto_msgTypes[62] ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5357,11 +5302,7 @@ func (x *StaticAddressLoopInResponse) String() string { func (*StaticAddressLoopInResponse) ProtoMessage() {} func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { -<<<<<<< HEAD - mi := &file_client_proto_msgTypes[57] -======= mi := &file_client_proto_msgTypes[62] ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5374,11 +5315,7 @@ func (x *StaticAddressLoopInResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use StaticAddressLoopInResponse.ProtoReflect.Descriptor instead. func (*StaticAddressLoopInResponse) Descriptor() ([]byte, []int) { -<<<<<<< HEAD - return file_client_proto_rawDescGZIP(), []int{57} -======= return file_client_proto_rawDescGZIP(), []int{62} ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func (x *StaticAddressLoopInResponse) GetSwapHash() []byte { @@ -5995,189 +5932,6 @@ var file_client_proto_rawDesc = []byte{ 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, -<<<<<<< HEAD - 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x75, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, - 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x22, 0x9f, 0x04, - 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, - 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, - 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x1a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, - 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, - 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x6e, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x6e, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x6f, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, - 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x6f, 0x6f, 0x70, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x61, 0x74, 0x6f, - 0x73, 0x68, 0x69, 0x73, 0x12, 0x4a, 0x0a, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x74, - 0x6c, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, - 0x73, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x1e, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, 0x73, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, - 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, - 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, - 0xa9, 0x01, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0xc3, 0x02, 0x0a, 0x1a, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, - 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, - 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, - 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, - 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, - 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, - 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, - 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, - 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, - 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, - 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, - 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, - 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, - 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, - 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, - 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, - 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, - 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x74, 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, - 0x08, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x74, 0x76, 0x12, 0x37, 0x0a, 0x18, 0x71, 0x75, 0x6f, - 0x74, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, - 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x71, 0x75, 0x6f, - 0x74, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, - 0x69, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, - 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, - 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, - 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, - 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, - 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, - 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, - 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, - 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, - 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, - 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, - 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, - 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, - 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, - 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, - 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, - 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, - 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, - 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, - 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, - 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, - 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, - 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, - 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, - 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, - 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, - 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, - 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, - 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, - 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, - 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, - 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, - 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, - 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, - 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, - 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, - 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, - 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, - 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, - 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, - 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, - 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, - 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, - 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, - 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, - 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, - 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, - 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, - 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, - 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, - 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, - 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, 0x2a, 0xdc, 0x01, 0x0a, 0x0c, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, - 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, - 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, - 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, - 0x0a, 0x4c, 0x4f, 0x4f, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x49, 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, - 0x09, 0x4c, 0x4f, 0x4f, 0x50, 0x45, 0x44, 0x5f, 0x49, 0x4e, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, - 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, - 0x55, 0x54, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, - 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, - 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, - 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, - 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, - 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x32, 0x89, 0x10, 0x0a, 0x0a, 0x53, 0x77, -======= 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x7a, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, @@ -6395,7 +6149,7 @@ var file_client_proto_rawDesc = []byte{ 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x2a, - 0x97, 0x03, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0xef, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, @@ -6411,183 +6165,159 @@ var file_client_proto_rawDesc = []byte{ 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x46, 0x45, 0x54, - 0x43, 0x48, 0x5f, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x5f, 0x53, 0x57, 0x45, - 0x45, 0x50, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x58, 0x10, - 0x08, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x09, - 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x5f, 0x53, 0x57, - 0x45, 0x45, 0x50, 0x4c, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x49, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, - 0x45, 0x44, 0x10, 0x0a, 0x12, 0x13, 0x0a, 0x0f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, - 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x53, 0x10, 0x0b, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x41, 0x49, - 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, - 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x10, 0x0c, 0x32, 0xe8, 0x11, 0x0a, 0x0a, 0x53, 0x77, ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) - 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, - 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, - 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, - 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, - 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, - 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, - 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, - 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, - 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, - 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, - 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, - 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, - 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, - 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, + 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, + 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x55, 0x43, 0x43, + 0x45, 0x45, 0x44, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, + 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, + 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x53, 0x10, + 0x0a, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, + 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x10, + 0x0b, 0x32, 0xe8, 0x11, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, + 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, + 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, + 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, + 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, + 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, + 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, + 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, + 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, + 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, + 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, + 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, + 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, + 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, + 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, + 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, - 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, - 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, + 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, + 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, + 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, - 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, - 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, - 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, - 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, - 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, - 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, - 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, - 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, - 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, - 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, - 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, - 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, - 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, -<<<<<<< HEAD - 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, - 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, - 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -======= - 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x4c, - 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, + 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, + 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, + 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, + 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, + 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, + 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, + 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, + 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, + 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, + 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, + 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, + 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, + 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, + 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, + 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, - 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, - 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, - 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, - 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) + 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, + 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, + 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, + 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -6602,94 +6332,6 @@ func file_client_proto_rawDescGZIP() []byte { return file_client_proto_rawDescData } -<<<<<<< HEAD -var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 8) -var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 58) -var file_client_proto_goTypes = []any{ - (AddressType)(0), // 0: looprpc.AddressType - (SwapType)(0), // 1: looprpc.SwapType - (SwapState)(0), // 2: looprpc.SwapState - (FailureReason)(0), // 3: looprpc.FailureReason - (LiquidityRuleType)(0), // 4: looprpc.LiquidityRuleType - (AutoReason)(0), // 5: looprpc.AutoReason - (DepositState)(0), // 6: looprpc.DepositState - (ListSwapsFilter_SwapTypeFilter)(0), // 7: looprpc.ListSwapsFilter.SwapTypeFilter - (*LoopOutRequest)(nil), // 8: looprpc.LoopOutRequest - (*LoopInRequest)(nil), // 9: looprpc.LoopInRequest - (*SwapResponse)(nil), // 10: looprpc.SwapResponse - (*MonitorRequest)(nil), // 11: looprpc.MonitorRequest - (*SwapStatus)(nil), // 12: looprpc.SwapStatus - (*ListSwapsRequest)(nil), // 13: looprpc.ListSwapsRequest - (*ListSwapsFilter)(nil), // 14: looprpc.ListSwapsFilter - (*ListSwapsResponse)(nil), // 15: looprpc.ListSwapsResponse - (*SwapInfoRequest)(nil), // 16: looprpc.SwapInfoRequest - (*TermsRequest)(nil), // 17: looprpc.TermsRequest - (*InTermsResponse)(nil), // 18: looprpc.InTermsResponse - (*OutTermsResponse)(nil), // 19: looprpc.OutTermsResponse - (*QuoteRequest)(nil), // 20: looprpc.QuoteRequest - (*InQuoteResponse)(nil), // 21: looprpc.InQuoteResponse - (*OutQuoteResponse)(nil), // 22: looprpc.OutQuoteResponse - (*ProbeRequest)(nil), // 23: looprpc.ProbeRequest - (*ProbeResponse)(nil), // 24: looprpc.ProbeResponse - (*TokensRequest)(nil), // 25: looprpc.TokensRequest - (*TokensResponse)(nil), // 26: looprpc.TokensResponse - (*FetchL402TokenRequest)(nil), // 27: looprpc.FetchL402TokenRequest - (*FetchL402TokenResponse)(nil), // 28: looprpc.FetchL402TokenResponse - (*L402Token)(nil), // 29: looprpc.L402Token - (*LoopStats)(nil), // 30: looprpc.LoopStats - (*GetInfoRequest)(nil), // 31: looprpc.GetInfoRequest - (*GetInfoResponse)(nil), // 32: looprpc.GetInfoResponse - (*GetLiquidityParamsRequest)(nil), // 33: looprpc.GetLiquidityParamsRequest - (*LiquidityParameters)(nil), // 34: looprpc.LiquidityParameters - (*LiquidityRule)(nil), // 35: looprpc.LiquidityRule - (*SetLiquidityParamsRequest)(nil), // 36: looprpc.SetLiquidityParamsRequest - (*SetLiquidityParamsResponse)(nil), // 37: looprpc.SetLiquidityParamsResponse - (*SuggestSwapsRequest)(nil), // 38: looprpc.SuggestSwapsRequest - (*Disqualified)(nil), // 39: looprpc.Disqualified - (*SuggestSwapsResponse)(nil), // 40: looprpc.SuggestSwapsResponse - (*AbandonSwapRequest)(nil), // 41: looprpc.AbandonSwapRequest - (*AbandonSwapResponse)(nil), // 42: looprpc.AbandonSwapResponse - (*ListReservationsRequest)(nil), // 43: looprpc.ListReservationsRequest - (*ListReservationsResponse)(nil), // 44: looprpc.ListReservationsResponse - (*ClientReservation)(nil), // 45: looprpc.ClientReservation - (*InstantOutRequest)(nil), // 46: looprpc.InstantOutRequest - (*InstantOutResponse)(nil), // 47: looprpc.InstantOutResponse - (*InstantOutQuoteRequest)(nil), // 48: looprpc.InstantOutQuoteRequest - (*InstantOutQuoteResponse)(nil), // 49: looprpc.InstantOutQuoteResponse - (*ListInstantOutsRequest)(nil), // 50: looprpc.ListInstantOutsRequest - (*ListInstantOutsResponse)(nil), // 51: looprpc.ListInstantOutsResponse - (*InstantOut)(nil), // 52: looprpc.InstantOut - (*NewStaticAddressRequest)(nil), // 53: looprpc.NewStaticAddressRequest - (*NewStaticAddressResponse)(nil), // 54: looprpc.NewStaticAddressResponse - (*ListUnspentDepositsRequest)(nil), // 55: looprpc.ListUnspentDepositsRequest - (*ListUnspentDepositsResponse)(nil), // 56: looprpc.ListUnspentDepositsResponse - (*Utxo)(nil), // 57: looprpc.Utxo - (*WithdrawDepositsRequest)(nil), // 58: looprpc.WithdrawDepositsRequest - (*WithdrawDepositsResponse)(nil), // 59: looprpc.WithdrawDepositsResponse - (*OutPoint)(nil), // 60: looprpc.OutPoint - (*StaticAddressSummaryRequest)(nil), // 61: looprpc.StaticAddressSummaryRequest - (*StaticAddressSummaryResponse)(nil), // 62: looprpc.StaticAddressSummaryResponse - (*Deposit)(nil), // 63: looprpc.Deposit - (*StaticAddressLoopInRequest)(nil), // 64: looprpc.StaticAddressLoopInRequest - (*StaticAddressLoopInResponse)(nil), // 65: looprpc.StaticAddressLoopInResponse - (*swapserverrpc.RouteHint)(nil), // 66: looprpc.RouteHint -} -var file_client_proto_depIdxs = []int32{ - 0, // 0: looprpc.LoopOutRequest.account_addr_type:type_name -> looprpc.AddressType - 66, // 1: looprpc.LoopInRequest.route_hints:type_name -> looprpc.RouteHint - 1, // 2: looprpc.SwapStatus.type:type_name -> looprpc.SwapType - 2, // 3: looprpc.SwapStatus.state:type_name -> looprpc.SwapState - 3, // 4: looprpc.SwapStatus.failure_reason:type_name -> looprpc.FailureReason - 14, // 5: looprpc.ListSwapsRequest.list_swap_filter:type_name -> looprpc.ListSwapsFilter - 7, // 6: looprpc.ListSwapsFilter.swap_type:type_name -> looprpc.ListSwapsFilter.SwapTypeFilter - 12, // 7: looprpc.ListSwapsResponse.swaps:type_name -> looprpc.SwapStatus - 66, // 8: looprpc.QuoteRequest.loop_in_route_hints:type_name -> looprpc.RouteHint - 66, // 9: looprpc.ProbeRequest.route_hints:type_name -> looprpc.RouteHint - 29, // 10: looprpc.TokensResponse.tokens:type_name -> looprpc.L402Token - 30, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats - 30, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats - 35, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule -======= var file_client_proto_enumTypes = make([]protoimpl.EnumInfo, 9) var file_client_proto_msgTypes = make([]protoimpl.MessageInfo, 63) var file_client_proto_goTypes = []any{ @@ -6782,84 +6424,11 @@ var file_client_proto_depIdxs = []int32{ 31, // 11: looprpc.GetInfoResponse.loop_out_stats:type_name -> looprpc.LoopStats 31, // 12: looprpc.GetInfoResponse.loop_in_stats:type_name -> looprpc.LoopStats 36, // 13: looprpc.LiquidityParameters.rules:type_name -> looprpc.LiquidityRule ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) 0, // 14: looprpc.LiquidityParameters.account_addr_type:type_name -> looprpc.AddressType 1, // 15: looprpc.LiquidityRule.swap_type:type_name -> looprpc.SwapType 4, // 16: looprpc.LiquidityRule.type:type_name -> looprpc.LiquidityRuleType 35, // 17: looprpc.SetLiquidityParamsRequest.parameters:type_name -> looprpc.LiquidityParameters 5, // 18: looprpc.Disqualified.reason:type_name -> looprpc.AutoReason -<<<<<<< HEAD - 8, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest - 9, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest - 39, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified - 45, // 22: looprpc.ListReservationsResponse.reservations:type_name -> looprpc.ClientReservation - 52, // 23: looprpc.ListInstantOutsResponse.swaps:type_name -> looprpc.InstantOut - 57, // 24: looprpc.ListUnspentDepositsResponse.utxos:type_name -> looprpc.Utxo - 60, // 25: looprpc.WithdrawDepositsRequest.outpoints:type_name -> looprpc.OutPoint - 6, // 26: looprpc.StaticAddressSummaryRequest.state_filter:type_name -> looprpc.DepositState - 63, // 27: looprpc.StaticAddressSummaryResponse.filtered_deposits:type_name -> looprpc.Deposit - 6, // 28: looprpc.Deposit.state:type_name -> looprpc.DepositState - 66, // 29: looprpc.StaticAddressLoopInRequest.route_hints:type_name -> looprpc.RouteHint - 8, // 30: looprpc.SwapClient.LoopOut:input_type -> looprpc.LoopOutRequest - 9, // 31: looprpc.SwapClient.LoopIn:input_type -> looprpc.LoopInRequest - 11, // 32: looprpc.SwapClient.Monitor:input_type -> looprpc.MonitorRequest - 13, // 33: looprpc.SwapClient.ListSwaps:input_type -> looprpc.ListSwapsRequest - 16, // 34: looprpc.SwapClient.SwapInfo:input_type -> looprpc.SwapInfoRequest - 41, // 35: looprpc.SwapClient.AbandonSwap:input_type -> looprpc.AbandonSwapRequest - 17, // 36: looprpc.SwapClient.LoopOutTerms:input_type -> looprpc.TermsRequest - 20, // 37: looprpc.SwapClient.LoopOutQuote:input_type -> looprpc.QuoteRequest - 17, // 38: looprpc.SwapClient.GetLoopInTerms:input_type -> looprpc.TermsRequest - 20, // 39: looprpc.SwapClient.GetLoopInQuote:input_type -> looprpc.QuoteRequest - 23, // 40: looprpc.SwapClient.Probe:input_type -> looprpc.ProbeRequest - 25, // 41: looprpc.SwapClient.GetL402Tokens:input_type -> looprpc.TokensRequest - 25, // 42: looprpc.SwapClient.GetLsatTokens:input_type -> looprpc.TokensRequest - 27, // 43: looprpc.SwapClient.FetchL402Token:input_type -> looprpc.FetchL402TokenRequest - 31, // 44: looprpc.SwapClient.GetInfo:input_type -> looprpc.GetInfoRequest - 33, // 45: looprpc.SwapClient.GetLiquidityParams:input_type -> looprpc.GetLiquidityParamsRequest - 36, // 46: looprpc.SwapClient.SetLiquidityParams:input_type -> looprpc.SetLiquidityParamsRequest - 38, // 47: looprpc.SwapClient.SuggestSwaps:input_type -> looprpc.SuggestSwapsRequest - 43, // 48: looprpc.SwapClient.ListReservations:input_type -> looprpc.ListReservationsRequest - 46, // 49: looprpc.SwapClient.InstantOut:input_type -> looprpc.InstantOutRequest - 48, // 50: looprpc.SwapClient.InstantOutQuote:input_type -> looprpc.InstantOutQuoteRequest - 50, // 51: looprpc.SwapClient.ListInstantOuts:input_type -> looprpc.ListInstantOutsRequest - 53, // 52: looprpc.SwapClient.NewStaticAddress:input_type -> looprpc.NewStaticAddressRequest - 55, // 53: looprpc.SwapClient.ListUnspentDeposits:input_type -> looprpc.ListUnspentDepositsRequest - 58, // 54: looprpc.SwapClient.WithdrawDeposits:input_type -> looprpc.WithdrawDepositsRequest - 61, // 55: looprpc.SwapClient.GetStaticAddressSummary:input_type -> looprpc.StaticAddressSummaryRequest - 64, // 56: looprpc.SwapClient.StaticAddressLoopIn:input_type -> looprpc.StaticAddressLoopInRequest - 10, // 57: looprpc.SwapClient.LoopOut:output_type -> looprpc.SwapResponse - 10, // 58: looprpc.SwapClient.LoopIn:output_type -> looprpc.SwapResponse - 12, // 59: looprpc.SwapClient.Monitor:output_type -> looprpc.SwapStatus - 15, // 60: looprpc.SwapClient.ListSwaps:output_type -> looprpc.ListSwapsResponse - 12, // 61: looprpc.SwapClient.SwapInfo:output_type -> looprpc.SwapStatus - 42, // 62: looprpc.SwapClient.AbandonSwap:output_type -> looprpc.AbandonSwapResponse - 19, // 63: looprpc.SwapClient.LoopOutTerms:output_type -> looprpc.OutTermsResponse - 22, // 64: looprpc.SwapClient.LoopOutQuote:output_type -> looprpc.OutQuoteResponse - 18, // 65: looprpc.SwapClient.GetLoopInTerms:output_type -> looprpc.InTermsResponse - 21, // 66: looprpc.SwapClient.GetLoopInQuote:output_type -> looprpc.InQuoteResponse - 24, // 67: looprpc.SwapClient.Probe:output_type -> looprpc.ProbeResponse - 26, // 68: looprpc.SwapClient.GetL402Tokens:output_type -> looprpc.TokensResponse - 26, // 69: looprpc.SwapClient.GetLsatTokens:output_type -> looprpc.TokensResponse - 28, // 70: looprpc.SwapClient.FetchL402Token:output_type -> looprpc.FetchL402TokenResponse - 32, // 71: looprpc.SwapClient.GetInfo:output_type -> looprpc.GetInfoResponse - 34, // 72: looprpc.SwapClient.GetLiquidityParams:output_type -> looprpc.LiquidityParameters - 37, // 73: looprpc.SwapClient.SetLiquidityParams:output_type -> looprpc.SetLiquidityParamsResponse - 40, // 74: looprpc.SwapClient.SuggestSwaps:output_type -> looprpc.SuggestSwapsResponse - 44, // 75: looprpc.SwapClient.ListReservations:output_type -> looprpc.ListReservationsResponse - 47, // 76: looprpc.SwapClient.InstantOut:output_type -> looprpc.InstantOutResponse - 49, // 77: looprpc.SwapClient.InstantOutQuote:output_type -> looprpc.InstantOutQuoteResponse - 51, // 78: looprpc.SwapClient.ListInstantOuts:output_type -> looprpc.ListInstantOutsResponse - 54, // 79: looprpc.SwapClient.NewStaticAddress:output_type -> looprpc.NewStaticAddressResponse - 56, // 80: looprpc.SwapClient.ListUnspentDeposits:output_type -> looprpc.ListUnspentDepositsResponse - 59, // 81: looprpc.SwapClient.WithdrawDeposits:output_type -> looprpc.WithdrawDepositsResponse - 62, // 82: looprpc.SwapClient.GetStaticAddressSummary:output_type -> looprpc.StaticAddressSummaryResponse - 65, // 83: looprpc.SwapClient.StaticAddressLoopIn:output_type -> looprpc.StaticAddressLoopInResponse - 57, // [57:84] is the sub-list for method output_type - 30, // [30:57] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name -======= 9, // 19: looprpc.SuggestSwapsResponse.loop_out:type_name -> looprpc.LoopOutRequest 10, // 20: looprpc.SuggestSwapsResponse.loop_in:type_name -> looprpc.LoopInRequest 40, // 21: looprpc.SuggestSwapsResponse.disqualified:type_name -> looprpc.Disqualified @@ -6936,7 +6505,6 @@ var file_client_proto_depIdxs = []int32{ 32, // [32:32] is the sub-list for extension type_name 32, // [32:32] is the sub-list for extension extendee 0, // [0:32] is the sub-list for field type_name ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } func init() { file_client_proto_init() } @@ -7665,9 +7233,6 @@ func file_client_proto_init() { return nil } } -<<<<<<< HEAD - file_client_proto_msgTypes[56].Exporter = func(v any, i int) any { -======= file_client_proto_msgTypes[60].Exporter = func(v any, i int) any { switch v := v.(*StaticAddressLoopInSwap); i { case 0: @@ -7681,7 +7246,6 @@ func file_client_proto_init() { } } file_client_proto_msgTypes[61].Exporter = func(v any, i int) any { ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) switch v := v.(*StaticAddressLoopInRequest); i { case 0: return &v.state @@ -7693,11 +7257,7 @@ func file_client_proto_init() { return nil } } -<<<<<<< HEAD - file_client_proto_msgTypes[57].Exporter = func(v any, i int) any { -======= file_client_proto_msgTypes[62].Exporter = func(v any, i int) any { ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) switch v := v.(*StaticAddressLoopInResponse); i { case 0: return &v.state @@ -7715,13 +7275,8 @@ func file_client_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_client_proto_rawDesc, -<<<<<<< HEAD - NumEnums: 8, - NumMessages: 58, -======= NumEnums: 9, NumMessages: 63, ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) NumExtensions: 0, NumServices: 1, }, diff --git a/looprpc/client.proto b/looprpc/client.proto index f1f44c42a..ee7cf73c8 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -1855,23 +1855,19 @@ enum StaticAddressLoopInSwapState { /* */ - FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX = 8; + SUCCEEDED = 8; /* */ - SUCCEEDED = 9; + SUCCEEDED_TRANSITIONING_FAILED = 9; /* */ - SUCCEEDED_SWEEPLESS_SIG_FAILED = 10; + UNLOCK_DEPOSITS = 10; /* */ - UNLOCK_DEPOSITS = 11; - - /* - */ - FAILED_STATIC_ADDRESS_SWAP = 12; + FAILED_STATIC_ADDRESS_SWAP = 11; } message StaticAddressLoopInRequest { diff --git a/looprpc/client.swagger.json b/looprpc/client.swagger.json index fa7c3e80c..8c18c1665 100644 --- a/looprpc/client.swagger.json +++ b/looprpc/client.swagger.json @@ -1594,8 +1594,6 @@ } } }, -<<<<<<< HEAD -======= "looprpcStaticAddressLoopInSwap": { "type": "object", "properties": { @@ -1636,15 +1634,13 @@ "SWEEP_STATIC_ADDRESS_HTLC_TIMEOUT", "MONITOR_HTLC_TIMEOUT_SWEEP", "HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT", - "FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX", "SUCCEEDED", - "SUCCEEDED_SWEEPLESS_SIG_FAILED", + "SUCCEEDED_TRANSITIONING_FAILED", "UNLOCK_DEPOSITS", "FAILED_STATIC_ADDRESS_SWAP" ], "default": "UNKNOWN_STATIC_ADDRESS_SWAP_STATE" }, ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) "looprpcStaticAddressSummaryResponse": { "type": "object", "properties": { @@ -1691,16 +1687,6 @@ "type": "string", "format": "int64", "description": "The total value of all htlc timeout sweeps that the client swept." -<<<<<<< HEAD - }, - "filtered_deposits": { - "type": "array", - "items": { - "$ref": "#/definitions/looprpcDeposit" - }, - "description": "A list of all deposits that match the filtered state." -======= ->>>>>>> 3995e99a (staticaddr: cmd listdeposits and listswaps) } } }, diff --git a/staticaddr/loopin/actions.go b/staticaddr/loopin/actions.go index 48ff03974..992da27a9 100644 --- a/staticaddr/loopin/actions.go +++ b/staticaddr/loopin/actions.go @@ -776,189 +776,7 @@ func (f *FSM) PaymentReceivedAction(ctx context.Context, return f.HandleError(err) } - return OnFetchSignPushSweeplessSweepTx -} - -// FetchSignPushSweeplessSweepTxAction requests server nonces, fee rate and -// destination address for the sweepless sweep transaction. It then creates the -// sweep transaction and signs it with the server and client nonces. If signing -// succeeds it pushes the signatures to the server. -func (f *FSM) FetchSignPushSweeplessSweepTxAction(ctx context.Context, - _ fsm.EventContext) fsm.EventType { - - // Fetch the sweepless sweep tx details from server. - fetchReq := &looprpc.FetchSweeplessSweepTxRequest{ - SwapHash: f.loopIn.SwapHash[:], - } - fetchResp, err := f.cfg.Server.FetchSweeplessSweepTx(ctx, fetchReq) - if err != nil { - err = fmt.Errorf("unable to fetch sweepless sweep tx: %w", err) - - return f.HandleError(err) - } - - address, err := btcutil.DecodeAddress( - fetchResp.SweepAddr, f.cfg.ChainParams, - ) - if err != nil { - f.Warnf("unable to decode sweep address: %v", err) - } - - // Standard fee. - feeRate := chainfee.SatPerKWeight(fetchResp.StandardFeeInfo.FeeRate) - serverNonces, err := toNonces(fetchResp.StandardFeeInfo.Nonces) - if err != nil { - err = fmt.Errorf("unable to convert server nonces: %w", err) - - return f.HandleError(err) - } - - // High fee. - highFeeRate := chainfee.SatPerKWeight(fetchResp.HighFeeInfo.FeeRate) - serverHighFeeNonces, err := toNonces(fetchResp.HighFeeInfo.Nonces) - if err != nil { - err = fmt.Errorf("unable to convert high fee server "+ - "nonces: %w", err) - - return f.HandleError(err) - } - - // Extremely high fee. - extremeFeeRate := chainfee.SatPerKWeight( - fetchResp.ExtremeFeeInfo.FeeRate, - ) - serverExtremeNonces, err := toNonces( - fetchResp.ExtremeFeeInfo.Nonces, - ) - if err != nil { - err = fmt.Errorf("unable to convert extremely high fee "+ - "server nonces: %w", err) - - return f.HandleError(err) - } - - // Standard sessions. - sessions, nonces, err := f.loopIn.createMusig2Sessions( - ctx, f.cfg.Signer, - ) - if err != nil { - return f.HandleError(err) - } - clientNonces, err := toNonces(nonces) - if err != nil { - return f.HandleError(err) - } - - // High fee sessions. - highFeeSessions, highFeeClientNonces, err := - f.loopIn.createMusig2Sessions(ctx, f.cfg.Signer) - - if err != nil { - return f.HandleError(err) - } - highClientNonces, err := toNonces(highFeeClientNonces) - if err != nil { - return f.HandleError(err) - } - - // Extremely high sessions. - extremeSessions, extremeClientNonces, err := - f.loopIn.createMusig2Sessions(ctx, f.cfg.Signer) - - if err != nil { - return f.HandleError(err) - } - extremelyHighClientNonces, err := toNonces(extremeClientNonces) - if err != nil { - return f.HandleError(err) - } - - // Create standard fee. - sweepTx, err := f.loopIn.createSweeplessSweepTx(address, feeRate) - if err != nil { - err = fmt.Errorf("unable to create sweepless sweep tx: %w", err) - return f.HandleError(err) - } - - // Create high fee. - highFeeSweepTx, err := f.loopIn.createSweeplessSweepTx( - address, highFeeRate, - ) - if err != nil { - err = fmt.Errorf("unable to create high fee sweepless sweep "+ - "tx: %w", err) - - return f.HandleError(err) - } - - // Create extremely high fee. - extremelyHighFeeSweepTx, err := f.loopIn.createSweeplessSweepTx( - address, extremeFeeRate, - ) - if err != nil { - err = fmt.Errorf("unable to create extremely high fee "+ - "sweepless sweep tx: %w", err) - - return f.HandleError(err) - } - - // Sign standard. - sweeplessClientSigs, err := f.loopIn.signMusig2Tx( - ctx, sweepTx, f.cfg.Signer, sessions, serverNonces, - ) - if err != nil { - err = fmt.Errorf("unable to sign sweepless sweep tx: %w", err) - return f.HandleError(err) - } - - // Sign high fee. - highFeeSigs, err := f.loopIn.signMusig2Tx( - ctx, highFeeSweepTx, f.cfg.Signer, highFeeSessions, - serverHighFeeNonces, - ) - if err != nil { - err = fmt.Errorf("unable to sign high fee sweepless sweep "+ - "tx: %w", err) - - return f.HandleError(err) - } - - // Sign extremely high fee. - extremelyHighSigs, err := f.loopIn.signMusig2Tx( - ctx, extremelyHighFeeSweepTx, f.cfg.Signer, extremeSessions, - serverExtremeNonces, - ) - if err != nil { - err = fmt.Errorf("unable to sign extremely high fee "+ - "sweepless sweep tx: %w", err) - - return f.HandleError(err) - } - - // Push sweepless sigs to the server. - req := &looprpc.PushStaticAddressSweeplessSigsRequest{ - SwapHash: f.loopIn.SwapHash[:], - StandardSigningInfo: &looprpc.ClientSweeplessSigningInfo{ - Nonces: fromNonces(clientNonces), - Sigs: sweeplessClientSigs, - }, - HighFeeSigningInfo: &looprpc.ClientSweeplessSigningInfo{ - Nonces: fromNonces(highClientNonces), - Sigs: highFeeSigs, - }, - ExtremeFeeSigningInfo: &looprpc.ClientSweeplessSigningInfo{ - Nonces: fromNonces(extremelyHighClientNonces), - Sigs: extremelyHighSigs, - }, - } - _, err = f.cfg.Server.PushStaticAddressSweeplessSigs(ctx, req) - if err != nil { - err = fmt.Errorf("unable to push sweepless sweep sigs: %w", err) - - return f.HandleError(err) - } - - return OnSweeplessSweepSigned + return OnSucceeded } // UnlockDepositsAction is called if the loop-in failed and its deposits should @@ -1056,14 +874,3 @@ func byteSliceTo66ByteSlice(b []byte) ([musig2.PubNonceSize]byte, error) { return res, nil } - -func fromNonces(nonces [][musig2.PubNonceSize]byte) [][]byte { - result := make([][]byte, 0, len(nonces)) - for _, nonce := range nonces { - temp := make([]byte, musig2.PubNonceSize) - copy(temp, nonce[:]) - result = append(result, temp) - } - - return result -} diff --git a/staticaddr/loopin/fsm.go b/staticaddr/loopin/fsm.go index 8c16d1eb0..43e7cdf8f 100644 --- a/staticaddr/loopin/fsm.go +++ b/staticaddr/loopin/fsm.go @@ -111,18 +111,13 @@ var ( // transaction was sufficiently confirmed. HtlcTimeoutSwept = fsm.StateType("HtlcTimeoutSwept") - // FetchSignPushSweeplessSweepTx is the state where the client fetches, - // signs and pushes the sweepless sweep tx signatures to the server. - FetchSignPushSweeplessSweepTx = fsm.StateType("FetchSignPushSweeplessSweepTx") //nolint:lll - // Succeeded is the state the swap is in if it was successful. Succeeded = fsm.StateType("Succeeded") - // SucceededSweeplessSigFailed is the state the swap is in if the swap - // payment was received but the client failed to sign the sweepless - // sweep transaction. This is considered a successful case from the - // client's perspective. - SucceededSweeplessSigFailed = fsm.StateType("SucceededSweeplessSigFailed") //nolint:lll + // SucceededTransitioningFailed is the state the swap is in if the swap + // payment was received but the client was not able to transition + // the deposits to the looped-in state. + SucceededTransitioningFailed = fsm.StateType("SucceededTransitioningFailed") //nolint:lll // UnlockDeposits is the state where the deposits are reset. This // happens when the state machine encountered an error and the swap @@ -135,30 +130,29 @@ var ( var PendingStates = []fsm.StateType{ InitHtlcTx, SignHtlcTx, MonitorInvoiceAndHtlcTx, PaymentReceived, - SweepHtlcTimeout, MonitorHtlcTimeoutSweep, FetchSignPushSweeplessSweepTx, + SweepHtlcTimeout, MonitorHtlcTimeoutSweep, UnlockDeposits, } var FinalStates = []fsm.StateType{ - HtlcTimeoutSwept, Succeeded, SucceededSweeplessSigFailed, Failed, + HtlcTimeoutSwept, Succeeded, SucceededTransitioningFailed, Failed, } var AllStates = append(PendingStates, FinalStates...) // Events. var ( - OnInitHtlc = fsm.EventType("OnInitHtlc") - OnHtlcInitiated = fsm.EventType("OnHtlcInitiated") - OnHtlcTxSigned = fsm.EventType("OnHtlcTxSigned") - OnSweepHtlcTimeout = fsm.EventType("OnSweepHtlcTimeout") - OnHtlcTimeoutSweepPublished = fsm.EventType("OnHtlcTimeoutSweepPublished") - OnHtlcTimeoutSwept = fsm.EventType("OnHtlcTimeoutSwept") - OnPaymentReceived = fsm.EventType("OnPaymentReceived") - OnPaymentDeadlineExceeded = fsm.EventType("OnPaymentDeadlineExceeded") - OnSwapTimedOut = fsm.EventType("OnSwapTimedOut") - OnFetchSignPushSweeplessSweepTx = fsm.EventType("OnFetchSignPushSweeplessSweepTx") - OnSweeplessSweepSigned = fsm.EventType("OnSweeplessSweepSigned") - OnRecover = fsm.EventType("OnRecover") + OnInitHtlc = fsm.EventType("OnInitHtlc") + OnHtlcInitiated = fsm.EventType("OnHtlcInitiated") + OnHtlcTxSigned = fsm.EventType("OnHtlcTxSigned") + OnSweepHtlcTimeout = fsm.EventType("OnSweepHtlcTimeout") + OnHtlcTimeoutSweepPublished = fsm.EventType("OnHtlcTimeoutSweepPublished") + OnHtlcTimeoutSwept = fsm.EventType("OnHtlcTimeoutSwept") + OnPaymentReceived = fsm.EventType("OnPaymentReceived") + OnPaymentDeadlineExceeded = fsm.EventType("OnPaymentDeadlineExceeded") + OnSwapTimedOut = fsm.EventType("OnSwapTimedOut") + OnSucceeded = fsm.EventType("OnSucceeded") + OnRecover = fsm.EventType("OnRecover") ) // LoopInStatesV0 returns the state and transition map for the loop-in state @@ -215,27 +209,19 @@ func (f *FSM) LoopInStatesV0() fsm.States { }, PaymentReceived: fsm.State{ Transitions: fsm.Transitions{ - OnFetchSignPushSweeplessSweepTx: FetchSignPushSweeplessSweepTx, - OnRecover: SucceededSweeplessSigFailed, - fsm.OnError: SucceededSweeplessSigFailed, + OnSucceeded: Succeeded, + OnRecover: Succeeded, + fsm.OnError: SucceededTransitioningFailed, }, Action: f.PaymentReceivedAction, }, - FetchSignPushSweeplessSweepTx: fsm.State{ - Transitions: fsm.Transitions{ - OnSweeplessSweepSigned: Succeeded, - OnRecover: SucceededSweeplessSigFailed, - fsm.OnError: SucceededSweeplessSigFailed, - }, - Action: f.FetchSignPushSweeplessSweepTxAction, - }, HtlcTimeoutSwept: fsm.State{ Action: fsm.NoOpAction, }, Succeeded: fsm.State{ Action: fsm.NoOpAction, }, - SucceededSweeplessSigFailed: fsm.State{ + SucceededTransitioningFailed: fsm.State{ Action: fsm.NoOpAction, }, UnlockDeposits: fsm.State{ From f8599ba20aebf9baf09eaed017a54f867d47af4b Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:35:04 +0100 Subject: [PATCH 62/67] loopd/staticaddr: add ntfn manager --- loopd/daemon.go | 1 + loopd/swapclient_server.go | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/loopd/daemon.go b/loopd/daemon.go index 96af9d902..5f7d25808 100644 --- a/loopd/daemon.go +++ b/loopd/daemon.go @@ -638,6 +638,7 @@ func (d *Daemon) initialize(withMacaroonService bool) error { Store: staticAddressLoopInStore, WalletKit: d.lnd.WalletKit, ChainNotifier: d.lnd.ChainNotifier, + NotificationManager: notificationManager, ChainParams: d.lnd.ChainParams, Signer: d.lnd.Signer, ValidateLoopInContract: loop.ValidateLoopInContract, diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 809ad7a5a..6eb5beefa 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -1796,14 +1796,11 @@ func toClientStaticAddressLoopInState( case loopin.HtlcTimeoutSwept: return looprpc.StaticAddressLoopInSwapState_HTLC_STATIC_ADDRESS_TIMEOUT_SWEPT - case loopin.FetchSignPushSweeplessSweepTx: - return looprpc.StaticAddressLoopInSwapState_FETCH_SIGN_PUSH_SWEEPLESS_SWEEP_TX - case loopin.Succeeded: return looprpc.StaticAddressLoopInSwapState_SUCCEEDED - case loopin.SucceededSweeplessSigFailed: - return looprpc.StaticAddressLoopInSwapState_SUCCEEDED_SWEEPLESS_SIG_FAILED + case loopin.SucceededTransitioningFailed: + return looprpc.StaticAddressLoopInSwapState_SUCCEEDED_TRANSITIONING_FAILED case loopin.UnlockDeposits: return looprpc.StaticAddressLoopInSwapState_UNLOCK_DEPOSITS From c1f3f75db307a79ae9ccf07a16608a9a4bc1f608 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Thu, 14 Nov 2024 15:36:03 +0100 Subject: [PATCH 63/67] staticaddr/loopin: remove unused code --- staticaddr/address/manager_test.go | 11 ----- staticaddr/deposit/manager_test.go | 11 ----- staticaddr/loopin/loopin.go | 68 ------------------------------ 3 files changed, 90 deletions(-) diff --git a/staticaddr/address/manager_test.go b/staticaddr/address/manager_test.go index 101cef582..68161050c 100644 --- a/staticaddr/address/manager_test.go +++ b/staticaddr/address/manager_test.go @@ -54,17 +54,6 @@ func (m *mockStaticAddressClient) PushStaticAddressSweeplessSigs(ctx context.Con args.Error(1) } -func (m *mockStaticAddressClient) FetchSweeplessSweepTx(ctx context.Context, - in *swapserverrpc.FetchSweeplessSweepTxRequest, - opts ...grpc.CallOption) ( - *swapserverrpc.FetchSweeplessSweepTxResponse, error) { - - args := m.Called(ctx, in, opts) - - return args.Get(0).(*swapserverrpc.FetchSweeplessSweepTxResponse), - args.Error(1) -} - func (m *mockStaticAddressClient) PushStaticAddressHtlcSigs(ctx context.Context, in *swapserverrpc.PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) ( diff --git a/staticaddr/deposit/manager_test.go b/staticaddr/deposit/manager_test.go index 009f0c4fe..d943a32f6 100644 --- a/staticaddr/deposit/manager_test.go +++ b/staticaddr/deposit/manager_test.go @@ -73,17 +73,6 @@ func (m *mockStaticAddressClient) PushStaticAddressSweeplessSigs(ctx context.Con args.Error(1) } -func (m *mockStaticAddressClient) FetchSweeplessSweepTx(ctx context.Context, - in *swapserverrpc.FetchSweeplessSweepTxRequest, - opts ...grpc.CallOption) ( - *swapserverrpc.FetchSweeplessSweepTxResponse, error) { - - args := m.Called(ctx, in, opts) - - return args.Get(0).(*swapserverrpc.FetchSweeplessSweepTxResponse), - args.Error(1) -} - func (m *mockStaticAddressClient) PushStaticAddressHtlcSigs(ctx context.Context, in *swapserverrpc.PushStaticAddressHtlcSigsRequest, opts ...grpc.CallOption) ( diff --git a/staticaddr/loopin/loopin.go b/staticaddr/loopin/loopin.go index 4318c4b6e..aa7c3a2da 100644 --- a/staticaddr/loopin/loopin.go +++ b/staticaddr/loopin/loopin.go @@ -198,74 +198,6 @@ func (l *StaticAddressLoopIn) createMusig2Session(ctx context.Context, ) } -// createSweeplessSweepTx creates the sweepless sweep transaction that the -// server wishes to publish. It spends the deposit outpoints to a -// server-specified sweep address. -func (l *StaticAddressLoopIn) createSweeplessSweepTx(address btcutil.Address, - feeRate chainfee.SatPerKWeight) (*wire.MsgTx, error) { - // Create the tx. - msgTx := wire.NewMsgTx(2) - - // Add the deposit inputs to the transaction in the order the server - // signed them. - outpoints := l.Outpoints() - for _, outpoint := range outpoints { - msgTx.AddTxIn(&wire.TxIn{ - PreviousOutPoint: outpoint, - }) - } - - // Calculate tx fee for the server provided fee rate. - weight, err := sweeplessSweepWeight(len(outpoints), address) - if err != nil { - return nil, err - } - fee := feeRate.FeeForWeight(weight) - - pkscript, err := txscript.PayToAddrScript(address) - if err != nil { - return nil, err - } - - // Create the sweep output. - sweepOutput := &wire.TxOut{ - Value: int64(l.TotalDepositAmount()) - int64(fee), - PkScript: pkscript, - } - - msgTx.AddTxOut(sweepOutput) - - return msgTx, nil -} - -// sweeplessSweepWeight returns weight units for a sweepless sweep transaction -// with N taproot inputs and one sweep output. -func sweeplessSweepWeight(numInputs int, - sweepAddress btcutil.Address) (lntypes.WeightUnit, error) { - - var weightEstimator input.TxWeightEstimator - for i := 0; i < numInputs; i++ { - weightEstimator.AddTaprootKeySpendInput( - txscript.SigHashDefault, - ) - } - - // Get the weight of the sweep output. - switch sweepAddress.(type) { - case *btcutil.AddressWitnessPubKeyHash: - weightEstimator.AddP2WKHOutput() - - case *btcutil.AddressTaproot: - weightEstimator.AddP2TROutput() - - default: - return 0, fmt.Errorf("invalid sweep address type %T", - sweepAddress) - } - - return weightEstimator.Weight(), nil -} - // signMusig2Tx adds the server nonces to the musig2 sessions and signs the // transaction. func (l *StaticAddressLoopIn) signMusig2Tx(ctx context.Context, From c2281b82b28e5980e743d7ef4a610edb1f34d6f5 Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Mon, 18 Nov 2024 17:53:11 +0100 Subject: [PATCH 64/67] loopcli/staticaddr: explicit loop in command --- cmd/loop/staticaddr.go | 70 +++++++++++++++++++++++------------------- 1 file changed, 38 insertions(+), 32 deletions(-) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index 703845e68..41d1c0040 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -29,38 +29,8 @@ var staticAddressCommands = cli.Command{ listStaticAddressSwapsCommand, withdrawalCommand, summaryCommand, + staticAddressLoopInCommand, }, - Description: ` - Requests a loop-in swap based on static address deposits. After the - creation of a static address funds can be send to it. Once the funds are - confirmed on-chain they can be swapped instantaneously. If deposited - funds are not needed they can we withdrawn back to the local lnd wallet. - `, - Flags: []cli.Flag{ - cli.StringSliceFlag{ - Name: "utxo", - Usage: "specify the utxos of deposits as " + - "outpoints(tx:idx) that should be looped in.", - }, - cli.BoolFlag{ - Name: "all", - Usage: "loop in all static address deposits.", - }, - cli.DurationFlag{ - Name: "payment_timeout", - Usage: "the maximum time in seconds that the server " + - "is allowed to take for the swap payment. " + - "The client can retry the swap with adjusted " + - "parameters after the payment timed out.", - }, - lastHopFlag, - labelFlag, - routeHintsFlag, - privateFlag, - forceFlag, - verboseFlag, - }, - Action: staticAddressLoopIn, } var newStaticAddressCommand = cli.Command{ @@ -427,9 +397,45 @@ func NewProtoOutPoint(op string) (*looprpc.OutPoint, error) { }, nil } +var staticAddressLoopInCommand = cli.Command{ + Name: "in", + Usage: "Loop in funds from static address deposits.", + Description: ` + Requests a loop-in swap based on static address deposits. After the + creation of a static address funds can be sent to it. Once the funds are + confirmed on-chain they can be swapped instantaneously. If deposited + funds are not needed they can we withdrawn back to the local lnd wallet. + `, + Flags: []cli.Flag{ + cli.StringSliceFlag{ + Name: "utxo", + Usage: "specify the utxos of deposits as " + + "outpoints(tx:idx) that should be looped in.", + }, + cli.BoolFlag{ + Name: "all", + Usage: "loop in all static address deposits.", + }, + cli.DurationFlag{ + Name: "payment_timeout", + Usage: "the maximum time in seconds that the server " + + "is allowed to take for the swap payment. " + + "The client can retry the swap with adjusted " + + "parameters after the payment timed out.", + }, + lastHopFlag, + labelFlag, + routeHintsFlag, + privateFlag, + forceFlag, + verboseFlag, + }, + Action: staticAddressLoopIn, +} + func staticAddressLoopIn(ctx *cli.Context) error { if ctx.NumFlags() == 0 && ctx.NArg() == 0 { - return cli.ShowAppHelp(ctx) + return cli.ShowCommandHelp(ctx, "in") } client, cleanup, err := getClient(ctx) From 6982adb3239f6f752eaaf89064bffb46be42764b Mon Sep 17 00:00:00 2001 From: sputn1ck Date: Tue, 19 Nov 2024 10:47:04 +0100 Subject: [PATCH 65/67] cmd/staticaddr: hide behind build flag --- cmd/loop/main.go | 19 ++++++++++--------- cmd/loop/staticaddr.go | 7 +++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/cmd/loop/main.go b/cmd/loop/main.go index 77d788824..7fa406f59 100644 --- a/cmd/loop/main.go +++ b/cmd/loop/main.go @@ -76,6 +76,15 @@ var ( Name: "verbose, v", Usage: "show expanded details", } + + commands = []cli.Command{ + loopOutCommand, loopInCommand, termsCommand, + monitorCommand, quoteCommand, listAuthCommand, fetchL402Command, + listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand, + setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand, + getInfoCommand, abandonSwapCommand, reservationsCommands, + instantOutCommand, listInstantOutsCommand, + } ) const ( @@ -142,15 +151,7 @@ func main() { tlsCertFlag, macaroonPathFlag, } - app.Commands = []cli.Command{ - loopOutCommand, loopInCommand, termsCommand, - monitorCommand, quoteCommand, listAuthCommand, fetchL402Command, - listSwapsCommand, swapInfoCommand, getLiquidityParamsCommand, - setLiquidityRuleCommand, suggestSwapCommand, setParamsCommand, - getInfoCommand, abandonSwapCommand, reservationsCommands, - instantOutCommand, listInstantOutsCommand, - staticAddressCommands, - } + app.Commands = commands err := app.Run(os.Args) if err != nil { diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index 41d1c0040..283a4b5e6 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -1,3 +1,6 @@ +//go:build staticaddr +// +build staticaddr + package main import ( @@ -18,6 +21,10 @@ import ( "github.com/urfave/cli" ) +func init() { + commands = append(commands, staticAddressCommands) +} + var staticAddressCommands = cli.Command{ Name: "static", ShortName: "s", From 0d307333e8464d1c52a968b16de1dd7571168431 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Fri, 29 Nov 2024 14:47:26 +0100 Subject: [PATCH 66/67] looprpc: addr and fee rate for withdrawals --- looprpc/client.pb.go | 818 ++++++++++++++++++++++--------------------- looprpc/client.proto | 10 + 2 files changed, 430 insertions(+), 398 deletions(-) diff --git a/looprpc/client.pb.go b/looprpc/client.pb.go index 969d67d3d..9a585cf89 100644 --- a/looprpc/client.pb.go +++ b/looprpc/client.pb.go @@ -4426,6 +4426,10 @@ type WithdrawDepositsRequest struct { Outpoints []*OutPoint `protobuf:"bytes,1,rep,name=outpoints,proto3" json:"outpoints,omitempty"` // If set to true, all deposits will be withdrawn. All bool `protobuf:"varint,2,opt,name=all,proto3" json:"all,omitempty"` + // The address to withdraw the funds to. + DestAddr string `protobuf:"bytes,3,opt,name=dest_addr,json=destAddr,proto3" json:"dest_addr,omitempty"` + // The fee rate in sat/vbyte to use for the withdrawal transaction. + SatPerVbyte int64 `protobuf:"varint,4,opt,name=sat_per_vbyte,json=satPerVbyte,proto3" json:"sat_per_vbyte,omitempty"` } func (x *WithdrawDepositsRequest) Reset() { @@ -4474,6 +4478,20 @@ func (x *WithdrawDepositsRequest) GetAll() bool { return false } +func (x *WithdrawDepositsRequest) GetDestAddr() string { + if x != nil { + return x.DestAddr + } + return "" +} + +func (x *WithdrawDepositsRequest) GetSatPerVbyte() int64 { + if x != nil { + return x.SatPerVbyte + } + return 0 +} + type WithdrawDepositsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -5913,411 +5931,415 @@ var file_client_proto_rawDesc = []byte{ 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, - 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x5c, 0x0a, 0x17, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, - 0x69, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x22, 0x65, 0x0a, 0x18, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, - 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, - 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, - 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x54, 0x78, 0x48, 0x61, 0x73, 0x68, - 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, 0x67, 0x0a, - 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x69, - 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x74, - 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, 0x69, 0x64, - 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, 0x69, 0x64, - 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x69, 0x6e, - 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, - 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x7a, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, 0x73, 0x74, - 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, - 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, - 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x22, 0x62, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, 0x74, 0x65, - 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, - 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x73, 0x77, 0x61, - 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x05, 0x73, 0x77, 0x61, 0x70, - 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x22, 0x96, 0x04, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x6c, 0x61, - 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, - 0x76, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x12, 0x2c, - 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, 0x74, 0x61, - 0x6c, 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x3c, 0x0a, 0x1a, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x65, - 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, - 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x61, - 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, - 0x73, 0x68, 0x69, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x06, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, - 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x5f, 0x73, 0x61, - 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x53, 0x61, 0x74, 0x6f, - 0x73, 0x68, 0x69, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6c, 0x6f, - 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, - 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, 0x6f, 0x6f, - 0x70, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x4a, 0x0a, - 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x74, 0x69, 0x6d, 0x65, - 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, - 0x68, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x48, 0x74, 0x6c, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x77, 0x65, 0x65, 0x70, - 0x73, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x07, 0x44, 0x65, - 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, - 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, - 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x5f, - 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x55, 0x6e, 0x74, 0x69, 0x6c, 0x45, - 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x99, 0x02, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, - 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x2b, - 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, 0x05, 0x73, - 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, + 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x9d, 0x01, 0x0a, 0x17, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x61, 0x6c, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x03, 0x61, 0x6c, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x64, 0x65, 0x73, 0x74, 0x5f, + 0x61, 0x64, 0x64, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x73, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x12, 0x22, 0x0a, 0x0d, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, + 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x73, 0x61, 0x74, + 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x22, 0x65, 0x0a, 0x18, 0x57, 0x69, 0x74, 0x68, + 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, + 0x61, 0x6c, 0x5f, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x61, 0x6c, 0x54, 0x78, 0x48, 0x61, + 0x73, 0x68, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6b, 0x5f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x22, + 0x67, 0x0a, 0x08, 0x4f, 0x75, 0x74, 0x50, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x74, + 0x78, 0x69, 0x64, 0x5f, 0x62, 0x79, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x09, 0x74, 0x78, 0x69, 0x64, 0x42, 0x79, 0x74, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x74, 0x78, + 0x69, 0x64, 0x5f, 0x73, 0x74, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x74, 0x78, + 0x69, 0x64, 0x53, 0x74, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x22, 0x7a, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x38, 0x0a, 0x0c, + 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x22, 0x62, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x11, 0x66, 0x69, 0x6c, + 0x74, 0x65, 0x72, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x44, + 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x10, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, + 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x58, 0x0a, 0x1e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, + 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x73, + 0x77, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x77, 0x61, 0x70, - 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x77, 0x61, 0x70, 0x41, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x45, 0x0a, 0x1f, 0x70, 0x61, - 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x1c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x22, 0xc3, 0x02, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x31, - 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, - 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, - 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x14, 0x0a, 0x05, - 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, - 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, - 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, 0x74, 0x65, - 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x12, - 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, - 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0d, - 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, - 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, - 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, - 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x74, 0x76, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x74, 0x76, 0x12, - 0x37, 0x0a, 0x18, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, - 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x15, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, - 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, - 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, - 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, - 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x2b, 0x0a, 0x11, 0x69, - 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, 0x72, 0x73, - 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, - 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, - 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, - 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2a, - 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, - 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, 0x50, 0x52, - 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, 0x0a, 0x08, - 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, 0x4f, 0x50, - 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, - 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, 0x56, 0x45, - 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x50, - 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, - 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, 0x4c, 0x45, - 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x53, - 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, 0x61, 0x69, - 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x46, 0x41, - 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, 0x4f, 0x4e, - 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, 0x10, 0x01, - 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, 0x0a, 0x1c, - 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, - 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, 0x12, 0x25, - 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, - 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x56, 0x41, - 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, 0x41, 0x52, - 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, - 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, - 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, 0x4e, 0x44, - 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, - 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, - 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, 0x44, 0x5f, - 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, 0x41, 0x49, - 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, - 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, 0x5f, 0x53, - 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x55, - 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, 0x52, 0x45, - 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, 0x74, 0x6f, - 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, - 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, - 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, - 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, 0x54, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, - 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, 0x02, 0x12, - 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, - 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, 0x03, 0x12, - 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, - 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, - 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, 0x46, - 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, - 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, 0x06, 0x12, - 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x50, - 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, 0x4f, 0x5f, - 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x42, - 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, 0x54, 0x4f, - 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, - 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, - 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, 0x18, 0x41, - 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, 0x55, 0x49, - 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, 0x55, 0x54, - 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, - 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, 0x12, 0x20, - 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x45, - 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0d, - 0x2a, 0xdc, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, - 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x45, - 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, 0x49, - 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, 0x57, - 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x4f, 0x50, 0x49, 0x4e, 0x47, 0x5f, 0x49, - 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x4f, 0x4f, 0x50, 0x45, 0x44, 0x5f, 0x49, 0x4e, - 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, - 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, 0x45, 0x58, - 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, 0x54, 0x5f, - 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, - 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x0a, 0x2a, - 0xef, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x25, 0x0a, 0x21, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x5f, - 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x5f, - 0x48, 0x54, 0x4c, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x49, 0x47, 0x4e, 0x5f, 0x48, - 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x4f, 0x4e, 0x49, - 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x48, 0x54, 0x4c, 0x43, - 0x5f, 0x54, 0x58, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x59, 0x4d, 0x45, 0x4e, 0x54, - 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x25, 0x0a, 0x21, 0x53, - 0x57, 0x45, 0x45, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, - 0x45, 0x53, 0x53, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, - 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x48, 0x54, - 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, - 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, - 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, - 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x55, 0x43, - 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x55, 0x43, 0x43, - 0x45, 0x45, 0x44, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, - 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x13, 0x0a, 0x0f, - 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x53, 0x10, - 0x0a, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, 0x41, 0x54, - 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, 0x50, 0x10, - 0x0b, 0x32, 0xe8, 0x11, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, - 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x4c, - 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x12, - 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, - 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, 0x01, 0x12, - 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, - 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, - 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, - 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, 0x6f, 0x70, - 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, - 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x51, - 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x0e, - 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, - 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, - 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, 0x47, 0x65, - 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, - 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, + 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x05, 0x73, 0x77, + 0x61, 0x70, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0x96, 0x04, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x63, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, + 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x14, 0x72, 0x65, 0x6c, 0x61, + 0x74, 0x69, 0x76, 0x65, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x73, + 0x12, 0x2c, 0x0a, 0x12, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x6e, 0x75, 0x6d, 0x5f, 0x64, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x74, 0x6f, + 0x74, 0x61, 0x6c, 0x4e, 0x75, 0x6d, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x3c, + 0x0a, 0x1a, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x75, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x55, 0x6e, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x72, 0x6d, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x5f, + 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x65, 0x64, 0x53, 0x61, + 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x34, 0x0a, 0x16, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, + 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x45, 0x78, 0x70, + 0x69, 0x72, 0x65, 0x64, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x38, 0x0a, 0x18, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x5f, + 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x16, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x6e, 0x53, 0x61, + 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, + 0x6c, 0x6f, 0x6f, 0x70, 0x65, 0x64, 0x5f, 0x69, 0x6e, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, + 0x69, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x15, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4c, + 0x6f, 0x6f, 0x70, 0x65, 0x64, 0x49, 0x6e, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, + 0x4a, 0x0a, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x74, 0x69, + 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x77, 0x65, 0x65, 0x70, 0x73, 0x5f, 0x73, 0x61, 0x74, + 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1e, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x48, 0x74, 0x6c, 0x63, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x77, 0x65, + 0x65, 0x70, 0x73, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x22, 0xd9, 0x01, 0x0a, 0x07, + 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2b, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, + 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x12, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x2e, 0x0a, 0x13, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x73, 0x5f, 0x75, 0x6e, 0x74, 0x69, 0x6c, 0x5f, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x11, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x55, 0x6e, 0x74, 0x69, + 0x6c, 0x45, 0x78, 0x70, 0x69, 0x72, 0x79, 0x22, 0x99, 0x02, 0x0a, 0x17, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, + 0x77, 0x61, 0x70, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, + 0x12, 0x2b, 0x0a, 0x11, 0x64, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x5f, 0x6f, 0x75, 0x74, 0x70, + 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x10, 0x64, 0x65, 0x70, + 0x6f, 0x73, 0x69, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x0a, + 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x25, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x77, + 0x61, 0x70, 0x5f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, + 0x69, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x73, 0x77, 0x61, 0x70, 0x41, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x45, 0x0a, 0x1f, + 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x1c, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x61, 0x74, 0x6f, 0x73, + 0x68, 0x69, 0x73, 0x22, 0xc3, 0x02, 0x0a, 0x1a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, + 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x75, 0x74, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, + 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, + 0x68, 0x69, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x6f, 0x70, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x6f, 0x70, 0x12, 0x14, + 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, + 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, + 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, + 0x6f, 0x72, 0x12, 0x33, 0x0a, 0x0b, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x5f, 0x68, 0x69, 0x6e, 0x74, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x52, 0x0a, 0x72, 0x6f, 0x75, + 0x74, 0x65, 0x48, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, + 0x74, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, + 0x65, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, + 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, + 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x22, 0xb5, 0x03, 0x0a, 0x1b, 0x53, 0x74, + 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x73, 0x77, 0x61, + 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x08, 0x73, 0x77, + 0x61, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x68, 0x74, 0x6c, 0x63, 0x5f, 0x63, 0x6c, 0x74, + 0x76, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x68, 0x74, 0x6c, 0x63, 0x43, 0x6c, 0x74, + 0x76, 0x12, 0x37, 0x0a, 0x18, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x5f, 0x73, 0x77, 0x61, 0x70, + 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x03, 0x52, 0x15, 0x71, 0x75, 0x6f, 0x74, 0x65, 0x64, 0x53, 0x77, 0x61, 0x70, 0x46, + 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x6d, 0x61, + 0x78, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x73, 0x61, 0x74, 0x6f, 0x73, + 0x68, 0x69, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x12, 0x6d, 0x61, 0x78, 0x53, 0x77, + 0x61, 0x70, 0x46, 0x65, 0x65, 0x53, 0x61, 0x74, 0x6f, 0x73, 0x68, 0x69, 0x73, 0x12, 0x2b, 0x0a, + 0x11, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x68, 0x65, 0x69, 0x67, + 0x68, 0x74, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x08, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x56, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x09, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x1c, 0x0a, 0x09, 0x69, + 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, + 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x17, 0x70, 0x61, 0x79, + 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x73, 0x65, 0x63, + 0x6f, 0x6e, 0x64, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x15, 0x70, 0x61, 0x79, 0x6d, + 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, + 0x73, 0x2a, 0x3b, 0x0a, 0x0b, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x18, 0x0a, 0x14, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x54, 0x41, + 0x50, 0x52, 0x4f, 0x4f, 0x54, 0x5f, 0x50, 0x55, 0x42, 0x4b, 0x45, 0x59, 0x10, 0x01, 0x2a, 0x25, + 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0c, 0x0a, 0x08, 0x4c, 0x4f, + 0x4f, 0x50, 0x5f, 0x4f, 0x55, 0x54, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x4c, 0x4f, 0x4f, 0x50, + 0x5f, 0x49, 0x4e, 0x10, 0x01, 0x2a, 0x73, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, 0x54, 0x49, 0x41, 0x54, 0x45, 0x44, 0x10, + 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x52, 0x45, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x45, + 0x56, 0x45, 0x41, 0x4c, 0x45, 0x44, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0e, 0x48, 0x54, 0x4c, 0x43, + 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x44, 0x10, 0x02, 0x12, 0x0b, 0x0a, 0x07, + 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x41, 0x49, + 0x4c, 0x45, 0x44, 0x10, 0x04, 0x12, 0x13, 0x0a, 0x0f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, + 0x5f, 0x53, 0x45, 0x54, 0x54, 0x4c, 0x45, 0x44, 0x10, 0x05, 0x2a, 0xeb, 0x02, 0x0a, 0x0d, 0x46, + 0x61, 0x69, 0x6c, 0x75, 0x72, 0x65, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, + 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4e, + 0x4f, 0x4e, 0x45, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4f, 0x46, 0x46, 0x43, 0x48, 0x41, 0x49, 0x4e, + 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x02, 0x12, 0x20, + 0x0a, 0x1c, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x03, + 0x12, 0x25, 0x0a, 0x21, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, + 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, + 0x56, 0x41, 0x4c, 0x55, 0x45, 0x10, 0x04, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, 0x49, 0x4c, 0x55, + 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4f, 0x52, + 0x41, 0x52, 0x59, 0x10, 0x05, 0x12, 0x23, 0x0a, 0x1f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, + 0x54, 0x5f, 0x41, 0x4d, 0x4f, 0x55, 0x4e, 0x54, 0x10, 0x06, 0x12, 0x1c, 0x0a, 0x18, 0x46, 0x41, + 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x41, 0x42, 0x41, + 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x07, 0x12, 0x31, 0x0a, 0x2d, 0x46, 0x41, 0x49, 0x4c, + 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, + 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x5f, 0x43, 0x4f, 0x4e, 0x46, 0x49, 0x52, 0x4d, 0x45, + 0x44, 0x5f, 0x42, 0x41, 0x4c, 0x41, 0x4e, 0x43, 0x45, 0x10, 0x08, 0x12, 0x2b, 0x0a, 0x27, 0x46, + 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x49, 0x4e, + 0x43, 0x4f, 0x52, 0x52, 0x45, 0x43, 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x41, 0x4d, 0x54, + 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x09, 0x2a, 0x2f, 0x0a, 0x11, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x52, 0x75, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, + 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x54, 0x48, + 0x52, 0x45, 0x53, 0x48, 0x4f, 0x4c, 0x44, 0x10, 0x01, 0x2a, 0xa6, 0x03, 0x0a, 0x0a, 0x41, 0x75, + 0x74, 0x6f, 0x52, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, + 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, + 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x4e, 0x4f, 0x54, 0x5f, 0x53, 0x54, 0x41, 0x52, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, + 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x46, 0x45, 0x45, 0x53, 0x10, + 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, 0x54, 0x5f, 0x45, 0x4c, 0x41, 0x50, 0x53, 0x45, 0x44, 0x10, + 0x03, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x49, 0x4e, 0x5f, 0x46, 0x4c, 0x49, 0x47, 0x48, 0x54, 0x10, 0x04, 0x12, 0x18, 0x0a, 0x14, + 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x53, 0x57, 0x41, 0x50, + 0x5f, 0x46, 0x45, 0x45, 0x10, 0x05, 0x12, 0x19, 0x0a, 0x15, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, + 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4d, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x45, 0x45, 0x10, + 0x06, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, + 0x5f, 0x50, 0x52, 0x45, 0x50, 0x41, 0x59, 0x10, 0x07, 0x12, 0x1f, 0x0a, 0x1b, 0x41, 0x55, 0x54, + 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, + 0x5f, 0x42, 0x41, 0x43, 0x4b, 0x4f, 0x46, 0x46, 0x10, 0x08, 0x12, 0x18, 0x0a, 0x14, 0x41, 0x55, + 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x4f, + 0x55, 0x54, 0x10, 0x09, 0x12, 0x17, 0x0a, 0x13, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, + 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x4f, 0x4f, 0x50, 0x5f, 0x49, 0x4e, 0x10, 0x0a, 0x12, 0x1c, 0x0a, + 0x18, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x4c, 0x49, 0x51, + 0x55, 0x49, 0x44, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x4b, 0x10, 0x0b, 0x12, 0x23, 0x0a, 0x1f, 0x41, + 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, 0x42, 0x55, 0x44, 0x47, 0x45, + 0x54, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, 0x10, 0x0c, + 0x12, 0x20, 0x0a, 0x1c, 0x41, 0x55, 0x54, 0x4f, 0x5f, 0x52, 0x45, 0x41, 0x53, 0x4f, 0x4e, 0x5f, + 0x46, 0x45, 0x45, 0x5f, 0x49, 0x4e, 0x53, 0x55, 0x46, 0x46, 0x49, 0x43, 0x49, 0x45, 0x4e, 0x54, + 0x10, 0x0d, 0x2a, 0xdc, 0x01, 0x0a, 0x0c, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x53, 0x74, + 0x61, 0x74, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, + 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, + 0x54, 0x45, 0x44, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, 0x41, + 0x57, 0x49, 0x4e, 0x47, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x49, 0x54, 0x48, 0x44, 0x52, + 0x41, 0x57, 0x4e, 0x10, 0x03, 0x12, 0x0e, 0x0a, 0x0a, 0x4c, 0x4f, 0x4f, 0x50, 0x49, 0x4e, 0x47, + 0x5f, 0x49, 0x4e, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x4c, 0x4f, 0x4f, 0x50, 0x45, 0x44, 0x5f, + 0x49, 0x4e, 0x10, 0x05, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x10, 0x06, 0x12, 0x16, 0x0a, 0x12, + 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, + 0x50, 0x54, 0x10, 0x07, 0x12, 0x13, 0x0a, 0x0f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x5f, + 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, 0x08, 0x12, 0x19, 0x0a, 0x15, 0x57, 0x41, 0x49, + 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x5f, 0x45, 0x58, 0x50, 0x49, 0x52, 0x59, 0x5f, 0x53, 0x57, 0x45, + 0x45, 0x50, 0x10, 0x09, 0x12, 0x0b, 0x0a, 0x07, 0x45, 0x58, 0x50, 0x49, 0x52, 0x45, 0x44, 0x10, + 0x0a, 0x2a, 0xef, 0x02, 0x0a, 0x1c, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x25, 0x0a, 0x21, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, + 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x49, 0x4e, 0x49, + 0x54, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x49, 0x47, 0x4e, + 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x58, 0x10, 0x02, 0x12, 0x1b, 0x0a, 0x17, 0x4d, 0x4f, + 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x49, 0x43, 0x45, 0x5f, 0x48, 0x54, + 0x4c, 0x43, 0x5f, 0x54, 0x58, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x41, 0x59, 0x4d, 0x45, + 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x43, 0x45, 0x49, 0x56, 0x45, 0x44, 0x10, 0x04, 0x12, 0x25, 0x0a, + 0x21, 0x53, 0x57, 0x45, 0x45, 0x50, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, + 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, + 0x55, 0x54, 0x10, 0x05, 0x12, 0x1e, 0x0a, 0x1a, 0x4d, 0x4f, 0x4e, 0x49, 0x54, 0x4f, 0x52, 0x5f, + 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, + 0x45, 0x50, 0x10, 0x06, 0x12, 0x25, 0x0a, 0x21, 0x48, 0x54, 0x4c, 0x43, 0x5f, 0x53, 0x54, 0x41, + 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x54, 0x49, 0x4d, 0x45, + 0x4f, 0x55, 0x54, 0x5f, 0x53, 0x57, 0x45, 0x50, 0x54, 0x10, 0x07, 0x12, 0x0d, 0x0a, 0x09, 0x53, + 0x55, 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x10, 0x08, 0x12, 0x22, 0x0a, 0x1e, 0x53, 0x55, + 0x43, 0x43, 0x45, 0x45, 0x44, 0x45, 0x44, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x49, 0x54, 0x49, + 0x4f, 0x4e, 0x49, 0x4e, 0x47, 0x5f, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x10, 0x09, 0x12, 0x13, + 0x0a, 0x0f, 0x55, 0x4e, 0x4c, 0x4f, 0x43, 0x4b, 0x5f, 0x44, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, + 0x53, 0x10, 0x0a, 0x12, 0x1e, 0x0a, 0x1a, 0x46, 0x41, 0x49, 0x4c, 0x45, 0x44, 0x5f, 0x53, 0x54, + 0x41, 0x54, 0x49, 0x43, 0x5f, 0x41, 0x44, 0x44, 0x52, 0x45, 0x53, 0x53, 0x5f, 0x53, 0x57, 0x41, + 0x50, 0x10, 0x0b, 0x32, 0xe8, 0x11, 0x0a, 0x0a, 0x53, 0x77, 0x61, 0x70, 0x43, 0x6c, 0x69, 0x65, + 0x6e, 0x74, 0x12, 0x39, 0x0a, 0x07, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x12, 0x17, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, + 0x06, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x07, 0x4d, 0x6f, 0x6e, 0x69, 0x74, 0x6f, + 0x72, 0x12, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x6f, 0x6e, 0x69, + 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x30, + 0x01, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x19, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, + 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x08, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x12, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x13, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x12, 0x48, 0x0a, 0x0b, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, 0x61, 0x70, 0x12, + 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, + 0x6e, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x41, 0x62, 0x61, 0x6e, 0x64, 0x6f, 0x6e, 0x53, 0x77, + 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x4c, 0x6f, + 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, 0x74, 0x54, + 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0c, + 0x4c, 0x6f, 0x6f, 0x70, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4f, 0x75, + 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, + 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x65, 0x72, 0x6d, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x49, 0x6e, 0x54, 0x65, 0x72, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x41, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x12, 0x15, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, + 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x05, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x12, 0x15, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x50, + 0x72, 0x6f, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a, 0x0d, + 0x47, 0x65, 0x74, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, - 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, - 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, 0x63, 0x68, - 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, - 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, 0x4c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, - 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, - 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, - 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, - 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, + 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4c, 0x73, 0x61, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, + 0x16, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x51, 0x0a, 0x0e, 0x46, 0x65, 0x74, 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, + 0x65, 0x6e, 0x12, 0x1e, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x46, 0x65, 0x74, + 0x63, 0x68, 0x4c, 0x34, 0x30, 0x32, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x17, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x18, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x56, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, + 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, + 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x53, 0x65, 0x74, + 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x22, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, 0x74, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x65, + 0x74, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x53, 0x75, 0x67, 0x67, + 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1c, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x53, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, + 0x65, 0x72, 0x76, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0a, - 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, 0x6f, 0x6f, - 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, - 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, - 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, - 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, 0x69, 0x73, - 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, 0x2e, 0x6c, - 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, - 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, - 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, - 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, + 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, + 0x0a, 0x0a, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x6c, + 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, + 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, 0x74, 0x65, 0x12, 0x1f, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, 0x6f, + 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, + 0x72, 0x70, 0x63, 0x2e, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x51, 0x75, + 0x6f, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a, 0x0f, 0x4c, + 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x12, 0x1f, + 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, 0x73, + 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x49, 0x6e, + 0x73, 0x74, 0x61, 0x6e, 0x74, 0x4f, 0x75, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x57, 0x0a, 0x10, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, - 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, - 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, - 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x57, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x12, 0x20, - 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, - 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, - 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, - 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, - 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, - 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, 0x6c, 0x6f, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, + 0x63, 0x2e, 0x4e, 0x65, 0x77, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x4c, 0x69, + 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x6e, 0x73, 0x70, 0x65, 0x6e, 0x74, 0x44, 0x65, 0x70, 0x6f, + 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, + 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, + 0x12, 0x20, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, 0x68, 0x64, + 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x57, 0x69, 0x74, + 0x68, 0x64, 0x72, 0x61, 0x77, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x72, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x73, 0x12, 0x29, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2a, 0x2e, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, + 0x61, 0x70, 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, + 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x69, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x53, - 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, - 0x73, 0x12, 0x26, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, - 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, - 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, - 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, 0x24, 0x2e, - 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, - 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, 0x53, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x53, 0x74, 0x61, 0x74, 0x69, + 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x12, + 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x25, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x75, 0x6d, + 0x6d, 0x61, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x13, + 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, + 0x70, 0x49, 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, - 0x6e, 0x12, 0x23, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x6f, - 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, 0x5a, 0x25, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, 0x68, 0x74, - 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, 0x6c, 0x6f, - 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x6c, 0x6f, 0x6f, 0x70, 0x72, + 0x70, 0x63, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x69, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x4c, 0x6f, 0x6f, 0x70, 0x49, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x27, + 0x5a, 0x25, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6c, 0x69, 0x67, + 0x68, 0x74, 0x6e, 0x69, 0x6e, 0x67, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6c, 0x6f, 0x6f, 0x70, 0x2f, + 0x6c, 0x6f, 0x6f, 0x70, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/looprpc/client.proto b/looprpc/client.proto index ee7cf73c8..78677826e 100644 --- a/looprpc/client.proto +++ b/looprpc/client.proto @@ -1582,6 +1582,16 @@ message WithdrawDepositsRequest { If set to true, all deposits will be withdrawn. */ bool all = 2; + + /* + The address to withdraw the funds to. + */ + string dest_addr = 3; + + /* + The fee rate in sat/vbyte to use for the withdrawal transaction. + */ + int64 sat_per_vbyte = 4; } message WithdrawDepositsResponse { From fb9562b7c10b3ba2de6d2cd22a009f6623cc5953 Mon Sep 17 00:00:00 2001 From: Slyghtning Date: Fri, 29 Nov 2024 14:47:51 +0100 Subject: [PATCH 67/67] staticaddr: dest addr and fee rate for withdrawals --- cmd/loop/staticaddr.go | 26 +++++++++--- loopd/swapclient_server.go | 2 +- staticaddr/withdraw/manager.go | 73 ++++++++++++++++++++++++---------- 3 files changed, 73 insertions(+), 28 deletions(-) diff --git a/cmd/loop/staticaddr.go b/cmd/loop/staticaddr.go index 283a4b5e6..b109516ae 100644 --- a/cmd/loop/staticaddr.go +++ b/cmd/loop/staticaddr.go @@ -1,6 +1,3 @@ -//go:build staticaddr -// +build staticaddr - package main import ( @@ -145,6 +142,18 @@ var withdrawalCommand = cli.Command{ Name: "all", Usage: "withdraws all static address deposits.", }, + cli.StringFlag{ + Name: "addr", + Usage: "the optional address that the withdrawn " + + "funds should be sent to, if let blank the " + + "funds will go to lnd's wallet", + }, + cli.Int64Flag{ + Name: "sat_per_vbyte", + Usage: "(optional) a manual fee expressed in " + + "sat/vbyte that should be used when crafting " + + "the transaction", + }, }, Action: withdraw, } @@ -165,6 +174,7 @@ func withdraw(ctx *cli.Context) error { isUtxoSelected = ctx.IsSet("utxo") outpoints []*looprpc.OutPoint ctxb = context.Background() + destAddr string ) switch { @@ -183,10 +193,16 @@ func withdraw(ctx *cli.Context) error { return fmt.Errorf("unknown withdrawal request") } + if ctx.IsSet("addr") { + destAddr = ctx.String("addr") + } + resp, err := client.WithdrawDeposits(ctxb, &looprpc.WithdrawDepositsRequest{ - Outpoints: outpoints, - All: isAllSelected, + Outpoints: outpoints, + All: isAllSelected, + DestAddr: destAddr, + SatPerVbyte: int64(ctx.Uint64("sat_per_vbyte")), }) if err != nil { return err diff --git a/loopd/swapclient_server.go b/loopd/swapclient_server.go index 6eb5beefa..3ea03715b 100644 --- a/loopd/swapclient_server.go +++ b/loopd/swapclient_server.go @@ -1447,7 +1447,7 @@ func (s *swapClientServer) WithdrawDeposits(ctx context.Context, } txhash, pkScript, err := s.withdrawalManager.DeliverWithdrawalRequest( - ctx, outpoints, + ctx, outpoints, req.DestAddr, req.SatPerVbyte, ) if err != nil { return nil, err diff --git a/staticaddr/withdraw/manager.go b/staticaddr/withdraw/manager.go index 26f5de501..0bc25657d 100644 --- a/staticaddr/withdraw/manager.go +++ b/staticaddr/withdraw/manager.go @@ -71,8 +71,10 @@ type ManagerConfig struct { // newWithdrawalRequest is used to send withdrawal request to the manager main // loop. type newWithdrawalRequest struct { - outpoints []wire.OutPoint - respChan chan *newWithdrawalResponse + outpoints []wire.OutPoint + respChan chan *newWithdrawalResponse + destAddr string + satPerVbyte int64 } // newWithdrawalResponse is used to return withdrawal info and error to the @@ -156,7 +158,8 @@ func (m *Manager) Run(ctx context.Context, currentHeight uint32) error { case request := <-m.newWithdrawalRequestChan: txHash, pkScript, err = m.WithdrawDeposits( - ctx, request.outpoints, + ctx, request.outpoints, request.destAddr, + request.satPerVbyte, ) if err != nil { log.Errorf("Error withdrawing deposits: %v", @@ -258,7 +261,8 @@ func (m *Manager) WaitInitComplete() { // WithdrawDeposits starts a deposits withdrawal flow. func (m *Manager) WithdrawDeposits(ctx context.Context, - outpoints []wire.OutPoint) (string, string, error) { + outpoints []wire.OutPoint, destAddr string, satPerVbyte int64) (string, + string, error) { if len(outpoints) == 0 { return "", "", fmt.Errorf("no outpoints selected to " + @@ -274,17 +278,32 @@ func (m *Manager) WithdrawDeposits(ctx context.Context, return "", "", ErrWithdrawingInactiveDeposits } - // Generate the withdrawal address from our local lnd wallet. - withdrawalAddress, err := m.cfg.WalletKit.NextAddr( - ctx, lnwallet.DefaultAccountName, - walletrpc.AddressType_TAPROOT_PUBKEY, false, + var ( + withdrawalAddress btcutil.Address + err error ) - if err != nil { - return "", "", err + + // Check if the user provided an address to withdraw to. If not, we'll + // generate a new address for them. + if destAddr != "" { + withdrawalAddress, err = btcutil.DecodeAddress( + destAddr, m.cfg.ChainParams, + ) + if err != nil { + return "", "", err + } + } else { + withdrawalAddress, err = m.cfg.WalletKit.NextAddr( + ctx, lnwallet.DefaultAccountName, + walletrpc.AddressType_TAPROOT_PUBKEY, false, + ) + if err != nil { + return "", "", err + } } finalizedTx, err := m.createFinalizedWithdrawalTx( - ctx, deposits, withdrawalAddress, + ctx, deposits, withdrawalAddress, satPerVbyte, ) if err != nil { return "", "", err @@ -335,8 +354,8 @@ func (m *Manager) WithdrawDeposits(ctx context.Context, } func (m *Manager) createFinalizedWithdrawalTx(ctx context.Context, - deposits []*deposit.Deposit, withdrawalAddress btcutil.Address) ( - *wire.MsgTx, error) { + deposits []*deposit.Deposit, withdrawalAddress btcutil.Address, + satPerVbyte int64) (*wire.MsgTx, error) { // Create a musig2 session for each deposit. withdrawalSessions, clientNonces, err := m.createMusig2Sessions( @@ -346,12 +365,19 @@ func (m *Manager) createFinalizedWithdrawalTx(ctx context.Context, return nil, err } - // Get the fee rate for the withdrawal sweep. - withdrawalSweepFeeRate, err := m.cfg.WalletKit.EstimateFeeRate( - ctx, defaultConfTarget, - ) - if err != nil { - return nil, err + var withdrawalSweepFeeRate chainfee.SatPerKWeight + if satPerVbyte == 0 { + // Get the fee rate for the withdrawal sweep. + withdrawalSweepFeeRate, err = m.cfg.WalletKit.EstimateFeeRate( + ctx, defaultConfTarget, + ) + if err != nil { + return nil, err + } + } else { + withdrawalSweepFeeRate = chainfee.SatPerKVByte( + satPerVbyte * 1000, + ).FeePerKWeight() } outpoints := toOutpoints(deposits) @@ -788,11 +814,14 @@ func (m *Manager) republishWithdrawals(ctx context.Context) error { // DeliverWithdrawalRequest forwards a withdrawal request to the manager main // loop. func (m *Manager) DeliverWithdrawalRequest(ctx context.Context, - outpoints []wire.OutPoint) (string, string, error) { + outpoints []wire.OutPoint, destAddr string, satPerVbyte int64) (string, + string, error) { request := newWithdrawalRequest{ - outpoints: outpoints, - respChan: make(chan *newWithdrawalResponse), + outpoints: outpoints, + destAddr: destAddr, + satPerVbyte: satPerVbyte, + respChan: make(chan *newWithdrawalResponse), } // Send the new loop-in request to the manager run loop.