diff --git a/api/connect/oracle/v2/query.pulsar.go b/api/connect/oracle/v2/query.pulsar.go index 1a4dbd27a..82792a4b2 100644 --- a/api/connect/oracle/v2/query.pulsar.go +++ b/api/connect/oracle/v2/query.pulsar.go @@ -3863,6 +3863,1339 @@ func (x *fastReflection_GetCurrencyPairMappingResponse) ProtoMethods() *protoifa } } +var ( + md_GetCurrencyPairMappingListRequest protoreflect.MessageDescriptor +) + +func init() { + file_connect_oracle_v2_query_proto_init() + md_GetCurrencyPairMappingListRequest = File_connect_oracle_v2_query_proto.Messages().ByName("GetCurrencyPairMappingListRequest") +} + +var _ protoreflect.Message = (*fastReflection_GetCurrencyPairMappingListRequest)(nil) + +type fastReflection_GetCurrencyPairMappingListRequest GetCurrencyPairMappingListRequest + +func (x *GetCurrencyPairMappingListRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_GetCurrencyPairMappingListRequest)(x) +} + +func (x *GetCurrencyPairMappingListRequest) slowProtoReflect() protoreflect.Message { + mi := &file_connect_oracle_v2_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GetCurrencyPairMappingListRequest_messageType fastReflection_GetCurrencyPairMappingListRequest_messageType +var _ protoreflect.MessageType = fastReflection_GetCurrencyPairMappingListRequest_messageType{} + +type fastReflection_GetCurrencyPairMappingListRequest_messageType struct{} + +func (x fastReflection_GetCurrencyPairMappingListRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_GetCurrencyPairMappingListRequest)(nil) +} +func (x fastReflection_GetCurrencyPairMappingListRequest_messageType) New() protoreflect.Message { + return new(fastReflection_GetCurrencyPairMappingListRequest) +} +func (x fastReflection_GetCurrencyPairMappingListRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GetCurrencyPairMappingListRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Descriptor() protoreflect.MessageDescriptor { + return md_GetCurrencyPairMappingListRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Type() protoreflect.MessageType { + return _fastReflection_GetCurrencyPairMappingListRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GetCurrencyPairMappingListRequest) New() protoreflect.Message { + return new(fastReflection_GetCurrencyPairMappingListRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Interface() protoreflect.ProtoMessage { + return (*GetCurrencyPairMappingListRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListRequest")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListRequest")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListRequest")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListRequest")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListRequest")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GetCurrencyPairMappingListRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListRequest")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GetCurrencyPairMappingListRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in connect.oracle.v2.GetCurrencyPairMappingListRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GetCurrencyPairMappingListRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GetCurrencyPairMappingListRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GetCurrencyPairMappingListRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GetCurrencyPairMappingListRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GetCurrencyPairMappingListRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GetCurrencyPairMappingListRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetCurrencyPairMappingListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetCurrencyPairMappingListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_CurrencyPairMapping protoreflect.MessageDescriptor + fd_CurrencyPairMapping_id protoreflect.FieldDescriptor + fd_CurrencyPairMapping_currency_pair protoreflect.FieldDescriptor +) + +func init() { + file_connect_oracle_v2_query_proto_init() + md_CurrencyPairMapping = File_connect_oracle_v2_query_proto.Messages().ByName("CurrencyPairMapping") + fd_CurrencyPairMapping_id = md_CurrencyPairMapping.Fields().ByName("id") + fd_CurrencyPairMapping_currency_pair = md_CurrencyPairMapping.Fields().ByName("currency_pair") +} + +var _ protoreflect.Message = (*fastReflection_CurrencyPairMapping)(nil) + +type fastReflection_CurrencyPairMapping CurrencyPairMapping + +func (x *CurrencyPairMapping) ProtoReflect() protoreflect.Message { + return (*fastReflection_CurrencyPairMapping)(x) +} + +func (x *CurrencyPairMapping) slowProtoReflect() protoreflect.Message { + mi := &file_connect_oracle_v2_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_CurrencyPairMapping_messageType fastReflection_CurrencyPairMapping_messageType +var _ protoreflect.MessageType = fastReflection_CurrencyPairMapping_messageType{} + +type fastReflection_CurrencyPairMapping_messageType struct{} + +func (x fastReflection_CurrencyPairMapping_messageType) Zero() protoreflect.Message { + return (*fastReflection_CurrencyPairMapping)(nil) +} +func (x fastReflection_CurrencyPairMapping_messageType) New() protoreflect.Message { + return new(fastReflection_CurrencyPairMapping) +} +func (x fastReflection_CurrencyPairMapping_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_CurrencyPairMapping +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_CurrencyPairMapping) Descriptor() protoreflect.MessageDescriptor { + return md_CurrencyPairMapping +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_CurrencyPairMapping) Type() protoreflect.MessageType { + return _fastReflection_CurrencyPairMapping_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_CurrencyPairMapping) New() protoreflect.Message { + return new(fastReflection_CurrencyPairMapping) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_CurrencyPairMapping) Interface() protoreflect.ProtoMessage { + return (*CurrencyPairMapping)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_CurrencyPairMapping) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != uint64(0) { + value := protoreflect.ValueOfUint64(x.Id) + if !f(fd_CurrencyPairMapping_id, value) { + return + } + } + if x.CurrencyPair != nil { + value := protoreflect.ValueOfMessage(x.CurrencyPair.ProtoReflect()) + if !f(fd_CurrencyPairMapping_currency_pair, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_CurrencyPairMapping) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "connect.oracle.v2.CurrencyPairMapping.id": + return x.Id != uint64(0) + case "connect.oracle.v2.CurrencyPairMapping.currency_pair": + return x.CurrencyPair != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.CurrencyPairMapping")) + } + panic(fmt.Errorf("message connect.oracle.v2.CurrencyPairMapping does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairMapping) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "connect.oracle.v2.CurrencyPairMapping.id": + x.Id = uint64(0) + case "connect.oracle.v2.CurrencyPairMapping.currency_pair": + x.CurrencyPair = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.CurrencyPairMapping")) + } + panic(fmt.Errorf("message connect.oracle.v2.CurrencyPairMapping does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_CurrencyPairMapping) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "connect.oracle.v2.CurrencyPairMapping.id": + value := x.Id + return protoreflect.ValueOfUint64(value) + case "connect.oracle.v2.CurrencyPairMapping.currency_pair": + value := x.CurrencyPair + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.CurrencyPairMapping")) + } + panic(fmt.Errorf("message connect.oracle.v2.CurrencyPairMapping does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairMapping) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "connect.oracle.v2.CurrencyPairMapping.id": + x.Id = value.Uint() + case "connect.oracle.v2.CurrencyPairMapping.currency_pair": + x.CurrencyPair = value.Message().Interface().(*v2.CurrencyPair) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.CurrencyPairMapping")) + } + panic(fmt.Errorf("message connect.oracle.v2.CurrencyPairMapping does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairMapping) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "connect.oracle.v2.CurrencyPairMapping.currency_pair": + if x.CurrencyPair == nil { + x.CurrencyPair = new(v2.CurrencyPair) + } + return protoreflect.ValueOfMessage(x.CurrencyPair.ProtoReflect()) + case "connect.oracle.v2.CurrencyPairMapping.id": + panic(fmt.Errorf("field id of message connect.oracle.v2.CurrencyPairMapping is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.CurrencyPairMapping")) + } + panic(fmt.Errorf("message connect.oracle.v2.CurrencyPairMapping does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_CurrencyPairMapping) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "connect.oracle.v2.CurrencyPairMapping.id": + return protoreflect.ValueOfUint64(uint64(0)) + case "connect.oracle.v2.CurrencyPairMapping.currency_pair": + m := new(v2.CurrencyPair) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.CurrencyPairMapping")) + } + panic(fmt.Errorf("message connect.oracle.v2.CurrencyPairMapping does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_CurrencyPairMapping) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in connect.oracle.v2.CurrencyPairMapping", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_CurrencyPairMapping) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_CurrencyPairMapping) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_CurrencyPairMapping) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_CurrencyPairMapping) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*CurrencyPairMapping) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Id != 0 { + n += 1 + runtime.Sov(uint64(x.Id)) + } + if x.CurrencyPair != nil { + l = options.Size(x.CurrencyPair) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*CurrencyPairMapping) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.CurrencyPair != nil { + encoded, err := options.Marshal(x.CurrencyPair) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.Id != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Id)) + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*CurrencyPairMapping) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrencyPairMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: CurrencyPairMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + x.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CurrencyPair", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.CurrencyPair == nil { + x.CurrencyPair = &v2.CurrencyPair{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CurrencyPair); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_GetCurrencyPairMappingListResponse_1_list)(nil) + +type _GetCurrencyPairMappingListResponse_1_list struct { + list *[]*CurrencyPairMapping +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairMapping) + (*x.list)[i] = concreteValue +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*CurrencyPairMapping) + *x.list = append(*x.list, concreteValue) +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) AppendMutable() protoreflect.Value { + v := new(CurrencyPairMapping) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) NewElement() protoreflect.Value { + v := new(CurrencyPairMapping) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_GetCurrencyPairMappingListResponse_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_GetCurrencyPairMappingListResponse protoreflect.MessageDescriptor + fd_GetCurrencyPairMappingListResponse_mappings protoreflect.FieldDescriptor +) + +func init() { + file_connect_oracle_v2_query_proto_init() + md_GetCurrencyPairMappingListResponse = File_connect_oracle_v2_query_proto.Messages().ByName("GetCurrencyPairMappingListResponse") + fd_GetCurrencyPairMappingListResponse_mappings = md_GetCurrencyPairMappingListResponse.Fields().ByName("mappings") +} + +var _ protoreflect.Message = (*fastReflection_GetCurrencyPairMappingListResponse)(nil) + +type fastReflection_GetCurrencyPairMappingListResponse GetCurrencyPairMappingListResponse + +func (x *GetCurrencyPairMappingListResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_GetCurrencyPairMappingListResponse)(x) +} + +func (x *GetCurrencyPairMappingListResponse) slowProtoReflect() protoreflect.Message { + mi := &file_connect_oracle_v2_query_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_GetCurrencyPairMappingListResponse_messageType fastReflection_GetCurrencyPairMappingListResponse_messageType +var _ protoreflect.MessageType = fastReflection_GetCurrencyPairMappingListResponse_messageType{} + +type fastReflection_GetCurrencyPairMappingListResponse_messageType struct{} + +func (x fastReflection_GetCurrencyPairMappingListResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_GetCurrencyPairMappingListResponse)(nil) +} +func (x fastReflection_GetCurrencyPairMappingListResponse_messageType) New() protoreflect.Message { + return new(fastReflection_GetCurrencyPairMappingListResponse) +} +func (x fastReflection_GetCurrencyPairMappingListResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_GetCurrencyPairMappingListResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Descriptor() protoreflect.MessageDescriptor { + return md_GetCurrencyPairMappingListResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Type() protoreflect.MessageType { + return _fastReflection_GetCurrencyPairMappingListResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_GetCurrencyPairMappingListResponse) New() protoreflect.Message { + return new(fastReflection_GetCurrencyPairMappingListResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Interface() protoreflect.ProtoMessage { + return (*GetCurrencyPairMappingListResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Mappings) != 0 { + value := protoreflect.ValueOfList(&_GetCurrencyPairMappingListResponse_1_list{list: &x.Mappings}) + if !f(fd_GetCurrencyPairMappingListResponse_mappings, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings": + return len(x.Mappings) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListResponse")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings": + x.Mappings = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListResponse")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings": + if len(x.Mappings) == 0 { + return protoreflect.ValueOfList(&_GetCurrencyPairMappingListResponse_1_list{}) + } + listValue := &_GetCurrencyPairMappingListResponse_1_list{list: &x.Mappings} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListResponse")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings": + lv := value.List() + clv := lv.(*_GetCurrencyPairMappingListResponse_1_list) + x.Mappings = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListResponse")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings": + if x.Mappings == nil { + x.Mappings = []*CurrencyPairMapping{} + } + value := &_GetCurrencyPairMappingListResponse_1_list{list: &x.Mappings} + return protoreflect.ValueOfList(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListResponse")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_GetCurrencyPairMappingListResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings": + list := []*CurrencyPairMapping{} + return protoreflect.ValueOfList(&_GetCurrencyPairMappingListResponse_1_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: connect.oracle.v2.GetCurrencyPairMappingListResponse")) + } + panic(fmt.Errorf("message connect.oracle.v2.GetCurrencyPairMappingListResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_GetCurrencyPairMappingListResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in connect.oracle.v2.GetCurrencyPairMappingListResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_GetCurrencyPairMappingListResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_GetCurrencyPairMappingListResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_GetCurrencyPairMappingListResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_GetCurrencyPairMappingListResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*GetCurrencyPairMappingListResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Mappings) > 0 { + for _, e := range x.Mappings { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*GetCurrencyPairMappingListResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Mappings) > 0 { + for iNdEx := len(x.Mappings) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Mappings[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*GetCurrencyPairMappingListResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, 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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetCurrencyPairMappingListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GetCurrencyPairMappingListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Mappings = append(x.Mappings, &CurrencyPairMapping{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Mappings[len(x.Mappings)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -4183,6 +5516,116 @@ func (x *GetCurrencyPairMappingResponse) GetCurrencyPairMapping() map[uint64]*v2 return nil } +// GetCurrencyPairMappingRequest is the GetCurrencyPairMapping request type. +type GetCurrencyPairMappingListRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *GetCurrencyPairMappingListRequest) Reset() { + *x = GetCurrencyPairMappingListRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_connect_oracle_v2_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCurrencyPairMappingListRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrencyPairMappingListRequest) ProtoMessage() {} + +// Deprecated: Use GetCurrencyPairMappingListRequest.ProtoReflect.Descriptor instead. +func (*GetCurrencyPairMappingListRequest) Descriptor() ([]byte, []int) { + return file_connect_oracle_v2_query_proto_rawDescGZIP(), []int{8} +} + +type CurrencyPairMapping struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // ID is the unique identifier for this currency pair string. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // CurrencyPair is the human-readable representation of the currency pair. + CurrencyPair *v2.CurrencyPair `protobuf:"bytes,2,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair,omitempty"` +} + +func (x *CurrencyPairMapping) Reset() { + *x = CurrencyPairMapping{} + if protoimpl.UnsafeEnabled { + mi := &file_connect_oracle_v2_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CurrencyPairMapping) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CurrencyPairMapping) ProtoMessage() {} + +// Deprecated: Use CurrencyPairMapping.ProtoReflect.Descriptor instead. +func (*CurrencyPairMapping) Descriptor() ([]byte, []int) { + return file_connect_oracle_v2_query_proto_rawDescGZIP(), []int{9} +} + +func (x *CurrencyPairMapping) GetId() uint64 { + if x != nil { + return x.Id + } + return 0 +} + +func (x *CurrencyPairMapping) GetCurrencyPair() *v2.CurrencyPair { + if x != nil { + return x.CurrencyPair + } + return nil +} + +// GetCurrencyPairMappingResponse is the GetCurrencyPairMapping response type. +type GetCurrencyPairMappingListResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // mappings is a list of the id representing the currency pair + // to the currency pair itself. + Mappings []*CurrencyPairMapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings,omitempty"` +} + +func (x *GetCurrencyPairMappingListResponse) Reset() { + *x = GetCurrencyPairMappingListResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_connect_oracle_v2_query_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *GetCurrencyPairMappingListResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*GetCurrencyPairMappingListResponse) ProtoMessage() {} + +// Deprecated: Use GetCurrencyPairMappingListResponse.ProtoReflect.Descriptor instead. +func (*GetCurrencyPairMappingListResponse) Descriptor() ([]byte, []int) { + return file_connect_oracle_v2_query_proto_rawDescGZIP(), []int{10} +} + +func (x *GetCurrencyPairMappingListResponse) GetMappings() []*CurrencyPairMapping { + if x != nil { + return x.Mappings + } + return nil +} + var File_connect_oracle_v2_query_proto protoreflect.FileDescriptor var file_connect_oracle_v2_query_proto_rawDesc = []byte{ @@ -4246,57 +5689,86 @@ var file_connect_oracle_v2_query_proto_rawDesc = []byte{ 0x65, 0x79, 0x12, 0x34, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x76, 0x32, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, - 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x32, 0xda, 0x04, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa0, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, - 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x2d, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, - 0x79, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, + 0x72, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, 0x21, + 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, + 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x22, 0x70, 0x0a, 0x13, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, + 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x04, 0x52, 0x02, 0x69, 0x64, 0x12, 0x49, 0x0a, 0x0d, 0x63, 0x75, 0x72, 0x72, + 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1e, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, + 0x76, 0x32, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0c, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, + 0x61, 0x69, 0x72, 0x22, 0x6e, 0x0a, 0x22, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, + 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, + 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x08, 0x6d, 0x61, 0x70, + 0x70, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, + 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, + 0x69, 0x6e, 0x67, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x08, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x73, 0x32, 0xa1, 0x06, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0xa0, 0x01, + 0x0a, 0x13, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x50, 0x61, 0x69, 0x72, 0x73, 0x12, 0x2d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, + 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, + 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x6c, 0x6c, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, + 0x12, 0x79, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x63, + 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, + 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, + 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, + 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, + 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, + 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, - 0x32, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x6c, 0x6c, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x50, 0x61, 0x69, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2a, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x24, 0x12, 0x22, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x61, 0x6c, - 0x6c, 0x5f, 0x74, 0x69, 0x63, 0x6b, 0x65, 0x72, 0x73, 0x12, 0x79, 0x0a, 0x08, 0x47, 0x65, 0x74, - 0x50, 0x72, 0x69, 0x63, 0x65, 0x12, 0x22, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, - 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, - 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, - 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x24, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, - 0x72, 0x69, 0x63, 0x65, 0x12, 0x7d, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, - 0x73, 0x12, 0x23, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, - 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, - 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, - 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, - 0x63, 0x65, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, - 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x30, - 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, - 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, - 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, - 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, - 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, + 0x32, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x72, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x25, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1f, 0x12, 0x1d, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x2f, - 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, - 0x72, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x42, 0xb6, 0x01, 0x0a, 0x15, 0x63, 0x6f, - 0x6d, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, - 0x2e, 0x76, 0x32, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x2b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x61, 0x63, - 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x32, 0xa2, 0x02, - 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x4f, - 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, - 0x63, 0x74, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x1d, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x32, - 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, - 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, - 0x56, 0x32, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x67, 0x65, 0x74, 0x5f, 0x70, 0x72, 0x69, 0x63, 0x65, 0x73, 0x12, 0xb3, 0x01, 0x0a, 0x16, 0x47, + 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, + 0x70, 0x70, 0x69, 0x6e, 0x67, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, + 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, + 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x34, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x2e, 0x12, 0x2c, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x12, 0xc4, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, + 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, + 0x34, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, + 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, + 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x50, 0x61, 0x69, 0x72, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, + 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x39, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x33, 0x12, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, + 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x32, 0x2f, 0x67, 0x65, 0x74, 0x5f, 0x63, 0x75, 0x72, + 0x72, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x70, 0x61, 0x69, 0x72, 0x5f, 0x6d, 0x61, 0x70, 0x70, 0x69, + 0x6e, 0x67, 0x5f, 0x6c, 0x69, 0x73, 0x74, 0x42, 0xb6, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, + 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, + 0x32, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x2b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, + 0x69, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2f, 0x76, 0x32, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x32, 0xa2, 0x02, 0x03, 0x43, + 0x4f, 0x58, 0xaa, 0x02, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2e, 0x4f, 0x72, 0x61, + 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x32, 0xca, 0x02, 0x11, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x32, 0xe2, 0x02, 0x1d, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x32, 0x5c, 0x47, + 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x43, 0x6f, 0x6e, + 0x6e, 0x65, 0x63, 0x74, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x32, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -4311,39 +5783,46 @@ func file_connect_oracle_v2_query_proto_rawDescGZIP() []byte { return file_connect_oracle_v2_query_proto_rawDescData } -var file_connect_oracle_v2_query_proto_msgTypes = make([]protoimpl.MessageInfo, 9) +var file_connect_oracle_v2_query_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_connect_oracle_v2_query_proto_goTypes = []interface{}{ - (*GetAllCurrencyPairsRequest)(nil), // 0: connect.oracle.v2.GetAllCurrencyPairsRequest - (*GetAllCurrencyPairsResponse)(nil), // 1: connect.oracle.v2.GetAllCurrencyPairsResponse - (*GetPriceRequest)(nil), // 2: connect.oracle.v2.GetPriceRequest - (*GetPriceResponse)(nil), // 3: connect.oracle.v2.GetPriceResponse - (*GetPricesRequest)(nil), // 4: connect.oracle.v2.GetPricesRequest - (*GetPricesResponse)(nil), // 5: connect.oracle.v2.GetPricesResponse - (*GetCurrencyPairMappingRequest)(nil), // 6: connect.oracle.v2.GetCurrencyPairMappingRequest - (*GetCurrencyPairMappingResponse)(nil), // 7: connect.oracle.v2.GetCurrencyPairMappingResponse - nil, // 8: connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry - (*v2.CurrencyPair)(nil), // 9: connect.types.v2.CurrencyPair - (*QuotePrice)(nil), // 10: connect.oracle.v2.QuotePrice + (*GetAllCurrencyPairsRequest)(nil), // 0: connect.oracle.v2.GetAllCurrencyPairsRequest + (*GetAllCurrencyPairsResponse)(nil), // 1: connect.oracle.v2.GetAllCurrencyPairsResponse + (*GetPriceRequest)(nil), // 2: connect.oracle.v2.GetPriceRequest + (*GetPriceResponse)(nil), // 3: connect.oracle.v2.GetPriceResponse + (*GetPricesRequest)(nil), // 4: connect.oracle.v2.GetPricesRequest + (*GetPricesResponse)(nil), // 5: connect.oracle.v2.GetPricesResponse + (*GetCurrencyPairMappingRequest)(nil), // 6: connect.oracle.v2.GetCurrencyPairMappingRequest + (*GetCurrencyPairMappingResponse)(nil), // 7: connect.oracle.v2.GetCurrencyPairMappingResponse + (*GetCurrencyPairMappingListRequest)(nil), // 8: connect.oracle.v2.GetCurrencyPairMappingListRequest + (*CurrencyPairMapping)(nil), // 9: connect.oracle.v2.CurrencyPairMapping + (*GetCurrencyPairMappingListResponse)(nil), // 10: connect.oracle.v2.GetCurrencyPairMappingListResponse + nil, // 11: connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry + (*v2.CurrencyPair)(nil), // 12: connect.types.v2.CurrencyPair + (*QuotePrice)(nil), // 13: connect.oracle.v2.QuotePrice } var file_connect_oracle_v2_query_proto_depIdxs = []int32{ - 9, // 0: connect.oracle.v2.GetAllCurrencyPairsResponse.currency_pairs:type_name -> connect.types.v2.CurrencyPair - 10, // 1: connect.oracle.v2.GetPriceResponse.price:type_name -> connect.oracle.v2.QuotePrice + 12, // 0: connect.oracle.v2.GetAllCurrencyPairsResponse.currency_pairs:type_name -> connect.types.v2.CurrencyPair + 13, // 1: connect.oracle.v2.GetPriceResponse.price:type_name -> connect.oracle.v2.QuotePrice 3, // 2: connect.oracle.v2.GetPricesResponse.prices:type_name -> connect.oracle.v2.GetPriceResponse - 8, // 3: connect.oracle.v2.GetCurrencyPairMappingResponse.currency_pair_mapping:type_name -> connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry - 9, // 4: connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry.value:type_name -> connect.types.v2.CurrencyPair - 0, // 5: connect.oracle.v2.Query.GetAllCurrencyPairs:input_type -> connect.oracle.v2.GetAllCurrencyPairsRequest - 2, // 6: connect.oracle.v2.Query.GetPrice:input_type -> connect.oracle.v2.GetPriceRequest - 4, // 7: connect.oracle.v2.Query.GetPrices:input_type -> connect.oracle.v2.GetPricesRequest - 6, // 8: connect.oracle.v2.Query.GetCurrencyPairMapping:input_type -> connect.oracle.v2.GetCurrencyPairMappingRequest - 1, // 9: connect.oracle.v2.Query.GetAllCurrencyPairs:output_type -> connect.oracle.v2.GetAllCurrencyPairsResponse - 3, // 10: connect.oracle.v2.Query.GetPrice:output_type -> connect.oracle.v2.GetPriceResponse - 5, // 11: connect.oracle.v2.Query.GetPrices:output_type -> connect.oracle.v2.GetPricesResponse - 7, // 12: connect.oracle.v2.Query.GetCurrencyPairMapping:output_type -> connect.oracle.v2.GetCurrencyPairMappingResponse - 9, // [9:13] is the sub-list for method output_type - 5, // [5:9] is the sub-list for method input_type - 5, // [5:5] is the sub-list for extension type_name - 5, // [5:5] is the sub-list for extension extendee - 0, // [0:5] is the sub-list for field type_name + 11, // 3: connect.oracle.v2.GetCurrencyPairMappingResponse.currency_pair_mapping:type_name -> connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry + 12, // 4: connect.oracle.v2.CurrencyPairMapping.currency_pair:type_name -> connect.types.v2.CurrencyPair + 9, // 5: connect.oracle.v2.GetCurrencyPairMappingListResponse.mappings:type_name -> connect.oracle.v2.CurrencyPairMapping + 12, // 6: connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry.value:type_name -> connect.types.v2.CurrencyPair + 0, // 7: connect.oracle.v2.Query.GetAllCurrencyPairs:input_type -> connect.oracle.v2.GetAllCurrencyPairsRequest + 2, // 8: connect.oracle.v2.Query.GetPrice:input_type -> connect.oracle.v2.GetPriceRequest + 4, // 9: connect.oracle.v2.Query.GetPrices:input_type -> connect.oracle.v2.GetPricesRequest + 6, // 10: connect.oracle.v2.Query.GetCurrencyPairMapping:input_type -> connect.oracle.v2.GetCurrencyPairMappingRequest + 8, // 11: connect.oracle.v2.Query.GetCurrencyPairMappingList:input_type -> connect.oracle.v2.GetCurrencyPairMappingListRequest + 1, // 12: connect.oracle.v2.Query.GetAllCurrencyPairs:output_type -> connect.oracle.v2.GetAllCurrencyPairsResponse + 3, // 13: connect.oracle.v2.Query.GetPrice:output_type -> connect.oracle.v2.GetPriceResponse + 5, // 14: connect.oracle.v2.Query.GetPrices:output_type -> connect.oracle.v2.GetPricesResponse + 7, // 15: connect.oracle.v2.Query.GetCurrencyPairMapping:output_type -> connect.oracle.v2.GetCurrencyPairMappingResponse + 10, // 16: connect.oracle.v2.Query.GetCurrencyPairMappingList:output_type -> connect.oracle.v2.GetCurrencyPairMappingListResponse + 12, // [12:17] is the sub-list for method output_type + 7, // [7:12] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_connect_oracle_v2_query_proto_init() } @@ -4449,6 +5928,42 @@ func file_connect_oracle_v2_query_proto_init() { return nil } } + file_connect_oracle_v2_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrencyPairMappingListRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_connect_oracle_v2_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CurrencyPairMapping); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_connect_oracle_v2_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*GetCurrencyPairMappingListResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -4456,7 +5971,7 @@ func file_connect_oracle_v2_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_connect_oracle_v2_query_proto_rawDesc, NumEnums: 0, - NumMessages: 9, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/connect/oracle/v2/query_grpc.pb.go b/api/connect/oracle/v2/query_grpc.pb.go index a63c3588f..3c1383442 100644 --- a/api/connect/oracle/v2/query_grpc.pb.go +++ b/api/connect/oracle/v2/query_grpc.pb.go @@ -19,10 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion9 const ( - Query_GetAllCurrencyPairs_FullMethodName = "/connect.oracle.v2.Query/GetAllCurrencyPairs" - Query_GetPrice_FullMethodName = "/connect.oracle.v2.Query/GetPrice" - Query_GetPrices_FullMethodName = "/connect.oracle.v2.Query/GetPrices" - Query_GetCurrencyPairMapping_FullMethodName = "/connect.oracle.v2.Query/GetCurrencyPairMapping" + Query_GetAllCurrencyPairs_FullMethodName = "/connect.oracle.v2.Query/GetAllCurrencyPairs" + Query_GetPrice_FullMethodName = "/connect.oracle.v2.Query/GetPrice" + Query_GetPrices_FullMethodName = "/connect.oracle.v2.Query/GetPrices" + Query_GetCurrencyPairMapping_FullMethodName = "/connect.oracle.v2.Query/GetCurrencyPairMapping" + Query_GetCurrencyPairMappingList_FullMethodName = "/connect.oracle.v2.Query/GetCurrencyPairMappingList" ) // QueryClient is the client API for Query service. @@ -41,6 +42,10 @@ type QueryClient interface { // indexers that have access to the ID of a currency pair, but no way to get // the underlying currency pair from it. GetCurrencyPairMapping(ctx context.Context, in *GetCurrencyPairMappingRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingResponse, error) + // Get the mapping of currency pair ID <-> currency pair as a list. This is + // useful for indexers that have access to the ID of a currency pair, but no + // way to get the underlying currency pair from it. + GetCurrencyPairMappingList(ctx context.Context, in *GetCurrencyPairMappingListRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingListResponse, error) } type queryClient struct { @@ -91,6 +96,16 @@ func (c *queryClient) GetCurrencyPairMapping(ctx context.Context, in *GetCurrenc return out, nil } +func (c *queryClient) GetCurrencyPairMappingList(ctx context.Context, in *GetCurrencyPairMappingListRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingListResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(GetCurrencyPairMappingListResponse) + err := c.cc.Invoke(ctx, Query_GetCurrencyPairMappingList_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility. @@ -107,6 +122,10 @@ type QueryServer interface { // indexers that have access to the ID of a currency pair, but no way to get // the underlying currency pair from it. GetCurrencyPairMapping(context.Context, *GetCurrencyPairMappingRequest) (*GetCurrencyPairMappingResponse, error) + // Get the mapping of currency pair ID <-> currency pair as a list. This is + // useful for indexers that have access to the ID of a currency pair, but no + // way to get the underlying currency pair from it. + GetCurrencyPairMappingList(context.Context, *GetCurrencyPairMappingListRequest) (*GetCurrencyPairMappingListResponse, error) mustEmbedUnimplementedQueryServer() } @@ -129,6 +148,9 @@ func (UnimplementedQueryServer) GetPrices(context.Context, *GetPricesRequest) (* func (UnimplementedQueryServer) GetCurrencyPairMapping(context.Context, *GetCurrencyPairMappingRequest) (*GetCurrencyPairMappingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyPairMapping not implemented") } +func (UnimplementedQueryServer) GetCurrencyPairMappingList(context.Context, *GetCurrencyPairMappingListRequest) (*GetCurrencyPairMappingListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyPairMappingList not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} func (UnimplementedQueryServer) testEmbeddedByValue() {} @@ -222,6 +244,24 @@ func _Query_GetCurrencyPairMapping_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_GetCurrencyPairMappingList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCurrencyPairMappingListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetCurrencyPairMappingList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_GetCurrencyPairMappingList_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetCurrencyPairMappingList(ctx, req.(*GetCurrencyPairMappingListRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -245,6 +285,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetCurrencyPairMapping", Handler: _Query_GetCurrencyPairMapping_Handler, }, + { + MethodName: "GetCurrencyPairMappingList", + Handler: _Query_GetCurrencyPairMappingList_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "connect/oracle/v2/query.proto", diff --git a/proto/connect/oracle/v2/query.proto b/proto/connect/oracle/v2/query.proto index aa0b1170b..10cf74760 100644 --- a/proto/connect/oracle/v2/query.proto +++ b/proto/connect/oracle/v2/query.proto @@ -41,6 +41,17 @@ service Query { additional_bindings : [] }; } + + // Get the mapping of currency pair ID <-> currency pair as a list. This is + // useful for indexers that have access to the ID of a currency pair, but no + // way to get the underlying currency pair from it. + rpc GetCurrencyPairMappingList(GetCurrencyPairMappingListRequest) + returns (GetCurrencyPairMappingListResponse) { + option (google.api.http) = { + get : "/connect/oracle/v2/get_currency_pair_mapping_list" + additional_bindings : [] + }; + } } message GetAllCurrencyPairsRequest {} @@ -94,3 +105,21 @@ message GetCurrencyPairMappingResponse { map currency_pair_mapping = 1 [ (gogoproto.nullable) = false ]; } + +// GetCurrencyPairMappingRequest is the GetCurrencyPairMapping request type. +message GetCurrencyPairMappingListRequest {} + +message CurrencyPairMapping { + // ID is the unique identifier for this currency pair string. + uint64 id = 1; + // CurrencyPair is the human-readable representation of the currency pair. + connect.types.v2.CurrencyPair currency_pair = 2 + [ (gogoproto.nullable) = false ]; +} + +// GetCurrencyPairMappingResponse is the GetCurrencyPairMapping response type. +message GetCurrencyPairMappingListResponse { + // mappings is a list of the id representing the currency pair + // to the currency pair itself. + repeated CurrencyPairMapping mappings = 1 [ (gogoproto.nullable) = false ]; +} diff --git a/tests/integration/connect_setup.go b/tests/integration/connect_setup.go index 3cc9b66ab..738f79079 100644 --- a/tests/integration/connect_setup.go +++ b/tests/integration/connect_setup.go @@ -269,7 +269,81 @@ func QueryCurrencyPairs(chain *cosmos.CosmosChain) (*oracletypes.GetAllCurrencyP client := oracletypes.NewQueryClient(cc) // query the currency pairs - return client.GetAllCurrencyPairs(context.Background(), &oracletypes.GetAllCurrencyPairsRequest{}) + resp, err := client.GetAllCurrencyPairs(context.Background(), &oracletypes.GetAllCurrencyPairsRequest{}) + + // check that there is a correspondence between mappings and the raw response + mappingResp, err := QueryCurrencyPairMappings(chain) + if err != nil { + return nil, err + } + + if len(resp.CurrencyPairs) != len(mappingResp.CurrencyPairMapping) { + return nil, fmt.Errorf("list and map responses should be the same length: got %d list, %d map", + len(resp.CurrencyPairs), + len(mappingResp.CurrencyPairMapping), + ) + } + for _, v := range mappingResp.CurrencyPairMapping { + found := false + for _, cp := range resp.CurrencyPairs { + if v.Equal(cp) { + found = true + } + } + + if !found { + return nil, fmt.Errorf("currency pair %v was found in mapping response but not in currency pair list", v) + } + } + + return resp, err +} + +// QueryCurrencyPairMappings queries the chain for the given currency pair mappings +func QueryCurrencyPairMappings(chain *cosmos.CosmosChain) (*oracletypes.GetCurrencyPairMappingResponse, error) { + // get grpc address + grpcAddr := chain.GetHostGRPCAddress() + + // create the client + cc, err := grpc.Dial(grpcAddr, grpc.WithTransportCredentials(insecure.NewCredentials())) + if err != nil { + return nil, err + } + defer cc.Close() + + // create the oracle client + client := oracletypes.NewQueryClient(cc) + + // query the currency pairs map + mapRes, err := client.GetCurrencyPairMapping(context.Background(), &oracletypes.GetCurrencyPairMappingRequest{}) + if err != nil { + return nil, err + } + + // query the currency pairs list + listRes, err := client.GetCurrencyPairMappingList(context.Background(), &oracletypes.GetCurrencyPairMappingListRequest{}) + if err != nil { + return nil, err + } + + if len(listRes.Mappings) != len(mapRes.CurrencyPairMapping) { + return nil, fmt.Errorf("map and list responses should be the same length: got %d list, %d map", + len(listRes.Mappings), + len(mapRes.CurrencyPairMapping), + ) + } + for _, m := range listRes.Mappings { + cp, found := mapRes.CurrencyPairMapping[m.Id] + if !found { + return nil, fmt.Errorf("mapping for %d not found", m.Id) + } + + if !m.CurrencyPair.Equal(cp) { + return nil, fmt.Errorf("market %s is not equal to %s", m.CurrencyPair.String(), cp.String()) + } + } + + return mapRes, nil } // QueryCurrencyPair queries the price for the given currency-pair given a desired height to query from diff --git a/x/marketmap/keeper/query.go b/x/marketmap/keeper/query.go index 080bd02ff..d013f0748 100644 --- a/x/marketmap/keeper/query.go +++ b/x/marketmap/keeper/query.go @@ -19,6 +19,8 @@ func NewQueryServer(k *Keeper) types.QueryServer { } // MarketMap returns the full MarketMap and associated information stored in the x/marketmap module. +// +// NOTE: the map type returned by this query is NOT SAFE. Use Markets instead for a safe value. func (q queryServerImpl) MarketMap(goCtx context.Context, req *types.MarketMapRequest) (*types.MarketMapResponse, error) { if req == nil { return nil, fmt.Errorf("request cannot be nil") diff --git a/x/oracle/keeper/grpc_query.go b/x/oracle/keeper/grpc_query.go index e46e7b353..54485e884 100644 --- a/x/oracle/keeper/grpc_query.go +++ b/x/oracle/keeper/grpc_query.go @@ -122,6 +122,9 @@ func (q queryServer) GetPrices(ctx context.Context, req *types.GetPricesRequest) }, nil } +// GetCurrencyPairMapping returns a map of ID -> CurrencyPair. +// +// NOTE: the map type returned by this query is NOT SAFE. Use GetCurrencyPairMappingList instead for a safe value. func (q queryServer) GetCurrencyPairMapping(ctx context.Context, _ *types.GetCurrencyPairMappingRequest) (*types.GetCurrencyPairMappingResponse, error) { pairs, err := q.k.GetCurrencyPairMapping(ctx) if err != nil { @@ -129,3 +132,12 @@ func (q queryServer) GetCurrencyPairMapping(ctx context.Context, _ *types.GetCur } return &types.GetCurrencyPairMappingResponse{CurrencyPairMapping: pairs}, nil } + +func (q queryServer) GetCurrencyPairMappingList(ctx context.Context, _ *types.GetCurrencyPairMappingListRequest) (*types.GetCurrencyPairMappingListResponse, error) { + pairs, err := q.k.GetCurrencyPairMappingList(ctx) + if err != nil { + return nil, err + } + + return &types.GetCurrencyPairMappingListResponse{Mappings: pairs}, nil +} diff --git a/x/oracle/keeper/grpc_query_test.go b/x/oracle/keeper/grpc_query_test.go index 352f023ae..a7d613db1 100644 --- a/x/oracle/keeper/grpc_query_test.go +++ b/x/oracle/keeper/grpc_query_test.go @@ -233,3 +233,43 @@ func (s *KeeperTestSuite) TestGetCurrencyPairMappingGRPC() { } }) } + +func (s *KeeperTestSuite) TestGetCurrencyPairMappingListGRPC() { + cp1 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN1"} + cp2 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN2"} + cp3 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN3"} + + qs := keeper.NewQueryServer(s.oracleKeeper) + // test that after CurrencyPairs are registered, all of them are returned from the query + s.Run("after CurrencyPairs are registered, all of them are returned from the query", func() { + currencyPairs := []connecttypes.CurrencyPair{ + cp1, + cp2, + cp3, + } + for _, cp := range currencyPairs { + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp)) + } + + // manually insert a new CurrencyPair as well + s.Require().NoError(s.oracleKeeper.SetPriceForCurrencyPair(s.ctx, cp1, types.QuotePrice{Price: sdkmath.NewInt(100)})) + + // query for pairs + res, err := qs.GetCurrencyPairMappingList(s.ctx, nil) + s.Require().Nil(err) + s.Require().Equal([]types.CurrencyPairMapping{ + { + Id: 0, + CurrencyPair: cp1, + }, + { + Id: 1, + CurrencyPair: cp2, + }, + { + Id: 2, + CurrencyPair: cp3, + }, + }, res.Mappings) + }) +} diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index ca60ab474..e0cd718bb 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -288,6 +288,7 @@ func (k *Keeper) GetAllCurrencyPairs(ctx context.Context) []connecttypes.Currenc } // GetCurrencyPairMapping returns a CurrencyPair mapping by ID that have currently been stored to state. +// NOTE: this map[] type should not be used by on-chain code. func (k *Keeper) GetCurrencyPairMapping(ctx context.Context) (map[uint64]connecttypes.CurrencyPair, error) { numPairs, err := k.numCPs.Get(ctx) if err != nil { @@ -302,6 +303,23 @@ func (k *Keeper) GetCurrencyPairMapping(ctx context.Context) (map[uint64]connect return pairs, nil } +// GetCurrencyPairMappingList returns a CurrencyPair mapping by ID that have currently been stored to state as a list. +func (k *Keeper) GetCurrencyPairMappingList(ctx context.Context) ([]types.CurrencyPairMapping, error) { + pairs := make([]types.CurrencyPairMapping, 0) + // aggregate CurrencyPairs stored under KeyPrefixNonce + err := k.IterateCurrencyPairs(ctx, func(cp connecttypes.CurrencyPair, cps types.CurrencyPairState) { + pairs = append(pairs, types.CurrencyPairMapping{ + Id: cps.GetId(), + CurrencyPair: cp, + }) + }) + if err != nil { + return nil, err + } + + return pairs, nil +} + // IterateCurrencyPairs iterates over all CurrencyPairs in the store, and executes a callback for each CurrencyPair. func (k *Keeper) IterateCurrencyPairs(ctx context.Context, cb func(cp connecttypes.CurrencyPair, cps types.CurrencyPairState)) error { it, err := k.currencyPairs.Iterate(ctx, nil) diff --git a/x/oracle/keeper/keeper_test.go b/x/oracle/keeper/keeper_test.go index f3b0df5a3..dc58faf1f 100644 --- a/x/oracle/keeper/keeper_test.go +++ b/x/oracle/keeper/keeper_test.go @@ -364,3 +364,90 @@ func (s *KeeperTestSuite) TestGetNumCurrencyPairs() { s.Require().Equal(cps, uint64(2)) }) } + +func (s *KeeperTestSuite) TestGetCurrencyPairMapping() { + cp1 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN1"} + cp2 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN2"} + + s.Run("get 0 with no state", func() { + s.SetupTest() + + mapping, err := s.oracleKeeper.GetCurrencyPairMapping(s.ctx) + s.Require().NoError(err) + s.Require().Empty(mapping) + }) + + s.Run("get 1 with 1 cp", func() { + s.SetupTest() + + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp1)) + + mapping, err := s.oracleKeeper.GetCurrencyPairMapping(s.ctx) + s.Require().NoError(err) + s.Require().Equal(map[uint64]connecttypes.CurrencyPair{ + 0: cp1, + }, mapping) + }) + + s.Run("get 2 with 2 cp", func() { + s.SetupTest() + + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp1)) + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp2)) + + mapping, err := s.oracleKeeper.GetCurrencyPairMapping(s.ctx) + s.Require().NoError(err) + s.Require().Equal(map[uint64]connecttypes.CurrencyPair{ + 0: cp1, + 1: cp2, + }, mapping) + }) +} + +func (s *KeeperTestSuite) TestGetCurrencyPairMappingList() { + cp1 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN1"} + cp2 := connecttypes.CurrencyPair{Base: "TEST", Quote: "COIN2"} + + s.Run("get 0 with no state", func() { + s.SetupTest() + + mapping, err := s.oracleKeeper.GetCurrencyPairMappingList(s.ctx) + s.Require().NoError(err) + s.Require().Empty(mapping) + }) + + s.Run("get 1 with 1 cp", func() { + s.SetupTest() + + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp1)) + + mapping, err := s.oracleKeeper.GetCurrencyPairMappingList(s.ctx) + s.Require().NoError(err) + s.Require().Equal([]types.CurrencyPairMapping{ + { + Id: 0, + CurrencyPair: cp1, + }, + }, mapping) + }) + + s.Run("get 2 with 2 cp", func() { + s.SetupTest() + + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp1)) + s.Require().NoError(s.oracleKeeper.CreateCurrencyPair(s.ctx, cp2)) + + mapping, err := s.oracleKeeper.GetCurrencyPairMappingList(s.ctx) + s.Require().NoError(err) + s.Require().Equal([]types.CurrencyPairMapping{ + { + Id: 0, + CurrencyPair: cp1, + }, + { + Id: 1, + CurrencyPair: cp2, + }, + }, mapping) + }) +} diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 270e5e4e3..912927c85 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -411,6 +411,144 @@ func (m *GetCurrencyPairMappingResponse) GetCurrencyPairMapping() map[uint64]typ return nil } +// GetCurrencyPairMappingRequest is the GetCurrencyPairMapping request type. +type GetCurrencyPairMappingListRequest struct { +} + +func (m *GetCurrencyPairMappingListRequest) Reset() { *m = GetCurrencyPairMappingListRequest{} } +func (m *GetCurrencyPairMappingListRequest) String() string { return proto.CompactTextString(m) } +func (*GetCurrencyPairMappingListRequest) ProtoMessage() {} +func (*GetCurrencyPairMappingListRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_85b187574238e3d2, []int{8} +} +func (m *GetCurrencyPairMappingListRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetCurrencyPairMappingListRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetCurrencyPairMappingListRequest.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 *GetCurrencyPairMappingListRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetCurrencyPairMappingListRequest.Merge(m, src) +} +func (m *GetCurrencyPairMappingListRequest) XXX_Size() int { + return m.Size() +} +func (m *GetCurrencyPairMappingListRequest) XXX_DiscardUnknown() { + xxx_messageInfo_GetCurrencyPairMappingListRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_GetCurrencyPairMappingListRequest proto.InternalMessageInfo + +type CurrencyPairMapping struct { + // ID is the unique identifier for this currency pair string. + Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` + // CurrencyPair is the human-readable representation of the currency pair. + CurrencyPair types.CurrencyPair `protobuf:"bytes,2,opt,name=currency_pair,json=currencyPair,proto3" json:"currency_pair"` +} + +func (m *CurrencyPairMapping) Reset() { *m = CurrencyPairMapping{} } +func (m *CurrencyPairMapping) String() string { return proto.CompactTextString(m) } +func (*CurrencyPairMapping) ProtoMessage() {} +func (*CurrencyPairMapping) Descriptor() ([]byte, []int) { + return fileDescriptor_85b187574238e3d2, []int{9} +} +func (m *CurrencyPairMapping) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *CurrencyPairMapping) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_CurrencyPairMapping.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 *CurrencyPairMapping) XXX_Merge(src proto.Message) { + xxx_messageInfo_CurrencyPairMapping.Merge(m, src) +} +func (m *CurrencyPairMapping) XXX_Size() int { + return m.Size() +} +func (m *CurrencyPairMapping) XXX_DiscardUnknown() { + xxx_messageInfo_CurrencyPairMapping.DiscardUnknown(m) +} + +var xxx_messageInfo_CurrencyPairMapping proto.InternalMessageInfo + +func (m *CurrencyPairMapping) GetId() uint64 { + if m != nil { + return m.Id + } + return 0 +} + +func (m *CurrencyPairMapping) GetCurrencyPair() types.CurrencyPair { + if m != nil { + return m.CurrencyPair + } + return types.CurrencyPair{} +} + +// GetCurrencyPairMappingResponse is the GetCurrencyPairMapping response type. +type GetCurrencyPairMappingListResponse struct { + // mappings is a list of the id representing the currency pair + // to the currency pair itself. + Mappings []CurrencyPairMapping `protobuf:"bytes,1,rep,name=mappings,proto3" json:"mappings"` +} + +func (m *GetCurrencyPairMappingListResponse) Reset() { *m = GetCurrencyPairMappingListResponse{} } +func (m *GetCurrencyPairMappingListResponse) String() string { return proto.CompactTextString(m) } +func (*GetCurrencyPairMappingListResponse) ProtoMessage() {} +func (*GetCurrencyPairMappingListResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_85b187574238e3d2, []int{10} +} +func (m *GetCurrencyPairMappingListResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GetCurrencyPairMappingListResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GetCurrencyPairMappingListResponse.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 *GetCurrencyPairMappingListResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetCurrencyPairMappingListResponse.Merge(m, src) +} +func (m *GetCurrencyPairMappingListResponse) XXX_Size() int { + return m.Size() +} +func (m *GetCurrencyPairMappingListResponse) XXX_DiscardUnknown() { + xxx_messageInfo_GetCurrencyPairMappingListResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_GetCurrencyPairMappingListResponse proto.InternalMessageInfo + +func (m *GetCurrencyPairMappingListResponse) GetMappings() []CurrencyPairMapping { + if m != nil { + return m.Mappings + } + return nil +} + func init() { proto.RegisterType((*GetAllCurrencyPairsRequest)(nil), "connect.oracle.v2.GetAllCurrencyPairsRequest") proto.RegisterType((*GetAllCurrencyPairsResponse)(nil), "connect.oracle.v2.GetAllCurrencyPairsResponse") @@ -421,54 +559,62 @@ func init() { proto.RegisterType((*GetCurrencyPairMappingRequest)(nil), "connect.oracle.v2.GetCurrencyPairMappingRequest") proto.RegisterType((*GetCurrencyPairMappingResponse)(nil), "connect.oracle.v2.GetCurrencyPairMappingResponse") proto.RegisterMapType((map[uint64]types.CurrencyPair)(nil), "connect.oracle.v2.GetCurrencyPairMappingResponse.CurrencyPairMappingEntry") + proto.RegisterType((*GetCurrencyPairMappingListRequest)(nil), "connect.oracle.v2.GetCurrencyPairMappingListRequest") + proto.RegisterType((*CurrencyPairMapping)(nil), "connect.oracle.v2.CurrencyPairMapping") + proto.RegisterType((*GetCurrencyPairMappingListResponse)(nil), "connect.oracle.v2.GetCurrencyPairMappingListResponse") } func init() { proto.RegisterFile("connect/oracle/v2/query.proto", fileDescriptor_85b187574238e3d2) } var fileDescriptor_85b187574238e3d2 = []byte{ - // 658 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xce, 0xa6, 0x49, 0xd5, 0x4e, 0xe9, 0xdf, 0xb6, 0xa0, 0x28, 0x34, 0x4e, 0xe5, 0x06, 0xa9, - 0xaa, 0xa8, 0x0d, 0xa6, 0x42, 0xc0, 0x01, 0xa9, 0x45, 0x28, 0x02, 0x84, 0xd4, 0xfa, 0xc0, 0x81, - 0x4b, 0xe4, 0x3a, 0x8b, 0x59, 0xea, 0x78, 0x5d, 0xef, 0x26, 0x22, 0x07, 0x2e, 0x88, 0x7b, 0x91, - 0x78, 0x01, 0xde, 0x81, 0x97, 0xe8, 0xb1, 0x12, 0x17, 0xc4, 0x01, 0xa1, 0x96, 0x07, 0x41, 0xd9, - 0x5d, 0xa7, 0x09, 0x75, 0x42, 0x7b, 0xb3, 0xfd, 0x7d, 0x33, 0xf3, 0xcd, 0xcc, 0x37, 0x86, 0x8a, - 0xcf, 0xa2, 0x88, 0xf8, 0xc2, 0x66, 0x89, 0xe7, 0x87, 0xc4, 0xee, 0x38, 0xf6, 0x61, 0x9b, 0x24, - 0x5d, 0x2b, 0x4e, 0x98, 0x60, 0x78, 0x51, 0xc3, 0x96, 0x82, 0xad, 0x8e, 0x53, 0x5e, 0x0e, 0x58, - 0xc0, 0x24, 0x6a, 0xf7, 0x9e, 0x14, 0xb1, 0xbc, 0x12, 0x30, 0x16, 0x84, 0xc4, 0xf6, 0x62, 0x6a, - 0x7b, 0x51, 0xc4, 0x84, 0x27, 0x28, 0x8b, 0xb8, 0x46, 0xab, 0x17, 0xab, 0x04, 0x24, 0x22, 0x9c, - 0xa6, 0x84, 0x5a, 0x4a, 0x10, 0xdd, 0x98, 0xf0, 0x1e, 0xee, 0xb7, 0x93, 0x84, 0x44, 0x7e, 0xb7, - 0x11, 0x7b, 0x34, 0x51, 0x2c, 0x73, 0x05, 0xca, 0x75, 0x22, 0xb6, 0xc3, 0xf0, 0x89, 0x06, 0x77, - 0x3d, 0x9a, 0x70, 0x97, 0x1c, 0xb6, 0x09, 0x17, 0xe6, 0x3b, 0xb8, 0x99, 0x89, 0xf2, 0x98, 0x45, - 0x9c, 0xe0, 0x17, 0x30, 0x37, 0x94, 0x93, 0x97, 0xd0, 0xea, 0xc4, 0xfa, 0x8c, 0x63, 0x58, 0x69, - 0x8f, 0xb2, 0xb6, 0xd5, 0x71, 0xac, 0xc1, 0x04, 0x3b, 0x85, 0xe3, 0x5f, 0xd5, 0x9c, 0x3b, 0xeb, - 0x0f, 0x26, 0x35, 0xef, 0xc3, 0x7c, 0x9d, 0x88, 0xdd, 0x84, 0xfa, 0x44, 0x97, 0xc7, 0x6b, 0x30, - 0x3b, 0x94, 0xbf, 0x84, 0x56, 0xd1, 0xfa, 0xb4, 0x7b, 0x6d, 0x30, 0xd0, 0x3c, 0x42, 0xb0, 0x70, - 0x1e, 0xa8, 0x95, 0x3d, 0x84, 0x62, 0xdc, 0xfb, 0x20, 0x23, 0x66, 0x9c, 0x8a, 0x75, 0x61, 0xe8, - 0xd6, 0x5e, 0x9b, 0x09, 0x22, 0xa3, 0xa4, 0x1e, 0xe4, 0xaa, 0x08, 0xbc, 0x0c, 0xc5, 0x88, 0x45, - 0x3e, 0x29, 0xe5, 0x57, 0xd1, 0x7a, 0xc1, 0x55, 0x2f, 0xb8, 0x0c, 0x53, 0x4d, 0xe2, 0xd3, 0x96, - 0x17, 0xf2, 0xd2, 0x84, 0x04, 0xfa, 0xef, 0x78, 0x0e, 0xf2, 0xb4, 0x59, 0x2a, 0xc8, 0xaf, 0x79, - 0xda, 0x34, 0x1f, 0x9f, 0x0b, 0x4a, 0x27, 0x89, 0x37, 0x60, 0x71, 0xa8, 0x95, 0x06, 0x6d, 0xaa, - 0x69, 0x4d, 0xbb, 0xf3, 0x83, 0xed, 0x3c, 0x6b, 0x72, 0xf3, 0x15, 0x2c, 0x0e, 0xc4, 0xeb, 0x8e, - 0xb6, 0x61, 0x52, 0xea, 0x4b, 0x67, 0xbc, 0x96, 0xd1, 0xd2, 0xbf, 0x63, 0xd0, 0x83, 0xd6, 0x81, - 0x66, 0x15, 0x2a, 0x75, 0x22, 0x06, 0x37, 0xf1, 0xd2, 0x8b, 0x63, 0x1a, 0x05, 0xe9, 0xba, 0x8f, - 0xf2, 0x60, 0x8c, 0x62, 0x68, 0x19, 0x9f, 0x10, 0x5c, 0x1f, 0x6e, 0xa4, 0xa5, 0x18, 0x5a, 0xd6, - 0xf3, 0x6c, 0x59, 0x63, 0x52, 0x5a, 0x19, 0xd8, 0xd3, 0x48, 0x24, 0x5d, 0xad, 0x7e, 0xc9, 0xbf, - 0x88, 0x97, 0xdf, 0x40, 0x69, 0x54, 0x18, 0x5e, 0x80, 0x89, 0x03, 0xd2, 0x95, 0x9b, 0x2f, 0xb8, - 0xbd, 0x47, 0xbc, 0x05, 0xc5, 0x8e, 0x17, 0xb6, 0xd5, 0x4a, 0xff, 0x6b, 0x4f, 0x57, 0x91, 0x1f, - 0xe5, 0x1f, 0x20, 0xe7, 0x67, 0x01, 0x8a, 0x7b, 0xbd, 0xe3, 0xc5, 0x5f, 0x11, 0x2c, 0x65, 0xdc, - 0x02, 0xde, 0xcc, 0x6e, 0x78, 0xc4, 0x45, 0x95, 0xad, 0xcb, 0xd2, 0xd5, 0x70, 0xcc, 0x8d, 0x8f, - 0xdf, 0xff, 0x7c, 0xc9, 0xd7, 0xb0, 0x69, 0x67, 0xdd, 0xbb, 0x68, 0x78, 0x61, 0xd8, 0x10, 0xd4, - 0x3f, 0x20, 0x09, 0xc7, 0x5d, 0x98, 0x4a, 0x1d, 0x80, 0xcd, 0xb1, 0xf6, 0x50, 0x5a, 0x2e, 0x63, - 0x21, 0xb3, 0x26, 0x05, 0x18, 0x78, 0x65, 0x84, 0x00, 0x75, 0x34, 0x1f, 0x60, 0xba, 0x6f, 0x59, - 0x3c, 0x2e, 0x6f, 0x7f, 0x10, 0xb5, 0xf1, 0x24, 0x5d, 0xfd, 0x96, 0xac, 0x5e, 0xc5, 0x95, 0x71, - 0xd5, 0x39, 0xfe, 0x86, 0xe0, 0x46, 0xb6, 0xcb, 0xf0, 0x9d, 0x2b, 0x18, 0x52, 0x29, 0xbb, 0x7b, - 0x65, 0x0b, 0x9b, 0x5b, 0x52, 0xa6, 0x85, 0x6f, 0x8f, 0x90, 0x99, 0x79, 0x31, 0x3b, 0xf5, 0xe3, - 0x53, 0x03, 0x9d, 0x9c, 0x1a, 0xe8, 0xf7, 0xa9, 0x81, 0x3e, 0x9f, 0x19, 0xb9, 0x93, 0x33, 0x23, - 0xf7, 0xe3, 0xcc, 0xc8, 0xbd, 0xde, 0x0c, 0xa8, 0x78, 0xdb, 0xde, 0xb7, 0x7c, 0xd6, 0xb2, 0xf9, - 0x01, 0x8d, 0x37, 0x5b, 0xa4, 0xd3, 0x4f, 0xdd, 0x71, 0xec, 0xf7, 0x69, 0x7e, 0x69, 0xe0, 0xfd, - 0x49, 0xf9, 0x2f, 0xbf, 0xf7, 0x37, 0x00, 0x00, 0xff, 0xff, 0xa7, 0x5b, 0xa5, 0x89, 0x7a, 0x06, - 0x00, 0x00, + // 751 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0xcd, 0x6e, 0xd3, 0x4a, + 0x14, 0xce, 0xa4, 0x49, 0xd5, 0x9e, 0xde, 0xfe, 0x4d, 0x7b, 0xaf, 0xa2, 0xdc, 0xc6, 0xe9, 0x75, + 0x73, 0x51, 0x55, 0x51, 0x9b, 0xa6, 0x05, 0x51, 0x16, 0x48, 0x2d, 0x42, 0xa1, 0xfc, 0x48, 0xad, + 0x17, 0x2c, 0xd8, 0x44, 0xae, 0x33, 0x84, 0xa1, 0x8e, 0xc7, 0xf5, 0x4c, 0x22, 0xb2, 0x60, 0x83, + 0xd8, 0x17, 0x89, 0x17, 0x80, 0x67, 0xe0, 0x15, 0x58, 0x74, 0x59, 0x89, 0x0d, 0x2b, 0x84, 0x5a, + 0x1e, 0x04, 0x65, 0x3c, 0x4e, 0x9d, 0xd6, 0x09, 0xc9, 0xce, 0xf6, 0x39, 0xdf, 0x39, 0xdf, 0x77, + 0xfe, 0x0c, 0x05, 0x87, 0x79, 0x1e, 0x71, 0x84, 0xc9, 0x02, 0xdb, 0x71, 0x89, 0xd9, 0x2a, 0x9b, + 0xc7, 0x4d, 0x12, 0xb4, 0x0d, 0x3f, 0x60, 0x82, 0xe1, 0x79, 0x65, 0x36, 0x42, 0xb3, 0xd1, 0x2a, + 0xe7, 0x17, 0xeb, 0xac, 0xce, 0xa4, 0xd5, 0xec, 0x3c, 0x85, 0x8e, 0xf9, 0xa5, 0x3a, 0x63, 0x75, + 0x97, 0x98, 0xb6, 0x4f, 0x4d, 0xdb, 0xf3, 0x98, 0xb0, 0x05, 0x65, 0x1e, 0x57, 0xd6, 0xe2, 0xf5, + 0x2c, 0x75, 0xe2, 0x11, 0x4e, 0x23, 0x87, 0x52, 0xe4, 0x20, 0xda, 0x3e, 0xe1, 0x1d, 0xbb, 0xd3, + 0x0c, 0x02, 0xe2, 0x39, 0xed, 0xaa, 0x6f, 0xd3, 0x20, 0xf4, 0xd2, 0x97, 0x20, 0x5f, 0x21, 0x62, + 0xc7, 0x75, 0x1f, 0x28, 0xe3, 0xbe, 0x4d, 0x03, 0x6e, 0x91, 0xe3, 0x26, 0xe1, 0x42, 0x7f, 0x0d, + 0xff, 0x26, 0x5a, 0xb9, 0xcf, 0x3c, 0x4e, 0xf0, 0x13, 0x98, 0xe9, 0x89, 0xc9, 0x73, 0x68, 0x79, + 0x6c, 0x75, 0xaa, 0xac, 0x19, 0x91, 0x46, 0x99, 0xdb, 0x68, 0x95, 0x8d, 0x78, 0x80, 0xdd, 0xcc, + 0xe9, 0x8f, 0x62, 0xca, 0x9a, 0x76, 0xe2, 0x41, 0xf5, 0x3b, 0x30, 0x5b, 0x21, 0x62, 0x3f, 0xa0, + 0x0e, 0x51, 0xe9, 0xf1, 0x0a, 0x4c, 0xf7, 0xc4, 0xcf, 0xa1, 0x65, 0xb4, 0x3a, 0x69, 0xfd, 0x15, + 0x07, 0xea, 0x27, 0x08, 0xe6, 0x2e, 0x81, 0x8a, 0xd9, 0x36, 0x64, 0xfd, 0xce, 0x07, 0x89, 0x98, + 0x2a, 0x17, 0x8c, 0x6b, 0x45, 0x37, 0x0e, 0x9a, 0x4c, 0x10, 0x89, 0x92, 0x7c, 0x90, 0x15, 0x22, + 0xf0, 0x22, 0x64, 0x3d, 0xe6, 0x39, 0x24, 0x97, 0x5e, 0x46, 0xab, 0x19, 0x2b, 0x7c, 0xc1, 0x79, + 0x98, 0xa8, 0x11, 0x87, 0x36, 0x6c, 0x97, 0xe7, 0xc6, 0xa4, 0xa1, 0xfb, 0x8e, 0x67, 0x20, 0x4d, + 0x6b, 0xb9, 0x8c, 0xfc, 0x9a, 0xa6, 0x35, 0xfd, 0xfe, 0x25, 0xa1, 0xa8, 0x92, 0x78, 0x0d, 0xe6, + 0x7b, 0xa4, 0x54, 0x69, 0x2d, 0xac, 0xd6, 0xa4, 0x35, 0x1b, 0x97, 0xb3, 0x57, 0xe3, 0xfa, 0x73, + 0x98, 0x8f, 0xe1, 0x95, 0xa2, 0x1d, 0x18, 0x97, 0xfc, 0xa2, 0x1a, 0xaf, 0x24, 0x48, 0xba, 0x5a, + 0x06, 0x55, 0x68, 0x05, 0xd4, 0x8b, 0x50, 0xa8, 0x10, 0x11, 0xef, 0xc4, 0x33, 0xdb, 0xf7, 0xa9, + 0x57, 0x8f, 0xda, 0x7d, 0x92, 0x06, 0xad, 0x9f, 0x87, 0xa2, 0xf1, 0x1e, 0xc1, 0xdf, 0xbd, 0x42, + 0x1a, 0xa1, 0x87, 0xa2, 0xf5, 0x38, 0x99, 0xd6, 0x80, 0x90, 0x46, 0x82, 0xed, 0xa1, 0x27, 0x82, + 0xb6, 0x62, 0xbf, 0xe0, 0x5c, 0xb7, 0xe7, 0x5f, 0x42, 0xae, 0x1f, 0x0c, 0xcf, 0xc1, 0xd8, 0x11, + 0x69, 0xcb, 0xce, 0x67, 0xac, 0xce, 0x23, 0xde, 0x82, 0x6c, 0xcb, 0x76, 0x9b, 0x61, 0x4b, 0xff, + 0x38, 0x9e, 0x56, 0xe8, 0x7c, 0x2f, 0x7d, 0x17, 0xe9, 0x2b, 0xf0, 0x5f, 0x32, 0xfb, 0xa7, 0x94, + 0x8b, 0xa8, 0x6c, 0x3e, 0x2c, 0x24, 0x78, 0xa8, 0xb1, 0x40, 0xd1, 0x58, 0xe0, 0xbd, 0xab, 0xd3, + 0x3c, 0x14, 0x1b, 0x55, 0x85, 0xde, 0x99, 0xf7, 0x40, 0x1f, 0x44, 0x4b, 0xf5, 0xea, 0x11, 0x4c, + 0xa8, 0xe6, 0x44, 0x43, 0x73, 0x23, 0xa1, 0x3b, 0x09, 0x51, 0x54, 0xce, 0x2e, 0xba, 0xfc, 0x79, + 0x1c, 0xb2, 0x07, 0x9d, 0x1b, 0x86, 0x3f, 0x21, 0x58, 0x48, 0x38, 0x09, 0x78, 0x3d, 0xb9, 0xef, + 0x7d, 0x0e, 0x4b, 0xde, 0x18, 0xd6, 0x3d, 0x94, 0xa2, 0xaf, 0xbd, 0xfb, 0xf6, 0xeb, 0x63, 0xba, + 0x84, 0x75, 0x33, 0xe9, 0xec, 0x89, 0xaa, 0xed, 0xba, 0x55, 0x41, 0x9d, 0x23, 0x12, 0x70, 0xdc, + 0x86, 0x89, 0x68, 0x11, 0xb0, 0x3e, 0x70, 0x4b, 0x42, 0x2e, 0xc3, 0x6c, 0x92, 0x5e, 0x92, 0x04, + 0x34, 0xbc, 0xd4, 0x87, 0x40, 0x78, 0x3b, 0xde, 0xc2, 0x64, 0x77, 0x73, 0xf1, 0xa0, 0xb8, 0xdd, + 0x42, 0x94, 0x06, 0x3b, 0xa9, 0xec, 0xff, 0xcb, 0xec, 0x45, 0x5c, 0x18, 0x94, 0x9d, 0xe3, 0x2f, + 0x08, 0xfe, 0x49, 0x9e, 0x0b, 0x7c, 0x6b, 0x84, 0xbd, 0x0c, 0x99, 0x6d, 0x8c, 0xbc, 0xc9, 0xfa, + 0x96, 0xa4, 0x69, 0xe0, 0x9b, 0x7d, 0x68, 0x26, 0x1e, 0x0e, 0xfc, 0x15, 0xc9, 0x7f, 0x50, 0x9f, + 0x69, 0xc6, 0x5b, 0x43, 0xf3, 0x88, 0xed, 0x64, 0xfe, 0xf6, 0x88, 0x28, 0xa5, 0x60, 0x5b, 0x2a, + 0xd8, 0xc4, 0x1b, 0xa3, 0x28, 0xa8, 0xba, 0x94, 0x8b, 0xdd, 0xca, 0xe9, 0xb9, 0x86, 0xce, 0xce, + 0x35, 0xf4, 0xf3, 0x5c, 0x43, 0x1f, 0x2e, 0xb4, 0xd4, 0xd9, 0x85, 0x96, 0xfa, 0x7e, 0xa1, 0xa5, + 0x5e, 0xac, 0xd7, 0xa9, 0x78, 0xd5, 0x3c, 0x34, 0x1c, 0xd6, 0x30, 0xf9, 0x11, 0xf5, 0xd7, 0x1b, + 0xa4, 0xd5, 0x8d, 0xdf, 0x2a, 0x9b, 0x6f, 0xa2, 0x24, 0xf2, 0x00, 0x1c, 0x8e, 0xcb, 0x3f, 0xf3, + 0xe6, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xbc, 0xf8, 0xcc, 0xe9, 0x48, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -493,6 +639,10 @@ type QueryClient interface { // indexers that have access to the ID of a currency pair, but no way to get // the underlying currency pair from it. GetCurrencyPairMapping(ctx context.Context, in *GetCurrencyPairMappingRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingResponse, error) + // Get the mapping of currency pair ID <-> currency pair as a list. This is + // useful for indexers that have access to the ID of a currency pair, but no + // way to get the underlying currency pair from it. + GetCurrencyPairMappingList(ctx context.Context, in *GetCurrencyPairMappingListRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingListResponse, error) } type queryClient struct { @@ -539,6 +689,15 @@ func (c *queryClient) GetCurrencyPairMapping(ctx context.Context, in *GetCurrenc return out, nil } +func (c *queryClient) GetCurrencyPairMappingList(ctx context.Context, in *GetCurrencyPairMappingListRequest, opts ...grpc.CallOption) (*GetCurrencyPairMappingListResponse, error) { + out := new(GetCurrencyPairMappingListResponse) + err := c.cc.Invoke(ctx, "/connect.oracle.v2.Query/GetCurrencyPairMappingList", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Get all the currency pairs the x/oracle module is tracking price-data for. @@ -551,6 +710,10 @@ type QueryServer interface { // indexers that have access to the ID of a currency pair, but no way to get // the underlying currency pair from it. GetCurrencyPairMapping(context.Context, *GetCurrencyPairMappingRequest) (*GetCurrencyPairMappingResponse, error) + // Get the mapping of currency pair ID <-> currency pair as a list. This is + // useful for indexers that have access to the ID of a currency pair, but no + // way to get the underlying currency pair from it. + GetCurrencyPairMappingList(context.Context, *GetCurrencyPairMappingListRequest) (*GetCurrencyPairMappingListResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -569,6 +732,9 @@ func (*UnimplementedQueryServer) GetPrices(ctx context.Context, req *GetPricesRe func (*UnimplementedQueryServer) GetCurrencyPairMapping(ctx context.Context, req *GetCurrencyPairMappingRequest) (*GetCurrencyPairMappingResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyPairMapping not implemented") } +func (*UnimplementedQueryServer) GetCurrencyPairMappingList(ctx context.Context, req *GetCurrencyPairMappingListRequest) (*GetCurrencyPairMappingListResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetCurrencyPairMappingList not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -646,6 +812,24 @@ func _Query_GetCurrencyPairMapping_Handler(srv interface{}, ctx context.Context, return interceptor(ctx, in, info, handler) } +func _Query_GetCurrencyPairMappingList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetCurrencyPairMappingListRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).GetCurrencyPairMappingList(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/connect.oracle.v2.Query/GetCurrencyPairMappingList", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).GetCurrencyPairMappingList(ctx, req.(*GetCurrencyPairMappingListRequest)) + } + return interceptor(ctx, in, info, handler) +} + var Query_serviceDesc = _Query_serviceDesc var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "connect.oracle.v2.Query", @@ -667,6 +851,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "GetCurrencyPairMapping", Handler: _Query_GetCurrencyPairMapping_Handler, }, + { + MethodName: "GetCurrencyPairMappingList", + Handler: _Query_GetCurrencyPairMappingList_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "connect/oracle/v2/query.proto", @@ -949,6 +1137,104 @@ func (m *GetCurrencyPairMappingResponse) MarshalToSizedBuffer(dAtA []byte) (int, return len(dAtA) - i, nil } +func (m *GetCurrencyPairMappingListRequest) 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 *GetCurrencyPairMappingListRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetCurrencyPairMappingListRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *CurrencyPairMapping) 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 *CurrencyPairMapping) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *CurrencyPairMapping) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.CurrencyPair.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if m.Id != 0 { + i = encodeVarintQuery(dAtA, i, uint64(m.Id)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *GetCurrencyPairMappingListResponse) 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 *GetCurrencyPairMappingListResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GetCurrencyPairMappingListResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Mappings) > 0 { + for iNdEx := len(m.Mappings) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Mappings[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1076,6 +1362,44 @@ func (m *GetCurrencyPairMappingResponse) Size() (n int) { return n } +func (m *GetCurrencyPairMappingListRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *CurrencyPairMapping) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Id != 0 { + n += 1 + sovQuery(uint64(m.Id)) + } + l = m.CurrencyPair.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *GetCurrencyPairMappingListResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Mappings) > 0 { + for _, e := range m.Mappings { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1822,6 +2146,242 @@ func (m *GetCurrencyPairMappingResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *GetCurrencyPairMappingListRequest) 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: GetCurrencyPairMappingListRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetCurrencyPairMappingListRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 *CurrencyPairMapping) 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: CurrencyPairMapping: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: CurrencyPairMapping: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + m.Id = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Id |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CurrencyPair", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.CurrencyPair.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 *GetCurrencyPairMappingListResponse) 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: GetCurrencyPairMappingListResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GetCurrencyPairMappingListResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Mappings", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Mappings = append(m.Mappings, CurrencyPairMapping{}) + if err := m.Mappings[len(m.Mappings)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/oracle/types/query.pb.gw.go b/x/oracle/types/query.pb.gw.go index 9b26c2f6d..b84bb9604 100644 --- a/x/oracle/types/query.pb.gw.go +++ b/x/oracle/types/query.pb.gw.go @@ -141,6 +141,24 @@ func local_request_Query_GetCurrencyPairMapping_0(ctx context.Context, marshaler } +func request_Query_GetCurrencyPairMappingList_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCurrencyPairMappingListRequest + var metadata runtime.ServerMetadata + + msg, err := client.GetCurrencyPairMappingList(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_GetCurrencyPairMappingList_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq GetCurrencyPairMappingListRequest + var metadata runtime.ServerMetadata + + msg, err := server.GetCurrencyPairMappingList(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -239,6 +257,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_GetCurrencyPairMappingList_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_GetCurrencyPairMappingList_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_GetCurrencyPairMappingList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -360,6 +401,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_GetCurrencyPairMappingList_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_GetCurrencyPairMappingList_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_GetCurrencyPairMappingList_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -371,6 +432,8 @@ var ( pattern_Query_GetPrices_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"connect", "oracle", "v2", "get_prices"}, "", runtime.AssumeColonVerbOpt(false))) pattern_Query_GetCurrencyPairMapping_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"connect", "oracle", "v2", "get_currency_pair_mapping"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_GetCurrencyPairMappingList_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"connect", "oracle", "v2", "get_currency_pair_mapping_list"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -381,4 +444,6 @@ var ( forward_Query_GetPrices_0 = runtime.ForwardResponseMessage forward_Query_GetCurrencyPairMapping_0 = runtime.ForwardResponseMessage + + forward_Query_GetCurrencyPairMappingList_0 = runtime.ForwardResponseMessage )