diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 42b1c0a6..23912ae3 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -51956,6 +51956,222 @@ paths: type: string tags: - Query + /side/btcbridge/withdrawal/fee: + get: + summary: QueryWithdrawNetworkFee queries the bitcoin network fee for withdrawal. + operationId: SideBtcbridgeQueryWithdrawNetworkFee + responses: + '200': + description: A successful response. + schema: + type: object + properties: + fee: + type: string + format: int64 + description: >- + QueryWithdrawNetworkFeeResponse is response type for the + Query/WithdrawNetworkFee RPC method. + default: + description: An unexpected error response. + schema: + type: object + properties: + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + '@type': + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + additionalProperties: {} + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := anypb.New(foo) + if err != nil { + ... + } + ... + foo := &pb.Foo{} + if err := any.UnmarshalTo(foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: sender + in: query + required: false + type: string + - name: amount + in: query + required: false + type: string + - name: fee_rate + in: query + required: false + type: string + tags: + - Query /side/btcbridge/withdrawal/request: get: summary: >- @@ -83279,6 +83495,15 @@ definitions: title: rune balances associated with the UTXO title: Bitcoin UTXO description: QueryUTXOsResponse is the response type for the Query/UTXOs RPC method. + side.btcbridge.QueryWithdrawNetworkFeeResponse: + type: object + properties: + fee: + type: string + format: int64 + description: >- + QueryWithdrawNetworkFeeResponse is response type for the + Query/WithdrawNetworkFee RPC method. side.btcbridge.QueryWithdrawRequestByTxHashResponse: type: object properties: diff --git a/proto/side/btcbridge/query.proto b/proto/side/btcbridge/query.proto index b0e39d95..011c47c2 100644 --- a/proto/side/btcbridge/query.proto +++ b/proto/side/btcbridge/query.proto @@ -39,6 +39,10 @@ service Query { rpc QueryWithdrawRequestByTxHash(QueryWithdrawRequestByTxHashRequest) returns (QueryWithdrawRequestByTxHashResponse) { option (google.api.http).get = "/side/btcbridge/withdrawal/request/tx/{txid}"; } + // QueryWithdrawNetworkFee queries the bitcoin network fee for withdrawal. + rpc QueryWithdrawNetworkFee(QueryWithdrawNetworkFeeRequest) returns (QueryWithdrawNetworkFeeResponse) { + option (google.api.http).get = "/side/btcbridge/withdrawal/fee"; + } // QueryUTXOs queries all utxos. rpc QueryUTXOs(QueryUTXOsRequest) returns (QueryUTXOsResponse) { option (google.api.http).get = "/side/btcbridge/utxos"; @@ -99,6 +103,18 @@ message QueryWithdrawRequestByTxHashResponse { BitcoinWithdrawRequest request = 1; } +// QueryWithdrawNetworkFeeRequest is request type for the Query/WithdrawNetworkFee RPC method. +message QueryWithdrawNetworkFeeRequest { + string sender = 1; + string amount = 2; + string fee_rate = 3; +} + +// QueryWithdrawNetworkFeeResponse is response type for the Query/WithdrawNetworkFee RPC method. +message QueryWithdrawNetworkFeeResponse { + int64 fee = 1; +} + // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} diff --git a/x/btcbridge/keeper/queries.go b/x/btcbridge/keeper/queries.go index 40f1b7b4..f2a3d93d 100644 --- a/x/btcbridge/keeper/queries.go +++ b/x/btcbridge/keeper/queries.go @@ -2,6 +2,7 @@ package keeper import ( "context" + "strconv" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" @@ -108,6 +109,35 @@ func (k Keeper) QueryWithdrawRequestByTxHash(goCtx context.Context, req *types.Q return &types.QueryWithdrawRequestByTxHashResponse{Request: request}, nil } +func (k Keeper) QueryWithdrawNetworkFee(goCtx context.Context, req *types.QueryWithdrawNetworkFeeRequest) (*types.QueryWithdrawNetworkFeeResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + amount, err := sdk.ParseCoinNormalized(req.Amount) + if err != nil { + return nil, err + } + + feeRate, err := strconv.ParseInt(req.FeeRate, 10, 64) + if err != nil { + return nil, types.ErrInvalidFeeRate + } + + withdrawReq, err := k.NewWithdrawRequest(ctx, req.Sender, amount, feeRate) + if err != nil { + return nil, err + } + + fee, err := k.getBtcNetworkFee(ctx, withdrawReq.Psbt) + if err != nil { + return nil, err + } + + return &types.QueryWithdrawNetworkFeeResponse{Fee: fee.Amount.Int64()}, nil +} + func (k Keeper) QueryUTXOs(goCtx context.Context, req *types.QueryUTXOsRequest) (*types.QueryUTXOsResponse, error) { if req == nil { return nil, status.Error(codes.InvalidArgument, "invalid request") diff --git a/x/btcbridge/types/query.pb.go b/x/btcbridge/types/query.pb.go index f998aaae..0edf783a 100644 --- a/x/btcbridge/types/query.pb.go +++ b/x/btcbridge/types/query.pb.go @@ -334,6 +334,112 @@ func (m *QueryWithdrawRequestByTxHashResponse) GetRequest() *BitcoinWithdrawRequ return nil } +// QueryWithdrawNetworkFeeRequest is request type for the Query/WithdrawNetworkFee RPC method. +type QueryWithdrawNetworkFeeRequest struct { + Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` + Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` + FeeRate string `protobuf:"bytes,3,opt,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` +} + +func (m *QueryWithdrawNetworkFeeRequest) Reset() { *m = QueryWithdrawNetworkFeeRequest{} } +func (m *QueryWithdrawNetworkFeeRequest) String() string { return proto.CompactTextString(m) } +func (*QueryWithdrawNetworkFeeRequest) ProtoMessage() {} +func (*QueryWithdrawNetworkFeeRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_fb547edb49d5502d, []int{6} +} +func (m *QueryWithdrawNetworkFeeRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWithdrawNetworkFeeRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWithdrawNetworkFeeRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryWithdrawNetworkFeeRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWithdrawNetworkFeeRequest.Merge(m, src) +} +func (m *QueryWithdrawNetworkFeeRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryWithdrawNetworkFeeRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWithdrawNetworkFeeRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWithdrawNetworkFeeRequest proto.InternalMessageInfo + +func (m *QueryWithdrawNetworkFeeRequest) GetSender() string { + if m != nil { + return m.Sender + } + return "" +} + +func (m *QueryWithdrawNetworkFeeRequest) GetAmount() string { + if m != nil { + return m.Amount + } + return "" +} + +func (m *QueryWithdrawNetworkFeeRequest) GetFeeRate() string { + if m != nil { + return m.FeeRate + } + return "" +} + +// QueryWithdrawNetworkFeeResponse is response type for the Query/WithdrawNetworkFee RPC method. +type QueryWithdrawNetworkFeeResponse struct { + Fee int64 `protobuf:"varint,1,opt,name=fee,proto3" json:"fee,omitempty"` +} + +func (m *QueryWithdrawNetworkFeeResponse) Reset() { *m = QueryWithdrawNetworkFeeResponse{} } +func (m *QueryWithdrawNetworkFeeResponse) String() string { return proto.CompactTextString(m) } +func (*QueryWithdrawNetworkFeeResponse) ProtoMessage() {} +func (*QueryWithdrawNetworkFeeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_fb547edb49d5502d, []int{7} +} +func (m *QueryWithdrawNetworkFeeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryWithdrawNetworkFeeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryWithdrawNetworkFeeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryWithdrawNetworkFeeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryWithdrawNetworkFeeResponse.Merge(m, src) +} +func (m *QueryWithdrawNetworkFeeResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryWithdrawNetworkFeeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryWithdrawNetworkFeeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryWithdrawNetworkFeeResponse proto.InternalMessageInfo + +func (m *QueryWithdrawNetworkFeeResponse) GetFee() int64 { + if m != nil { + return m.Fee + } + return 0 +} + // QueryParamsRequest is request type for the Query/Params RPC method. type QueryParamsRequest struct { } @@ -342,7 +448,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{6} + return fileDescriptor_fb547edb49d5502d, []int{8} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -381,7 +487,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{7} + return fileDescriptor_fb547edb49d5502d, []int{9} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -425,7 +531,7 @@ func (m *QueryChainTipRequest) Reset() { *m = QueryChainTipRequest{} } func (m *QueryChainTipRequest) String() string { return proto.CompactTextString(m) } func (*QueryChainTipRequest) ProtoMessage() {} func (*QueryChainTipRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{8} + return fileDescriptor_fb547edb49d5502d, []int{10} } func (m *QueryChainTipRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -464,7 +570,7 @@ func (m *QueryChainTipResponse) Reset() { *m = QueryChainTipResponse{} } func (m *QueryChainTipResponse) String() string { return proto.CompactTextString(m) } func (*QueryChainTipResponse) ProtoMessage() {} func (*QueryChainTipResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{9} + return fileDescriptor_fb547edb49d5502d, []int{11} } func (m *QueryChainTipResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -516,7 +622,7 @@ func (m *QueryBlockHeaderByHeightRequest) Reset() { *m = QueryBlockHeade func (m *QueryBlockHeaderByHeightRequest) String() string { return proto.CompactTextString(m) } func (*QueryBlockHeaderByHeightRequest) ProtoMessage() {} func (*QueryBlockHeaderByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{10} + return fileDescriptor_fb547edb49d5502d, []int{12} } func (m *QueryBlockHeaderByHeightRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -561,7 +667,7 @@ func (m *QueryBlockHeaderByHeightResponse) Reset() { *m = QueryBlockHead func (m *QueryBlockHeaderByHeightResponse) String() string { return proto.CompactTextString(m) } func (*QueryBlockHeaderByHeightResponse) ProtoMessage() {} func (*QueryBlockHeaderByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{11} + return fileDescriptor_fb547edb49d5502d, []int{13} } func (m *QueryBlockHeaderByHeightResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -606,7 +712,7 @@ func (m *QueryBlockHeaderByHashRequest) Reset() { *m = QueryBlockHeaderB func (m *QueryBlockHeaderByHashRequest) String() string { return proto.CompactTextString(m) } func (*QueryBlockHeaderByHashRequest) ProtoMessage() {} func (*QueryBlockHeaderByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{12} + return fileDescriptor_fb547edb49d5502d, []int{14} } func (m *QueryBlockHeaderByHashRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -651,7 +757,7 @@ func (m *QueryBlockHeaderByHashResponse) Reset() { *m = QueryBlockHeader func (m *QueryBlockHeaderByHashResponse) String() string { return proto.CompactTextString(m) } func (*QueryBlockHeaderByHashResponse) ProtoMessage() {} func (*QueryBlockHeaderByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{13} + return fileDescriptor_fb547edb49d5502d, []int{15} } func (m *QueryBlockHeaderByHashResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -695,7 +801,7 @@ func (m *QueryUTXOsRequest) Reset() { *m = QueryUTXOsRequest{} } func (m *QueryUTXOsRequest) String() string { return proto.CompactTextString(m) } func (*QueryUTXOsRequest) ProtoMessage() {} func (*QueryUTXOsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{14} + return fileDescriptor_fb547edb49d5502d, []int{16} } func (m *QueryUTXOsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -733,7 +839,7 @@ func (m *QueryUTXOsResponse) Reset() { *m = QueryUTXOsResponse{} } func (m *QueryUTXOsResponse) String() string { return proto.CompactTextString(m) } func (*QueryUTXOsResponse) ProtoMessage() {} func (*QueryUTXOsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{15} + return fileDescriptor_fb547edb49d5502d, []int{17} } func (m *QueryUTXOsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -778,7 +884,7 @@ func (m *QueryUTXOsByAddressRequest) Reset() { *m = QueryUTXOsByAddressR func (m *QueryUTXOsByAddressRequest) String() string { return proto.CompactTextString(m) } func (*QueryUTXOsByAddressRequest) ProtoMessage() {} func (*QueryUTXOsByAddressRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{16} + return fileDescriptor_fb547edb49d5502d, []int{18} } func (m *QueryUTXOsByAddressRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -823,7 +929,7 @@ func (m *QueryUTXOsByAddressResponse) Reset() { *m = QueryUTXOsByAddress func (m *QueryUTXOsByAddressResponse) String() string { return proto.CompactTextString(m) } func (*QueryUTXOsByAddressResponse) ProtoMessage() {} func (*QueryUTXOsByAddressResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{17} + return fileDescriptor_fb547edb49d5502d, []int{19} } func (m *QueryUTXOsByAddressResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -868,7 +974,7 @@ func (m *QueryDKGRequestRequest) Reset() { *m = QueryDKGRequestRequest{} func (m *QueryDKGRequestRequest) String() string { return proto.CompactTextString(m) } func (*QueryDKGRequestRequest) ProtoMessage() {} func (*QueryDKGRequestRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{18} + return fileDescriptor_fb547edb49d5502d, []int{20} } func (m *QueryDKGRequestRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -913,7 +1019,7 @@ func (m *QueryDKGRequestResponse) Reset() { *m = QueryDKGRequestResponse func (m *QueryDKGRequestResponse) String() string { return proto.CompactTextString(m) } func (*QueryDKGRequestResponse) ProtoMessage() {} func (*QueryDKGRequestResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{19} + return fileDescriptor_fb547edb49d5502d, []int{21} } func (m *QueryDKGRequestResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -958,7 +1064,7 @@ func (m *QueryDKGRequestsRequest) Reset() { *m = QueryDKGRequestsRequest func (m *QueryDKGRequestsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDKGRequestsRequest) ProtoMessage() {} func (*QueryDKGRequestsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{20} + return fileDescriptor_fb547edb49d5502d, []int{22} } func (m *QueryDKGRequestsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1003,7 +1109,7 @@ func (m *QueryDKGRequestsResponse) Reset() { *m = QueryDKGRequestsRespon func (m *QueryDKGRequestsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDKGRequestsResponse) ProtoMessage() {} func (*QueryDKGRequestsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{21} + return fileDescriptor_fb547edb49d5502d, []int{23} } func (m *QueryDKGRequestsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1047,7 +1153,7 @@ func (m *QueryAllDKGRequestsRequest) Reset() { *m = QueryAllDKGRequestsR func (m *QueryAllDKGRequestsRequest) String() string { return proto.CompactTextString(m) } func (*QueryAllDKGRequestsRequest) ProtoMessage() {} func (*QueryAllDKGRequestsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{22} + return fileDescriptor_fb547edb49d5502d, []int{24} } func (m *QueryAllDKGRequestsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1085,7 +1191,7 @@ func (m *QueryAllDKGRequestsResponse) Reset() { *m = QueryAllDKGRequests func (m *QueryAllDKGRequestsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAllDKGRequestsResponse) ProtoMessage() {} func (*QueryAllDKGRequestsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{23} + return fileDescriptor_fb547edb49d5502d, []int{25} } func (m *QueryAllDKGRequestsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1130,7 +1236,7 @@ func (m *QueryDKGCompletionRequestsRequest) Reset() { *m = QueryDKGCompl func (m *QueryDKGCompletionRequestsRequest) String() string { return proto.CompactTextString(m) } func (*QueryDKGCompletionRequestsRequest) ProtoMessage() {} func (*QueryDKGCompletionRequestsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{24} + return fileDescriptor_fb547edb49d5502d, []int{26} } func (m *QueryDKGCompletionRequestsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1175,7 +1281,7 @@ func (m *QueryDKGCompletionRequestsResponse) Reset() { *m = QueryDKGComp func (m *QueryDKGCompletionRequestsResponse) String() string { return proto.CompactTextString(m) } func (*QueryDKGCompletionRequestsResponse) ProtoMessage() {} func (*QueryDKGCompletionRequestsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_fb547edb49d5502d, []int{25} + return fileDescriptor_fb547edb49d5502d, []int{27} } func (m *QueryDKGCompletionRequestsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -1218,6 +1324,8 @@ func init() { proto.RegisterType((*QueryWithdrawRequestsByAddressResponse)(nil), "side.btcbridge.QueryWithdrawRequestsByAddressResponse") proto.RegisterType((*QueryWithdrawRequestByTxHashRequest)(nil), "side.btcbridge.QueryWithdrawRequestByTxHashRequest") proto.RegisterType((*QueryWithdrawRequestByTxHashResponse)(nil), "side.btcbridge.QueryWithdrawRequestByTxHashResponse") + proto.RegisterType((*QueryWithdrawNetworkFeeRequest)(nil), "side.btcbridge.QueryWithdrawNetworkFeeRequest") + proto.RegisterType((*QueryWithdrawNetworkFeeResponse)(nil), "side.btcbridge.QueryWithdrawNetworkFeeResponse") proto.RegisterType((*QueryParamsRequest)(nil), "side.btcbridge.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "side.btcbridge.QueryParamsResponse") proto.RegisterType((*QueryChainTipRequest)(nil), "side.btcbridge.QueryChainTipRequest") @@ -1243,81 +1351,87 @@ func init() { func init() { proto.RegisterFile("side/btcbridge/query.proto", fileDescriptor_fb547edb49d5502d) } var fileDescriptor_fb547edb49d5502d = []byte{ - // 1172 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0xcf, 0x6f, 0xdc, 0x54, - 0x10, 0xc7, 0xf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ca, 0x5e, 0x9c, 0xaa, 0xec, 0xcf, 0x53, 0x95, 0x7d, 0x79, 0xa6, 0x8e, 0xbc, - 0x38, 0x53, 0x47, 0x7e, 0x3f, 0x53, 0x47, 0x3e, 0xd6, 0xaa, 0x8e, 0x6f, 0x1f, 0x95, 0xb4, 0xb2, - 0x7b, 0x28, 0x02, 0x8a, 0xff, 0x66, 0x28, 0xbb, 0xb5, 0x30, 0xfa, 0x71, 0xf7, 0x00, 0x6d, 0x35, - 0x2c, 0xaf, 0x34, 0x2e, 0x0c, 0xb6, 0xff, 0x09, 0x00, 0x00, 0xff, 0xff, 0x69, 0x72, 0xcd, 0x22, - 0x52, 0x11, 0x00, 0x00, + // 1276 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x98, 0x4f, 0x6f, 0xdc, 0x44, + 0x14, 0xc0, 0xe3, 0x24, 0x4d, 0xdb, 0x09, 0x94, 0xf6, 0x35, 0x4d, 0x17, 0x27, 0x71, 0x36, 0x93, + 0x34, 0x59, 0xa5, 0x8d, 0x4d, 0xb2, 0x21, 0xa2, 0x12, 0x42, 0xed, 0x06, 0xd1, 0xa0, 0x4a, 0xb4, + 0xb8, 0xa9, 0x40, 0x5c, 0x8a, 0x77, 0x77, 0xb2, 0x6b, 0x65, 0xb3, 0xde, 0xda, 0xde, 0x26, 0xab, + 0x28, 0x17, 0x8e, 0x15, 0x07, 0x24, 0x90, 0xe0, 0x80, 0x04, 0xe2, 0xc0, 0x89, 0x2b, 0x12, 0x37, + 0xae, 0xbd, 0x20, 0x55, 0xe2, 0xc2, 0x09, 0xa1, 0x84, 0x0f, 0x82, 0x3c, 0x7e, 0xf6, 0xae, 0xc7, + 0xf6, 0xae, 0x03, 0x39, 0x70, 0xe9, 0xda, 0x33, 0xef, 0xcf, 0xef, 0xbd, 0x79, 0x7e, 0xf3, 0x1a, + 0x22, 0x3b, 0x66, 0x95, 0x69,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, 0x47, 0x6c, 0x96, 0x94, 0xb5, 0xcc, 0xf2, 0x88, 0xbc, 0xc8, + 0x91, 0xf3, 0xa0, 0xf4, 0x41, 0xde, 0x61, 0x0c, 0x6c, 0x42, 0xba, 0xf7, 0x33, 0xcc, 0x25, 0xba, + 0xe9, 0x1d, 0x25, 0x64, 0xda, 0x4f, 0x04, 0x9d, 0xcf, 0x70, 0xe7, 0xd7, 0xe1, 0x9a, 0xe8, 0x9c, + 0x5f, 0xe4, 0xf0, 0xb5, 0x84, 0x33, 0x68, 0x74, 0x28, 0x80, 0xe5, 0x74, 0xd3, 0xb1, 0xa2, 0xbc, + 0x99, 0x49, 0x76, 0x50, 0x1b, 0xe2, 0x3c, 0x3d, 0x45, 0xf7, 0xb9, 0x44, 0x5e, 0x13, 0xee, 0x64, + 0x58, 0x4c, 0xf4, 0x14, 0x1b, 0x42, 0xe4, 0xa5, 0x81, 0x72, 0x48, 0x53, 0xe0, 0x34, 0x14, 0xf2, + 0x22, 0x4d, 0x75, 0xb7, 0x16, 0x96, 0xd1, 0xa1, 0x57, 0x41, 0xcf, 0x25, 0x72, 0x59, 0x1c, 0x11, + 0x60, 0x90, 0x9f, 0x30, 0x45, 0x85, 0xc1, 0x82, 0x83, 0x7a, 0x60, 0x0f, 0x11, 0x7c, 0x15, 0x9c, + 0x5a, 0x74, 0x7a, 0x48, 0x39, 0xb5, 0xc4, 0x01, 0x24, 0xe5, 0xd4, 0x92, 0xc7, 0x11, 0xba, 0xc0, + 0xa9, 0x14, 0x98, 0xee, 0x43, 0xe5, 0xc0, 0x2f, 0x12, 0x8e, 0x3c, 0x89, 0x83, 0x04, 0xac, 0xa6, + 0x25, 0x21, 0x75, 0x52, 0x91, 0xd7, 0x4e, 0xa3, 0x82, 0xac, 0x45, 0xce, 0xba, 0x02, 0x37, 0x93, + 0x58, 0x2b, 0xa1, 0x5e, 0xe4, 0x78, 0x4b, 0x5b, 0x2f, 0x8e, 0x15, 0xe9, 0xe5, 0xb1, 0x22, 0xfd, + 0x75, 0xac, 0x48, 0x5f, 0x9c, 0x28, 0x43, 0x2f, 0x4f, 0x94, 0xa1, 0x3f, 0x4e, 0x94, 0xa1, 0x4f, + 0xd4, 0x9a, 0xe9, 0xd6, 0xdb, 0x65, 0xb5, 0x62, 0xed, 0x71, 0x83, 0xfc, 0xaf, 0x35, 0x15, 0xab, + 0xe1, 0x5b, 0x3f, 0xe8, 0xbd, 0xe5, 0x3b, 0x2d, 0xe6, 0x94, 0xc7, 0xb8, 0x40, 0xf1, 0x9f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xc7, 0x85, 0xbe, 0x13, 0x99, 0x12, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1346,6 +1460,8 @@ type QueryClient interface { QueryWithdrawRequestsByAddress(ctx context.Context, in *QueryWithdrawRequestsByAddressRequest, opts ...grpc.CallOption) (*QueryWithdrawRequestsByAddressResponse, error) // QueryWithdrawRequestByTxHash queries the withdrawal request by the given tx hash. QueryWithdrawRequestByTxHash(ctx context.Context, in *QueryWithdrawRequestByTxHashRequest, opts ...grpc.CallOption) (*QueryWithdrawRequestByTxHashResponse, error) + // QueryWithdrawNetworkFee queries the bitcoin network fee for withdrawal. + QueryWithdrawNetworkFee(ctx context.Context, in *QueryWithdrawNetworkFeeRequest, opts ...grpc.CallOption) (*QueryWithdrawNetworkFeeResponse, error) // QueryUTXOs queries all utxos. QueryUTXOs(ctx context.Context, in *QueryUTXOsRequest, opts ...grpc.CallOption) (*QueryUTXOsResponse, error) // QueryUTXOsByAddress queries the utxos of the given address. @@ -1431,6 +1547,15 @@ func (c *queryClient) QueryWithdrawRequestByTxHash(ctx context.Context, in *Quer return out, nil } +func (c *queryClient) QueryWithdrawNetworkFee(ctx context.Context, in *QueryWithdrawNetworkFeeRequest, opts ...grpc.CallOption) (*QueryWithdrawNetworkFeeResponse, error) { + out := new(QueryWithdrawNetworkFeeResponse) + err := c.cc.Invoke(ctx, "/side.btcbridge.Query/QueryWithdrawNetworkFee", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + func (c *queryClient) QueryUTXOs(ctx context.Context, in *QueryUTXOsRequest, opts ...grpc.CallOption) (*QueryUTXOsResponse, error) { out := new(QueryUTXOsResponse) err := c.cc.Invoke(ctx, "/side.btcbridge.Query/QueryUTXOs", in, out, opts...) @@ -1501,6 +1626,8 @@ type QueryServer interface { QueryWithdrawRequestsByAddress(context.Context, *QueryWithdrawRequestsByAddressRequest) (*QueryWithdrawRequestsByAddressResponse, error) // QueryWithdrawRequestByTxHash queries the withdrawal request by the given tx hash. QueryWithdrawRequestByTxHash(context.Context, *QueryWithdrawRequestByTxHashRequest) (*QueryWithdrawRequestByTxHashResponse, error) + // QueryWithdrawNetworkFee queries the bitcoin network fee for withdrawal. + QueryWithdrawNetworkFee(context.Context, *QueryWithdrawNetworkFeeRequest) (*QueryWithdrawNetworkFeeResponse, error) // QueryUTXOs queries all utxos. QueryUTXOs(context.Context, *QueryUTXOsRequest) (*QueryUTXOsResponse, error) // QueryUTXOsByAddress queries the utxos of the given address. @@ -1540,6 +1667,9 @@ func (*UnimplementedQueryServer) QueryWithdrawRequestsByAddress(ctx context.Cont func (*UnimplementedQueryServer) QueryWithdrawRequestByTxHash(ctx context.Context, req *QueryWithdrawRequestByTxHashRequest) (*QueryWithdrawRequestByTxHashResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryWithdrawRequestByTxHash not implemented") } +func (*UnimplementedQueryServer) QueryWithdrawNetworkFee(ctx context.Context, req *QueryWithdrawNetworkFeeRequest) (*QueryWithdrawNetworkFeeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method QueryWithdrawNetworkFee not implemented") +} func (*UnimplementedQueryServer) QueryUTXOs(ctx context.Context, req *QueryUTXOsRequest) (*QueryUTXOsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method QueryUTXOs not implemented") } @@ -1689,6 +1819,24 @@ func _Query_QueryWithdrawRequestByTxHash_Handler(srv interface{}, ctx context.Co return interceptor(ctx, in, info, handler) } +func _Query_QueryWithdrawNetworkFee_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryWithdrawNetworkFeeRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).QueryWithdrawNetworkFee(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/side.btcbridge.Query/QueryWithdrawNetworkFee", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).QueryWithdrawNetworkFee(ctx, req.(*QueryWithdrawNetworkFeeRequest)) + } + return interceptor(ctx, in, info, handler) +} + func _Query_QueryUTXOs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryUTXOsRequest) if err := dec(in); err != nil { @@ -1829,6 +1977,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "QueryWithdrawRequestByTxHash", Handler: _Query_QueryWithdrawRequestByTxHash_Handler, }, + { + MethodName: "QueryWithdrawNetworkFee", + Handler: _Query_QueryWithdrawNetworkFee_Handler, + }, { MethodName: "QueryUTXOs", Handler: _Query_QueryUTXOs_Handler, @@ -2103,6 +2255,78 @@ func (m *QueryWithdrawRequestByTxHashResponse) MarshalToSizedBuffer(dAtA []byte) return len(dAtA) - i, nil } +func (m *QueryWithdrawNetworkFeeRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryWithdrawNetworkFeeRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWithdrawNetworkFeeRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.FeeRate) > 0 { + i -= len(m.FeeRate) + copy(dAtA[i:], m.FeeRate) + i = encodeVarintQuery(dAtA, i, uint64(len(m.FeeRate))) + i-- + dAtA[i] = 0x1a + } + if len(m.Amount) > 0 { + i -= len(m.Amount) + copy(dAtA[i:], m.Amount) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Amount))) + i-- + dAtA[i] = 0x12 + } + if len(m.Sender) > 0 { + i -= len(m.Sender) + copy(dAtA[i:], m.Sender) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Sender))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryWithdrawNetworkFeeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryWithdrawNetworkFeeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryWithdrawNetworkFeeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Fee != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Fee)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -2833,6 +3057,39 @@ func (m *QueryWithdrawRequestByTxHashResponse) Size() (n int) { return n } +func (m *QueryWithdrawNetworkFeeRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Sender) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Amount) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.FeeRate) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryWithdrawNetworkFeeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Fee != 0 { + n += 1 + sovQuery(uint64(m.Fee)) + } + return n +} + func (m *QueryParamsRequest) Size() (n int) { if m == nil { return 0 @@ -3721,6 +3978,221 @@ func (m *QueryWithdrawRequestByTxHashResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryWithdrawNetworkFeeRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryWithdrawNetworkFeeRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWithdrawNetworkFeeRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Sender = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Amount = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRate = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryWithdrawNetworkFeeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryWithdrawNetworkFeeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryWithdrawNetworkFeeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Fee", wireType) + } + m.Fee = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Fee |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/x/btcbridge/types/query.pb.gw.go b/x/btcbridge/types/query.pb.gw.go index c47102b0..ec854420 100644 --- a/x/btcbridge/types/query.pb.gw.go +++ b/x/btcbridge/types/query.pb.gw.go @@ -339,6 +339,42 @@ func local_request_Query_QueryWithdrawRequestByTxHash_0(ctx context.Context, mar } +var ( + filter_Query_QueryWithdrawNetworkFee_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_QueryWithdrawNetworkFee_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWithdrawNetworkFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryWithdrawNetworkFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.QueryWithdrawNetworkFee(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_QueryWithdrawNetworkFee_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryWithdrawNetworkFeeRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_QueryWithdrawNetworkFee_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.QueryWithdrawNetworkFee(ctx, &protoReq) + return msg, metadata, err + +} + func request_Query_QueryUTXOs_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryUTXOsRequest var metadata runtime.ServerMetadata @@ -740,6 +776,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_QueryWithdrawNetworkFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_QueryWithdrawNetworkFee_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryWithdrawNetworkFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_QueryUTXOs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1059,6 +1118,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_QueryWithdrawNetworkFee_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_QueryWithdrawNetworkFee_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_QueryWithdrawNetworkFee_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + mux.Handle("GET", pattern_Query_QueryUTXOs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -1197,6 +1276,8 @@ var ( pattern_Query_QueryWithdrawRequestByTxHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"side", "btcbridge", "withdrawal", "request", "tx", "txid"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_QueryWithdrawNetworkFee_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"side", "btcbridge", "withdrawal", "fee"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Query_QueryUTXOs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"side", "btcbridge", "utxos"}, "", runtime.AssumeColonVerbOpt(true))) pattern_Query_QueryUTXOsByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 1, 0, 4, 1, 5, 3}, []string{"side", "btcbridge", "utxos", "address"}, "", runtime.AssumeColonVerbOpt(true))) @@ -1225,6 +1306,8 @@ var ( forward_Query_QueryWithdrawRequestByTxHash_0 = runtime.ForwardResponseMessage + forward_Query_QueryWithdrawNetworkFee_0 = runtime.ForwardResponseMessage + forward_Query_QueryUTXOs_0 = runtime.ForwardResponseMessage forward_Query_QueryUTXOsByAddress_0 = runtime.ForwardResponseMessage