From 49b9e7939454c268a50123304e20955f25375e85 Mon Sep 17 00:00:00 2001 From: michael1011 Date: Sat, 8 Apr 2023 16:59:42 +0200 Subject: [PATCH] feat: allow setting claim transaction fee --- boltzrpc/boltzrpc.pb.go | 344 ++++++++++++++++++----------------- boltzrpc/boltzrpc.pb.gw.go | 192 ++++++++----------- boltzrpc/boltzrpc.proto | 6 + boltzrpc/boltzrpc_grpc.pb.go | 12 +- build/version.go | 2 +- database/database.go | 83 ++++++--- database/migration.go | 42 +++-- database/reverse.go | 34 +++- database/scan.go | 5 +- docs/grpc.md | 2 + logger/logger.go | 32 ++++ nursery/reverse.go | 14 +- rpcserver/router.go | 3 +- rpcserver/serializer.go | 1 + 14 files changed, 435 insertions(+), 337 deletions(-) diff --git a/boltzrpc/boltzrpc.pb.go b/boltzrpc/boltzrpc.pb.go index f6daeaf2..8d8ddce5 100644 --- a/boltzrpc/boltzrpc.pb.go +++ b/boltzrpc/boltzrpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.0 -// protoc v3.15.6 +// protoc-gen-go v1.26.0 +// protoc v3.12.4 // source: boltzrpc.proto package boltzrpc @@ -100,9 +100,8 @@ type SwapInfo struct { ExpectedAmount int64 `protobuf:"varint,10,opt,name=expected_amount,json=expectedAmount,proto3" json:"expected_amount,omitempty"` TimeoutBlockHeight uint32 `protobuf:"varint,11,opt,name=timeout_block_height,json=timeoutBlockHeight,proto3" json:"timeout_block_height,omitempty"` LockupTransactionId string `protobuf:"bytes,12,opt,name=lockup_transaction_id,json=lockupTransactionId,proto3" json:"lockup_transaction_id,omitempty"` - // - //If the swap times out or fails for some other reason, the damon will automatically refund the coins sent to the - //`lockup_address` back to the LND wallet and save the refund transaction id to the database. + // If the swap times out or fails for some other reason, the damon will automatically refund the coins sent to the + // `lockup_address` back to the LND wallet and save the refund transaction id to the database. RefundTransactionId string `protobuf:"bytes,13,opt,name=refund_transaction_id,json=refundTransactionId,proto3" json:"refund_transaction_id,omitempty"` } @@ -392,6 +391,7 @@ type ReverseSwapInfo struct { TimeoutBlockHeight uint32 `protobuf:"varint,11,opt,name=timeout_block_height,json=timeoutBlockHeight,proto3" json:"timeout_block_height,omitempty"` LockupTransactionId string `protobuf:"bytes,12,opt,name=lockup_transaction_id,json=lockupTransactionId,proto3" json:"lockup_transaction_id,omitempty"` ClaimTransactionId string `protobuf:"bytes,13,opt,name=claim_transaction_id,json=claimTransactionId,proto3" json:"claim_transaction_id,omitempty"` + ClaimFeePerVbyte uint32 `protobuf:"varint,14,opt,name=claim_fee_per_vbyte,json=claimFeePerVbyte,proto3" json:"claim_fee_per_vbyte,omitempty"` } func (x *ReverseSwapInfo) Reset() { @@ -517,6 +517,13 @@ func (x *ReverseSwapInfo) GetClaimTransactionId() string { return "" } +func (x *ReverseSwapInfo) GetClaimFeePerVbyte() uint32 { + if x != nil { + return x.ClaimFeePerVbyte + } + return 0 +} + type GetInfoRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1116,9 +1123,8 @@ type DepositRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // - //Percentage of inbound liquidity the channel that is opened in case the invoice cannot be paid should have. - //25 by default. + // Percentage of inbound liquidity the channel that is opened in case the invoice cannot be paid should have. + // 25 by default. InboundLiquidity uint32 `protobuf:"varint,1,opt,name=inbound_liquidity,json=inboundLiquidity,proto3" json:"inbound_liquidity,omitempty"` } @@ -1348,9 +1354,8 @@ type CreateChannelRequest struct { unknownFields protoimpl.UnknownFields Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` - // - //Percentage of inbound liquidity the channel that is opened should have. - //25 by default. + // Percentage of inbound liquidity the channel that is opened should have. + // 25 by default. InboundLiquidity uint32 `protobuf:"varint,2,opt,name=inbound_liquidity,json=inboundLiquidity,proto3" json:"inbound_liquidity,omitempty"` Private bool `protobuf:"varint,3,opt,name=private,proto3" json:"private,omitempty"` } @@ -1417,6 +1422,8 @@ type CreateReverseSwapRequest struct { // If no value is set, the daemon will query a new P2WKH address from LND Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` AcceptZeroConf bool `protobuf:"varint,3,opt,name=accept_zero_conf,json=acceptZeroConf,proto3" json:"accept_zero_conf,omitempty"` + // sat/vByte fee for the claim transaction; if not set, a reasonable fee will be queried from mempool.space or LND + SatPerVbyteFee uint32 `protobuf:"varint,4,opt,name=sat_per_vbyte_fee,json=satPerVbyteFee,proto3" json:"sat_per_vbyte_fee,omitempty"` } func (x *CreateReverseSwapRequest) Reset() { @@ -1472,6 +1479,13 @@ func (x *CreateReverseSwapRequest) GetAcceptZeroConf() bool { return false } +func (x *CreateReverseSwapRequest) GetSatPerVbyteFee() uint32 { + if x != nil { + return x.SatPerVbyteFee + } + return 0 +} + type CreateReverseSwapResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1603,7 +1617,7 @@ var file_boltzrpc_proto_rawDesc = []byte{ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xda, 0x03, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x89, 0x04, 0x0a, 0x0f, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x29, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, @@ -1633,101 +1647,104 @@ var file_boltzrpc_proto_rawDesc = []byte{ 0x30, 0x0a, 0x14, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, - 0x64, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 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, 0x6c, 0x6e, 0x64, - 0x5f, 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, - 0x6e, 0x64, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, - 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, - 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x61, 0x70, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x13, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, - 0x77, 0x61, 0x70, 0x73, 0x22, 0x3d, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x46, 0x65, 0x65, - 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x22, 0x51, 0x0a, 0x04, 0x46, 0x65, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, - 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, - 0x0a, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x6d, - 0x69, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x6f, 0x6c, - 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, - 0x05, 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x06, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, - 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, - 0x78, 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, - 0x69, 0x6d, 0x61, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, - 0x16, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, - 0x2e, 0x46, 0x65, 0x65, 0x73, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x6f, - 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, - 0x69, 0x6d, 0x69, 0x74, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, - 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcd, 0x01, 0x0a, 0x11, 0x4c, 0x69, - 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x28, 0x0a, 0x05, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, - 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x05, 0x73, 0x77, 0x61, 0x70, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x63, 0x68, 0x61, - 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, - 0x43, 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, - 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x73, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, - 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, - 0xc5, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x77, 0x61, 0x70, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, - 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x73, 0x77, 0x61, 0x70, 0x12, - 0x48, 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x6f, 0x6c, 0x74, - 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x76, - 0x65, 0x72, 0x73, 0x65, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x64, 0x12, 0x2d, 0x0a, 0x13, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x70, + 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, + 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x46, 0x65, 0x65, 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, + 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x22, 0xde, 0x01, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 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, 0x6c, 0x6e, 0x64, 0x5f, + 0x70, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6c, 0x6e, + 0x64, 0x50, 0x75, 0x62, 0x6b, 0x65, 0x79, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, 0x69, 0x67, 0x68, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x65, + 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x0c, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, + 0x32, 0x0a, 0x15, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, + 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, + 0x61, 0x70, 0x73, 0x22, 0x3d, 0x0a, 0x09, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, + 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x06, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x22, 0x51, 0x0a, 0x04, 0x46, 0x65, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, + 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x02, 0x52, 0x0a, + 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x12, 0x29, 0x0a, 0x05, 0x6d, 0x69, + 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x62, 0x6f, 0x6c, 0x74, + 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x4d, 0x69, 0x6e, 0x65, 0x72, 0x46, 0x65, 0x65, 0x73, 0x52, 0x05, + 0x6d, 0x69, 0x6e, 0x65, 0x72, 0x22, 0x3c, 0x0a, 0x06, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x61, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x61, 0x78, + 0x69, 0x6d, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x61, 0x78, 0x69, + 0x6d, 0x61, 0x6c, 0x22, 0x17, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x66, 0x0a, 0x16, + 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x22, 0x0a, 0x04, 0x66, 0x65, 0x65, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, + 0x46, 0x65, 0x65, 0x73, 0x52, 0x04, 0x66, 0x65, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x62, 0x6f, 0x6c, + 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x06, 0x6c, 0x69, + 0x6d, 0x69, 0x74, 0x73, 0x22, 0x12, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, + 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xcd, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, + 0x0a, 0x05, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x05, 0x73, 0x77, 0x61, 0x70, 0x73, 0x12, 0x4e, 0x0a, 0x11, 0x63, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, + 0x6f, 0x6d, 0x62, 0x69, 0x6e, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x53, 0x77, + 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x3e, 0x0a, 0x0d, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x65, - 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x22, 0x3d, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, - 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x62, - 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x22, 0x6d, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0d, 0x52, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, - 0x65, 0x69, 0x67, 0x68, 0x74, 0x22, 0x2b, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, - 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, + 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0c, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x73, 0x22, 0x24, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x53, + 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xc5, + 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x04, 0x73, 0x77, 0x61, 0x70, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, + 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x04, 0x73, 0x77, 0x61, 0x70, 0x12, 0x48, + 0x0a, 0x10, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x43, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3c, 0x0a, 0x0c, 0x72, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x5f, 0x73, 0x77, 0x61, 0x70, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, + 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, + 0x65, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0b, 0x72, 0x65, 0x76, 0x65, 0x72, + 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x22, 0x3d, 0x0a, 0x0e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, + 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x62, 0x6f, + 0x75, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x22, 0x6d, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, - 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, 0x70, - 0x65, 0x63, 0x74, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, - 0x69, 0x70, 0x32, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x69, 0x70, 0x32, - 0x31, 0x22, 0x75, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, + 0x73, 0x73, 0x12, 0x30, 0x0a, 0x14, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x5f, 0x68, 0x65, 0x69, 0x67, 0x68, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, + 0x52, 0x12, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x48, 0x65, + 0x69, 0x67, 0x68, 0x74, 0x22, 0x2b, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, + 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x71, - 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, - 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x18, - 0x0a, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0x76, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x22, 0x7d, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x65, 0x78, 0x70, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x41, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x69, + 0x70, 0x32, 0x31, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x69, 0x70, 0x32, 0x31, + 0x22, 0x75, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, + 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x71, 0x75, + 0x69, 0x64, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x10, 0x69, 0x6e, 0x62, + 0x6f, 0x75, 0x6e, 0x64, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x69, 0x74, 0x79, 0x12, 0x18, 0x0a, + 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x18, 0x0a, 0x07, @@ -1735,66 +1752,69 @@ var file_boltzrpc_proto_rawDesc = []byte{ 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5a, 0x65, 0x72, 0x6f, 0x43, 0x6f, 0x6e, 0x66, - 0x22, 0xb7, 0x01, 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, - 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, - 0x0a, 0x0e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x31, 0x0a, 0x15, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, - 0x5f, 0x66, 0x65, 0x65, 0x5f, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, - 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x53, 0x61, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6c, 0x61, 0x69, - 0x6d, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x72, 0x61, - 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x2a, 0x62, 0x0a, 0x09, 0x53, 0x77, - 0x61, 0x70, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, - 0x4e, 0x47, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, - 0x55, 0x4c, 0x10, 0x01, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, - 0x10, 0x0a, 0x0c, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, - 0x03, 0x12, 0x0c, 0x0a, 0x08, 0x52, 0x45, 0x46, 0x55, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, - 0x0d, 0x0a, 0x09, 0x41, 0x42, 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x05, 0x32, 0xe4, - 0x04, 0x0a, 0x05, 0x42, 0x6f, 0x6c, 0x74, 0x7a, 0x12, 0x3e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, - 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, - 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x62, 0x6f, 0x6c, - 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x6f, - 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, - 0x09, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x6f, 0x6c, - 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, - 0x63, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, - 0x66, 0x6f, 0x12, 0x1c, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, - 0x74, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1d, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, - 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x3e, 0x0a, 0x07, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x18, 0x2e, 0x62, 0x6f, 0x6c, - 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, - 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, - 0x47, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, - 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, - 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x6f, 0x6c, - 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1e, 0x2e, 0x62, 0x6f, 0x6c, 0x74, - 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, - 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x6f, 0x6c, 0x74, - 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x12, 0x22, 0x2e, 0x62, - 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, - 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x23, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x42, 0x6f, 0x6c, 0x74, 0x7a, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x2f, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x2d, 0x6c, 0x6e, 0x64, 0x2f, 0x62, 0x6f, 0x6c, 0x74, - 0x7a, 0x72, 0x70, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x12, 0x29, 0x0a, 0x11, 0x73, 0x61, 0x74, 0x5f, 0x70, 0x65, 0x72, 0x5f, 0x76, 0x62, 0x79, 0x74, + 0x65, 0x5f, 0x66, 0x65, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0e, 0x73, 0x61, 0x74, + 0x50, 0x65, 0x72, 0x56, 0x62, 0x79, 0x74, 0x65, 0x46, 0x65, 0x65, 0x22, 0xb7, 0x01, 0x0a, 0x19, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, + 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6c, 0x6f, 0x63, + 0x6b, 0x75, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x31, 0x0a, 0x15, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x5f, 0x66, 0x65, 0x65, 0x5f, + 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x5f, 0x73, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, + 0x12, 0x72, 0x6f, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x46, 0x65, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, + 0x53, 0x61, 0x74, 0x12, 0x30, 0x0a, 0x14, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x5f, 0x74, 0x72, 0x61, + 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x12, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x2a, 0x62, 0x0a, 0x09, 0x53, 0x77, 0x61, 0x70, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x50, 0x45, 0x4e, 0x44, 0x49, 0x4e, 0x47, 0x10, 0x00, 0x12, + 0x0e, 0x0a, 0x0a, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x46, 0x55, 0x4c, 0x10, 0x01, 0x12, + 0x09, 0x0a, 0x05, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x53, 0x45, + 0x52, 0x56, 0x45, 0x52, 0x5f, 0x45, 0x52, 0x52, 0x4f, 0x52, 0x10, 0x03, 0x12, 0x0c, 0x0a, 0x08, + 0x52, 0x45, 0x46, 0x55, 0x4e, 0x44, 0x45, 0x44, 0x10, 0x04, 0x12, 0x0d, 0x0a, 0x09, 0x41, 0x42, + 0x41, 0x4e, 0x44, 0x4f, 0x4e, 0x45, 0x44, 0x10, 0x05, 0x32, 0xe4, 0x04, 0x0a, 0x05, 0x42, 0x6f, + 0x6c, 0x74, 0x7a, 0x12, 0x3e, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, + 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, + 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1f, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, + 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, + 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, + 0x53, 0x77, 0x61, 0x70, 0x73, 0x12, 0x1a, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, + 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1b, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x53, 0x77, 0x61, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4a, + 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x2e, + 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, + 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x62, 0x6f, + 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x77, 0x61, 0x70, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x44, 0x65, + 0x70, 0x6f, 0x73, 0x69, 0x74, 0x12, 0x18, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, + 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x19, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x44, 0x65, 0x70, 0x6f, 0x73, + 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x12, 0x1b, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, + 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, + 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x1e, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, + 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x12, 0x22, 0x2e, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, + 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, + 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x62, 0x6f, + 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x76, + 0x65, 0x72, 0x73, 0x65, 0x53, 0x77, 0x61, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x42, 0x2d, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x42, + 0x6f, 0x6c, 0x74, 0x7a, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2f, 0x62, 0x6f, 0x6c, + 0x74, 0x7a, 0x2d, 0x6c, 0x6e, 0x64, 0x2f, 0x62, 0x6f, 0x6c, 0x74, 0x7a, 0x72, 0x70, 0x63, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/boltzrpc/boltzrpc.pb.gw.go b/boltzrpc/boltzrpc.pb.gw.go index 5a72bb08..1c98c067 100644 --- a/boltzrpc/boltzrpc.pb.gw.go +++ b/boltzrpc/boltzrpc.pb.gw.go @@ -285,22 +285,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/GetInfo", runtime.WithHTTPPathPattern("/v1/info")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/GetInfo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_GetInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_GetInfo_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -310,22 +308,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/GetServiceInfo", runtime.WithHTTPPathPattern("/v1/serviceinfo")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/GetServiceInfo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_GetServiceInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_GetServiceInfo_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_GetServiceInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_GetServiceInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -335,22 +331,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/ListSwaps", runtime.WithHTTPPathPattern("/v1/listswaps")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/ListSwaps") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_ListSwaps_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_ListSwaps_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_ListSwaps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_ListSwaps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -360,22 +354,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/GetSwapInfo", runtime.WithHTTPPathPattern("/v1/swap/{id}")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/GetSwapInfo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_GetSwapInfo_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_GetSwapInfo_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_GetSwapInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_GetSwapInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -385,22 +377,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/Deposit", runtime.WithHTTPPathPattern("/v1/deposit")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/Deposit") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_Deposit_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_Deposit_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_Deposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -410,22 +400,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/CreateSwap", runtime.WithHTTPPathPattern("/v1/createswap")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/CreateSwap") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_CreateSwap_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_CreateSwap_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_CreateSwap_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_CreateSwap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -435,22 +423,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/CreateChannel", runtime.WithHTTPPathPattern("/v1/createchannel")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/CreateChannel") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_CreateChannel_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_CreateChannel_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_CreateChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_CreateChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -460,22 +446,20 @@ func RegisterBoltzHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv var stream runtime.ServerTransportStream ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/CreateReverseSwap", runtime.WithHTTPPathPattern("/v1/createreverseswap")) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req, "/boltzrpc.Boltz/CreateReverseSwap") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Boltz_CreateReverseSwap_0(annotatedContext, inboundMarshaler, server, req, pathParams) + resp, md, err := local_request_Boltz_CreateReverseSwap_0(rctx, inboundMarshaler, server, req, pathParams) md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_CreateReverseSwap_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_CreateReverseSwap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -524,21 +508,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/GetInfo", runtime.WithHTTPPathPattern("/v1/info")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/GetInfo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_GetInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_GetInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_GetInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_GetInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -546,21 +528,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/GetServiceInfo", runtime.WithHTTPPathPattern("/v1/serviceinfo")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/GetServiceInfo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_GetServiceInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_GetServiceInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_GetServiceInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_GetServiceInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -568,21 +548,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/ListSwaps", runtime.WithHTTPPathPattern("/v1/listswaps")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/ListSwaps") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_ListSwaps_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_ListSwaps_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_ListSwaps_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_ListSwaps_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -590,21 +568,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/GetSwapInfo", runtime.WithHTTPPathPattern("/v1/swap/{id}")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/GetSwapInfo") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_GetSwapInfo_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_GetSwapInfo_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_GetSwapInfo_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_GetSwapInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -612,21 +588,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/Deposit", runtime.WithHTTPPathPattern("/v1/deposit")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/Deposit") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_Deposit_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_Deposit_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_Deposit_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_Deposit_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -634,21 +608,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/CreateSwap", runtime.WithHTTPPathPattern("/v1/createswap")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/CreateSwap") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_CreateSwap_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_CreateSwap_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_CreateSwap_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_CreateSwap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -656,21 +628,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/CreateChannel", runtime.WithHTTPPathPattern("/v1/createchannel")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/CreateChannel") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_CreateChannel_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_CreateChannel_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_CreateChannel_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_CreateChannel_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -678,21 +648,19 @@ func RegisterBoltzHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - var err error - var annotatedContext context.Context - annotatedContext, err = runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/CreateReverseSwap", runtime.WithHTTPPathPattern("/v1/createreverseswap")) + rctx, err := runtime.AnnotateContext(ctx, mux, req, "/boltzrpc.Boltz/CreateReverseSwap") if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Boltz_CreateReverseSwap_0(annotatedContext, inboundMarshaler, client, req, pathParams) - annotatedContext = runtime.NewServerMetadataContext(annotatedContext, md) + resp, md, err := request_Boltz_CreateReverseSwap_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { - runtime.HTTPError(annotatedContext, mux, outboundMarshaler, w, req, err) + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Boltz_CreateReverseSwap_0(annotatedContext, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Boltz_CreateReverseSwap_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) diff --git a/boltzrpc/boltzrpc.proto b/boltzrpc/boltzrpc.proto index 7cfc8269..fe6c31aa 100644 --- a/boltzrpc/boltzrpc.proto +++ b/boltzrpc/boltzrpc.proto @@ -126,6 +126,7 @@ message ReverseSwapInfo { uint32 timeout_block_height = 11; string lockup_transaction_id = 12; string claim_transaction_id = 13; + uint32 claim_fee_per_vbyte = 14; } message GetInfoRequest {} @@ -211,9 +212,14 @@ message CreateChannelRequest { message CreateReverseSwapRequest { int64 amount = 1; + // If no value is set, the daemon will query a new P2WKH address from LND string address = 2; + bool accept_zero_conf = 3; + + // sat/vByte fee for the claim transaction; if not set, a reasonable fee will be queried from mempool.space or LND + uint32 sat_per_vbyte_fee = 4; } message CreateReverseSwapResponse { string id = 1; diff --git a/boltzrpc/boltzrpc_grpc.pb.go b/boltzrpc/boltzrpc_grpc.pb.go index dd813f5b..6e12f103 100644 --- a/boltzrpc/boltzrpc_grpc.pb.go +++ b/boltzrpc/boltzrpc_grpc.pb.go @@ -1,8 +1,4 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. -// versions: -// - protoc-gen-go-grpc v1.2.0 -// - protoc v3.15.6 -// source: boltzrpc.proto package boltzrpc @@ -15,7 +11,6 @@ import ( // 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 // BoltzClient is the client API for Boltz service. @@ -209,7 +204,7 @@ type UnsafeBoltzServer interface { } func RegisterBoltzServer(s grpc.ServiceRegistrar, srv BoltzServer) { - s.RegisterService(&Boltz_ServiceDesc, srv) + s.RegisterService(&_Boltz_serviceDesc, srv) } func _Boltz_GetInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { @@ -356,10 +351,7 @@ func _Boltz_CreateReverseSwap_Handler(srv interface{}, ctx context.Context, dec return interceptor(ctx, in, info, handler) } -// Boltz_ServiceDesc is the grpc.ServiceDesc for Boltz service. -// It's only intended for direct use with grpc.RegisterService, -// and not to be introspected or modified (even as a copy) -var Boltz_ServiceDesc = grpc.ServiceDesc{ +var _Boltz_serviceDesc = grpc.ServiceDesc{ ServiceName: "boltzrpc.Boltz", HandlerType: (*BoltzServer)(nil), Methods: []grpc.MethodDesc{ diff --git a/build/version.go b/build/version.go index 9737441a..ddbd46fc 100644 --- a/build/version.go +++ b/build/version.go @@ -2,7 +2,7 @@ package build var Commit string -const version = "1.2.7" +const version = "1.2.8" func GetVersion() string { basicVersion := "v" + version diff --git a/database/database.go b/database/database.go index c71e9497..baecbfd7 100644 --- a/database/database.go +++ b/database/database.go @@ -10,6 +10,62 @@ import ( // TODO: prepare insert statements only once +const ( + createTables = ` +CREATE TABLE IF NOT EXISTS version ( + version INT +); + +CREATE TABLE IF NOT EXISTS macaroons ( + id VARCHAR PRIMARY KEY, + rootKey VARCHAR +); + +CREATE TABLE IF NOT EXISTS swaps ( + id VARCHAR PRIMARY KEY, + state INT, + error VARCHAR, + status VARCHAR, + privateKey VARCHAR, + preimage VARCHAR, + redeemScript VARCHAR, + invoice VARCHAR, + address VARCHAR, + expectedAmount INT, + timeoutBlockheight INTEGER, + lockupTransactionId VARCHAR, + refundTransactionId VARCHAR +); + +CREATE TABLE IF NOT EXISTS reverseSwaps ( + id VARCHAR PRIMARY KEY, + state INT, + error VARCHAR, + status VARCHAR, + acceptZeroConf BOOLEAN, + privateKey VARCHAR, + preimage VARCHAR, + redeemScript VARCHAR, + invoice VARCHAR, + claimAddress VARCHAR, + expectedAmount INT, + timeoutBlockheight INTEGER, + lockupTransactionId VARCHAR, + claimFeePerVbyte INTEGER, + claimTransactionId VARCHAR +); + +CREATE TABLE IF NOT EXISTS channelCreations ( + swapId VARCHAR PRIMARY KEY, + status VARCHAR, + inboundLiquidity INT, + private BOOLEAN, + fundingTransactionId VARCHAR, + fundingTransactionVout INT +); +` +) + type Database struct { Path string `long:"database.path" description:"Path to the database file"` @@ -36,32 +92,7 @@ func (database *Database) Connect() error { } func (database *Database) createTables() error { - _, err := database.db.Exec("CREATE TABLE IF NOT EXISTS version (version INT)") - - if err != nil { - return err - } - - _, err = database.db.Exec("CREATE TABLE IF NOT EXISTS macaroons (id VARCHAR PRIMARY KEY, rootKey VARCHAR)") - - if err != nil { - return err - } - - _, err = database.db.Exec("CREATE TABLE IF NOT EXISTS swaps (id VARCHAR PRIMARY KEY, state INT, error VARCHAR, status VARCHAR, privateKey VARCHAR, preimage VARCHAR, redeemScript VARCHAR, invoice VARCHAR, address VARCHAR, expectedAmount INT, timeoutBlockheight INTEGER, lockupTransactionId VARCHAR, refundTransactionId VARCHAR)") - - if err != nil { - return err - } - - _, err = database.db.Exec("CREATE TABLE IF NOT EXISTS reverseSwaps (id VARCHAR PRIMARY KEY, state INT, error VARCHAR, status VARCHAR, acceptZeroConf BOOLEAN, privateKey VARCHAR, preimage VARCHAR, redeemScript VARCHAR, invoice VARCHAR, claimAddress VARCHAR, expectedAmount INT, timeoutBlockheight INTEGER, lockupTransactionId VARCHAR, claimTransactionId VARCHAR)") - - if err != nil { - return err - } - - _, err = database.db.Exec("CREATE TABLE IF NOT EXISTS channelCreations (swapId VARCHAR PRIMARY KEY, status VARCHAR, inboundLiquidity INT, private BOOLEAN, fundingTransactionId VARCHAR, fundingTransactionVout INT)") - + _, err := database.db.Exec(createTables) return err } diff --git a/database/migration.go b/database/migration.go index fd9a7bbf..9ded7491 100644 --- a/database/migration.go +++ b/database/migration.go @@ -14,7 +14,7 @@ type swapStatus struct { status string } -const latestSchemaVersion = 2 +const latestSchemaVersion = 3 func (database *Database) migrate() error { version, err := database.queryVersion() @@ -36,12 +36,11 @@ func (database *Database) migrate() error { return database.performMigration(version) } -func (database *Database) performMigration(fromVersion int) error { - switch fromVersion { +func (database *Database) performMigration(oldVersion int) error { + switch oldVersion { case 1: - logger.Info("Updating database from version 1 to 2") - - logger.Info("Migrating table \"swaps\"") + logMigration(oldVersion) + logMigratingTable("swaps") _, err := database.db.Exec("ALTER TABLE swaps ADD COLUMN state INT") @@ -114,7 +113,7 @@ func (database *Database) performMigration(fromVersion int) error { } } - logger.Info("Migrating table \"reverseSwaps\"") + logMigratingTable("reverseSwaps") _, err = database.db.Exec("ALTER TABLE reverseSwaps ADD COLUMN state INT") @@ -177,27 +176,38 @@ func (database *Database) performMigration(fromVersion int) error { } } - _, err = database.db.Exec("UPDATE version SET version = 2 WHERE version = 1") + return database.postMigration(oldVersion) + + case 2: + logMigration(oldVersion) + + _, err := database.db.Exec("ALTER TABLE reverseSwaps ADD COLUMN claimFeePerVbyte INTEGER NOT NULL DEFAULT 0") if err != nil { return err } - logger.Info("Update to database version 2 completed") - return database.postMigration(fromVersion) + return database.postMigration(oldVersion) case latestSchemaVersion: logger.Info("Database already at latest schema version: " + strconv.Itoa(latestSchemaVersion)) default: - return errors.New("found unexpected database schema version: " + strconv.Itoa(fromVersion)) + return errors.New("found unexpected database schema version: " + strconv.Itoa(oldVersion)) } return nil } func (database *Database) postMigration(fromVersion int) error { + _, err := database.db.Exec("UPDATE version SET version = ? WHERE version = ?", fromVersion+1, fromVersion) + if err != nil { + return err + } + + logger.Infof("Update to database version %d completed", fromVersion+1) + if fromVersion+1 < latestSchemaVersion { - logger.Info("Running migration again") + logger.Info("Running next database migration") return database.migrate() } @@ -215,3 +225,11 @@ func (database *Database) queryVersion() (int, error) { return version, err } + +func logMigration(oldVersion int) { + logger.Infof("Updating database from version %d to %d", oldVersion, oldVersion+1) +} + +func logMigratingTable(table string) { + logger.Infof("Migrating table \"%s\"", table) +} diff --git a/database/reverse.go b/database/reverse.go index 1204a0da..53017cdf 100644 --- a/database/reverse.go +++ b/database/reverse.go @@ -25,6 +25,7 @@ type ReverseSwap struct { OnchainAmount uint64 TimeoutBlockHeight uint32 LockupTransactionId string + ClaimFeePerVbyte uint32 ClaimTransactionId string } @@ -42,6 +43,7 @@ type ReverseSwapSerialized struct { OnchainAmount uint64 TimeoutBlockHeight uint32 LockupTransactionId string + ClaimFeePerVbyte uint32 ClaimTransactionId string } @@ -60,6 +62,7 @@ func (reverseSwap *ReverseSwap) Serialize() ReverseSwapSerialized { OnchainAmount: reverseSwap.OnchainAmount, TimeoutBlockHeight: reverseSwap.TimeoutBlockHeight, LockupTransactionId: reverseSwap.LockupTransactionId, + ClaimFeePerVbyte: reverseSwap.ClaimFeePerVbyte, ClaimTransactionId: reverseSwap.ClaimTransactionId, } } @@ -88,6 +91,7 @@ func parseReverseSwap(rows *sql.Rows) (*ReverseSwap, error) { "expectedAmount": &reverseSwap.OnchainAmount, "timeoutBlockheight": &reverseSwap.TimeoutBlockHeight, "lockupTransactionId": &reverseSwap.LockupTransactionId, + "claimFeePerVbyte": &reverseSwap.ClaimFeePerVbyte, "claimTransactionId": &reverseSwap.ClaimTransactionId, }, ) @@ -169,7 +173,24 @@ func (database *Database) QueryPendingReverseSwaps() ([]ReverseSwap, error) { } func (database *Database) CreateReverseSwap(reverseSwap ReverseSwap) error { - insertStatement := "INSERT INTO reverseSwaps (id, state, error, status, acceptZeroConf, privateKey, preimage, redeemScript, invoice, claimAddress, expectedAmount, timeoutBlockheight, lockupTransactionId, claimTransactionId) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" + insertStatement := ` +INSERT INTO reverseSwaps ( + id, + state, + error, + status, + acceptZeroConf, + privateKey, + preimage, + redeemScript, + invoice, + claimAddress, + expectedAmount, + timeoutBlockheight, + lockupTransactionId, + claimFeePerVbyte, + claimTransactionId +) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)` statement, err := database.db.Prepare(insertStatement) if err != nil { @@ -190,6 +211,7 @@ func (database *Database) CreateReverseSwap(reverseSwap ReverseSwap) error { reverseSwap.OnchainAmount, reverseSwap.TimeoutBlockHeight, reverseSwap.LockupTransactionId, + reverseSwap.ClaimFeePerVbyte, reverseSwap.ClaimTransactionId, ) @@ -222,9 +244,15 @@ func (database *Database) SetReverseSwapLockupTransactionId(reverseSwap *Reverse return err } -func (database *Database) SetReverseSwapClaimTransactionId(reverseSwap *ReverseSwap, claimTransactionId string) error { +func (database *Database) SetReverseSwapClaimTransactionId(reverseSwap *ReverseSwap, claimTransactionId string, satPerVbyte int64) error { reverseSwap.ClaimTransactionId = claimTransactionId + reverseSwap.ClaimFeePerVbyte = uint32(satPerVbyte) - _, err := database.db.Exec("UPDATE reverseSwaps SET claimTransactionId = ? WHERE id = ?", claimTransactionId, reverseSwap.Id) + _, err := database.db.Exec( + "UPDATE reverseSwaps SET claimTransactionId = ?, claimFeePerVbyte = ? WHERE id = ?", + reverseSwap.ClaimTransactionId, + reverseSwap.ClaimFeePerVbyte, + reverseSwap.Id, + ) return err } diff --git a/database/scan.go b/database/scan.go index bb2f53fb..bf6979a9 100644 --- a/database/scan.go +++ b/database/scan.go @@ -7,7 +7,6 @@ import ( // TODO: optimize (query columns only once per query (improves speed by like a microsecond per row so low priority)) func scanRow(row *sql.Rows, rowValues map[string]interface{}) error { columns, err := row.Columns() - if err != nil { return err } @@ -18,7 +17,5 @@ func scanRow(row *sql.Rows, rowValues map[string]interface{}) error { values = append(values, rowValues[column]) } - err = row.Scan(values...) - - return err + return row.Scan(values...) } diff --git a/docs/grpc.md b/docs/grpc.md index d839a5aa..32cd5ef6 100644 --- a/docs/grpc.md +++ b/docs/grpc.md @@ -134,6 +134,7 @@ Channel creations are an optional extension to a submarine swap in the data type | `amount` | [`int64`](#int64) | | | | `address` | [`string`](#string) | | If no value is set, the daemon will query a new P2WKH address from LND | | `accept_zero_conf` | [`bool`](#bool) | | | +| `sat_per_vbyte_fee` | [`uint32`](#uint32) | | sat/vByte fee for the claim transaction; if not set, a reasonable fee will be queried from mempool.space or LND | @@ -356,6 +357,7 @@ Channel creations are an optional extension to a submarine swap in the data type | `timeout_block_height` | [`uint32`](#uint32) | | | | `lockup_transaction_id` | [`string`](#string) | | | | `claim_transaction_id` | [`string`](#string) | | | +| `claim_fee_per_vbyte` | [`uint32`](#uint32) | | | diff --git a/logger/logger.go b/logger/logger.go index f4013f65..84bd8788 100644 --- a/logger/logger.go +++ b/logger/logger.go @@ -38,6 +38,14 @@ func Fatal(message string) { logger.Fatal(prefix + message) } +func Fatalf(message string, args ...any) { + if !initialized { + return + } + + logger.Fatalf(prefix+message, args...) +} + func Error(message string) { if !initialized { return @@ -46,6 +54,14 @@ func Error(message string) { logger.Error(prefix + message) } +func Errorf(message string, args ...any) { + if !initialized { + return + } + + logger.Errorf(prefix+message, args...) +} + func Warning(message string) { if !initialized { return @@ -54,6 +70,14 @@ func Warning(message string) { logger.Warning(prefix + message) } +func Warningf(message string, args ...any) { + if !initialized { + return + } + + logger.Warningf(prefix+message, args...) +} + func Info(message string) { if !initialized { return @@ -62,6 +86,14 @@ func Info(message string) { logger.Info(prefix + message) } +func Infof(message string, args ...any) { + if !initialized { + return + } + + logger.Infof(prefix+message, args...) +} + func PrintFatal(format string, a ...interface{}) { fmt.Printf(format+"\n", a...) os.Exit(1) diff --git a/nursery/reverse.go b/nursery/reverse.go index 22f8a0dd..9de154a3 100644 --- a/nursery/reverse.go +++ b/nursery/reverse.go @@ -152,11 +152,13 @@ func (nursery *Nursery) handleReverseSwapStatus(reverseSwap *database.ReverseSwa return } - feeSatPerVbyte, err := nursery.mempool.GetFeeEstimation() - - if err != nil { - logger.Error("Could not get LND fee estimation: " + err.Error()) - return + feeSatPerVbyte := int64(reverseSwap.ClaimFeePerVbyte) + if feeSatPerVbyte == 0 { + feeSatPerVbyte, err = nursery.mempool.GetFeeEstimation() + if err != nil { + logger.Error("Could not get fee estimation: " + err.Error()) + return + } } logger.Info("Using fee of " + strconv.FormatInt(feeSatPerVbyte, 10) + " sat/vbyte for claim transaction") @@ -191,7 +193,7 @@ func (nursery *Nursery) handleReverseSwapStatus(reverseSwap *database.ReverseSwa return } - err = nursery.database.SetReverseSwapClaimTransactionId(reverseSwap, claimTransactionId) + err = nursery.database.SetReverseSwapClaimTransactionId(reverseSwap, claimTransactionId, feeSatPerVbyte) if err != nil { logger.Error("Could not set claim transaction id in database: " + err.Error()) diff --git a/rpcserver/router.go b/rpcserver/router.go index 04a55710..3ba851b1 100644 --- a/rpcserver/router.go +++ b/rpcserver/router.go @@ -355,7 +355,7 @@ func (server *routedBoltzServer) CreateChannel(_ context.Context, request *boltz invoice, err := server.lnd.AddHoldInvoice( preimageHash, - int64(request.Amount), + request.Amount, // TODO: query timeout block delta from API utils.CalculateInvoiceExpiry(144, utils.GetBlockTime(server.symbol)), "Channel Creation from "+server.symbol, @@ -526,6 +526,7 @@ func (server *routedBoltzServer) CreateReverseSwap(_ context.Context, request *b OnchainAmount: response.OnchainAmount, TimeoutBlockHeight: response.TimeoutBlockHeight, LockupTransactionId: "", + ClaimFeePerVbyte: request.SatPerVbyteFee, ClaimTransactionId: "", } diff --git a/rpcserver/serializer.go b/rpcserver/serializer.go index 0918539c..70645087 100644 --- a/rpcserver/serializer.go +++ b/rpcserver/serializer.go @@ -54,6 +54,7 @@ func serializeReverseSwap(reverseSwap *database.ReverseSwap) *boltzrpc.ReverseSw OnchainAmount: int64(serializedReverseSwap.OnchainAmount), TimeoutBlockHeight: serializedReverseSwap.TimeoutBlockHeight, LockupTransactionId: serializedReverseSwap.LockupTransactionId, + ClaimFeePerVbyte: reverseSwap.ClaimFeePerVbyte, ClaimTransactionId: serializedReverseSwap.ClaimTransactionId, } }