mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
feat: add PubKey fast reflection
This commit is contained in:
parent
c3e8fcc3d3
commit
f6879f1c12
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,500 +0,0 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package modulev1
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/api/cosmos/app/v1alpha1"
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
md_Module protoreflect.MessageDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_oracle_module_v1_module_proto_init()
|
||||
md_Module = File_oracle_module_v1_module_proto.Messages().ByName("Module")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_Module)(nil)
|
||||
|
||||
type fastReflection_Module Module
|
||||
|
||||
func (x *Module) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_Module)(x)
|
||||
}
|
||||
|
||||
func (x *Module) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_oracle_module_v1_module_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_Module_messageType fastReflection_Module_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_Module_messageType{}
|
||||
|
||||
type fastReflection_Module_messageType struct{}
|
||||
|
||||
func (x fastReflection_Module_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_Module)(nil)
|
||||
}
|
||||
func (x fastReflection_Module_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_Module)
|
||||
}
|
||||
func (x fastReflection_Module_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Module
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_Module) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_Module
|
||||
}
|
||||
|
||||
// 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_Module) Type() protoreflect.MessageType {
|
||||
return _fastReflection_Module_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_Module) New() protoreflect.Message {
|
||||
return new(fastReflection_Module)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_Module) Interface() protoreflect.ProtoMessage {
|
||||
return (*Module)(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_Module) 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_Module) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.module.v1.Module 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_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in oracle.module.v1.Module", 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_Module) 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_Module) 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_Module) 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_Module) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*Module)
|
||||
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().(*Module)
|
||||
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().(*Module)
|
||||
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: Module: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Module: 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,
|
||||
}
|
||||
}
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.27.0
|
||||
// protoc (unknown)
|
||||
// source: oracle/module/v1/module.proto
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
type Module struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *Module) Reset() {
|
||||
*x = Module{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_oracle_module_v1_module_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *Module) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*Module) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use Module.ProtoReflect.Descriptor instead.
|
||||
func (*Module) Descriptor() ([]byte, []int) {
|
||||
return file_oracle_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_oracle_module_v1_module_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_oracle_module_v1_module_proto_rawDesc = []byte{
|
||||
0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||
0x10, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76,
|
||||
0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31,
|
||||
0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba,
|
||||
0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xbb, 0x01,
|
||||
0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x6d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f,
|
||||
0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70,
|
||||
0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f,
|
||||
0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x4d,
|
||||
0x58, 0xaa, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
|
||||
0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x10, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f,
|
||||
0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65,
|
||||
0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
|
||||
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x12, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a,
|
||||
0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_oracle_module_v1_module_proto_rawDescOnce sync.Once
|
||||
file_oracle_module_v1_module_proto_rawDescData = file_oracle_module_v1_module_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_oracle_module_v1_module_proto_rawDescGZIP() []byte {
|
||||
file_oracle_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||
file_oracle_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_module_v1_module_proto_rawDescData)
|
||||
})
|
||||
return file_oracle_module_v1_module_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_oracle_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_oracle_module_v1_module_proto_goTypes = []interface{}{
|
||||
(*Module)(nil), // 0: oracle.module.v1.Module
|
||||
}
|
||||
var file_oracle_module_v1_module_proto_depIdxs = []int32{
|
||||
0, // [0:0] is the sub-list for method output_type
|
||||
0, // [0:0] is the sub-list for method input_type
|
||||
0, // [0:0] is the sub-list for extension type_name
|
||||
0, // [0:0] is the sub-list for extension extendee
|
||||
0, // [0:0] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_oracle_module_v1_module_proto_init() }
|
||||
func file_oracle_module_v1_module_proto_init() {
|
||||
if File_oracle_module_v1_module_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_oracle_module_v1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*Module); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_oracle_module_v1_module_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_oracle_module_v1_module_proto_goTypes,
|
||||
DependencyIndexes: file_oracle_module_v1_module_proto_depIdxs,
|
||||
MessageInfos: file_oracle_module_v1_module_proto_msgTypes,
|
||||
}.Build()
|
||||
File_oracle_module_v1_module_proto = out.File
|
||||
file_oracle_module_v1_module_proto_rawDesc = nil
|
||||
file_oracle_module_v1_module_proto_goTypes = nil
|
||||
file_oracle_module_v1_module_proto_depIdxs = nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -1,996 +0,0 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package oraclev1
|
||||
|
||||
import (
|
||||
fmt "fmt"
|
||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
io "io"
|
||||
reflect "reflect"
|
||||
sync "sync"
|
||||
)
|
||||
|
||||
var (
|
||||
md_QueryParamsRequest protoreflect.MessageDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_oracle_v1_query_proto_init()
|
||||
md_QueryParamsRequest = File_oracle_v1_query_proto.Messages().ByName("QueryParamsRequest")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil)
|
||||
|
||||
type fastReflection_QueryParamsRequest QueryParamsRequest
|
||||
|
||||
func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_QueryParamsRequest)(x)
|
||||
}
|
||||
|
||||
func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[0]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{}
|
||||
|
||||
type fastReflection_QueryParamsRequest_messageType struct{}
|
||||
|
||||
func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_QueryParamsRequest)(nil)
|
||||
}
|
||||
func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_QueryParamsRequest)
|
||||
}
|
||||
func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_QueryParamsRequest
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_QueryParamsRequest
|
||||
}
|
||||
|
||||
// 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_QueryParamsRequest) Type() protoreflect.MessageType {
|
||||
return _fastReflection_QueryParamsRequest_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message {
|
||||
return new(fastReflection_QueryParamsRequest)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage {
|
||||
return (*QueryParamsRequest)(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_QueryParamsRequest) 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_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsRequest", 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*QueryParamsRequest)
|
||||
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().(*QueryParamsRequest)
|
||||
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().(*QueryParamsRequest)
|
||||
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: QueryParamsRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: 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_QueryParamsResponse protoreflect.MessageDescriptor
|
||||
fd_QueryParamsResponse_params protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_oracle_v1_query_proto_init()
|
||||
md_QueryParamsResponse = File_oracle_v1_query_proto.Messages().ByName("QueryParamsResponse")
|
||||
fd_QueryParamsResponse_params = md_QueryParamsResponse.Fields().ByName("params")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_QueryParamsResponse)(nil)
|
||||
|
||||
type fastReflection_QueryParamsResponse QueryParamsResponse
|
||||
|
||||
func (x *QueryParamsResponse) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_QueryParamsResponse)(x)
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[1]
|
||||
if protoimpl.UnsafeEnabled && x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
return ms
|
||||
}
|
||||
return mi.MessageOf(x)
|
||||
}
|
||||
|
||||
var _fastReflection_QueryParamsResponse_messageType fastReflection_QueryParamsResponse_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_QueryParamsResponse_messageType{}
|
||||
|
||||
type fastReflection_QueryParamsResponse_messageType struct{}
|
||||
|
||||
func (x fastReflection_QueryParamsResponse_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_QueryParamsResponse)(nil)
|
||||
}
|
||||
func (x fastReflection_QueryParamsResponse_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_QueryParamsResponse)
|
||||
}
|
||||
func (x fastReflection_QueryParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_QueryParamsResponse
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_QueryParamsResponse) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_QueryParamsResponse
|
||||
}
|
||||
|
||||
// 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_QueryParamsResponse) Type() protoreflect.MessageType {
|
||||
return _fastReflection_QueryParamsResponse_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_QueryParamsResponse) New() protoreflect.Message {
|
||||
return new(fastReflection_QueryParamsResponse)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_QueryParamsResponse) Interface() protoreflect.ProtoMessage {
|
||||
return (*QueryParamsResponse)(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_QueryParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if x.Params != nil {
|
||||
value := protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||
if !f(fd_QueryParamsResponse_params, 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_QueryParamsResponse) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "oracle.v1.QueryParamsResponse.params":
|
||||
return x.Params != nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "oracle.v1.QueryParamsResponse.params":
|
||||
x.Params = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "oracle.v1.QueryParamsResponse.params":
|
||||
value := x.Params
|
||||
return protoreflect.ValueOfMessage(value.ProtoReflect())
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "oracle.v1.QueryParamsResponse.params":
|
||||
x.Params = value.Message().Interface().(*Params)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "oracle.v1.QueryParamsResponse.params":
|
||||
if x.Params == nil {
|
||||
x.Params = new(Params)
|
||||
}
|
||||
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "oracle.v1.QueryParamsResponse.params":
|
||||
m := new(Params)
|
||||
return protoreflect.ValueOfMessage(m.ProtoReflect())
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: oracle.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message oracle.v1.QueryParamsResponse 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_QueryParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in oracle.v1.QueryParamsResponse", 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) 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_QueryParamsResponse) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*QueryParamsResponse)
|
||||
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.Params != nil {
|
||||
l = options.Size(x.Params)
|
||||
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().(*QueryParamsResponse)
|
||||
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.Params != nil {
|
||||
encoded, err := options.Marshal(x.Params)
|
||||
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().(*QueryParamsResponse)
|
||||
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: QueryParamsResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsResponse: 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 Params", 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.Params == nil {
|
||||
x.Params = &Params{}
|
||||
}
|
||||
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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
|
||||
// protoc (unknown)
|
||||
// source: oracle/v1/query.proto
|
||||
|
||||
const (
|
||||
// Verify that this generated code is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
||||
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||
type QueryParamsRequest struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
}
|
||||
|
||||
func (x *QueryParamsRequest) Reset() {
|
||||
*x = QueryParamsRequest{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *QueryParamsRequest) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*QueryParamsRequest) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead.
|
||||
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||
return file_oracle_v1_query_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||
type QueryParamsResponse struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// params defines the parameters of the module.
|
||||
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) Reset() {
|
||||
*x = QueryParamsResponse{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_oracle_v1_query_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*QueryParamsResponse) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use QueryParamsResponse.ProtoReflect.Descriptor instead.
|
||||
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return file_oracle_v1_query_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) GetParams() *Params {
|
||||
if x != nil {
|
||||
return x.Params
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_oracle_v1_query_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_oracle_v1_query_proto_rawDesc = []byte{
|
||||
0x0a, 0x15, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72,
|
||||
0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x09, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61,
|
||||
0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
|
||||
0x1a, 0x17, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65,
|
||||
0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65,
|
||||
0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
|
||||
0x40, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73,
|
||||
0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e,
|
||||
0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d,
|
||||
0x73, 0x32, 0x6b, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x62, 0x0a, 0x06, 0x50, 0x61,
|
||||
0x72, 0x61, 0x6d, 0x73, 0x12, 0x1d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75,
|
||||
0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x2e,
|
||||
0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||
0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x6f, 0x72,
|
||||
0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x8f,
|
||||
0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31,
|
||||
0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d,
|
||||
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
|
||||
0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c,
|
||||
0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
||||
0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca,
|
||||
0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72,
|
||||
0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
|
||||
0x61, 0x74, 0x61, 0xea, 0x02, 0x0a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_oracle_v1_query_proto_rawDescOnce sync.Once
|
||||
file_oracle_v1_query_proto_rawDescData = file_oracle_v1_query_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_oracle_v1_query_proto_rawDescGZIP() []byte {
|
||||
file_oracle_v1_query_proto_rawDescOnce.Do(func() {
|
||||
file_oracle_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_oracle_v1_query_proto_rawDescData)
|
||||
})
|
||||
return file_oracle_v1_query_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_oracle_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_oracle_v1_query_proto_goTypes = []interface{}{
|
||||
(*QueryParamsRequest)(nil), // 0: oracle.v1.QueryParamsRequest
|
||||
(*QueryParamsResponse)(nil), // 1: oracle.v1.QueryParamsResponse
|
||||
(*Params)(nil), // 2: oracle.v1.Params
|
||||
}
|
||||
var file_oracle_v1_query_proto_depIdxs = []int32{
|
||||
2, // 0: oracle.v1.QueryParamsResponse.params:type_name -> oracle.v1.Params
|
||||
0, // 1: oracle.v1.Query.Params:input_type -> oracle.v1.QueryParamsRequest
|
||||
1, // 2: oracle.v1.Query.Params:output_type -> oracle.v1.QueryParamsResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
1, // [1:1] is the sub-list for extension extendee
|
||||
0, // [0:1] is the sub-list for field type_name
|
||||
}
|
||||
|
||||
func init() { file_oracle_v1_query_proto_init() }
|
||||
func file_oracle_v1_query_proto_init() {
|
||||
if File_oracle_v1_query_proto != nil {
|
||||
return
|
||||
}
|
||||
file_oracle_v1_genesis_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_oracle_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryParamsRequest); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
file_oracle_v1_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*QueryParamsResponse); i {
|
||||
case 0:
|
||||
return &v.state
|
||||
case 1:
|
||||
return &v.sizeCache
|
||||
case 2:
|
||||
return &v.unknownFields
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
}
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: file_oracle_v1_query_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_oracle_v1_query_proto_goTypes,
|
||||
DependencyIndexes: file_oracle_v1_query_proto_depIdxs,
|
||||
MessageInfos: file_oracle_v1_query_proto_msgTypes,
|
||||
}.Build()
|
||||
File_oracle_v1_query_proto = out.File
|
||||
file_oracle_v1_query_proto_rawDesc = nil
|
||||
file_oracle_v1_query_proto_goTypes = nil
|
||||
file_oracle_v1_query_proto_depIdxs = nil
|
||||
}
|
@ -1,111 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: oracle/v1/query.proto
|
||||
|
||||
package oraclev1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/oracle.v1.Query/Params"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type QueryClient interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewQueryClient(cc grpc.ClientConnInterface) QueryClient {
|
||||
return &queryClient{cc}
|
||||
}
|
||||
|
||||
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...)
|
||||
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
|
||||
type QueryServer interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedQueryServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to QueryServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeQueryServer interface {
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) {
|
||||
s.RegisterService(&Query_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryParamsRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Params(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Params_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
|
||||
}
|
||||
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)
|
||||
var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "oracle.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "oracle/v1/query.proto",
|
||||
}
|
@ -1,342 +0,0 @@
|
||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||
|
||||
package oraclev1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
type BalanceTable interface {
|
||||
Insert(ctx context.Context, balance *Balance) error
|
||||
Update(ctx context.Context, balance *Balance) error
|
||||
Save(ctx context.Context, balance *Balance) error
|
||||
Delete(ctx context.Context, balance *Balance) error
|
||||
Has(ctx context.Context, account string) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, account string) (*Balance, error)
|
||||
List(ctx context.Context, prefixKey BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error)
|
||||
ListRange(ctx context.Context, from, to BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey BalanceIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to BalanceIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type BalanceIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i BalanceIterator) Value() (*Balance, error) {
|
||||
var balance Balance
|
||||
err := i.UnmarshalMessage(&balance)
|
||||
return &balance, err
|
||||
}
|
||||
|
||||
type BalanceIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
balanceIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type BalancePrimaryKey = BalanceAccountIndexKey
|
||||
|
||||
type BalanceAccountIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x BalanceAccountIndexKey) id() uint32 { return 0 }
|
||||
func (x BalanceAccountIndexKey) values() []interface{} { return x.vs }
|
||||
func (x BalanceAccountIndexKey) balanceIndexKey() {}
|
||||
|
||||
func (this BalanceAccountIndexKey) WithAccount(account string) BalanceAccountIndexKey {
|
||||
this.vs = []interface{}{account}
|
||||
return this
|
||||
}
|
||||
|
||||
type BalanceAmountIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x BalanceAmountIndexKey) id() uint32 { return 1 }
|
||||
func (x BalanceAmountIndexKey) values() []interface{} { return x.vs }
|
||||
func (x BalanceAmountIndexKey) balanceIndexKey() {}
|
||||
|
||||
func (this BalanceAmountIndexKey) WithAmount(amount uint64) BalanceAmountIndexKey {
|
||||
this.vs = []interface{}{amount}
|
||||
return this
|
||||
}
|
||||
|
||||
type balanceTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this balanceTable) Insert(ctx context.Context, balance *Balance) error {
|
||||
return this.table.Insert(ctx, balance)
|
||||
}
|
||||
|
||||
func (this balanceTable) Update(ctx context.Context, balance *Balance) error {
|
||||
return this.table.Update(ctx, balance)
|
||||
}
|
||||
|
||||
func (this balanceTable) Save(ctx context.Context, balance *Balance) error {
|
||||
return this.table.Save(ctx, balance)
|
||||
}
|
||||
|
||||
func (this balanceTable) Delete(ctx context.Context, balance *Balance) error {
|
||||
return this.table.Delete(ctx, balance)
|
||||
}
|
||||
|
||||
func (this balanceTable) Has(ctx context.Context, account string) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, account)
|
||||
}
|
||||
|
||||
func (this balanceTable) Get(ctx context.Context, account string) (*Balance, error) {
|
||||
var balance Balance
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &balance, account)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &balance, nil
|
||||
}
|
||||
|
||||
func (this balanceTable) List(ctx context.Context, prefixKey BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return BalanceIterator{it}, err
|
||||
}
|
||||
|
||||
func (this balanceTable) ListRange(ctx context.Context, from, to BalanceIndexKey, opts ...ormlist.Option) (BalanceIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return BalanceIterator{it}, err
|
||||
}
|
||||
|
||||
func (this balanceTable) DeleteBy(ctx context.Context, prefixKey BalanceIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this balanceTable) DeleteRange(ctx context.Context, from, to BalanceIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this balanceTable) doNotImplement() {}
|
||||
|
||||
var _ BalanceTable = balanceTable{}
|
||||
|
||||
func NewBalanceTable(db ormtable.Schema) (BalanceTable, error) {
|
||||
table := db.GetTable(&Balance{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Balance{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return balanceTable{table}, nil
|
||||
}
|
||||
|
||||
type AccountTable interface {
|
||||
Insert(ctx context.Context, account *Account) error
|
||||
Update(ctx context.Context, account *Account) error
|
||||
Save(ctx context.Context, account *Account) error
|
||||
Delete(ctx context.Context, account *Account) error
|
||||
Has(ctx context.Context, id uint64) (found bool, err error)
|
||||
// Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
Get(ctx context.Context, id uint64) (*Account, error)
|
||||
HasByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (found bool, err error)
|
||||
// GetByAddressChainNetwork returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (*Account, error)
|
||||
List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
|
||||
ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to AccountIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type AccountIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i AccountIterator) Value() (*Account, error) {
|
||||
var account Account
|
||||
err := i.UnmarshalMessage(&account)
|
||||
return &account, err
|
||||
}
|
||||
|
||||
type AccountIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
accountIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type AccountPrimaryKey = AccountIdIndexKey
|
||||
|
||||
type AccountIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x AccountIdIndexKey) id() uint32 { return 0 }
|
||||
func (x AccountIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AccountIdIndexKey) accountIndexKey() {}
|
||||
|
||||
func (this AccountIdIndexKey) WithId(id uint64) AccountIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type AccountAddressChainNetworkIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x AccountAddressChainNetworkIndexKey) id() uint32 { return 1 }
|
||||
func (x AccountAddressChainNetworkIndexKey) values() []interface{} { return x.vs }
|
||||
func (x AccountAddressChainNetworkIndexKey) accountIndexKey() {}
|
||||
|
||||
func (this AccountAddressChainNetworkIndexKey) WithAddress(address string) AccountAddressChainNetworkIndexKey {
|
||||
this.vs = []interface{}{address}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this AccountAddressChainNetworkIndexKey) WithAddressChain(address string, chain string) AccountAddressChainNetworkIndexKey {
|
||||
this.vs = []interface{}{address, chain}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this AccountAddressChainNetworkIndexKey) WithAddressChainNetwork(address string, chain string, network string) AccountAddressChainNetworkIndexKey {
|
||||
this.vs = []interface{}{address, chain, network}
|
||||
return this
|
||||
}
|
||||
|
||||
type accountTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this accountTable) Insert(ctx context.Context, account *Account) error {
|
||||
return this.table.Insert(ctx, account)
|
||||
}
|
||||
|
||||
func (this accountTable) Update(ctx context.Context, account *Account) error {
|
||||
return this.table.Update(ctx, account)
|
||||
}
|
||||
|
||||
func (this accountTable) Save(ctx context.Context, account *Account) error {
|
||||
return this.table.Save(ctx, account)
|
||||
}
|
||||
|
||||
func (this accountTable) Delete(ctx context.Context, account *Account) error {
|
||||
return this.table.Delete(ctx, account)
|
||||
}
|
||||
|
||||
func (this accountTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this accountTable) Get(ctx context.Context, id uint64) (*Account, error) {
|
||||
var account Account
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &account, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &account, nil
|
||||
}
|
||||
|
||||
func (this accountTable) HasByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
address,
|
||||
chain,
|
||||
network,
|
||||
)
|
||||
}
|
||||
|
||||
func (this accountTable) GetByAddressChainNetwork(ctx context.Context, address string, chain string, network string) (*Account, error) {
|
||||
var account Account
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
|
||||
address,
|
||||
chain,
|
||||
network,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &account, nil
|
||||
}
|
||||
|
||||
func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return AccountIterator{it}, err
|
||||
}
|
||||
|
||||
func (this accountTable) ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return AccountIterator{it}, err
|
||||
}
|
||||
|
||||
func (this accountTable) DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this accountTable) DeleteRange(ctx context.Context, from, to AccountIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this accountTable) doNotImplement() {}
|
||||
|
||||
var _ AccountTable = accountTable{}
|
||||
|
||||
func NewAccountTable(db ormtable.Schema) (AccountTable, error) {
|
||||
table := db.GetTable(&Account{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Account{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return accountTable{table}, nil
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
BalanceTable() BalanceTable
|
||||
AccountTable() AccountTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
balance BalanceTable
|
||||
account AccountTable
|
||||
}
|
||||
|
||||
func (x stateStore) BalanceTable() BalanceTable {
|
||||
return x.balance
|
||||
}
|
||||
|
||||
func (x stateStore) AccountTable() AccountTable {
|
||||
return x.account
|
||||
}
|
||||
|
||||
func (stateStore) doNotImplement() {}
|
||||
|
||||
var _ StateStore = stateStore{}
|
||||
|
||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
balanceTable, err := NewBalanceTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
accountTable, err := NewAccountTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
balanceTable,
|
||||
accountTable,
|
||||
}, nil
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,115 +0,0 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.3.0
|
||||
// - protoc (unknown)
|
||||
// source: oracle/v1/tx.proto
|
||||
|
||||
package oraclev1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
)
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the grpc package it is being compiled against.
|
||||
// Requires gRPC-Go v1.32.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/oracle.v1.Msg/UpdateParams"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
//
|
||||
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
|
||||
type MsgClient interface {
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
cc grpc.ClientConnInterface
|
||||
}
|
||||
|
||||
func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
|
||||
return &msgClient{cc}
|
||||
}
|
||||
|
||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// MsgServer is the server API for Msg service.
|
||||
// All implementations must embed UnimplementedMsgServer
|
||||
// for forward compatibility
|
||||
type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have forward compatible implementations.
|
||||
type UnimplementedMsgServer struct {
|
||||
}
|
||||
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
|
||||
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
|
||||
// Use of this interface is not recommended, as added methods to MsgServer will
|
||||
// result in compilation errors.
|
||||
type UnsafeMsgServer interface {
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
|
||||
s.RegisterService(&Msg_ServiceDesc, srv)
|
||||
}
|
||||
|
||||
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgUpdateParams)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).UpdateParams(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_UpdateParams_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "oracle.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "oracle/v1/tx.proto",
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -20,7 +20,6 @@ const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/vault.v1.Query/Params"
|
||||
Query_BuildTx_FullMethodName = "/vault.v1.Query/BuildTx"
|
||||
Query_Schema_FullMethodName = "/vault.v1.Query/Schema"
|
||||
Query_Sync_FullMethodName = "/vault.v1.Query/Sync"
|
||||
)
|
||||
@ -31,8 +30,6 @@ const (
|
||||
type QueryClient interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||
BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error)
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error)
|
||||
@ -58,15 +55,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error) {
|
||||
out := new(BuildTxResponse)
|
||||
err := c.cc.Invoke(ctx, Query_BuildTx_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) {
|
||||
out := new(QuerySchemaResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Schema_FullMethodName, in, out, opts...)
|
||||
@ -91,8 +79,6 @@ func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.Ca
|
||||
type QueryServer interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||
BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error)
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error)
|
||||
@ -109,9 +95,6 @@ type UnimplementedQueryServer struct {
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BuildTx not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented")
|
||||
}
|
||||
@ -149,24 +132,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_BuildTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BuildTxRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).BuildTx(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_BuildTx_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).BuildTx(ctx, req.(*BuildTxRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuerySchemaRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -214,10 +179,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BuildTx",
|
||||
Handler: _Query_BuildTx_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Schema",
|
||||
Handler: _Query_Schema_Handler,
|
||||
|
@ -9,7 +9,7 @@ option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||
// GenesisState defines the module genesis state
|
||||
message GenesisState {
|
||||
// Params defines all the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
@ -38,3 +38,34 @@ message KeyInfo {
|
||||
string curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448",
|
||||
// "Ed25519", "Ed448", "secp256k1"
|
||||
}
|
||||
|
||||
message Keyshares {
|
||||
string validator_cid = 1;
|
||||
string user_cid = 2;
|
||||
int64 last_updated_block = 3;
|
||||
}
|
||||
|
||||
// PubKey defines a public key for a did
|
||||
message PubKey {
|
||||
string role = 1;
|
||||
string key_type = 2;
|
||||
RawKey raw_key = 3;
|
||||
JSONWebKey jwk = 4;
|
||||
}
|
||||
|
||||
// JWK represents a JSON Web Key
|
||||
message JSONWebKey {
|
||||
string kty = 1; // Key Type
|
||||
string crv = 2; // Curve (for EC and OKP keys)
|
||||
string x = 3; // X coordinate (for EC and OKP keys)
|
||||
string y = 4; // Y coordinate (for EC keys)
|
||||
string n = 5; // Modulus (for RSA keys)
|
||||
string e = 6; // Exponent (for RSA keys)
|
||||
}
|
||||
|
||||
message RawKey {
|
||||
string algorithm = 1;
|
||||
string encoding = 2;
|
||||
string curve = 3;
|
||||
bytes key = 4;
|
||||
}
|
||||
|
@ -3,18 +3,15 @@ syntax = "proto3";
|
||||
package did.v1;
|
||||
|
||||
import "cosmos/orm/v1/orm.proto";
|
||||
import "did/v1/genesis.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||
|
||||
message Authentication {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1
|
||||
primary_key: {fields: "did"}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "controller,subject"
|
||||
unique: true
|
||||
}
|
||||
id : 1
|
||||
primary_key : {fields : "did"}
|
||||
index : {id : 1 fields : "controller,subject" unique : true}
|
||||
};
|
||||
|
||||
// The unique identifier of the authentication
|
||||
@ -42,31 +39,12 @@ message Authentication {
|
||||
// Controller represents a Sonr DWN Vault
|
||||
message Controller {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 2
|
||||
primary_key: {
|
||||
fields: "number"
|
||||
auto_increment: true
|
||||
}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "sonr_address"
|
||||
unique: true
|
||||
}
|
||||
index: {
|
||||
id: 2
|
||||
fields: "eth_address"
|
||||
unique: true
|
||||
}
|
||||
index: {
|
||||
id: 3
|
||||
fields: "btc_address"
|
||||
unique: true
|
||||
}
|
||||
index: {
|
||||
id: 4
|
||||
fields: "did"
|
||||
unique: true
|
||||
}
|
||||
id : 2
|
||||
primary_key : {fields : "number" auto_increment : true}
|
||||
index : {id : 1 fields : "sonr_address" unique : true}
|
||||
index : {id : 2 fields : "eth_address" unique : true}
|
||||
index : {id : 3 fields : "btc_address" unique : true}
|
||||
index : {id : 4 fields : "did" unique : true}
|
||||
};
|
||||
|
||||
// The unique identifier of the controller
|
||||
@ -100,23 +78,11 @@ message Controller {
|
||||
// Verification represents a verification method
|
||||
message Verification {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 4
|
||||
primary_key: {fields: "did"}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "issuer,subject"
|
||||
unique: true
|
||||
}
|
||||
index: {
|
||||
id: 2
|
||||
fields: "controller,did_method,issuer"
|
||||
unique: true
|
||||
}
|
||||
index: {
|
||||
id: 3
|
||||
fields: "verification_type,subject,issuer"
|
||||
unique: true
|
||||
}
|
||||
id : 4
|
||||
primary_key : {fields : "did"}
|
||||
index : {id : 1 fields : "issuer,subject" unique : true}
|
||||
index : {id : 2 fields : "controller,did_method,issuer" unique : true}
|
||||
index : {id : 3 fields : "verification_type,subject,issuer" unique : true}
|
||||
};
|
||||
|
||||
// The unique identifier of the verification
|
||||
@ -146,34 +112,3 @@ message Verification {
|
||||
// CreationBlock is the block number of the creation of the controller
|
||||
int64 creation_block = 9;
|
||||
}
|
||||
|
||||
message Keyshares {
|
||||
string validator_cid = 1;
|
||||
string user_cid = 2;
|
||||
int64 last_updated_block = 3;
|
||||
}
|
||||
|
||||
// PubKey defines a public key for a did
|
||||
message PubKey {
|
||||
string role = 1;
|
||||
string key_type = 2;
|
||||
RawKey raw_key = 3;
|
||||
JSONWebKey jwk = 4;
|
||||
}
|
||||
|
||||
// JWK represents a JSON Web Key
|
||||
message JSONWebKey {
|
||||
string kty = 1; // Key Type
|
||||
string crv = 2; // Curve (for EC and OKP keys)
|
||||
string x = 3; // X coordinate (for EC and OKP keys)
|
||||
string y = 4; // Y coordinate (for EC keys)
|
||||
string n = 5; // Modulus (for RSA keys)
|
||||
string e = 6; // Exponent (for RSA keys)
|
||||
}
|
||||
|
||||
message RawKey {
|
||||
string algorithm = 1;
|
||||
string encoding = 2;
|
||||
string curve = 3;
|
||||
bytes key = 4;
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ service Msg {
|
||||
|
||||
// RegisterController initializes a controller with the given authentication
|
||||
// set, address, cid, publicKey, and user-defined alias.
|
||||
rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse);
|
||||
rpc RegisterController(MsgRegisterController)
|
||||
returns (MsgRegisterControllerResponse);
|
||||
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
|
||||
@ -30,7 +31,7 @@ message MsgRegisterController {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// Assertions is the list of assertions to initialize the controller with.
|
||||
repeated bytes assertions = 2;
|
||||
@ -51,7 +52,7 @@ message MsgRegisterControllerResponse {
|
||||
bool success = 1;
|
||||
|
||||
// Controller is the address of the initialized controller.
|
||||
string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string controller = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// Accounts are a Address Map and Supported coin Denoms for the controller
|
||||
map<string, string> accounts = 3;
|
||||
@ -62,7 +63,7 @@ message MsgExecuteTx {
|
||||
option (cosmos.msg.v1.signer) = "controller";
|
||||
|
||||
// Controller is the address of the controller to authenticate.
|
||||
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string controller = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// Messages is the list of messages to execute.
|
||||
map<string, bytes> messages = 2;
|
||||
@ -84,10 +85,10 @@ message MsgUpdateParams {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// params defines the parameters to update.
|
||||
Params params = 2 [(gogoproto.nullable) = false];
|
||||
Params params = 2 [ (gogoproto.nullable) = false ];
|
||||
|
||||
// token is the macron token to authenticate the operation.
|
||||
string token = 3;
|
||||
|
@ -10,7 +10,7 @@ option go_package = "github.com/onsonr/sonr/x/macaroon/types";
|
||||
// GenesisState defines the module genesis state
|
||||
message GenesisState {
|
||||
// Params defines all the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
|
@ -14,12 +14,14 @@ service Query {
|
||||
}
|
||||
|
||||
// RefreshToken refreshes a macaroon token as post authentication.
|
||||
rpc RefreshToken(QueryRefreshTokenRequest) returns (QueryRefreshTokenResponse) {
|
||||
rpc RefreshToken(QueryRefreshTokenRequest)
|
||||
returns (QueryRefreshTokenResponse) {
|
||||
option (google.api.http).post = "/macaroon/v1/refresh";
|
||||
}
|
||||
|
||||
// ValidateToken validates a macaroon token as pre authentication.
|
||||
rpc ValidateToken(QueryValidateTokenRequest) returns (QueryValidateTokenResponse) {
|
||||
rpc ValidateToken(QueryValidateTokenRequest)
|
||||
returns (QueryValidateTokenResponse) {
|
||||
option (google.api.http).post = "/macaroon/v1/validate";
|
||||
}
|
||||
}
|
||||
|
@ -9,16 +9,9 @@ option go_package = "github.com/onsonr/sonr/x/macaroon/types";
|
||||
|
||||
message Grant {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1
|
||||
primary_key: {
|
||||
fields: "id"
|
||||
auto_increment: true
|
||||
}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "subject,origin"
|
||||
unique: true
|
||||
}
|
||||
id : 1
|
||||
primary_key : {fields : "id" auto_increment : true}
|
||||
index : {id : 1 fields : "subject,origin" unique : true}
|
||||
};
|
||||
|
||||
uint64 id = 1;
|
||||
@ -30,16 +23,9 @@ message Grant {
|
||||
|
||||
message Macaroon {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 2
|
||||
primary_key: {
|
||||
fields: "id"
|
||||
auto_increment: true
|
||||
}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "subject,origin"
|
||||
unique: true
|
||||
}
|
||||
id : 2
|
||||
primary_key : {fields : "id" auto_increment : true}
|
||||
index : {id : 1 fields : "subject,origin" unique : true}
|
||||
};
|
||||
|
||||
uint64 id = 1;
|
||||
|
@ -29,12 +29,12 @@ message MsgUpdateParams {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// params defines the parameters to update.
|
||||
//
|
||||
// NOTE: All parameters must be supplied.
|
||||
Params params = 2 [(gogoproto.nullable) = false];
|
||||
Params params = 2 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// MsgUpdateParamsResponse defines the response structure for executing a
|
||||
@ -48,7 +48,7 @@ message MsgIssueMacaroon {
|
||||
option (cosmos.msg.v1.signer) = "controller";
|
||||
|
||||
// Controller is the address of the controller to authenticate.
|
||||
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string controller = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// Origin is the origin of the request in wildcard form.
|
||||
string origin = 2;
|
||||
|
@ -9,7 +9,7 @@ option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
// GenesisState defines the module genesis state
|
||||
message GenesisState {
|
||||
// Params defines all the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
|
@ -9,16 +9,9 @@ option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
|
||||
message Metadata {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1
|
||||
primary_key: {
|
||||
fields: "id"
|
||||
auto_increment: true
|
||||
}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "origin"
|
||||
unique: true
|
||||
}
|
||||
id : 1
|
||||
primary_key : {fields : "id" auto_increment : true}
|
||||
index : {id : 1 fields : "origin" unique : true}
|
||||
};
|
||||
|
||||
uint64 id = 1;
|
||||
@ -33,13 +26,9 @@ message Metadata {
|
||||
// Profile represents a DID alias
|
||||
message Profile {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 2
|
||||
primary_key: {fields: "id"}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "subject,origin"
|
||||
unique: true
|
||||
}
|
||||
id : 2
|
||||
primary_key : {fields : "id"}
|
||||
index : {id : 1 fields : "subject,origin" unique : true}
|
||||
};
|
||||
|
||||
// The unique identifier of the alias
|
||||
|
@ -29,12 +29,12 @@ message MsgUpdateParams {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// params defines the parameters to update.
|
||||
//
|
||||
// NOTE: All parameters must be supplied.
|
||||
Params params = 2 [(gogoproto.nullable) = false];
|
||||
Params params = 2 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// MsgUpdateParamsResponse defines the response structure for executing a
|
||||
@ -48,7 +48,7 @@ message MsgRegisterService {
|
||||
option (cosmos.msg.v1.signer) = "controller";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string controller = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// origin is the origin of the request in wildcard form. Requires valid TXT
|
||||
// record in DNS.
|
||||
|
@ -9,7 +9,7 @@ option go_package = "github.com/onsonr/sonr/x/vault/types";
|
||||
// GenesisState defines the module genesis state
|
||||
message GenesisState {
|
||||
// Params defines all the parameters of the module.
|
||||
Params params = 1 [(gogoproto.nullable) = false];
|
||||
Params params = 1 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// Params defines the set of module parameters.
|
||||
|
@ -13,11 +13,6 @@ service Query {
|
||||
option (google.api.http).get = "/vault/v1/params";
|
||||
}
|
||||
|
||||
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||
rpc BuildTx(BuildTxRequest) returns (BuildTxResponse) {
|
||||
option (google.api.http).post = "/vault/v1/buildtx";
|
||||
}
|
||||
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
rpc Schema(QuerySchemaRequest) returns (QuerySchemaResponse) {
|
||||
@ -39,16 +34,6 @@ message QueryParamsResponse {
|
||||
// params defines the parameters of the module.
|
||||
Params params = 1;
|
||||
}
|
||||
|
||||
// QueryIPFSRequest is the request type for the Query/IPFS RPC method.
|
||||
message QueryIPFSRequest {}
|
||||
|
||||
// QueryIPFSResponse is the response type for the Query/IPFS RPC method.
|
||||
message QueryIPFSResponse {
|
||||
// IPFS is the IPFS client status.
|
||||
bool ipfs = 1;
|
||||
}
|
||||
|
||||
// QuerySchemaRequest is the request type for the Query/Schema RPC method.
|
||||
message QuerySchemaRequest {}
|
||||
|
||||
@ -59,23 +44,7 @@ message QuerySchemaResponse {
|
||||
}
|
||||
|
||||
// SyncRequest is the request type for the Sync RPC method.
|
||||
message SyncRequest {
|
||||
string did = 1;
|
||||
}
|
||||
message SyncRequest { string did = 1; }
|
||||
|
||||
// SyncResponse is the response type for the Sync RPC method.
|
||||
message SyncResponse {
|
||||
bool success = 1;
|
||||
}
|
||||
|
||||
// BuildTxRequest is the request type for the BuildTx RPC method.
|
||||
message BuildTxRequest {
|
||||
string did = 1;
|
||||
string pkl = 2;
|
||||
}
|
||||
|
||||
// BuildTxResponse is the response type for the BuildTx RPC method.
|
||||
message BuildTxResponse {
|
||||
bool success = 1;
|
||||
string tx = 2;
|
||||
}
|
||||
message SyncResponse { bool success = 1; }
|
||||
|
@ -9,21 +9,10 @@ option go_package = "github.com/onsonr/sonr/x/vault/types";
|
||||
|
||||
message DWN {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1
|
||||
primary_key: {
|
||||
fields: "id"
|
||||
auto_increment: true
|
||||
}
|
||||
index: {
|
||||
id: 1
|
||||
fields: "alias"
|
||||
unique: true
|
||||
}
|
||||
index: {
|
||||
id: 2
|
||||
fields: "cid"
|
||||
unique: true
|
||||
}
|
||||
id : 1
|
||||
primary_key : {fields : "id" auto_increment : true}
|
||||
index : {id : 1 fields : "alias" unique : true}
|
||||
index : {id : 2 fields : "cid" unique : true}
|
||||
};
|
||||
uint64 id = 1;
|
||||
string alias = 2;
|
||||
|
@ -32,12 +32,12 @@ message MsgUpdateParams {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the governance account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// params defines the parameters to update.
|
||||
//
|
||||
// NOTE: All parameters must be supplied.
|
||||
Params params = 2 [(gogoproto.nullable) = false];
|
||||
Params params = 2 [ (gogoproto.nullable) = false ];
|
||||
}
|
||||
|
||||
// MsgUpdateParamsResponse defines the response structure for executing a
|
||||
@ -51,7 +51,7 @@ message MsgAllocateVault {
|
||||
option (cosmos.msg.v1.signer) = "authority";
|
||||
|
||||
// authority is the address of the service account.
|
||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
|
||||
|
||||
// subject is a unique human-defined identifier to associate with the vault.
|
||||
string subject = 2;
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -35,12 +35,6 @@ func (k Querier) Sync(goCtx context.Context, req *types.SyncRequest) (*types.Syn
|
||||
return &types.SyncResponse{}, nil
|
||||
}
|
||||
|
||||
// BuildTx implements types.QueryServer.
|
||||
func (k Querier) BuildTx(goCtx context.Context, req *types.BuildTxRequest) (*types.BuildTxResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
return &types.BuildTxResponse{}, nil
|
||||
}
|
||||
|
||||
// Schema implements types.QueryServer.
|
||||
func (k Querier) Schema(goCtx context.Context, req *types.QuerySchemaRequest) (*types.QuerySchemaResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
|
@ -111,89 +111,6 @@ func (m *QueryParamsResponse) GetParams() *Params {
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryIPFSRequest is the request type for the Query/IPFS RPC method.
|
||||
type QueryIPFSRequest struct {
|
||||
}
|
||||
|
||||
func (m *QueryIPFSRequest) Reset() { *m = QueryIPFSRequest{} }
|
||||
func (m *QueryIPFSRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryIPFSRequest) ProtoMessage() {}
|
||||
func (*QueryIPFSRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{2}
|
||||
}
|
||||
func (m *QueryIPFSRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryIPFSRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryIPFSRequest.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 *QueryIPFSRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryIPFSRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryIPFSRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryIPFSRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryIPFSRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryIPFSRequest proto.InternalMessageInfo
|
||||
|
||||
// QueryIPFSResponse is the response type for the Query/IPFS RPC method.
|
||||
type QueryIPFSResponse struct {
|
||||
// IPFS is the IPFS client status.
|
||||
Ipfs bool `protobuf:"varint,1,opt,name=ipfs,proto3" json:"ipfs,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryIPFSResponse) Reset() { *m = QueryIPFSResponse{} }
|
||||
func (m *QueryIPFSResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryIPFSResponse) ProtoMessage() {}
|
||||
func (*QueryIPFSResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{3}
|
||||
}
|
||||
func (m *QueryIPFSResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryIPFSResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryIPFSResponse.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 *QueryIPFSResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryIPFSResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryIPFSResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryIPFSResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryIPFSResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryIPFSResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryIPFSResponse) GetIpfs() bool {
|
||||
if m != nil {
|
||||
return m.Ipfs
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// QuerySchemaRequest is the request type for the Query/Schema RPC method.
|
||||
type QuerySchemaRequest struct {
|
||||
}
|
||||
@ -202,7 +119,7 @@ func (m *QuerySchemaRequest) Reset() { *m = QuerySchemaRequest{} }
|
||||
func (m *QuerySchemaRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuerySchemaRequest) ProtoMessage() {}
|
||||
func (*QuerySchemaRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{4}
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{2}
|
||||
}
|
||||
func (m *QuerySchemaRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -241,7 +158,7 @@ func (m *QuerySchemaResponse) Reset() { *m = QuerySchemaResponse{} }
|
||||
func (m *QuerySchemaResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuerySchemaResponse) ProtoMessage() {}
|
||||
func (*QuerySchemaResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{5}
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{3}
|
||||
}
|
||||
func (m *QuerySchemaResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -286,7 +203,7 @@ func (m *SyncRequest) Reset() { *m = SyncRequest{} }
|
||||
func (m *SyncRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*SyncRequest) ProtoMessage() {}
|
||||
func (*SyncRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{6}
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{4}
|
||||
}
|
||||
func (m *SyncRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -331,7 +248,7 @@ func (m *SyncResponse) Reset() { *m = SyncResponse{} }
|
||||
func (m *SyncResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*SyncResponse) ProtoMessage() {}
|
||||
func (*SyncResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{7}
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{5}
|
||||
}
|
||||
func (m *SyncResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -367,159 +284,42 @@ func (m *SyncResponse) GetSuccess() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// BuildTxRequest is the request type for the BuildTx RPC method.
|
||||
type BuildTxRequest struct {
|
||||
Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"`
|
||||
Pkl string `protobuf:"bytes,2,opt,name=pkl,proto3" json:"pkl,omitempty"`
|
||||
}
|
||||
|
||||
func (m *BuildTxRequest) Reset() { *m = BuildTxRequest{} }
|
||||
func (m *BuildTxRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*BuildTxRequest) ProtoMessage() {}
|
||||
func (*BuildTxRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{8}
|
||||
}
|
||||
func (m *BuildTxRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *BuildTxRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_BuildTxRequest.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 *BuildTxRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BuildTxRequest.Merge(m, src)
|
||||
}
|
||||
func (m *BuildTxRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *BuildTxRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BuildTxRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BuildTxRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *BuildTxRequest) GetDid() string {
|
||||
if m != nil {
|
||||
return m.Did
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *BuildTxRequest) GetPkl() string {
|
||||
if m != nil {
|
||||
return m.Pkl
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// BuildTxResponse is the response type for the BuildTx RPC method.
|
||||
type BuildTxResponse struct {
|
||||
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
||||
Tx string `protobuf:"bytes,2,opt,name=tx,proto3" json:"tx,omitempty"`
|
||||
}
|
||||
|
||||
func (m *BuildTxResponse) Reset() { *m = BuildTxResponse{} }
|
||||
func (m *BuildTxResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*BuildTxResponse) ProtoMessage() {}
|
||||
func (*BuildTxResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{9}
|
||||
}
|
||||
func (m *BuildTxResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *BuildTxResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_BuildTxResponse.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 *BuildTxResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_BuildTxResponse.Merge(m, src)
|
||||
}
|
||||
func (m *BuildTxResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *BuildTxResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_BuildTxResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_BuildTxResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *BuildTxResponse) GetSuccess() bool {
|
||||
if m != nil {
|
||||
return m.Success
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func (m *BuildTxResponse) GetTx() string {
|
||||
if m != nil {
|
||||
return m.Tx
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryParamsRequest)(nil), "vault.v1.QueryParamsRequest")
|
||||
proto.RegisterType((*QueryParamsResponse)(nil), "vault.v1.QueryParamsResponse")
|
||||
proto.RegisterType((*QueryIPFSRequest)(nil), "vault.v1.QueryIPFSRequest")
|
||||
proto.RegisterType((*QueryIPFSResponse)(nil), "vault.v1.QueryIPFSResponse")
|
||||
proto.RegisterType((*QuerySchemaRequest)(nil), "vault.v1.QuerySchemaRequest")
|
||||
proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse")
|
||||
proto.RegisterType((*SyncRequest)(nil), "vault.v1.SyncRequest")
|
||||
proto.RegisterType((*SyncResponse)(nil), "vault.v1.SyncResponse")
|
||||
proto.RegisterType((*BuildTxRequest)(nil), "vault.v1.BuildTxRequest")
|
||||
proto.RegisterType((*BuildTxResponse)(nil), "vault.v1.BuildTxResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) }
|
||||
|
||||
var fileDescriptor_e6d49a2800ab3e4b = []byte{
|
||||
// 466 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xc1, 0x6e, 0xd3, 0x30,
|
||||
0x18, 0xc7, 0x9b, 0x30, 0xba, 0xf1, 0x0d, 0x95, 0xcc, 0x1b, 0x55, 0x16, 0x8d, 0x80, 0x2c, 0x24,
|
||||
0x7a, 0x4a, 0xb4, 0xc1, 0x0d, 0x09, 0xa4, 0x1d, 0x90, 0x38, 0x20, 0x8d, 0x96, 0x0b, 0x5c, 0x50,
|
||||
0x9a, 0x9a, 0x2e, 0x5a, 0x6a, 0x7b, 0xb5, 0x53, 0xa5, 0x57, 0x9e, 0x00, 0x89, 0x97, 0xe2, 0x38,
|
||||
0x89, 0x0b, 0x47, 0xd4, 0xf2, 0x06, 0xbc, 0x00, 0x8a, 0xed, 0x24, 0xcd, 0xb2, 0x89, 0x4b, 0xe4,
|
||||
0xfc, 0xbf, 0xef, 0xfb, 0xf9, 0xef, 0xfc, 0x1d, 0x38, 0x58, 0x44, 0x59, 0x2a, 0xc3, 0xc5, 0x71,
|
||||
0x78, 0x99, 0x91, 0xf9, 0x32, 0xe0, 0x73, 0x26, 0x19, 0xda, 0x51, 0x6a, 0xb0, 0x38, 0xf6, 0x8e,
|
||||
0xa6, 0x8c, 0x4d, 0x53, 0x12, 0x46, 0x3c, 0x09, 0x23, 0x4a, 0x99, 0x8c, 0x64, 0xc2, 0xa8, 0xd0,
|
||||
0x7d, 0x5e, 0xbf, 0x9a, 0x9e, 0x12, 0x4a, 0x44, 0x62, 0x74, 0x7c, 0x00, 0xe8, 0x7d, 0x81, 0x3b,
|
||||
0x8b, 0xe6, 0xd1, 0x4c, 0x0c, 0xc9, 0x65, 0x46, 0x84, 0xc4, 0xaf, 0x61, 0xbf, 0xa1, 0x0a, 0xce,
|
||||
0xa8, 0x20, 0x68, 0x00, 0x5d, 0xae, 0x14, 0xd7, 0x7a, 0x62, 0x0d, 0x76, 0x4f, 0x9c, 0xa0, 0xdc,
|
||||
0x3d, 0x30, 0x9d, 0xa6, 0x8e, 0x11, 0x38, 0x0a, 0xf0, 0xf6, 0xec, 0xcd, 0xa8, 0x84, 0x3e, 0x83,
|
||||
0xbd, 0x0d, 0xcd, 0x20, 0x11, 0x6c, 0x25, 0xfc, 0x8b, 0x06, 0xee, 0x0c, 0xd5, 0xba, 0xf2, 0x34,
|
||||
0x8a, 0xcf, 0xc9, 0x2c, 0xba, 0xee, 0xa9, 0x54, 0x6b, 0x4f, 0x42, 0x29, 0x6d, 0x4f, 0xa6, 0xd3,
|
||||
0xd4, 0xf1, 0x63, 0xd8, 0x1d, 0x2d, 0x69, 0x6c, 0x78, 0xc8, 0x81, 0x3b, 0x93, 0x64, 0xa2, 0xa6,
|
||||
0xee, 0x0d, 0x8b, 0x25, 0x1e, 0xc0, 0x7d, 0xdd, 0x60, 0xd0, 0x2e, 0x6c, 0x8b, 0x2c, 0x8e, 0x89,
|
||||
0x28, 0xed, 0x95, 0xaf, 0xf8, 0x05, 0xf4, 0x4e, 0xb3, 0x24, 0x9d, 0x7c, 0xc8, 0x6f, 0xa5, 0x15,
|
||||
0x0a, 0xbf, 0x48, 0x5d, 0x5b, 0x2b, 0xfc, 0x22, 0xc5, 0x2f, 0xe1, 0x41, 0x35, 0xf5, 0xbf, 0x2d,
|
||||
0x50, 0x0f, 0x6c, 0x99, 0x9b, 0x69, 0x5b, 0xe6, 0x27, 0x7f, 0x6d, 0xb8, 0xab, 0xce, 0x8f, 0x3e,
|
||||
0x43, 0x57, 0x7f, 0x6d, 0x74, 0x54, 0x9f, 0xb5, 0x1d, 0xa2, 0xf7, 0xe8, 0x96, 0xaa, 0xde, 0x1a,
|
||||
0xbb, 0x5f, 0x7f, 0xfe, 0xf9, 0x6e, 0x23, 0xe4, 0x84, 0xd5, 0xd5, 0xd0, 0xe1, 0xa1, 0x8f, 0xb0,
|
||||
0x6d, 0x7c, 0x22, 0xb7, 0x66, 0x34, 0x0f, 0xec, 0x1d, 0xde, 0x50, 0x31, 0xe4, 0x43, 0x45, 0xde,
|
||||
0xc7, 0x7b, 0x35, 0x79, 0x5c, 0xb4, 0xc8, 0xbc, 0xf0, 0xae, 0x53, 0x69, 0x79, 0x6f, 0x84, 0xdd,
|
||||
0xf2, 0xde, 0x0c, 0xfd, 0x26, 0xef, 0x3a, 0x64, 0xf4, 0x0e, 0xb6, 0x8a, 0x0c, 0xd1, 0xc3, 0x8d,
|
||||
0x6b, 0x50, 0x87, 0xee, 0xf5, 0xaf, 0xcb, 0x06, 0xd8, 0x57, 0x40, 0x07, 0xf7, 0x36, 0x80, 0x4b,
|
||||
0x1a, 0x9f, 0xbe, 0xfa, 0xb1, 0xf2, 0xad, 0xab, 0x95, 0x6f, 0xfd, 0x5e, 0xf9, 0xd6, 0xb7, 0xb5,
|
||||
0xdf, 0xb9, 0x5a, 0xfb, 0x9d, 0x5f, 0x6b, 0xbf, 0xf3, 0xe9, 0xe9, 0x34, 0x91, 0xe7, 0xd9, 0x38,
|
||||
0x88, 0xd9, 0x2c, 0x64, 0x54, 0x30, 0x3a, 0x0f, 0xd5, 0x23, 0x37, 0x04, 0xb9, 0xe4, 0x44, 0x8c,
|
||||
0xbb, 0xea, 0x2f, 0x7b, 0xfe, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xf3, 0xd1, 0xd1, 0xbc, 0xbd, 0x03,
|
||||
0x00, 0x00,
|
||||
// 364 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0x4f, 0x4f, 0xfa, 0x30,
|
||||
0x1c, 0xc6, 0x19, 0xbf, 0x9f, 0x88, 0xc5, 0x98, 0xa5, 0x22, 0x21, 0x0b, 0x4e, 0xb3, 0x78, 0xe0,
|
||||
0xb4, 0x06, 0xbc, 0x6b, 0xe2, 0xdd, 0x44, 0xe1, 0xe6, 0xc5, 0x94, 0xd2, 0x8c, 0x25, 0xd0, 0x8e,
|
||||
0xb5, 0x23, 0xee, 0xea, 0x2b, 0x30, 0xf1, 0xe2, 0x4b, 0xf2, 0x48, 0xe2, 0xc5, 0xa3, 0x01, 0x5f,
|
||||
0x88, 0x59, 0x5b, 0xfe, 0x8c, 0xe9, 0x65, 0xd9, 0x9e, 0xef, 0xd3, 0xcf, 0xf3, 0xed, 0x93, 0x81,
|
||||
0xfa, 0x0c, 0x27, 0x63, 0x89, 0x66, 0x1d, 0x34, 0x4d, 0x68, 0x9c, 0xfa, 0x51, 0xcc, 0x25, 0x87,
|
||||
0x55, 0xa5, 0xfa, 0xb3, 0x8e, 0xd3, 0x0a, 0x38, 0x0f, 0xc6, 0x14, 0xe1, 0x28, 0x44, 0x98, 0x31,
|
||||
0x2e, 0xb1, 0x0c, 0x39, 0x13, 0xda, 0xe7, 0x34, 0xd6, 0xa7, 0x03, 0xca, 0xa8, 0x08, 0x8d, 0xee,
|
||||
0xd5, 0x01, 0xbc, 0xcf, 0x70, 0x77, 0x38, 0xc6, 0x13, 0xd1, 0xa3, 0xd3, 0x84, 0x0a, 0xe9, 0x5d,
|
||||
0x83, 0xe3, 0x9c, 0x2a, 0x22, 0xce, 0x04, 0x85, 0x6d, 0x50, 0x89, 0x94, 0xd2, 0xb4, 0xce, 0xad,
|
||||
0x76, 0xad, 0x6b, 0xfb, 0xab, 0x74, 0xdf, 0x38, 0xcd, 0x7c, 0x8d, 0xed, 0x93, 0x11, 0x9d, 0xe0,
|
||||
0x5d, 0xec, 0x4a, 0xdd, 0x60, 0x85, 0x52, 0x8a, 0x58, 0xe3, 0x34, 0x73, 0xef, 0x0c, 0xd4, 0xfa,
|
||||
0x29, 0x23, 0x86, 0x07, 0x6d, 0xf0, 0x6f, 0x18, 0x0e, 0xd5, 0xa9, 0x83, 0x5e, 0xf6, 0xea, 0xb5,
|
||||
0xc1, 0xa1, 0x36, 0x18, 0x74, 0x13, 0xec, 0x8b, 0x84, 0x10, 0x2a, 0xf4, 0xca, 0xd5, 0xde, 0xea,
|
||||
0xb3, 0xfb, 0x56, 0x06, 0x7b, 0x6a, 0x19, 0xf8, 0x08, 0x2a, 0x7a, 0x7b, 0xd8, 0xda, 0x04, 0x17,
|
||||
0x4b, 0x71, 0x4e, 0xff, 0x98, 0xea, 0x28, 0xaf, 0xf9, 0xfc, 0xf1, 0xfd, 0x5a, 0x86, 0xd0, 0x46,
|
||||
0xeb, 0xaa, 0x75, 0x19, 0x59, 0x80, 0xbe, 0x47, 0x21, 0x20, 0x57, 0x4f, 0x21, 0x20, 0x5f, 0xd3,
|
||||
0x6f, 0x01, 0xba, 0x16, 0x78, 0x0b, 0xfe, 0x67, 0xb7, 0x86, 0x27, 0x5b, 0xc5, 0x6d, 0x6a, 0x72,
|
||||
0x1a, 0xbb, 0xb2, 0x01, 0x36, 0x14, 0xd0, 0xf6, 0x8e, 0xb6, 0x80, 0x29, 0x23, 0x37, 0x57, 0xef,
|
||||
0x0b, 0xd7, 0x9a, 0x2f, 0x5c, 0xeb, 0x6b, 0xe1, 0x5a, 0x2f, 0x4b, 0xb7, 0x34, 0x5f, 0xba, 0xa5,
|
||||
0xcf, 0xa5, 0x5b, 0x7a, 0xb8, 0x08, 0x42, 0x39, 0x4a, 0x06, 0x3e, 0xe1, 0x13, 0xc4, 0x99, 0xe0,
|
||||
0x2c, 0x46, 0xea, 0xf1, 0x64, 0x08, 0x32, 0x8d, 0xa8, 0x18, 0x54, 0xd4, 0xaf, 0x75, 0xf9, 0x13,
|
||||
0x00, 0x00, 0xff, 0xff, 0x21, 0x69, 0x1c, 0x41, 0xb2, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -536,8 +336,6 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
type QueryClient interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
|
||||
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||
BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error)
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error)
|
||||
@ -563,15 +361,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) BuildTx(ctx context.Context, in *BuildTxRequest, opts ...grpc.CallOption) (*BuildTxResponse, error) {
|
||||
out := new(BuildTxResponse)
|
||||
err := c.cc.Invoke(ctx, "/vault.v1.Query/BuildTx", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) {
|
||||
out := new(QuerySchemaResponse)
|
||||
err := c.cc.Invoke(ctx, "/vault.v1.Query/Schema", in, out, opts...)
|
||||
@ -594,8 +383,6 @@ func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.Ca
|
||||
type QueryServer interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// BuildTx builds an unsigned transaction message for the given PKL.
|
||||
BuildTx(context.Context, *BuildTxRequest) (*BuildTxResponse, error)
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error)
|
||||
@ -611,9 +398,6 @@ type UnimplementedQueryServer struct {
|
||||
func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) BuildTx(ctx context.Context, req *BuildTxRequest) (*BuildTxResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method BuildTx not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) Schema(ctx context.Context, req *QuerySchemaRequest) (*QuerySchemaResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented")
|
||||
}
|
||||
@ -643,24 +427,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_BuildTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(BuildTxRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).BuildTx(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vault.v1.Query/BuildTx",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).BuildTx(ctx, req.(*BuildTxRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuerySchemaRequest)
|
||||
if err := dec(in); err != nil {
|
||||
@ -705,10 +471,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "BuildTx",
|
||||
Handler: _Query_BuildTx_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Schema",
|
||||
Handler: _Query_Schema_Handler,
|
||||
@ -780,62 +542,6 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryIPFSRequest) 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 *QueryIPFSRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryIPFSRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryIPFSResponse) 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 *QueryIPFSResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryIPFSResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Ipfs {
|
||||
i--
|
||||
if m.Ipfs {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QuerySchemaRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@ -957,83 +663,6 @@ func (m *SyncResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *BuildTxRequest) 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 *BuildTxRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *BuildTxRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Pkl) > 0 {
|
||||
i -= len(m.Pkl)
|
||||
copy(dAtA[i:], m.Pkl)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Pkl)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Did) > 0 {
|
||||
i -= len(m.Did)
|
||||
copy(dAtA[i:], m.Did)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Did)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *BuildTxResponse) 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 *BuildTxResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *BuildTxResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Tx) > 0 {
|
||||
i -= len(m.Tx)
|
||||
copy(dAtA[i:], m.Tx)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Tx)))
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if m.Success {
|
||||
i--
|
||||
if m.Success {
|
||||
dAtA[i] = 1
|
||||
} else {
|
||||
dAtA[i] = 0
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x8
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovQuery(v)
|
||||
base := offset
|
||||
@ -1067,27 +696,6 @@ func (m *QueryParamsResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryIPFSRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryIPFSResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Ipfs {
|
||||
n += 2
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QuerySchemaRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@ -1135,39 +743,6 @@ func (m *SyncResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *BuildTxRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Did)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
l = len(m.Pkl)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *BuildTxResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Success {
|
||||
n += 2
|
||||
}
|
||||
l = len(m.Tx)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovQuery(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@ -1310,126 +885,6 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryIPFSRequest) 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: QueryIPFSRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryIPFSRequest: 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 *QueryIPFSResponse) 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: QueryIPFSResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryIPFSResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Ipfs", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Ipfs = bool(v != 0)
|
||||
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 *QuerySchemaRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
@ -1718,222 +1173,6 @@ func (m *SyncResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *BuildTxRequest) 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: BuildTxRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: BuildTxRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Did = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Pkl", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Pkl = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *BuildTxResponse) 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: BuildTxResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: BuildTxResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType)
|
||||
}
|
||||
var v int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
v |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
m.Success = bool(v != 0)
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Tx", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Tx = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipQuery(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
@ -51,42 +51,6 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_BuildTx_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_Query_BuildTx_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq BuildTxRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BuildTx_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.BuildTx(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_BuildTx_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq BuildTxRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_BuildTx_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.BuildTx(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Query_Schema_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QuerySchemaRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
@ -170,29 +134,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Query_BuildTx_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_BuildTx_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_BuildTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Schema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -300,26 +241,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("POST", pattern_Query_BuildTx_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_BuildTx_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_BuildTx_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Schema_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
@ -366,8 +287,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
var (
|
||||
pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_BuildTx_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "buildtx"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Schema_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "schema"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Sync_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2}, []string{"vault", "v1", "sync"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
@ -376,8 +295,6 @@ var (
|
||||
var (
|
||||
forward_Query_Params_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_BuildTx_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Schema_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Sync_0 = runtime.ForwardResponseMessage
|
||||
|
Loading…
x
Reference in New Issue
Block a user