mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
refactor: Rename x/vault -> x/dwn and x/service -> x/svc
This commit is contained in:
parent
711acd6bb8
commit
629ef72954
498
api/dwn/module/v1/module.pulsar.go
Normal file
498
api/dwn/module/v1/module.pulsar.go
Normal file
@ -0,0 +1,498 @@
|
||||
// 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_dwn_module_v1_module_proto_init()
|
||||
md_Module = File_dwn_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_dwn_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: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.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: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.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: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.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: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.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: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.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: dwn.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.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 dwn.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: dwn/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_dwn_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_dwn_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_dwn_module_v1_module_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_dwn_module_v1_module_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x64, 0x77, 0x6e, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x77,
|
||||
0x6e, 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, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x64, 0x77, 0x6e, 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, 0x31, 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, 0x64, 0x77, 0x6e, 0x2f, 0x6d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
||||
0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x77, 0x6e, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x77, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x77, 0x6e, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x0f, 0x44, 0x77, 0x6e, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_dwn_module_v1_module_proto_rawDescOnce sync.Once
|
||||
file_dwn_module_v1_module_proto_rawDescData = file_dwn_module_v1_module_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_dwn_module_v1_module_proto_rawDescGZIP() []byte {
|
||||
file_dwn_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||
file_dwn_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_dwn_module_v1_module_proto_rawDescData)
|
||||
})
|
||||
return file_dwn_module_v1_module_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_dwn_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_dwn_module_v1_module_proto_goTypes = []interface{}{
|
||||
(*Module)(nil), // 0: dwn.module.v1.Module
|
||||
}
|
||||
var file_dwn_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_dwn_module_v1_module_proto_init() }
|
||||
func file_dwn_module_v1_module_proto_init() {
|
||||
if File_dwn_module_v1_module_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_dwn_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_dwn_module_v1_module_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_dwn_module_v1_module_proto_goTypes,
|
||||
DependencyIndexes: file_dwn_module_v1_module_proto_depIdxs,
|
||||
MessageInfos: file_dwn_module_v1_module_proto_msgTypes,
|
||||
}.Build()
|
||||
File_dwn_module_v1_module_proto = out.File
|
||||
file_dwn_module_v1_module_proto_rawDesc = nil
|
||||
file_dwn_module_v1_module_proto_goTypes = nil
|
||||
file_dwn_module_v1_module_proto_depIdxs = nil
|
||||
}
|
2322
api/dwn/v1/genesis.pulsar.go
Normal file
2322
api/dwn/v1/genesis.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
4218
api/dwn/v1/query.pulsar.go
Normal file
4218
api/dwn/v1/query.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
253
api/dwn/v1/query_grpc.pb.go
Normal file
253
api/dwn/v1/query_grpc.pb.go
Normal file
@ -0,0 +1,253 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: dwn/v1/query.proto
|
||||
|
||||
package dwnv1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/dwn.v1.Query/Params"
|
||||
Query_Schema_FullMethodName = "/dwn.v1.Query/Schema"
|
||||
Query_Allocate_FullMethodName = "/dwn.v1.Query/Allocate"
|
||||
Query_Sync_FullMethodName = "/dwn.v1.Query/Sync"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
type QueryClient interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, 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)
|
||||
// Allocate initializes a Target Vault available for claims with a compatible
|
||||
// Authentication mechanism. The default authentication mechanism is WebAuthn.
|
||||
Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error)
|
||||
// Sync queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, 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) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QuerySchemaResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Schema_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryAllocateResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QuerySyncResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
type QueryServer interface {
|
||||
// Params queries all parameters of the module.
|
||||
Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error)
|
||||
// Schema queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error)
|
||||
// Allocate initializes a Target Vault available for claims with a compatible
|
||||
// Authentication mechanism. The default authentication mechanism is WebAuthn.
|
||||
Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error)
|
||||
// Sync queries the DID document by its id. And returns the required PKL
|
||||
// information
|
||||
Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Allocate(context.Context, *QueryAllocateRequest) (*QueryAllocateResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Sync(context.Context, *QuerySyncRequest) (*QuerySyncResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
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 {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Schema(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Schema_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Schema(ctx, req.(*QuerySchemaRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAllocateRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Allocate(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Allocate_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QuerySyncRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Sync(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Sync_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest))
|
||||
}
|
||||
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: "dwn.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Schema",
|
||||
Handler: _Query_Schema_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Allocate",
|
||||
Handler: _Query_Allocate_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Sync",
|
||||
Handler: _Query_Sync_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "dwn/v1/query.proto",
|
||||
}
|
166
api/dwn/v1/state.cosmos_orm.go
Normal file
166
api/dwn/v1/state.cosmos_orm.go
Normal file
@ -0,0 +1,166 @@
|
||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||
|
||||
package dwnv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
type ExampleDataTable interface {
|
||||
Insert(ctx context.Context, exampleData *ExampleData) error
|
||||
Update(ctx context.Context, exampleData *ExampleData) error
|
||||
Save(ctx context.Context, exampleData *ExampleData) error
|
||||
Delete(ctx context.Context, exampleData *ExampleData) error
|
||||
Has(ctx context.Context, account []byte) (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 []byte) (*ExampleData, error)
|
||||
List(ctx context.Context, prefixKey ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error)
|
||||
ListRange(ctx context.Context, from, to ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey ExampleDataIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to ExampleDataIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type ExampleDataIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i ExampleDataIterator) Value() (*ExampleData, error) {
|
||||
var exampleData ExampleData
|
||||
err := i.UnmarshalMessage(&exampleData)
|
||||
return &exampleData, err
|
||||
}
|
||||
|
||||
type ExampleDataIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
exampleDataIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type ExampleDataPrimaryKey = ExampleDataAccountIndexKey
|
||||
|
||||
type ExampleDataAccountIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ExampleDataAccountIndexKey) id() uint32 { return 0 }
|
||||
func (x ExampleDataAccountIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ExampleDataAccountIndexKey) exampleDataIndexKey() {}
|
||||
|
||||
func (this ExampleDataAccountIndexKey) WithAccount(account []byte) ExampleDataAccountIndexKey {
|
||||
this.vs = []interface{}{account}
|
||||
return this
|
||||
}
|
||||
|
||||
type ExampleDataAmountIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ExampleDataAmountIndexKey) id() uint32 { return 1 }
|
||||
func (x ExampleDataAmountIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ExampleDataAmountIndexKey) exampleDataIndexKey() {}
|
||||
|
||||
func (this ExampleDataAmountIndexKey) WithAmount(amount uint64) ExampleDataAmountIndexKey {
|
||||
this.vs = []interface{}{amount}
|
||||
return this
|
||||
}
|
||||
|
||||
type exampleDataTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this exampleDataTable) Insert(ctx context.Context, exampleData *ExampleData) error {
|
||||
return this.table.Insert(ctx, exampleData)
|
||||
}
|
||||
|
||||
func (this exampleDataTable) Update(ctx context.Context, exampleData *ExampleData) error {
|
||||
return this.table.Update(ctx, exampleData)
|
||||
}
|
||||
|
||||
func (this exampleDataTable) Save(ctx context.Context, exampleData *ExampleData) error {
|
||||
return this.table.Save(ctx, exampleData)
|
||||
}
|
||||
|
||||
func (this exampleDataTable) Delete(ctx context.Context, exampleData *ExampleData) error {
|
||||
return this.table.Delete(ctx, exampleData)
|
||||
}
|
||||
|
||||
func (this exampleDataTable) Has(ctx context.Context, account []byte) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, account)
|
||||
}
|
||||
|
||||
func (this exampleDataTable) Get(ctx context.Context, account []byte) (*ExampleData, error) {
|
||||
var exampleData ExampleData
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &exampleData, account)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &exampleData, nil
|
||||
}
|
||||
|
||||
func (this exampleDataTable) List(ctx context.Context, prefixKey ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return ExampleDataIterator{it}, err
|
||||
}
|
||||
|
||||
func (this exampleDataTable) ListRange(ctx context.Context, from, to ExampleDataIndexKey, opts ...ormlist.Option) (ExampleDataIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return ExampleDataIterator{it}, err
|
||||
}
|
||||
|
||||
func (this exampleDataTable) DeleteBy(ctx context.Context, prefixKey ExampleDataIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this exampleDataTable) DeleteRange(ctx context.Context, from, to ExampleDataIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this exampleDataTable) doNotImplement() {}
|
||||
|
||||
var _ ExampleDataTable = exampleDataTable{}
|
||||
|
||||
func NewExampleDataTable(db ormtable.Schema) (ExampleDataTable, error) {
|
||||
table := db.GetTable(&ExampleData{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&ExampleData{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return exampleDataTable{table}, nil
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
ExampleDataTable() ExampleDataTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
exampleData ExampleDataTable
|
||||
}
|
||||
|
||||
func (x stateStore) ExampleDataTable() ExampleDataTable {
|
||||
return x.exampleData
|
||||
}
|
||||
|
||||
func (stateStore) doNotImplement() {}
|
||||
|
||||
var _ StateStore = stateStore{}
|
||||
|
||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
exampleDataTable, err := NewExampleDataTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
exampleDataTable,
|
||||
}, nil
|
||||
}
|
626
api/dwn/v1/state.pulsar.go
Normal file
626
api/dwn/v1/state.pulsar.go
Normal file
@ -0,0 +1,626 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package dwnv1
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/api/cosmos/orm/v1"
|
||||
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_ExampleData protoreflect.MessageDescriptor
|
||||
fd_ExampleData_account protoreflect.FieldDescriptor
|
||||
fd_ExampleData_amount protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
file_dwn_v1_state_proto_init()
|
||||
md_ExampleData = File_dwn_v1_state_proto.Messages().ByName("ExampleData")
|
||||
fd_ExampleData_account = md_ExampleData.Fields().ByName("account")
|
||||
fd_ExampleData_amount = md_ExampleData.Fields().ByName("amount")
|
||||
}
|
||||
|
||||
var _ protoreflect.Message = (*fastReflection_ExampleData)(nil)
|
||||
|
||||
type fastReflection_ExampleData ExampleData
|
||||
|
||||
func (x *ExampleData) ProtoReflect() protoreflect.Message {
|
||||
return (*fastReflection_ExampleData)(x)
|
||||
}
|
||||
|
||||
func (x *ExampleData) slowProtoReflect() protoreflect.Message {
|
||||
mi := &file_dwn_v1_state_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_ExampleData_messageType fastReflection_ExampleData_messageType
|
||||
var _ protoreflect.MessageType = fastReflection_ExampleData_messageType{}
|
||||
|
||||
type fastReflection_ExampleData_messageType struct{}
|
||||
|
||||
func (x fastReflection_ExampleData_messageType) Zero() protoreflect.Message {
|
||||
return (*fastReflection_ExampleData)(nil)
|
||||
}
|
||||
func (x fastReflection_ExampleData_messageType) New() protoreflect.Message {
|
||||
return new(fastReflection_ExampleData)
|
||||
}
|
||||
func (x fastReflection_ExampleData_messageType) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_ExampleData
|
||||
}
|
||||
|
||||
// Descriptor returns message descriptor, which contains only the protobuf
|
||||
// type information for the message.
|
||||
func (x *fastReflection_ExampleData) Descriptor() protoreflect.MessageDescriptor {
|
||||
return md_ExampleData
|
||||
}
|
||||
|
||||
// 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_ExampleData) Type() protoreflect.MessageType {
|
||||
return _fastReflection_ExampleData_messageType
|
||||
}
|
||||
|
||||
// New returns a newly allocated and mutable empty message.
|
||||
func (x *fastReflection_ExampleData) New() protoreflect.Message {
|
||||
return new(fastReflection_ExampleData)
|
||||
}
|
||||
|
||||
// Interface unwraps the message reflection interface and
|
||||
// returns the underlying ProtoMessage interface.
|
||||
func (x *fastReflection_ExampleData) Interface() protoreflect.ProtoMessage {
|
||||
return (*ExampleData)(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_ExampleData) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
|
||||
if len(x.Account) != 0 {
|
||||
value := protoreflect.ValueOfBytes(x.Account)
|
||||
if !f(fd_ExampleData_account, value) {
|
||||
return
|
||||
}
|
||||
}
|
||||
if x.Amount != uint64(0) {
|
||||
value := protoreflect.ValueOfUint64(x.Amount)
|
||||
if !f(fd_ExampleData_amount, 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_ExampleData) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
switch fd.FullName() {
|
||||
case "dwn.v1.ExampleData.account":
|
||||
return len(x.Account) != 0
|
||||
case "dwn.v1.ExampleData.amount":
|
||||
return x.Amount != uint64(0)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.v1.ExampleData 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_ExampleData) Clear(fd protoreflect.FieldDescriptor) {
|
||||
switch fd.FullName() {
|
||||
case "dwn.v1.ExampleData.account":
|
||||
x.Account = nil
|
||||
case "dwn.v1.ExampleData.amount":
|
||||
x.Amount = uint64(0)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.v1.ExampleData 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_ExampleData) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch descriptor.FullName() {
|
||||
case "dwn.v1.ExampleData.account":
|
||||
value := x.Account
|
||||
return protoreflect.ValueOfBytes(value)
|
||||
case "dwn.v1.ExampleData.amount":
|
||||
value := x.Amount
|
||||
return protoreflect.ValueOfUint64(value)
|
||||
default:
|
||||
if descriptor.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.v1.ExampleData 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_ExampleData) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
|
||||
switch fd.FullName() {
|
||||
case "dwn.v1.ExampleData.account":
|
||||
x.Account = value.Bytes()
|
||||
case "dwn.v1.ExampleData.amount":
|
||||
x.Amount = value.Uint()
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.v1.ExampleData 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_ExampleData) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "dwn.v1.ExampleData.account":
|
||||
panic(fmt.Errorf("field account of message dwn.v1.ExampleData is not mutable"))
|
||||
case "dwn.v1.ExampleData.amount":
|
||||
panic(fmt.Errorf("field amount of message dwn.v1.ExampleData is not mutable"))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.v1.ExampleData 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_ExampleData) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
|
||||
switch fd.FullName() {
|
||||
case "dwn.v1.ExampleData.account":
|
||||
return protoreflect.ValueOfBytes(nil)
|
||||
case "dwn.v1.ExampleData.amount":
|
||||
return protoreflect.ValueOfUint64(uint64(0))
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: dwn.v1.ExampleData"))
|
||||
}
|
||||
panic(fmt.Errorf("message dwn.v1.ExampleData 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_ExampleData) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
|
||||
switch d.FullName() {
|
||||
default:
|
||||
panic(fmt.Errorf("%s is not a oneof field in dwn.v1.ExampleData", 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_ExampleData) 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_ExampleData) 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_ExampleData) 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_ExampleData) ProtoMethods() *protoiface.Methods {
|
||||
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
|
||||
x := input.Message.Interface().(*ExampleData)
|
||||
if x == nil {
|
||||
return protoiface.SizeOutput{
|
||||
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
|
||||
Size: 0,
|
||||
}
|
||||
}
|
||||
options := runtime.SizeInputToOptions(input)
|
||||
_ = options
|
||||
var n int
|
||||
var l int
|
||||
_ = l
|
||||
l = len(x.Account)
|
||||
if l > 0 {
|
||||
n += 1 + l + runtime.Sov(uint64(l))
|
||||
}
|
||||
if x.Amount != 0 {
|
||||
n += 1 + runtime.Sov(uint64(x.Amount))
|
||||
}
|
||||
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().(*ExampleData)
|
||||
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.Amount != 0 {
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(x.Amount))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if len(x.Account) > 0 {
|
||||
i -= len(x.Account)
|
||||
copy(dAtA[i:], x.Account)
|
||||
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Account)))
|
||||
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().(*ExampleData)
|
||||
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: ExampleData: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExampleData: 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 Account", wireType)
|
||||
}
|
||||
var byteLen 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++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
|
||||
}
|
||||
if postIndex > l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
x.Account = append(x.Account[:0], dAtA[iNdEx:postIndex]...)
|
||||
if x.Account == nil {
|
||||
x.Account = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
||||
}
|
||||
x.Amount = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
x.Amount |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
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: dwn/v1/state.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)
|
||||
)
|
||||
|
||||
type ExampleData struct {
|
||||
state protoimpl.MessageState
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
}
|
||||
|
||||
func (x *ExampleData) Reset() {
|
||||
*x = ExampleData{}
|
||||
if protoimpl.UnsafeEnabled {
|
||||
mi := &file_dwn_v1_state_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
}
|
||||
|
||||
func (x *ExampleData) String() string {
|
||||
return protoimpl.X.MessageStringOf(x)
|
||||
}
|
||||
|
||||
func (*ExampleData) ProtoMessage() {}
|
||||
|
||||
// Deprecated: Use ExampleData.ProtoReflect.Descriptor instead.
|
||||
func (*ExampleData) Descriptor() ([]byte, []int) {
|
||||
return file_dwn_v1_state_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *ExampleData) GetAccount() []byte {
|
||||
if x != nil {
|
||||
return x.Account
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (x *ExampleData) GetAmount() uint64 {
|
||||
if x != nil {
|
||||
return x.Amount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
var File_dwn_v1_state_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_dwn_v1_state_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x77, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f,
|
||||
0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e,
|
||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x0a, 0x0b, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65,
|
||||
0x44, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x16,
|
||||
0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06,
|
||||
0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x1f, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x19, 0x0a, 0x09,
|
||||
0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0a, 0x0a, 0x06, 0x61, 0x6d, 0x6f,
|
||||
0x75, 0x6e, 0x74, 0x10, 0x01, 0x18, 0x01, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64,
|
||||
0x77, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x27, 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,
|
||||
0x64, 0x77, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x77, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44,
|
||||
0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x77, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x77,
|
||||
0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x77, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50,
|
||||
0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x77, 0x6e, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_dwn_v1_state_proto_rawDescOnce sync.Once
|
||||
file_dwn_v1_state_proto_rawDescData = file_dwn_v1_state_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_dwn_v1_state_proto_rawDescGZIP() []byte {
|
||||
file_dwn_v1_state_proto_rawDescOnce.Do(func() {
|
||||
file_dwn_v1_state_proto_rawDescData = protoimpl.X.CompressGZIP(file_dwn_v1_state_proto_rawDescData)
|
||||
})
|
||||
return file_dwn_v1_state_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_dwn_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_dwn_v1_state_proto_goTypes = []interface{}{
|
||||
(*ExampleData)(nil), // 0: dwn.v1.ExampleData
|
||||
}
|
||||
var file_dwn_v1_state_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_dwn_v1_state_proto_init() }
|
||||
func file_dwn_v1_state_proto_init() {
|
||||
if File_dwn_v1_state_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_dwn_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||
switch v := v.(*ExampleData); 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_dwn_v1_state_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_dwn_v1_state_proto_goTypes,
|
||||
DependencyIndexes: file_dwn_v1_state_proto_depIdxs,
|
||||
MessageInfos: file_dwn_v1_state_proto_msgTypes,
|
||||
}.Build()
|
||||
File_dwn_v1_state_proto = out.File
|
||||
file_dwn_v1_state_proto_rawDesc = nil
|
||||
file_dwn_v1_state_proto_goTypes = nil
|
||||
file_dwn_v1_state_proto_depIdxs = nil
|
||||
}
|
2061
api/dwn/v1/tx.pulsar.go
Normal file
2061
api/dwn/v1/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
171
api/dwn/v1/tx_grpc.pb.go
Normal file
171
api/dwn/v1/tx_grpc.pb.go
Normal file
@ -0,0 +1,171 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: dwn/v1/tx.proto
|
||||
|
||||
package dwnv1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/dwn.v1.Msg/UpdateParams"
|
||||
Msg_Initialize_FullMethodName = "/dwn.v1.Msg/Initialize"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
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)
|
||||
// Initialize spawns a new Vault
|
||||
Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, 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) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgInitializeResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_Initialize_FullMethodName, in, out, cOpts...)
|
||||
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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// Initialize spawns a new Vault
|
||||
Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgInitialize)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Initialize(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_Initialize_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize))
|
||||
}
|
||||
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: "dwn.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Initialize",
|
||||
Handler: _Msg_Initialize_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "dwn/v1/tx.proto",
|
||||
}
|
498
api/svc/module/v1/module.pulsar.go
Normal file
498
api/svc/module/v1/module.pulsar.go
Normal file
@ -0,0 +1,498 @@
|
||||
// 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_svc_module_v1_module_proto_init()
|
||||
md_Module = File_svc_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_svc_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: svc.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.module.v1.Module"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 svc.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: svc/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_svc_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_svc_module_v1_module_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
var File_svc_module_v1_module_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_svc_module_v1_module_proto_rawDesc = []byte{
|
||||
0x0a, 0x1a, 0x73, 0x76, 0x63, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f,
|
||||
0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x76,
|
||||
0x63, 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, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e,
|
||||
0x73, 0x76, 0x63, 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, 0x31, 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, 0x73, 0x76, 0x63, 0x2f, 0x6d, 0x6f, 0x64,
|
||||
0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2,
|
||||
0x02, 0x03, 0x53, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x53, 0x76, 0x63, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x53, 0x76, 0x63, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x53, 0x76, 0x63, 0x5c, 0x4d, 0x6f, 0x64, 0x75,
|
||||
0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
|
||||
0x61, 0xea, 0x02, 0x0f, 0x53, 0x76, 0x63, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a,
|
||||
0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_svc_module_v1_module_proto_rawDescOnce sync.Once
|
||||
file_svc_module_v1_module_proto_rawDescData = file_svc_module_v1_module_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_svc_module_v1_module_proto_rawDescGZIP() []byte {
|
||||
file_svc_module_v1_module_proto_rawDescOnce.Do(func() {
|
||||
file_svc_module_v1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_module_v1_module_proto_rawDescData)
|
||||
})
|
||||
return file_svc_module_v1_module_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_svc_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
|
||||
var file_svc_module_v1_module_proto_goTypes = []interface{}{
|
||||
(*Module)(nil), // 0: svc.module.v1.Module
|
||||
}
|
||||
var file_svc_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_svc_module_v1_module_proto_init() }
|
||||
func file_svc_module_v1_module_proto_init() {
|
||||
if File_svc_module_v1_module_proto != nil {
|
||||
return
|
||||
}
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_svc_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_svc_module_v1_module_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 1,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_svc_module_v1_module_proto_goTypes,
|
||||
DependencyIndexes: file_svc_module_v1_module_proto_depIdxs,
|
||||
MessageInfos: file_svc_module_v1_module_proto_msgTypes,
|
||||
}.Build()
|
||||
File_svc_module_v1_module_proto = out.File
|
||||
file_svc_module_v1_module_proto_rawDesc = nil
|
||||
file_svc_module_v1_module_proto_goTypes = nil
|
||||
file_svc_module_v1_module_proto_depIdxs = nil
|
||||
}
|
3264
api/svc/v1/genesis.pulsar.go
Normal file
3264
api/svc/v1/genesis.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
993
api/svc/v1/query.pulsar.go
Normal file
993
api/svc/v1/query.pulsar.go
Normal file
@ -0,0 +1,993 @@
|
||||
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
|
||||
package svcv1
|
||||
|
||||
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_svc_v1_query_proto_init()
|
||||
md_QueryParamsRequest = File_svc_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_svc_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: svc.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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: svc.v1.QueryParamsRequest"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 svc.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_svc_v1_query_proto_init()
|
||||
md_QueryParamsResponse = File_svc_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_svc_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 "svc.v1.QueryParamsResponse.params":
|
||||
return x.Params != nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 "svc.v1.QueryParamsResponse.params":
|
||||
x.Params = nil
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 "svc.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: svc.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 "svc.v1.QueryParamsResponse.params":
|
||||
x.Params = value.Message().Interface().(*Params)
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
panic(fmt.Errorf("proto3 declared messages do not support extensions: svc.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 "svc.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: svc.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 "svc.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: svc.v1.QueryParamsResponse"))
|
||||
}
|
||||
panic(fmt.Errorf("message svc.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 svc.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: svc/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_svc_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_svc_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_svc_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_svc_v1_query_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *QueryParamsResponse) GetParams() *Params {
|
||||
if x != nil {
|
||||
return x.Params
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
var File_svc_v1_query_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_svc_v1_query_proto_rawDesc = []byte{
|
||||
0x0a, 0x12, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x73, 0x76, 0x63, 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, 0x14, 0x73, 0x76, 0x63, 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, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a,
|
||||
0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e,
|
||||
0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70,
|
||||
0x61, 0x72, 0x61, 0x6d, 0x73, 0x32, 0x62, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x59,
|
||||
0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76,
|
||||
0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71,
|
||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75,
|
||||
0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||
0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x73, 0x76, 0x63, 0x2f,
|
||||
0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
|
||||
0x2e, 0x73, 0x76, 0x63, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 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, 0x73, 0x76, 0x63, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x76, 0x63, 0x76, 0x31, 0xa2, 0x02,
|
||||
0x03, 0x53, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x53, 0x76, 0x63, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06,
|
||||
0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x53, 0x76, 0x63, 0x5c, 0x56, 0x31, 0x5c,
|
||||
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x53, 0x76,
|
||||
0x63, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
file_svc_v1_query_proto_rawDescOnce sync.Once
|
||||
file_svc_v1_query_proto_rawDescData = file_svc_v1_query_proto_rawDesc
|
||||
)
|
||||
|
||||
func file_svc_v1_query_proto_rawDescGZIP() []byte {
|
||||
file_svc_v1_query_proto_rawDescOnce.Do(func() {
|
||||
file_svc_v1_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_svc_v1_query_proto_rawDescData)
|
||||
})
|
||||
return file_svc_v1_query_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_svc_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_svc_v1_query_proto_goTypes = []interface{}{
|
||||
(*QueryParamsRequest)(nil), // 0: svc.v1.QueryParamsRequest
|
||||
(*QueryParamsResponse)(nil), // 1: svc.v1.QueryParamsResponse
|
||||
(*Params)(nil), // 2: svc.v1.Params
|
||||
}
|
||||
var file_svc_v1_query_proto_depIdxs = []int32{
|
||||
2, // 0: svc.v1.QueryParamsResponse.params:type_name -> svc.v1.Params
|
||||
0, // 1: svc.v1.Query.Params:input_type -> svc.v1.QueryParamsRequest
|
||||
1, // 2: svc.v1.Query.Params:output_type -> svc.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_svc_v1_query_proto_init() }
|
||||
func file_svc_v1_query_proto_init() {
|
||||
if File_svc_v1_query_proto != nil {
|
||||
return
|
||||
}
|
||||
file_svc_v1_genesis_proto_init()
|
||||
if !protoimpl.UnsafeEnabled {
|
||||
file_svc_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_svc_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_svc_v1_query_proto_rawDesc,
|
||||
NumEnums: 0,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_svc_v1_query_proto_goTypes,
|
||||
DependencyIndexes: file_svc_v1_query_proto_depIdxs,
|
||||
MessageInfos: file_svc_v1_query_proto_msgTypes,
|
||||
}.Build()
|
||||
File_svc_v1_query_proto = out.File
|
||||
file_svc_v1_query_proto_rawDesc = nil
|
||||
file_svc_v1_query_proto_goTypes = nil
|
||||
file_svc_v1_query_proto_depIdxs = nil
|
||||
}
|
127
api/svc/v1/query_grpc.pb.go
Normal file
127
api/svc/v1/query_grpc.pb.go
Normal file
@ -0,0 +1,127 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: svc/v1/query.proto
|
||||
|
||||
package svcv1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Query_Params_FullMethodName = "/svc.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.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility.
|
||||
//
|
||||
// Query provides defines the gRPC querier service.
|
||||
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.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedQueryServer struct{}
|
||||
|
||||
func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
func (UnimplementedQueryServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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) {
|
||||
// If the following call pancis, it indicates UnimplementedQueryServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
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: "svc.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "Params",
|
||||
Handler: _Query_Params_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "svc/v1/query.proto",
|
||||
}
|
368
api/svc/v1/state.cosmos_orm.go
Normal file
368
api/svc/v1/state.cosmos_orm.go
Normal file
@ -0,0 +1,368 @@
|
||||
// Code generated by protoc-gen-go-cosmos-orm. DO NOT EDIT.
|
||||
|
||||
package svcv1
|
||||
|
||||
import (
|
||||
context "context"
|
||||
ormlist "cosmossdk.io/orm/model/ormlist"
|
||||
ormtable "cosmossdk.io/orm/model/ormtable"
|
||||
ormerrors "cosmossdk.io/orm/types/ormerrors"
|
||||
)
|
||||
|
||||
type MetadataTable interface {
|
||||
Insert(ctx context.Context, metadata *Metadata) error
|
||||
InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error)
|
||||
LastInsertedSequence(ctx context.Context) (uint64, error)
|
||||
Update(ctx context.Context, metadata *Metadata) error
|
||||
Save(ctx context.Context, metadata *Metadata) error
|
||||
Delete(ctx context.Context, metadata *Metadata) 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) (*Metadata, error)
|
||||
HasByOrigin(ctx context.Context, origin string) (found bool, err error)
|
||||
// GetByOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetByOrigin(ctx context.Context, origin string) (*Metadata, error)
|
||||
List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
|
||||
ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to MetadataIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type MetadataIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i MetadataIterator) Value() (*Metadata, error) {
|
||||
var metadata Metadata
|
||||
err := i.UnmarshalMessage(&metadata)
|
||||
return &metadata, err
|
||||
}
|
||||
|
||||
type MetadataIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
metadataIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type MetadataPrimaryKey = MetadataIdIndexKey
|
||||
|
||||
type MetadataIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MetadataIdIndexKey) id() uint32 { return 0 }
|
||||
func (x MetadataIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MetadataIdIndexKey) metadataIndexKey() {}
|
||||
|
||||
func (this MetadataIdIndexKey) WithId(id uint64) MetadataIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type MetadataOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x MetadataOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x MetadataOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x MetadataOriginIndexKey) metadataIndexKey() {}
|
||||
|
||||
func (this MetadataOriginIndexKey) WithOrigin(origin string) MetadataOriginIndexKey {
|
||||
this.vs = []interface{}{origin}
|
||||
return this
|
||||
}
|
||||
|
||||
type metadataTable struct {
|
||||
table ormtable.AutoIncrementTable
|
||||
}
|
||||
|
||||
func (this metadataTable) Insert(ctx context.Context, metadata *Metadata) error {
|
||||
return this.table.Insert(ctx, metadata)
|
||||
}
|
||||
|
||||
func (this metadataTable) Update(ctx context.Context, metadata *Metadata) error {
|
||||
return this.table.Update(ctx, metadata)
|
||||
}
|
||||
|
||||
func (this metadataTable) Save(ctx context.Context, metadata *Metadata) error {
|
||||
return this.table.Save(ctx, metadata)
|
||||
}
|
||||
|
||||
func (this metadataTable) Delete(ctx context.Context, metadata *Metadata) error {
|
||||
return this.table.Delete(ctx, metadata)
|
||||
}
|
||||
|
||||
func (this metadataTable) InsertReturningId(ctx context.Context, metadata *Metadata) (uint64, error) {
|
||||
return this.table.InsertReturningPKey(ctx, metadata)
|
||||
}
|
||||
|
||||
func (this metadataTable) LastInsertedSequence(ctx context.Context) (uint64, error) {
|
||||
return this.table.LastInsertedSequence(ctx)
|
||||
}
|
||||
|
||||
func (this metadataTable) Has(ctx context.Context, id uint64) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this metadataTable) Get(ctx context.Context, id uint64) (*Metadata, error) {
|
||||
var metadata Metadata
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &metadata, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &metadata, nil
|
||||
}
|
||||
|
||||
func (this metadataTable) HasByOrigin(ctx context.Context, origin string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
origin,
|
||||
)
|
||||
}
|
||||
|
||||
func (this metadataTable) GetByOrigin(ctx context.Context, origin string) (*Metadata, error) {
|
||||
var metadata Metadata
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &metadata,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &metadata, nil
|
||||
}
|
||||
|
||||
func (this metadataTable) List(ctx context.Context, prefixKey MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return MetadataIterator{it}, err
|
||||
}
|
||||
|
||||
func (this metadataTable) ListRange(ctx context.Context, from, to MetadataIndexKey, opts ...ormlist.Option) (MetadataIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return MetadataIterator{it}, err
|
||||
}
|
||||
|
||||
func (this metadataTable) DeleteBy(ctx context.Context, prefixKey MetadataIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this metadataTable) DeleteRange(ctx context.Context, from, to MetadataIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this metadataTable) doNotImplement() {}
|
||||
|
||||
var _ MetadataTable = metadataTable{}
|
||||
|
||||
func NewMetadataTable(db ormtable.Schema) (MetadataTable, error) {
|
||||
table := db.GetTable(&Metadata{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Metadata{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return metadataTable{table.(ormtable.AutoIncrementTable)}, nil
|
||||
}
|
||||
|
||||
type ProfileTable interface {
|
||||
Insert(ctx context.Context, profile *Profile) error
|
||||
Update(ctx context.Context, profile *Profile) error
|
||||
Save(ctx context.Context, profile *Profile) error
|
||||
Delete(ctx context.Context, profile *Profile) error
|
||||
Has(ctx context.Context, id 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, id string) (*Profile, error)
|
||||
HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error)
|
||||
// GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
|
||||
GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error)
|
||||
List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
|
||||
ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error)
|
||||
DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error
|
||||
DeleteRange(ctx context.Context, from, to ProfileIndexKey) error
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type ProfileIterator struct {
|
||||
ormtable.Iterator
|
||||
}
|
||||
|
||||
func (i ProfileIterator) Value() (*Profile, error) {
|
||||
var profile Profile
|
||||
err := i.UnmarshalMessage(&profile)
|
||||
return &profile, err
|
||||
}
|
||||
|
||||
type ProfileIndexKey interface {
|
||||
id() uint32
|
||||
values() []interface{}
|
||||
profileIndexKey()
|
||||
}
|
||||
|
||||
// primary key starting index..
|
||||
type ProfilePrimaryKey = ProfileIdIndexKey
|
||||
|
||||
type ProfileIdIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ProfileIdIndexKey) id() uint32 { return 0 }
|
||||
func (x ProfileIdIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ProfileIdIndexKey) profileIndexKey() {}
|
||||
|
||||
func (this ProfileIdIndexKey) WithId(id string) ProfileIdIndexKey {
|
||||
this.vs = []interface{}{id}
|
||||
return this
|
||||
}
|
||||
|
||||
type ProfileSubjectOriginIndexKey struct {
|
||||
vs []interface{}
|
||||
}
|
||||
|
||||
func (x ProfileSubjectOriginIndexKey) id() uint32 { return 1 }
|
||||
func (x ProfileSubjectOriginIndexKey) values() []interface{} { return x.vs }
|
||||
func (x ProfileSubjectOriginIndexKey) profileIndexKey() {}
|
||||
|
||||
func (this ProfileSubjectOriginIndexKey) WithSubject(subject string) ProfileSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject}
|
||||
return this
|
||||
}
|
||||
|
||||
func (this ProfileSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) ProfileSubjectOriginIndexKey {
|
||||
this.vs = []interface{}{subject, origin}
|
||||
return this
|
||||
}
|
||||
|
||||
type profileTable struct {
|
||||
table ormtable.Table
|
||||
}
|
||||
|
||||
func (this profileTable) Insert(ctx context.Context, profile *Profile) error {
|
||||
return this.table.Insert(ctx, profile)
|
||||
}
|
||||
|
||||
func (this profileTable) Update(ctx context.Context, profile *Profile) error {
|
||||
return this.table.Update(ctx, profile)
|
||||
}
|
||||
|
||||
func (this profileTable) Save(ctx context.Context, profile *Profile) error {
|
||||
return this.table.Save(ctx, profile)
|
||||
}
|
||||
|
||||
func (this profileTable) Delete(ctx context.Context, profile *Profile) error {
|
||||
return this.table.Delete(ctx, profile)
|
||||
}
|
||||
|
||||
func (this profileTable) Has(ctx context.Context, id string) (found bool, err error) {
|
||||
return this.table.PrimaryKey().Has(ctx, id)
|
||||
}
|
||||
|
||||
func (this profileTable) Get(ctx context.Context, id string) (*Profile, error) {
|
||||
var profile Profile
|
||||
found, err := this.table.PrimaryKey().Get(ctx, &profile, id)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &profile, nil
|
||||
}
|
||||
|
||||
func (this profileTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) {
|
||||
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
}
|
||||
|
||||
func (this profileTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Profile, error) {
|
||||
var profile Profile
|
||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &profile,
|
||||
subject,
|
||||
origin,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if !found {
|
||||
return nil, ormerrors.NotFound
|
||||
}
|
||||
return &profile, nil
|
||||
}
|
||||
|
||||
func (this profileTable) List(ctx context.Context, prefixKey ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
|
||||
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
|
||||
return ProfileIterator{it}, err
|
||||
}
|
||||
|
||||
func (this profileTable) ListRange(ctx context.Context, from, to ProfileIndexKey, opts ...ormlist.Option) (ProfileIterator, error) {
|
||||
it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...)
|
||||
return ProfileIterator{it}, err
|
||||
}
|
||||
|
||||
func (this profileTable) DeleteBy(ctx context.Context, prefixKey ProfileIndexKey) error {
|
||||
return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...)
|
||||
}
|
||||
|
||||
func (this profileTable) DeleteRange(ctx context.Context, from, to ProfileIndexKey) error {
|
||||
return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values())
|
||||
}
|
||||
|
||||
func (this profileTable) doNotImplement() {}
|
||||
|
||||
var _ ProfileTable = profileTable{}
|
||||
|
||||
func NewProfileTable(db ormtable.Schema) (ProfileTable, error) {
|
||||
table := db.GetTable(&Profile{})
|
||||
if table == nil {
|
||||
return nil, ormerrors.TableNotFound.Wrap(string((&Profile{}).ProtoReflect().Descriptor().FullName()))
|
||||
}
|
||||
return profileTable{table}, nil
|
||||
}
|
||||
|
||||
type StateStore interface {
|
||||
MetadataTable() MetadataTable
|
||||
ProfileTable() ProfileTable
|
||||
|
||||
doNotImplement()
|
||||
}
|
||||
|
||||
type stateStore struct {
|
||||
metadata MetadataTable
|
||||
profile ProfileTable
|
||||
}
|
||||
|
||||
func (x stateStore) MetadataTable() MetadataTable {
|
||||
return x.metadata
|
||||
}
|
||||
|
||||
func (x stateStore) ProfileTable() ProfileTable {
|
||||
return x.profile
|
||||
}
|
||||
|
||||
func (stateStore) doNotImplement() {}
|
||||
|
||||
var _ StateStore = stateStore{}
|
||||
|
||||
func NewStateStore(db ormtable.Schema) (StateStore, error) {
|
||||
metadataTable, err := NewMetadataTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
profileTable, err := NewProfileTable(db)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return stateStore{
|
||||
metadataTable,
|
||||
profileTable,
|
||||
}, nil
|
||||
}
|
1749
api/svc/v1/state.pulsar.go
Normal file
1749
api/svc/v1/state.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
2195
api/svc/v1/tx.pulsar.go
Normal file
2195
api/svc/v1/tx.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
173
api/svc/v1/tx_grpc.pb.go
Normal file
173
api/svc/v1/tx_grpc.pb.go
Normal file
@ -0,0 +1,173 @@
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: svc/v1/tx.proto
|
||||
|
||||
package svcv1
|
||||
|
||||
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.64.0 or later.
|
||||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/svc.v1.Msg/UpdateParams"
|
||||
Msg_RegisterService_FullMethodName = "/svc.v1.Msg/RegisterService"
|
||||
)
|
||||
|
||||
// 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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
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)
|
||||
// RegisterService initializes a Service with a given permission scope and
|
||||
// URI. The domain must have a valid TXT record containing the public key.
|
||||
RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, 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) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, cOpts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgRegisterServiceResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, cOpts...)
|
||||
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.
|
||||
//
|
||||
// Msg defines the Msg service.
|
||||
type MsgServer interface {
|
||||
// UpdateParams defines a governance operation for updating the parameters.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// RegisterService initializes a Service with a given permission scope and
|
||||
// URI. The domain must have a valid TXT record containing the public key.
|
||||
RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer must be embedded to have
|
||||
// forward compatible implementations.
|
||||
//
|
||||
// NOTE: this should be embedded by value instead of pointer to avoid a nil
|
||||
// pointer dereference when methods are called.
|
||||
type UnimplementedMsgServer struct{}
|
||||
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
// 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) {
|
||||
// If the following call pancis, it indicates UnimplementedMsgServer was
|
||||
// embedded by pointer and is nil. This will cause panics if an
|
||||
// unimplemented method is ever invoked, so we test this at initialization
|
||||
// time to prevent it from happening at runtime later due to I/O.
|
||||
if t, ok := srv.(interface{ testEmbeddedByValue() }); ok {
|
||||
t.testEmbeddedByValue()
|
||||
}
|
||||
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)
|
||||
}
|
||||
|
||||
func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgRegisterService)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).RegisterService(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_RegisterService_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).RegisterService(ctx, req.(*MsgRegisterService))
|
||||
}
|
||||
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: "svc.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "RegisterService",
|
||||
Handler: _Msg_RegisterService_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "svc/v1/tx.proto",
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -20,6 +20,7 @@ const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
Msg_UpdateParams_FullMethodName = "/vault.v1.Msg/UpdateParams"
|
||||
Msg_Initialize_FullMethodName = "/vault.v1.Msg/Initialize"
|
||||
)
|
||||
|
||||
// MsgClient is the client API for Msg service.
|
||||
@ -32,6 +33,8 @@ type MsgClient interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// Initialize spawns a new Vault
|
||||
Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@ -52,6 +55,16 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) {
|
||||
cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
|
||||
out := new(MsgInitializeResponse)
|
||||
err := c.cc.Invoke(ctx, Msg_Initialize_FullMethodName, in, out, cOpts...)
|
||||
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.
|
||||
@ -62,6 +75,8 @@ type MsgServer interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// Initialize spawns a new Vault
|
||||
Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error)
|
||||
mustEmbedUnimplementedMsgServer()
|
||||
}
|
||||
|
||||
@ -75,6 +90,9 @@ type UnimplementedMsgServer struct{}
|
||||
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
|
||||
}
|
||||
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
|
||||
func (UnimplementedMsgServer) testEmbeddedByValue() {}
|
||||
|
||||
@ -114,6 +132,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgInitialize)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Initialize(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Msg_Initialize_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize))
|
||||
}
|
||||
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)
|
||||
@ -125,6 +161,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Initialize",
|
||||
Handler: _Msg_Initialize_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "vault/v1/tx.proto",
|
||||
|
90
app/app.go
90
app/app.go
@ -134,6 +134,15 @@ import (
|
||||
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
|
||||
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
|
||||
ibctm "github.com/cosmos/ibc-go/v8/modules/light-clients/07-tendermint"
|
||||
did "github.com/onsonr/sonr/x/did"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
didtypes "github.com/onsonr/sonr/x/did/types"
|
||||
dwn "github.com/onsonr/sonr/x/dwn"
|
||||
dwnkeeper "github.com/onsonr/sonr/x/dwn/keeper"
|
||||
dwntypes "github.com/onsonr/sonr/x/dwn/types"
|
||||
svc "github.com/onsonr/sonr/x/svc"
|
||||
svckeeper "github.com/onsonr/sonr/x/svc/keeper"
|
||||
svctypes "github.com/onsonr/sonr/x/svc/types"
|
||||
"github.com/spf13/cast"
|
||||
globalfee "github.com/strangelove-ventures/globalfee/x/globalfee"
|
||||
globalfeekeeper "github.com/strangelove-ventures/globalfee/x/globalfee/keeper"
|
||||
@ -144,16 +153,6 @@ import (
|
||||
tokenfactory "github.com/strangelove-ventures/tokenfactory/x/tokenfactory"
|
||||
tokenfactorykeeper "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/keeper"
|
||||
tokenfactorytypes "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types"
|
||||
|
||||
did "github.com/onsonr/sonr/x/did"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
didtypes "github.com/onsonr/sonr/x/did/types"
|
||||
service "github.com/onsonr/sonr/x/service"
|
||||
servicekeeper "github.com/onsonr/sonr/x/service/keeper"
|
||||
servicetypes "github.com/onsonr/sonr/x/service/types"
|
||||
vault "github.com/onsonr/sonr/x/vault"
|
||||
vaultkeeper "github.com/onsonr/sonr/x/vault/keeper"
|
||||
vaulttypes "github.com/onsonr/sonr/x/vault/types"
|
||||
)
|
||||
|
||||
const appName = "sonr"
|
||||
@ -232,8 +231,8 @@ type SonrApp struct {
|
||||
CrisisKeeper *crisiskeeper.Keeper
|
||||
UpgradeKeeper *upgradekeeper.Keeper
|
||||
legacyAmino *codec.LegacyAmino
|
||||
VaultKeeper vaultkeeper.Keeper
|
||||
ServiceKeeper servicekeeper.Keeper
|
||||
DwnKeeper dwnkeeper.Keeper
|
||||
SvcKeeper svckeeper.Keeper
|
||||
sm *module.SimulationManager
|
||||
BasicModuleManager module.BasicManager
|
||||
ModuleManager *module.Manager
|
||||
@ -366,8 +365,8 @@ func NewChainApp(
|
||||
globalfeetypes.StoreKey,
|
||||
packetforwardtypes.StoreKey,
|
||||
didtypes.StoreKey,
|
||||
vaulttypes.StoreKey,
|
||||
servicetypes.StoreKey,
|
||||
dwntypes.StoreKey,
|
||||
svctypes.StoreKey,
|
||||
)
|
||||
|
||||
tkeys := storetypes.NewTransientStoreKeys(paramstypes.TStoreKey)
|
||||
@ -627,28 +626,43 @@ func NewChainApp(
|
||||
app.StakingKeeper,
|
||||
)
|
||||
|
||||
// Create the vault Keeper
|
||||
app.VaultKeeper = vaultkeeper.NewKeeper(
|
||||
// Create the svc Keeper
|
||||
app.SvcKeeper = svckeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
||||
sdkruntime.NewKVStoreService(keys[svctypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.AccountKeeper,
|
||||
app.DidKeeper,
|
||||
)
|
||||
|
||||
// Create the service Keeper
|
||||
app.ServiceKeeper = servicekeeper.NewKeeper(
|
||||
// Create the dwn Keeper
|
||||
app.DwnKeeper = dwnkeeper.NewKeeper(
|
||||
appCodec,
|
||||
sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
||||
sdkruntime.NewKVStoreService(keys[dwntypes.StoreKey]),
|
||||
logger,
|
||||
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
app.DidKeeper,
|
||||
app.GroupKeeper,
|
||||
app.NFTKeeper,
|
||||
app.VaultKeeper,
|
||||
)
|
||||
|
||||
// // Create the vault Keeper
|
||||
// app.VaultKeeper = vaultkeeper.NewKeeper(
|
||||
// appCodec,
|
||||
// sdkruntime.NewKVStoreService(keys[vaulttypes.StoreKey]),
|
||||
// logger,
|
||||
// authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
// app.AccountKeeper,
|
||||
// app.DidKeeper,
|
||||
// )
|
||||
//
|
||||
// // Create the service Keeper
|
||||
// app.ServiceKeeper = servicekeeper.NewKeeper(
|
||||
// appCodec,
|
||||
// sdkruntime.NewKVStoreService(keys[servicetypes.StoreKey]),
|
||||
// logger,
|
||||
// authtypes.NewModuleAddress(govtypes.ModuleName).String(),
|
||||
// app.DidKeeper,
|
||||
// app.GroupKeeper,
|
||||
// app.NFTKeeper,
|
||||
// app.VaultKeeper,
|
||||
// )
|
||||
//
|
||||
// Create the globalfee keeper
|
||||
app.GlobalFeeKeeper = globalfeekeeper.NewKeeper(
|
||||
appCodec,
|
||||
@ -906,10 +920,8 @@ func NewChainApp(
|
||||
),
|
||||
|
||||
did.NewAppModule(appCodec, app.DidKeeper, app.NFTKeeper),
|
||||
|
||||
vault.NewAppModule(appCodec, app.VaultKeeper, app.DidKeeper),
|
||||
|
||||
service.NewAppModule(appCodec, app.ServiceKeeper, app.DidKeeper),
|
||||
dwn.NewAppModule(appCodec, app.DwnKeeper),
|
||||
svc.NewAppModule(appCodec, app.SvcKeeper),
|
||||
)
|
||||
|
||||
// BasicModuleManager defines the module BasicManager is in charge of setting up basic,
|
||||
@ -958,8 +970,8 @@ func NewChainApp(
|
||||
tokenfactorytypes.ModuleName,
|
||||
packetforwardtypes.ModuleName,
|
||||
didtypes.ModuleName,
|
||||
vaulttypes.ModuleName,
|
||||
servicetypes.ModuleName,
|
||||
dwntypes.ModuleName,
|
||||
svctypes.ModuleName,
|
||||
)
|
||||
|
||||
app.ModuleManager.SetOrderEndBlockers(
|
||||
@ -979,8 +991,8 @@ func NewChainApp(
|
||||
tokenfactorytypes.ModuleName,
|
||||
packetforwardtypes.ModuleName,
|
||||
didtypes.ModuleName,
|
||||
vaulttypes.ModuleName,
|
||||
servicetypes.ModuleName,
|
||||
dwntypes.ModuleName,
|
||||
svctypes.ModuleName,
|
||||
)
|
||||
|
||||
// NOTE: The genutils module must occur after staking so that pools are
|
||||
@ -1009,8 +1021,8 @@ func NewChainApp(
|
||||
globalfeetypes.ModuleName,
|
||||
packetforwardtypes.ModuleName,
|
||||
didtypes.ModuleName,
|
||||
vaulttypes.ModuleName,
|
||||
servicetypes.ModuleName,
|
||||
dwntypes.ModuleName,
|
||||
svctypes.ModuleName,
|
||||
}
|
||||
app.ModuleManager.SetOrderInitGenesis(genesisModuleOrder...)
|
||||
app.ModuleManager.SetOrderExportGenesis(genesisModuleOrder...)
|
||||
@ -1469,8 +1481,8 @@ func initParamsKeeper(
|
||||
paramsKeeper.Subspace(packetforwardtypes.ModuleName).
|
||||
WithKeyTable(packetforwardtypes.ParamKeyTable())
|
||||
paramsKeeper.Subspace(didtypes.ModuleName)
|
||||
paramsKeeper.Subspace(vaulttypes.ModuleName)
|
||||
paramsKeeper.Subspace(servicetypes.ModuleName)
|
||||
paramsKeeper.Subspace(dwntypes.ModuleName)
|
||||
paramsKeeper.Subspace(svctypes.ModuleName)
|
||||
|
||||
return paramsKeeper
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ This directory contains the protobuf definitions for the Sonr blockchain.
|
||||
|
||||
The `did` directory contains the protobuf definitions for the DID module.
|
||||
|
||||
### `service`
|
||||
### `dwn`
|
||||
|
||||
The `dwn` directory contains the protobuf definitions for the Vault module.
|
||||
|
||||
### `svc`
|
||||
|
||||
The `service` directory contains the protobuf definitions for the Service module.
|
||||
|
||||
### `vault`
|
||||
|
||||
The `vault` directory contains the protobuf definitions for the Vault module.
|
||||
|
@ -1,11 +1,13 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package service.module.v1;
|
||||
package dwn.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr"};
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import : "github.com/onsonr/sonr"
|
||||
};
|
||||
}
|
@ -1,17 +1,16 @@
|
||||
syntax = "proto3";
|
||||
package vault.v1;
|
||||
package dwn.v1;
|
||||
|
||||
import "amino/amino.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "amino/amino.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/vault/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/dwn/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.
|
||||
message Params {
|
||||
option (amino.name) = "vault/params";
|
||||
@ -35,3 +34,4 @@ message Schema {
|
||||
string keyshare = 9;
|
||||
string profile = 10;
|
||||
}
|
||||
|
@ -1,10 +1,10 @@
|
||||
syntax = "proto3";
|
||||
package vault.v1;
|
||||
package dwn.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "vault/v1/genesis.proto";
|
||||
import "dwn/v1/genesis.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/vault/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/dwn/types";
|
||||
|
||||
// ╭─────────────────────────────────────────────────────────╮
|
||||
// │ RPC Query Service │
|
19
proto/dwn/v1/state.proto
Normal file
19
proto/dwn/v1/state.proto
Normal file
@ -0,0 +1,19 @@
|
||||
syntax = "proto3";
|
||||
package dwn.v1;
|
||||
|
||||
import "cosmos/orm/v1/orm.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/dwn/types";
|
||||
|
||||
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
|
||||
|
||||
message ExampleData {
|
||||
option (cosmos.orm.v1.table) = {
|
||||
id: 1;
|
||||
primary_key: { fields: "account" }
|
||||
index: { id: 1 fields: "amount" }
|
||||
};
|
||||
|
||||
bytes account = 1;
|
||||
uint64 amount = 2;
|
||||
}
|
@ -1,13 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package vault.v1;
|
||||
package dwn.v1;
|
||||
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "dwn/v1/genesis.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "google/api/annotations.proto";
|
||||
import "vault/v1/genesis.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/vault/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/dwn/types";
|
||||
|
||||
// Msg defines the Msg service.
|
||||
service Msg {
|
@ -1,11 +1,13 @@
|
||||
syntax = "proto3";
|
||||
|
||||
package vault.module.v1;
|
||||
package svc.module.v1;
|
||||
|
||||
import "cosmos/app/v1alpha1/module.proto";
|
||||
|
||||
// Module is the app config object of the module.
|
||||
// Learn more: https://docs.cosmos.network/main/building-modules/depinject
|
||||
message Module {
|
||||
option (cosmos.app.v1alpha1.module) = {go_import: "github.com/onsonr/sonr"};
|
||||
option (cosmos.app.v1alpha1.module) = {
|
||||
go_import : "github.com/onsonr/sonr"
|
||||
};
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
syntax = "proto3";
|
||||
package service.v1;
|
||||
package svc.v1;
|
||||
|
||||
import "amino/amino.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "amino/amino.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/svc/types";
|
||||
|
||||
// GenesisState defines the module genesis state
|
||||
message GenesisState {
|
@ -1,16 +1,16 @@
|
||||
syntax = "proto3";
|
||||
package service.v1;
|
||||
package svc.v1;
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "service/v1/genesis.proto";
|
||||
import "svc/v1/genesis.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/svc/types";
|
||||
|
||||
// Query provides defines the gRPC querier service.
|
||||
service Query {
|
||||
// Params queries all parameters of the module.
|
||||
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
|
||||
option (google.api.http).get = "/service/v1/params";
|
||||
option (google.api.http).get = "/svc/v1/params";
|
||||
}
|
||||
}
|
||||
|
@ -1,9 +1,10 @@
|
||||
syntax = "proto3";
|
||||
package service.v1;
|
||||
package svc.v1;
|
||||
|
||||
import "cosmos/orm/v1/orm.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/svc/types";
|
||||
|
||||
|
||||
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
|
||||
|
@ -1,12 +1,12 @@
|
||||
syntax = "proto3";
|
||||
package service.v1;
|
||||
package svc.v1;
|
||||
|
||||
import "cosmos/msg/v1/msg.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
import "svc/v1/genesis.proto";
|
||||
import "gogoproto/gogo.proto";
|
||||
import "service/v1/genesis.proto";
|
||||
import "cosmos_proto/cosmos.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/service/types";
|
||||
option go_package = "github.com/onsonr/sonr/x/svc/types";
|
||||
|
||||
// Msg defines the Msg service.
|
||||
service Msg {
|
@ -1,21 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package vault.v1;
|
||||
|
||||
import "cosmos/orm/v1/orm.proto";
|
||||
|
||||
option go_package = "github.com/onsonr/sonr/x/vault/types";
|
||||
|
||||
// https://github.com/cosmos/cosmos-sdk/blob/main/orm/README.md
|
||||
|
||||
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}
|
||||
};
|
||||
uint64 id = 1;
|
||||
string alias = 2;
|
||||
string cid = 3;
|
||||
string resolver = 4;
|
||||
}
|
@ -50,17 +50,3 @@ for module in $base_namespace; do
|
||||
rm -rf $module
|
||||
done
|
||||
|
||||
cd $ROOT_DIR
|
||||
|
||||
echo "Generating third-party proto code"
|
||||
cd third_party/proto
|
||||
buf generate
|
||||
|
||||
echo "Copying generated proto code"
|
||||
cd $ROOT_DIR/github.com/onsonr/sonr/pkg
|
||||
|
||||
cp -r hway/types/* $ROOT_DIR/pkg/hway/types
|
||||
cp -r common/types/* $ROOT_DIR/pkg/common/types
|
||||
|
||||
echo "Cleaning up"
|
||||
rm -rf $ROOT_DIR/github.com
|
||||
|
5
web/workers/noble-client/.gitignore
vendored
5
web/workers/noble-client/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
.env
|
||||
dist
|
||||
out
|
@ -1,9 +0,0 @@
|
||||
# `noble-client`
|
||||
|
||||
This is a Cloudflare Workers Durable Object that can be deployed to Cloudflare's edge network.
|
||||
|
||||
It uses `noble-es` to provide a simple interface to interact with the Sonr network.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying to Cloudflare
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "noble-client",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"deploy": "wrangler deploy",
|
||||
"dev": "wrangler dev",
|
||||
"start": "wrangler dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"wrangler": "^3.60.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"sonr-es": "^0.5.3"
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
export * from "./stub.js";
|
||||
|
||||
/**
|
||||
* Welcome to Cloudflare Workers! This is your first Durable Objects application.
|
||||
*
|
||||
* - Run `npm run dev` in your terminal to start a development server
|
||||
* - Open a browser tab at http://localhost:8787/ to see your Durable Object in action
|
||||
* - Run `npm run deploy` to publish your application
|
||||
*
|
||||
* Learn more at https://developers.cloudflare.com/durable-objects
|
||||
*/
|
||||
|
||||
/**
|
||||
* Env provides a mechanism to reference bindings declared in wrangler.toml within JavaScript
|
||||
*
|
||||
* @typedef {Object} Env
|
||||
* @property {DurableObjectNamespace} NOBLE_DURABLE_CLIENT - The Durable Object namespace binding
|
||||
*/
|
||||
|
||||
|
||||
export default {
|
||||
/**
|
||||
* This is the standard fetch handler for a Cloudflare Worker
|
||||
*
|
||||
* @param {Request} request - The request submitted to the Worker from the client
|
||||
* @param {Env} env - The interface to reference bindings declared in wrangler.toml
|
||||
* @param {ExecutionContext} ctx - The execution context of the Worker
|
||||
* @returns {Promise<Response>} The response to be sent back to the client
|
||||
*/
|
||||
async fetch(request, env, ctx) {
|
||||
// We will create a `DurableObjectId` using the pathname from the Worker request
|
||||
// This id refers to a unique instance of our 'MyDurableObject' class above
|
||||
let id = env.NOBLE_DURABLE_CLIENT.idFromName(new URL(request.url).pathname);
|
||||
|
||||
// This stub creates a communication channel with the Durable Object instance
|
||||
// The Durable Object constructor will be invoked upon the first call for a given id
|
||||
let stub = env.NOBLE_DURABLE_CLIENT.get(id);
|
||||
|
||||
// We call the `sayHello()` RPC method on the stub to invoke the method on the remote
|
||||
// Durable Object instance
|
||||
let greeting = await stub.sayHello("world");
|
||||
|
||||
return new Response(greeting);
|
||||
},
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
import { DurableObject } from "cloudflare:workers";
|
||||
|
||||
/** A Durable Object's behavior is defined in an exported Javascript class */
|
||||
export class NobleDurableClient extends DurableObject {
|
||||
/**
|
||||
* The constructor is invoked once upon creation of the Durable Object, i.e. the first call to
|
||||
* `DurableObjectStub::get` for a given identifier (no-op constructors can be omitted)
|
||||
*
|
||||
* @param {DurableObjectState} ctx - The interface for interacting with Durable Object state
|
||||
* @param {Env} env - The interface to reference bindings declared in wrangler.toml
|
||||
*/
|
||||
constructor(ctx, env) {
|
||||
super(ctx, env);
|
||||
}
|
||||
|
||||
/**
|
||||
* The Durable Object exposes an RPC method sayHello which will be invoked when when a Durable
|
||||
* Object instance receives a request from a Worker via the same method invocation on the stub
|
||||
*
|
||||
* @param {string} name - The name provided to a Durable Object instance from a Worker
|
||||
* @returns {Promise<string>} The greeting to be sent back to the Worker
|
||||
*/
|
||||
async sayHello(name) {
|
||||
return `Hello, ${name}!`;
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
#:schema node_modules/wrangler/config-schema.json
|
||||
name = "noble-client"
|
||||
main = "src/index.js"
|
||||
compatibility_date = "2024-11-12"
|
||||
|
||||
# Workers Logs
|
||||
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
||||
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
||||
[observability]
|
||||
enabled = true
|
||||
|
||||
# Automatically place your workloads in an optimal location to minimize latency.
|
||||
# If you are running back-end logic in a Worker, running it closer to your back-end infrastructure
|
||||
# rather than the end user may result in better performance.
|
||||
# Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
||||
# [placement]
|
||||
# mode = "smart"
|
||||
|
||||
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
||||
# Docs:
|
||||
# - https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
||||
# Note: Use secrets to store sensitive data.
|
||||
# - https://developers.cloudflare.com/workers/configuration/secrets/
|
||||
# [vars]
|
||||
# MY_VARIABLE = "production_value"
|
||||
|
||||
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
|
||||
# [ai]
|
||||
# binding = "AI"
|
||||
|
||||
# Bind an Analytics Engine dataset. Use Analytics Engine to write analytics within your Pages Function.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
|
||||
# [[analytics_engine_datasets]]
|
||||
# binding = "MY_DATASET"
|
||||
|
||||
# Bind a headless browser instance running on Cloudflare's global network.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
|
||||
# [browser]
|
||||
# binding = "MY_BROWSER"
|
||||
|
||||
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
|
||||
# [[d1_databases]]
|
||||
# binding = "MY_DB"
|
||||
# database_name = "my-database"
|
||||
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
# Bind a dispatch namespace. Use Workers for Platforms to deploy serverless functions programmatically on behalf of your customers.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
|
||||
# [[dispatch_namespaces]]
|
||||
# binding = "MY_DISPATCHER"
|
||||
# namespace = "my-namespace"
|
||||
|
||||
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
||||
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
||||
[[durable_objects.bindings]]
|
||||
name = "NOBLE_DURABLE_CLIENT"
|
||||
class_name = "NobleDurableClient"
|
||||
|
||||
# Durable Object migrations.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
||||
[[migrations]]
|
||||
tag = "v1"
|
||||
new_classes = ["NobleDurableClient"]
|
||||
|
||||
# Bind a Hyperdrive configuration. Use to accelerate access to your existing databases from Cloudflare Workers.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
|
||||
# [[hyperdrive]]
|
||||
# binding = "MY_HYPERDRIVE"
|
||||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
|
||||
# [[kv_namespaces]]
|
||||
# binding = "MY_KV_NAMESPACE"
|
||||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Bind an mTLS certificate. Use to present a client certificate when communicating with another service.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
|
||||
# [[mtls_certificates]]
|
||||
# binding = "MY_CERTIFICATE"
|
||||
# certificate_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
||||
# [[queues.producers]]
|
||||
# binding = "MY_QUEUE"
|
||||
# queue = "my-queue"
|
||||
|
||||
# Bind a Queue consumer. Queue Consumers can retrieve tasks scheduled by Producers to act on them.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
||||
# [[queues.consumers]]
|
||||
# queue = "my-queue"
|
||||
|
||||
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
|
||||
# [[r2_buckets]]
|
||||
# binding = "MY_BUCKET"
|
||||
# bucket_name = "my-bucket"
|
||||
|
||||
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
||||
# [[services]]
|
||||
# binding = "MY_SERVICE"
|
||||
# service = "my-service"
|
||||
|
||||
# Bind a Vectorize index. Use to store and query vector embeddings for semantic search, classification and other vector search use-cases.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
|
||||
# [[vectorize]]
|
||||
# binding = "MY_INDEX"
|
||||
# index_name = "my-index"
|
5
web/workers/osmosis-client/.gitignore
vendored
5
web/workers/osmosis-client/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
.env
|
||||
dist
|
||||
out
|
@ -1,10 +0,0 @@
|
||||
# `osmosis-client`
|
||||
|
||||
This is a Cloudflare Workers Durable Object that can be deployed to Cloudflare's edge network.
|
||||
|
||||
It uses `osmosis-es` to provide a simple interface to interact with the Sonr network.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying to Cloudflare
|
||||
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "sonr-client",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"deploy": "wrangler deploy",
|
||||
"dev": "wrangler dev",
|
||||
"start": "wrangler dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"wrangler": "^3.60.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"sonr-es": "^0.5.3"
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
export * from "./stub.js";
|
||||
|
||||
/**
|
||||
* Welcome to Cloudflare Workers! This is your first Durable Objects application.
|
||||
*
|
||||
* - Run `npm run dev` in your terminal to start a development server
|
||||
* - Open a browser tab at http://localhost:8787/ to see your Durable Object in action
|
||||
* - Run `npm run deploy` to publish your application
|
||||
*
|
||||
* Learn more at https://developers.cloudflare.com/durable-objects
|
||||
*/
|
||||
|
||||
/**
|
||||
* Env provides a mechanism to reference bindings declared in wrangler.toml within JavaScript
|
||||
*
|
||||
* @typedef {Object} Env
|
||||
* @property {DurableObjectNamespace} OSMOSIS_DURABLE_CLIENT - The Durable Object namespace binding
|
||||
*/
|
||||
|
||||
|
||||
export default {
|
||||
/**
|
||||
* This is the standard fetch handler for a Cloudflare Worker
|
||||
*
|
||||
* @param {Request} request - The request submitted to the Worker from the client
|
||||
* @param {Env} env - The interface to reference bindings declared in wrangler.toml
|
||||
* @param {ExecutionContext} ctx - The execution context of the Worker
|
||||
* @returns {Promise<Response>} The response to be sent back to the client
|
||||
*/
|
||||
async fetch(request, env, ctx) {
|
||||
// We will create a `DurableObjectId` using the pathname from the Worker request
|
||||
// This id refers to a unique instance of our 'MyDurableObject' class above
|
||||
let id = env.OSMOSIS_DURABLE_CLIENT.idFromName(new URL(request.url).pathname);
|
||||
|
||||
// This stub creates a communication channel with the Durable Object instance
|
||||
// The Durable Object constructor will be invoked upon the first call for a given id
|
||||
let stub = env.OSMOSIS_DURABLE_CLIENT.get(id);
|
||||
|
||||
// We call the `sayHello()` RPC method on the stub to invoke the method on the remote
|
||||
// Durable Object instance
|
||||
let greeting = await stub.sayHello("world");
|
||||
|
||||
return new Response(greeting);
|
||||
},
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
import { DurableObject } from "cloudflare:workers";
|
||||
|
||||
/** A Durable Object's behavior is defined in an exported Javascript class */
|
||||
export class OsmosisDurableClient extends DurableObject {
|
||||
/**
|
||||
* The constructor is invoked once upon creation of the Durable Object, i.e. the first call to
|
||||
* `DurableObjectStub::get` for a given identifier (no-op constructors can be omitted)
|
||||
*
|
||||
* @param {DurableObjectState} ctx - The interface for interacting with Durable Object state
|
||||
* @param {Env} env - The interface to reference bindings declared in wrangler.toml
|
||||
*/
|
||||
constructor(ctx, env) {
|
||||
super(ctx, env);
|
||||
}
|
||||
|
||||
/**
|
||||
* The Durable Object exposes an RPC method sayHello which will be invoked when when a Durable
|
||||
* Object instance receives a request from a Worker via the same method invocation on the stub
|
||||
*
|
||||
* @param {string} name - The name provided to a Durable Object instance from a Worker
|
||||
* @returns {Promise<string>} The greeting to be sent back to the Worker
|
||||
*/
|
||||
async sayHello(name) {
|
||||
return `Hello, ${name}!`;
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
#:schema node_modules/wrangler/config-schema.json
|
||||
name = "osmosis-client"
|
||||
main = "src/index.js"
|
||||
compatibility_date = "2024-11-12"
|
||||
|
||||
# Workers Logs
|
||||
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
||||
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
||||
[observability]
|
||||
enabled = true
|
||||
|
||||
# Automatically place your workloads in an optimal location to minimize latency.
|
||||
# If you are running back-end logic in a Worker, running it closer to your back-end infrastructure
|
||||
# rather than the end user may result in better performance.
|
||||
# Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
||||
# [placement]
|
||||
# mode = "smart"
|
||||
|
||||
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
||||
# Docs:
|
||||
# - https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
||||
# Note: Use secrets to store sensitive data.
|
||||
# - https://developers.cloudflare.com/workers/configuration/secrets/
|
||||
# [vars]
|
||||
# MY_VARIABLE = "production_value"
|
||||
|
||||
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
|
||||
# [ai]
|
||||
# binding = "AI"
|
||||
|
||||
# Bind an Analytics Engine dataset. Use Analytics Engine to write analytics within your Pages Function.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
|
||||
# [[analytics_engine_datasets]]
|
||||
# binding = "MY_DATASET"
|
||||
|
||||
# Bind a headless browser instance running on Cloudflare's global network.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
|
||||
# [browser]
|
||||
# binding = "MY_BROWSER"
|
||||
|
||||
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
|
||||
# [[d1_databases]]
|
||||
# binding = "MY_DB"
|
||||
# database_name = "my-database"
|
||||
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
# Bind a dispatch namespace. Use Workers for Platforms to deploy serverless functions programmatically on behalf of your customers.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
|
||||
# [[dispatch_namespaces]]
|
||||
# binding = "MY_DISPATCHER"
|
||||
# namespace = "my-namespace"
|
||||
|
||||
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
||||
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
||||
[[durable_objects.bindings]]
|
||||
name = "OSMOSIS_DURABLE_CLIENT"
|
||||
class_name = "OsmosisDurableClient"
|
||||
|
||||
# Durable Object migrations.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
||||
[[migrations]]
|
||||
tag = "v1"
|
||||
new_classes = ["OsmosisDurableClient"]
|
||||
|
||||
# Bind a Hyperdrive configuration. Use to accelerate access to your existing databases from Cloudflare Workers.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
|
||||
# [[hyperdrive]]
|
||||
# binding = "MY_HYPERDRIVE"
|
||||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
|
||||
# [[kv_namespaces]]
|
||||
# binding = "MY_KV_NAMESPACE"
|
||||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Bind an mTLS certificate. Use to present a client certificate when communicating with another service.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
|
||||
# [[mtls_certificates]]
|
||||
# binding = "MY_CERTIFICATE"
|
||||
# certificate_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
||||
# [[queues.producers]]
|
||||
# binding = "MY_QUEUE"
|
||||
# queue = "my-queue"
|
||||
|
||||
# Bind a Queue consumer. Queue Consumers can retrieve tasks scheduled by Producers to act on them.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
||||
# [[queues.consumers]]
|
||||
# queue = "my-queue"
|
||||
|
||||
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
|
||||
# [[r2_buckets]]
|
||||
# binding = "MY_BUCKET"
|
||||
# bucket_name = "my-bucket"
|
||||
|
||||
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
||||
# [[services]]
|
||||
# binding = "MY_SERVICE"
|
||||
# service = "my-service"
|
||||
|
||||
# Bind a Vectorize index. Use to store and query vector embeddings for semantic search, classification and other vector search use-cases.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
|
||||
# [[vectorize]]
|
||||
# binding = "MY_INDEX"
|
||||
# index_name = "my-index"
|
5
web/workers/sonr-client/.gitignore
vendored
5
web/workers/sonr-client/.gitignore
vendored
@ -1,5 +0,0 @@
|
||||
node_modules
|
||||
.DS_Store
|
||||
.env
|
||||
dist
|
||||
out
|
@ -1,10 +0,0 @@
|
||||
# `sonr-client`
|
||||
|
||||
This is a Cloudflare Workers Durable Object that can be deployed to Cloudflare's edge network.
|
||||
|
||||
It uses `sonr-es` to provide a simple interface to interact with the Sonr network.
|
||||
|
||||
## Usage
|
||||
|
||||
### Deploying to Cloudflare
|
||||
|
Binary file not shown.
@ -1,16 +0,0 @@
|
||||
{
|
||||
"name": "sonr-client",
|
||||
"version": "0.0.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"deploy": "wrangler deploy",
|
||||
"dev": "wrangler dev",
|
||||
"start": "wrangler dev"
|
||||
},
|
||||
"devDependencies": {
|
||||
"wrangler": "^3.60.3"
|
||||
},
|
||||
"dependencies": {
|
||||
"sonr-es": "^0.5.3"
|
||||
}
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
export * from "./stub.js";
|
||||
|
||||
/**
|
||||
* Welcome to Cloudflare Workers! This is your first Durable Objects application.
|
||||
*
|
||||
* - Run `npm run dev` in your terminal to start a development server
|
||||
* - Open a browser tab at http://localhost:8787/ to see your Durable Object in action
|
||||
* - Run `npm run deploy` to publish your application
|
||||
*
|
||||
* Learn more at https://developers.cloudflare.com/durable-objects
|
||||
*/
|
||||
|
||||
/**
|
||||
* Env provides a mechanism to reference bindings declared in wrangler.toml within JavaScript
|
||||
*
|
||||
* @typedef {Object} Env
|
||||
* @property {DurableObjectNamespace} SONR_DURABLE_CLIENT - The Durable Object namespace binding
|
||||
*/
|
||||
|
||||
|
||||
export default {
|
||||
/**
|
||||
* This is the standard fetch handler for a Cloudflare Worker
|
||||
*
|
||||
* @param {Request} request - The request submitted to the Worker from the client
|
||||
* @param {Env} env - The interface to reference bindings declared in wrangler.toml
|
||||
* @param {ExecutionContext} ctx - The execution context of the Worker
|
||||
* @returns {Promise<Response>} The response to be sent back to the client
|
||||
*/
|
||||
async fetch(request, env, ctx) {
|
||||
// We will create a `DurableObjectId` using the pathname from the Worker request
|
||||
// This id refers to a unique instance of our 'MyDurableObject' class above
|
||||
let id = env.SONR_DURABLE_CLIENT.idFromName(new URL(request.url).pathname);
|
||||
|
||||
// This stub creates a communication channel with the Durable Object instance
|
||||
// The Durable Object constructor will be invoked upon the first call for a given id
|
||||
let stub = env.SONR_DURABLE_CLIENT.get(id);
|
||||
|
||||
// We call the `sayHello()` RPC method on the stub to invoke the method on the remote
|
||||
// Durable Object instance
|
||||
let greeting = await stub.sayHello("world");
|
||||
|
||||
return new Response(greeting);
|
||||
},
|
||||
};
|
@ -1,26 +0,0 @@
|
||||
import { DurableObject } from "cloudflare:workers";
|
||||
|
||||
/** A Durable Object's behavior is defined in an exported Javascript class */
|
||||
export class SonrDurableClient extends DurableObject {
|
||||
/**
|
||||
* The constructor is invoked once upon creation of the Durable Object, i.e. the first call to
|
||||
* `DurableObjectStub::get` for a given identifier (no-op constructors can be omitted)
|
||||
*
|
||||
* @param {DurableObjectState} ctx - The interface for interacting with Durable Object state
|
||||
* @param {Env} env - The interface to reference bindings declared in wrangler.toml
|
||||
*/
|
||||
constructor(ctx, env) {
|
||||
super(ctx, env);
|
||||
}
|
||||
|
||||
/**
|
||||
* The Durable Object exposes an RPC method sayHello which will be invoked when when a Durable
|
||||
* Object instance receives a request from a Worker via the same method invocation on the stub
|
||||
*
|
||||
* @param {string} name - The name provided to a Durable Object instance from a Worker
|
||||
* @returns {Promise<string>} The greeting to be sent back to the Worker
|
||||
*/
|
||||
async sayHello(name) {
|
||||
return `Hello, ${name}!`;
|
||||
}
|
||||
}
|
@ -1,113 +0,0 @@
|
||||
#:schema node_modules/wrangler/config-schema.json
|
||||
name = "sonr-client"
|
||||
main = "src/index.js"
|
||||
compatibility_date = "2024-11-12"
|
||||
|
||||
# Workers Logs
|
||||
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
||||
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
||||
[observability]
|
||||
enabled = true
|
||||
|
||||
# Automatically place your workloads in an optimal location to minimize latency.
|
||||
# If you are running back-end logic in a Worker, running it closer to your back-end infrastructure
|
||||
# rather than the end user may result in better performance.
|
||||
# Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement
|
||||
# [placement]
|
||||
# mode = "smart"
|
||||
|
||||
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
||||
# Docs:
|
||||
# - https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables
|
||||
# Note: Use secrets to store sensitive data.
|
||||
# - https://developers.cloudflare.com/workers/configuration/secrets/
|
||||
# [vars]
|
||||
# MY_VARIABLE = "production_value"
|
||||
|
||||
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#workers-ai
|
||||
# [ai]
|
||||
# binding = "AI"
|
||||
|
||||
# Bind an Analytics Engine dataset. Use Analytics Engine to write analytics within your Pages Function.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#analytics-engine-datasets
|
||||
# [[analytics_engine_datasets]]
|
||||
# binding = "MY_DATASET"
|
||||
|
||||
# Bind a headless browser instance running on Cloudflare's global network.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#browser-rendering
|
||||
# [browser]
|
||||
# binding = "MY_BROWSER"
|
||||
|
||||
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#d1-databases
|
||||
# [[d1_databases]]
|
||||
# binding = "MY_DB"
|
||||
# database_name = "my-database"
|
||||
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
# Bind a dispatch namespace. Use Workers for Platforms to deploy serverless functions programmatically on behalf of your customers.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#dispatch-namespace-bindings-workers-for-platforms
|
||||
# [[dispatch_namespaces]]
|
||||
# binding = "MY_DISPATCHER"
|
||||
# namespace = "my-namespace"
|
||||
|
||||
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
||||
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
||||
[[durable_objects.bindings]]
|
||||
name = "SONR_DURABLE_CLIENT"
|
||||
class_name = "SonrDurableClient"
|
||||
|
||||
# Durable Object migrations.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
||||
[[migrations]]
|
||||
tag = "v2"
|
||||
renamed_classes = [{ from = "MyDurableObject", to = "SonrDurableClient" }]
|
||||
|
||||
# Bind a Hyperdrive configuration. Use to accelerate access to your existing databases from Cloudflare Workers.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#hyperdrive
|
||||
# [[hyperdrive]]
|
||||
# binding = "MY_HYPERDRIVE"
|
||||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#kv-namespaces
|
||||
# [[kv_namespaces]]
|
||||
# binding = "MY_KV_NAMESPACE"
|
||||
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
||||
|
||||
# Bind an mTLS certificate. Use to present a client certificate when communicating with another service.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#mtls-certificates
|
||||
# [[mtls_certificates]]
|
||||
# binding = "MY_CERTIFICATE"
|
||||
# certificate_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
||||
|
||||
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
||||
# [[queues.producers]]
|
||||
# binding = "MY_QUEUE"
|
||||
# queue = "my-queue"
|
||||
|
||||
# Bind a Queue consumer. Queue Consumers can retrieve tasks scheduled by Producers to act on them.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#queues
|
||||
# [[queues.consumers]]
|
||||
# queue = "my-queue"
|
||||
|
||||
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#r2-buckets
|
||||
# [[r2_buckets]]
|
||||
# binding = "MY_BUCKET"
|
||||
# bucket_name = "my-bucket"
|
||||
|
||||
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings
|
||||
# [[services]]
|
||||
# binding = "MY_SERVICE"
|
||||
# service = "my-service"
|
||||
|
||||
# Bind a Vectorize index. Use to store and query vector embeddings for semantic search, classification and other vector search use-cases.
|
||||
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#vectorize-indexes
|
||||
# [[vectorize]]
|
||||
# binding = "MY_INDEX"
|
||||
# index_name = "my-index"
|
@ -1,18 +1,18 @@
|
||||
# `x/vault`
|
||||
# `x/dwn`
|
||||
|
||||
The Vault module is responsible for the management of IPFS deployed Decentralized Web Nodes (DWNs) and their associated data.
|
||||
The DWN module is responsible for the management of IPFS deployed Decentralized Web Nodes (DWNs) and their associated data.
|
||||
|
||||
## Concepts
|
||||
|
||||
The Vault module introduces several key concepts:
|
||||
The DWN module introduces several key concepts:
|
||||
|
||||
1. Decentralized Web Node (DWN): A distributed network for storing and sharing data.
|
||||
2. Schema: A structure defining the format of various data types in the vault.
|
||||
2. Schema: A structure defining the format of various data types in the dwn.
|
||||
3. IPFS Integration: The module can interact with IPFS for decentralized data storage.
|
||||
|
||||
## State
|
||||
|
||||
The Vault module maintains the following state:
|
||||
The DWN module maintains the following state:
|
||||
|
||||
### DWN State
|
||||
|
||||
@ -62,15 +62,15 @@ message Schema {
|
||||
|
||||
## State Transitions
|
||||
|
||||
State transitions in the Vault module are primarily triggered by:
|
||||
State transitions in the DWN module are primarily triggered by:
|
||||
|
||||
1. Updating module parameters
|
||||
2. Allocating new vaults
|
||||
2. Allocating new dwns
|
||||
3. Syncing DID documents
|
||||
|
||||
## Messages
|
||||
|
||||
The Vault module defines the following message:
|
||||
The DWN module defines the following message:
|
||||
|
||||
1. `MsgUpdateParams`: Used to update the module parameters.
|
||||
|
||||
@ -91,19 +91,19 @@ No specific end-block operations are defined for this module.
|
||||
|
||||
## Hooks
|
||||
|
||||
The Vault module does not define any hooks.
|
||||
The DWN module does not define any hooks.
|
||||
|
||||
## Events
|
||||
|
||||
The Vault module does not explicitly define any events. However, standard Cosmos SDK events may be emitted during state transitions.
|
||||
The DWN module does not explicitly define any events. However, standard Cosmos SDK events may be emitted during state transitions.
|
||||
|
||||
## Client
|
||||
|
||||
The Vault module provides the following gRPC query endpoints:
|
||||
The DWN module provides the following gRPC query endpoints:
|
||||
|
||||
1. `Params`: Queries all parameters of the module.
|
||||
2. `Schema`: Queries the DID document schema.
|
||||
3. `Allocate`: Initializes a Target Vault available for claims.
|
||||
3. `Allocate`: Initializes a Target DWN available for claims.
|
||||
4. `Sync`: Queries the DID document by its ID and returns required information.
|
||||
|
||||
## Params
|
||||
@ -112,7 +112,7 @@ The module parameters include:
|
||||
|
||||
- `ipfs_active` (bool): Indicates if IPFS integration is active.
|
||||
- `local_registration_enabled` (bool): Indicates if local registration is enabled.
|
||||
- `schema` (Schema): Defines the structure for various data types in the vault.
|
||||
- `schema` (Schema): Defines the structure for various data types in the dwn.
|
||||
|
||||
## Future Improvements
|
||||
|
||||
@ -129,7 +129,7 @@ Acceptance tests should cover:
|
||||
1. Parameter updates
|
||||
2. DWN state management
|
||||
3. Schema queries
|
||||
4. Vault allocation process
|
||||
4. DWN allocation process
|
||||
5. DID document syncing
|
||||
|
||||
## Appendix
|
@ -2,7 +2,7 @@ package module
|
||||
|
||||
import (
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
modulev1 "github.com/onsonr/sonr/api/vault/v1"
|
||||
modulev1 "github.com/onsonr/sonr/api/dwn/v1"
|
||||
)
|
||||
|
||||
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
// !NOTE: Must enable in module.go (disabled in favor of autocli.go)
|
@ -9,7 +9,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
// !NOTE: Must enable in module.go (disabled in favor of autocli.go)
|
||||
@ -54,7 +54,7 @@ func MsgUpdateParams() *cobra.Command {
|
||||
msg := &types.MsgUpdateParams{
|
||||
Authority: senderAddress.String(),
|
||||
Params: types.Params{
|
||||
IpfsActive: someValue,
|
||||
SomeValue: someValue,
|
||||
},
|
||||
}
|
||||
|
@ -3,21 +3,21 @@ package module
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
"cosmossdk.io/core/address"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/store"
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/log"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
modulev1 "github.com/onsonr/sonr/api/vault/module/v1"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
"github.com/onsonr/sonr/x/vault/keeper"
|
||||
modulev1 "github.com/onsonr/sonr/api/dwn/module/v1"
|
||||
"github.com/onsonr/sonr/x/dwn/keeper"
|
||||
)
|
||||
|
||||
var _ appmodule.AppModule = AppModule{}
|
||||
@ -42,8 +42,6 @@ type ModuleInputs struct {
|
||||
StoreService store.KVStoreService
|
||||
AddressCodec address.Codec
|
||||
|
||||
AccountKeeper authkeeper.AccountKeeper
|
||||
DidKeeper didkeeper.Keeper
|
||||
StakingKeeper stakingkeeper.Keeper
|
||||
SlashingKeeper slashingkeeper.Keeper
|
||||
}
|
||||
@ -58,8 +56,8 @@ type ModuleOutputs struct {
|
||||
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
||||
govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String()
|
||||
|
||||
k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.AccountKeeper, in.DidKeeper)
|
||||
m := NewAppModule(in.Cdc, k, in.DidKeeper)
|
||||
k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr)
|
||||
m := NewAppModule(in.Cdc, k)
|
||||
|
||||
return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}}
|
||||
}
|
@ -3,7 +3,7 @@ package keeper_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@ -12,8 +12,6 @@ func TestGenesis(t *testing.T) {
|
||||
|
||||
genesisState := &types.GenesisState{
|
||||
Params: types.DefaultParams(),
|
||||
|
||||
// this line is used by starport scaffolding # genesis/test/state
|
||||
}
|
||||
|
||||
f.k.InitGenesis(f.ctx, genesisState)
|
||||
@ -21,5 +19,4 @@ func TestGenesis(t *testing.T) {
|
||||
got := f.k.ExportGenesis(f.ctx)
|
||||
require.NotNil(t, got)
|
||||
|
||||
// this line is used by starport scaffolding # genesis/test/assert
|
||||
}
|
@ -1,20 +1,20 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
storetypes "cosmossdk.io/core/store"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/orm/model/ormdb"
|
||||
nftkeeper "cosmossdk.io/x/nft/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
|
||||
|
||||
apiv1 "github.com/onsonr/sonr/api/service/v1"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
vaultkeeper "github.com/onsonr/sonr/x/vault/keeper"
|
||||
apiv1 "github.com/onsonr/sonr/api/dwn/v1"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
type Keeper struct {
|
||||
@ -28,11 +28,6 @@ type Keeper struct {
|
||||
OrmDB apiv1.StateStore
|
||||
|
||||
authority string
|
||||
|
||||
DidKeeper didkeeper.Keeper
|
||||
GroupKeeper groupkeeper.Keeper
|
||||
NFTKeeper nftkeeper.Keeper
|
||||
VaultKeeper vaultkeeper.Keeper
|
||||
}
|
||||
|
||||
// NewKeeper creates a new Keeper instance
|
||||
@ -41,10 +36,6 @@ func NewKeeper(
|
||||
storeService storetypes.KVStoreService,
|
||||
logger log.Logger,
|
||||
authority string,
|
||||
didKeeper didkeeper.Keeper,
|
||||
groupKeeper groupkeeper.Keeper,
|
||||
nftKeeper nftkeeper.Keeper,
|
||||
vaultKeeper vaultkeeper.Keeper,
|
||||
) Keeper {
|
||||
logger = logger.With(log.ModuleKey, "x/"+types.ModuleName)
|
||||
|
||||
@ -72,10 +63,6 @@ func NewKeeper(
|
||||
OrmDB: store,
|
||||
|
||||
authority: authority,
|
||||
|
||||
DidKeeper: didKeeper,
|
||||
GroupKeeper: groupKeeper,
|
||||
NFTKeeper: nftKeeper,
|
||||
}
|
||||
|
||||
schema, err := sb.Build()
|
||||
@ -87,3 +74,29 @@ func NewKeeper(
|
||||
|
||||
return k
|
||||
}
|
||||
|
||||
func (k Keeper) Logger() log.Logger {
|
||||
return k.logger
|
||||
}
|
||||
|
||||
// InitGenesis initializes the module's state from a genesis state.
|
||||
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
||||
|
||||
if err := data.Params.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return k.Params.Set(ctx, data.Params)
|
||||
}
|
||||
|
||||
// ExportGenesis exports the module's state to a genesis state.
|
||||
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
||||
params, err := k.Params.Get(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return &types.GenesisState{
|
||||
Params: params,
|
||||
}
|
||||
}
|
@ -3,11 +3,14 @@ package keeper_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cosmos/cosmos-sdk/runtime"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/integration"
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
@ -15,18 +18,16 @@ import (
|
||||
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
||||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
module "github.com/onsonr/sonr/x/vault"
|
||||
"github.com/onsonr/sonr/x/vault/keeper"
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
module "github.com/onsonr/sonr/x/dwn"
|
||||
"github.com/onsonr/sonr/x/dwn/keeper"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
var maccPerms = map[string][]string{
|
||||
@ -50,7 +51,6 @@ type testFixture struct {
|
||||
bankkeeper bankkeeper.BaseKeeper
|
||||
stakingKeeper *stakingkeeper.Keeper
|
||||
mintkeeper mintkeeper.Keeper
|
||||
didk didkeeper.Keeper
|
||||
|
||||
addrs []sdk.AccAddress
|
||||
govModAddr string
|
||||
@ -59,7 +59,6 @@ type testFixture struct {
|
||||
func SetupTest(t *testing.T) *testFixture {
|
||||
t.Helper()
|
||||
f := new(testFixture)
|
||||
require := require.New(t)
|
||||
|
||||
// Base setup
|
||||
logger := log.NewTestLogger(t)
|
||||
@ -68,20 +67,17 @@ func SetupTest(t *testing.T) *testFixture {
|
||||
f.govModAddr = authtypes.NewModuleAddress(govtypes.ModuleName).String()
|
||||
f.addrs = simtestutil.CreateIncrementalAccounts(3)
|
||||
|
||||
key := storetypes.NewKVStoreKey(types.ModuleName)
|
||||
storeService := runtime.NewKVStoreService(key)
|
||||
testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test"))
|
||||
|
||||
f.ctx = testCtx.Ctx
|
||||
keys := storetypes.NewKVStoreKeys(authtypes.ModuleName, banktypes.ModuleName, stakingtypes.ModuleName, minttypes.ModuleName, types.ModuleName)
|
||||
f.ctx = sdk.NewContext(integration.CreateMultiStore(keys, logger), cmtproto.Header{}, false, logger)
|
||||
|
||||
// Register SDK modules.
|
||||
registerBaseSDKModules(f, encCfg, storeService, logger, require)
|
||||
registerBaseSDKModules(logger, f, encCfg, keys)
|
||||
|
||||
// Setup Keeper.
|
||||
f.k = keeper.NewKeeper(encCfg.Codec, storeService, logger, f.govModAddr, f.accountkeeper, f.didk)
|
||||
f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr)
|
||||
f.msgServer = keeper.NewMsgServerImpl(f.k)
|
||||
f.queryServer = keeper.NewQuerier(f.k)
|
||||
f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.didk)
|
||||
f.appModule = module.NewAppModule(encCfg.Codec, f.k)
|
||||
|
||||
return f
|
||||
}
|
||||
@ -89,22 +85,23 @@ func SetupTest(t *testing.T) *testFixture {
|
||||
func registerModuleInterfaces(encCfg moduletestutil.TestEncodingConfig) {
|
||||
authtypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
stakingtypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
banktypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
minttypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
|
||||
types.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
}
|
||||
|
||||
func registerBaseSDKModules(
|
||||
logger log.Logger,
|
||||
f *testFixture,
|
||||
encCfg moduletestutil.TestEncodingConfig,
|
||||
storeService store.KVStoreService,
|
||||
logger log.Logger,
|
||||
require *require.Assertions,
|
||||
keys map[string]*storetypes.KVStoreKey,
|
||||
) {
|
||||
registerModuleInterfaces(encCfg)
|
||||
|
||||
// Auth Keeper.
|
||||
f.accountkeeper = authkeeper.NewAccountKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[authtypes.StoreKey]),
|
||||
authtypes.ProtoBaseAccount,
|
||||
maccPerms,
|
||||
authcodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix,
|
||||
@ -113,7 +110,7 @@ func registerBaseSDKModules(
|
||||
|
||||
// Bank Keeper.
|
||||
f.bankkeeper = bankkeeper.NewBaseKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[banktypes.StoreKey]),
|
||||
f.accountkeeper,
|
||||
nil,
|
||||
f.govModAddr, logger,
|
||||
@ -121,21 +118,16 @@ func registerBaseSDKModules(
|
||||
|
||||
// Staking Keeper.
|
||||
f.stakingKeeper = stakingkeeper.NewKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]),
|
||||
f.accountkeeper, f.bankkeeper, f.govModAddr,
|
||||
authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr),
|
||||
authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr),
|
||||
)
|
||||
require.NoError(f.stakingKeeper.SetParams(f.ctx, stakingtypes.DefaultParams()))
|
||||
f.accountkeeper.SetModuleAccount(f.ctx, f.stakingKeeper.GetNotBondedPool(f.ctx))
|
||||
f.accountkeeper.SetModuleAccount(f.ctx, f.stakingKeeper.GetBondedPool(f.ctx))
|
||||
|
||||
// Mint Keeper.
|
||||
f.mintkeeper = mintkeeper.NewKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[minttypes.StoreKey]),
|
||||
f.stakingKeeper, f.accountkeeper, f.bankkeeper,
|
||||
authtypes.FeeCollectorName, f.govModAddr,
|
||||
)
|
||||
f.accountkeeper.SetModuleAccount(f.ctx, f.accountkeeper.GetModuleAccount(f.ctx, minttypes.ModuleName))
|
||||
f.mintkeeper.InitGenesis(f.ctx, f.accountkeeper, minttypes.DefaultGenesisState())
|
||||
}
|
@ -6,7 +6,7 @@ import (
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
type msgServer struct {
|
||||
@ -27,3 +27,10 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams
|
||||
|
||||
return nil, ms.k.Params.Set(ctx, msg.Params)
|
||||
}
|
||||
|
||||
// Initialize implements types.MsgServer.
|
||||
func (ms msgServer) Initialize(ctx context.Context, msg *types.MsgInitialize) (*types.MsgInitializeResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("Initialize is unimplemented")
|
||||
return &types.MsgInitializeResponse{}, nil
|
||||
}
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
func TestParams(t *testing.T) {
|
31
x/dwn/keeper/orm_test.go
Normal file
31
x/dwn/keeper/orm_test.go
Normal file
@ -0,0 +1,31 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
apiv1 "github.com/onsonr/sonr/api/dwn/v1"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestORM(t *testing.T) {
|
||||
f := SetupTest(t)
|
||||
|
||||
dt := f.k.OrmDB.ExampleDataTable()
|
||||
acc := []byte("test_acc")
|
||||
amt := uint64(7)
|
||||
|
||||
err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
||||
Account: acc,
|
||||
Amount: amt,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
d, err := dt.Has(f.ctx, []byte("test_acc"))
|
||||
require.NoError(t, err)
|
||||
require.True(t, d)
|
||||
|
||||
res, err := dt.Get(f.ctx, []byte("test_acc"))
|
||||
require.NoError(t, err)
|
||||
require.NotNil(t, res)
|
||||
require.EqualValues(t, amt, res.Amount)
|
||||
}
|
51
x/dwn/keeper/query_server.go
Normal file
51
x/dwn/keeper/query_server.go
Normal file
@ -0,0 +1,51 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
var _ types.QueryServer = Querier{}
|
||||
|
||||
type Querier struct {
|
||||
Keeper
|
||||
}
|
||||
|
||||
func NewQuerier(keeper Keeper) Querier {
|
||||
return Querier{Keeper: keeper}
|
||||
}
|
||||
|
||||
func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
||||
p, err := k.Keeper.Params.Get(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &types.QueryParamsResponse{Params: &p}, nil
|
||||
}
|
||||
|
||||
// Schema implements types.QueryServer.
|
||||
func (k Querier) Schema(goCtx context.Context, req *types.QuerySchemaRequest) (*types.QuerySchemaResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("Schema is unimplemented")
|
||||
return &types.QuerySchemaResponse{}, nil
|
||||
}
|
||||
|
||||
// Allocate implements types.QueryServer.
|
||||
func (k Querier) Allocate(goCtx context.Context, req *types.QueryAllocateRequest) (*types.QueryAllocateResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("Allocate is unimplemented")
|
||||
return &types.QueryAllocateResponse{}, nil
|
||||
}
|
||||
|
||||
// Sync implements types.QueryServer.
|
||||
func (k Querier) Sync(goCtx context.Context, req *types.QuerySyncRequest) (*types.QuerySyncResponse, error) {
|
||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||
panic("Sync is unimplemented")
|
||||
return &types.QuerySyncResponse{}, nil
|
||||
}
|
@ -4,27 +4,27 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
|
||||
"cosmossdk.io/client/v2/autocli"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
"github.com/onsonr/sonr/x/service/keeper"
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/dwn/keeper"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
)
|
||||
|
||||
const (
|
||||
// ConsensusVersion defines the current x/service module consensus version.
|
||||
// ConsensusVersion defines the current x/dwn module consensus version.
|
||||
ConsensusVersion = 1
|
||||
|
||||
// this line is used by starport scaffolding # simapp/module/const
|
||||
)
|
||||
|
||||
var (
|
||||
@ -44,19 +44,16 @@ type AppModule struct {
|
||||
AppModuleBasic
|
||||
|
||||
keeper keeper.Keeper
|
||||
didk didkeeper.Keeper
|
||||
}
|
||||
|
||||
// NewAppModule constructor
|
||||
func NewAppModule(
|
||||
cdc codec.Codec,
|
||||
keeper keeper.Keeper,
|
||||
didkeeper didkeeper.Keeper,
|
||||
) *AppModule {
|
||||
return &AppModule{
|
||||
AppModuleBasic: AppModuleBasic{cdc: cdc},
|
||||
keeper: keeper,
|
||||
didk: didkeeper,
|
||||
}
|
||||
}
|
||||
|
@ -6,7 +6,6 @@ import (
|
||||
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
// this line is used by starport scaffolding # 1
|
||||
)
|
||||
|
||||
var (
|
||||
@ -26,7 +25,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||
}
|
||||
|
||||
func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
// this line is used by starport scaffolding # 3
|
||||
|
||||
registry.RegisterImplementations(
|
||||
(*sdk.Msg)(nil),
|
@ -1,7 +1,5 @@
|
||||
package types
|
||||
|
||||
// this line is used by starport scaffolding # genesis/types/import
|
||||
|
||||
// DefaultIndex is the default global index
|
||||
const DefaultIndex uint64 = 1
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: vault/v1/genesis.proto
|
||||
// source: dwn/v1/genesis.proto
|
||||
|
||||
package types
|
||||
|
||||
@ -34,7 +34,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} }
|
||||
func (m *GenesisState) String() string { return proto.CompactTextString(m) }
|
||||
func (*GenesisState) ProtoMessage() {}
|
||||
func (*GenesisState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c971b352fb6cc17, []int{0}
|
||||
return fileDescriptor_8e7492a25d5871dc, []int{0}
|
||||
}
|
||||
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -80,7 +80,7 @@ type Params struct {
|
||||
func (m *Params) Reset() { *m = Params{} }
|
||||
func (*Params) ProtoMessage() {}
|
||||
func (*Params) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c971b352fb6cc17, []int{1}
|
||||
return fileDescriptor_8e7492a25d5871dc, []int{1}
|
||||
}
|
||||
func (m *Params) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -147,7 +147,7 @@ func (m *Schema) Reset() { *m = Schema{} }
|
||||
func (m *Schema) String() string { return proto.CompactTextString(m) }
|
||||
func (*Schema) ProtoMessage() {}
|
||||
func (*Schema) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_4c971b352fb6cc17, []int{2}
|
||||
return fileDescriptor_8e7492a25d5871dc, []int{2}
|
||||
}
|
||||
func (m *Schema) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -247,43 +247,42 @@ func (m *Schema) GetProfile() string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*GenesisState)(nil), "vault.v1.GenesisState")
|
||||
proto.RegisterType((*Params)(nil), "vault.v1.Params")
|
||||
proto.RegisterType((*Schema)(nil), "vault.v1.Schema")
|
||||
proto.RegisterType((*GenesisState)(nil), "dwn.v1.GenesisState")
|
||||
proto.RegisterType((*Params)(nil), "dwn.v1.Params")
|
||||
proto.RegisterType((*Schema)(nil), "dwn.v1.Schema")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("vault/v1/genesis.proto", fileDescriptor_4c971b352fb6cc17) }
|
||||
func init() { proto.RegisterFile("dwn/v1/genesis.proto", fileDescriptor_8e7492a25d5871dc) }
|
||||
|
||||
var fileDescriptor_4c971b352fb6cc17 = []byte{
|
||||
// 434 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x92, 0x31, 0x6f, 0xd3, 0x40,
|
||||
0x14, 0xc7, 0x6d, 0xda, 0xb8, 0xc9, 0xb5, 0x43, 0x39, 0x55, 0xe8, 0xc8, 0xe0, 0xa0, 0x8a, 0xa1,
|
||||
0x62, 0xb0, 0x55, 0xd8, 0x10, 0xaa, 0x44, 0x25, 0xc4, 0x8a, 0xdc, 0x8d, 0x25, 0x7a, 0x71, 0x5e,
|
||||
0x9d, 0x6b, 0x9c, 0x3b, 0xeb, 0xee, 0xe2, 0xd2, 0xaf, 0xc0, 0xc4, 0xc8, 0xd8, 0x0f, 0xc0, 0xc0,
|
||||
0xc7, 0xe8, 0xd8, 0x91, 0x09, 0xa1, 0x64, 0x80, 0x8f, 0xc0, 0x88, 0xee, 0x9d, 0x83, 0xa2, 0x2e,
|
||||
0xa7, 0xf7, 0xff, 0xfd, 0xff, 0x7e, 0xfa, 0xeb, 0xc9, 0xec, 0x49, 0x0b, 0xcb, 0xda, 0xe5, 0xed,
|
||||
0x69, 0x5e, 0xa1, 0x42, 0x2b, 0x6d, 0xd6, 0x18, 0xed, 0x34, 0xef, 0x13, 0xcf, 0xda, 0xd3, 0xe1,
|
||||
0x63, 0x58, 0x48, 0xa5, 0x73, 0x7a, 0x83, 0x39, 0x3c, 0xaa, 0x74, 0xa5, 0x69, 0xcc, 0xfd, 0x14,
|
||||
0xe8, 0xf1, 0x19, 0x3b, 0x78, 0x1f, 0x76, 0x5c, 0x38, 0x70, 0xc8, 0x33, 0x96, 0x34, 0x60, 0x60,
|
||||
0x61, 0x45, 0xfc, 0x2c, 0x3e, 0xd9, 0x7f, 0x79, 0x98, 0x6d, 0x76, 0x66, 0x1f, 0x88, 0x9f, 0xef,
|
||||
0xde, 0xfd, 0x1c, 0x45, 0x45, 0x97, 0x3a, 0xfe, 0x16, 0xb3, 0x24, 0x18, 0x7c, 0xc4, 0xf6, 0x65,
|
||||
0x73, 0x69, 0xc7, 0x50, 0x3a, 0xd9, 0x22, 0x7d, 0xdf, 0x2f, 0x98, 0x47, 0x6f, 0x89, 0xf0, 0x37,
|
||||
0x6c, 0x58, 0xeb, 0x12, 0xea, 0xb1, 0xc1, 0x4a, 0x5a, 0x67, 0xc0, 0x49, 0xad, 0xc6, 0xa8, 0x60,
|
||||
0x52, 0xe3, 0x54, 0x3c, 0xa2, 0xbc, 0xa0, 0x44, 0xb1, 0x15, 0x78, 0x17, 0x7c, 0x7e, 0xc2, 0x12,
|
||||
0x5b, 0xce, 0x70, 0x01, 0x62, 0xf7, 0x61, 0xb3, 0x0b, 0xe2, 0x45, 0xe7, 0xbf, 0x7e, 0xfa, 0xf5,
|
||||
0x76, 0x14, 0xfd, 0xb9, 0x1d, 0xc5, 0x9f, 0x7f, 0x7f, 0x7f, 0x71, 0x10, 0x6e, 0xd5, 0xd5, 0xfd,
|
||||
0x1b, 0xb3, 0x24, 0xa4, 0xb9, 0x60, 0x7b, 0x2d, 0x1a, 0x2b, 0xb5, 0xa2, 0xaa, 0xbd, 0x62, 0x23,
|
||||
0xbd, 0x03, 0x65, 0xa9, 0x97, 0xca, 0x51, 0xa9, 0x41, 0xb1, 0x91, 0xfc, 0x88, 0xf5, 0xc0, 0x5a,
|
||||
0x74, 0x62, 0x87, 0x78, 0x10, 0x9e, 0x96, 0x33, 0x90, 0x8a, 0x8a, 0x0d, 0x8a, 0x20, 0x78, 0xca,
|
||||
0x58, 0x69, 0x70, 0x8a, 0xca, 0x49, 0xa8, 0x45, 0x8f, 0xac, 0x2d, 0xc2, 0x0f, 0xd9, 0xce, 0x54,
|
||||
0x4e, 0x45, 0x42, 0x86, 0x1f, 0x3d, 0xb9, 0xba, 0x9e, 0x8b, 0xbd, 0x40, 0xae, 0xae, 0xe7, 0x7e,
|
||||
0x73, 0x65, 0x40, 0x39, 0xd1, 0x0f, 0x9b, 0x49, 0xf0, 0x21, 0xeb, 0xcf, 0xf1, 0xc6, 0xce, 0xc0,
|
||||
0xa0, 0x18, 0x90, 0xf1, 0x5f, 0xfb, 0xee, 0x8d, 0xd1, 0x97, 0xb2, 0x46, 0xc1, 0x42, 0xf7, 0x4e,
|
||||
0x9e, 0x9f, 0xdd, 0xad, 0xd2, 0xf8, 0x7e, 0x95, 0xc6, 0xbf, 0x56, 0x69, 0xfc, 0x65, 0x9d, 0x46,
|
||||
0xf7, 0xeb, 0x34, 0xfa, 0xb1, 0x4e, 0xa3, 0x8f, 0xcf, 0x2b, 0xe9, 0x66, 0xcb, 0x49, 0x56, 0xea,
|
||||
0x45, 0xae, 0x95, 0xd5, 0xca, 0xe4, 0xf4, 0x7c, 0xca, 0xc3, 0xed, 0xdc, 0x4d, 0x83, 0x76, 0x92,
|
||||
0xd0, 0x0f, 0xf3, 0xea, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xc9, 0x54, 0x04, 0x35, 0x7d, 0x02,
|
||||
0x00, 0x00,
|
||||
var fileDescriptor_8e7492a25d5871dc = []byte{
|
||||
// 431 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x92, 0x31, 0x6f, 0x13, 0x31,
|
||||
0x1c, 0xc5, 0xef, 0x68, 0x73, 0x4d, 0xdc, 0x0a, 0x81, 0x95, 0xc1, 0x64, 0xb8, 0xa0, 0x0c, 0x08,
|
||||
0x21, 0x74, 0xa7, 0xc2, 0x86, 0xb2, 0x50, 0x09, 0xb1, 0xa2, 0xeb, 0xc6, 0x12, 0x39, 0xbe, 0x7f,
|
||||
0x2f, 0x6e, 0x2e, 0xf6, 0xc9, 0x76, 0x2e, 0xf4, 0x2b, 0x30, 0x31, 0x32, 0x76, 0x66, 0xe2, 0x63,
|
||||
0x74, 0xec, 0xc8, 0x84, 0x50, 0x32, 0xc0, 0x47, 0x60, 0x44, 0xfe, 0xfb, 0x8a, 0xd2, 0xc5, 0xf2,
|
||||
0xfb, 0xbd, 0xe7, 0xa7, 0x37, 0x98, 0x0c, 0xcb, 0x8d, 0xca, 0xdb, 0xd3, 0xbc, 0x02, 0x05, 0x56,
|
||||
0xda, 0xac, 0x31, 0xda, 0x69, 0x9a, 0x94, 0x1b, 0x95, 0xb5, 0xa7, 0xa3, 0x61, 0xa5, 0x2b, 0x8d,
|
||||
0x28, 0xf7, 0xb7, 0xe0, 0x8e, 0x1e, 0xf3, 0x95, 0x54, 0x3a, 0xc7, 0x33, 0xa0, 0xc9, 0x94, 0x9c,
|
||||
0xbc, 0x0f, 0x0d, 0xe7, 0x8e, 0x3b, 0xa0, 0x2f, 0x49, 0xd2, 0x70, 0xc3, 0x57, 0x96, 0xc5, 0x4f,
|
||||
0xe3, 0xe7, 0xc7, 0xaf, 0x1e, 0x66, 0xa1, 0x31, 0xfb, 0x80, 0xf4, 0xec, 0xf0, 0xe6, 0xe7, 0x38,
|
||||
0x2a, 0xba, 0xcc, 0xe4, 0x5b, 0x4c, 0x92, 0x60, 0xd0, 0x31, 0x39, 0x96, 0xcd, 0x85, 0x9d, 0x71,
|
||||
0xe1, 0x64, 0x0b, 0xf8, 0xba, 0x5f, 0x10, 0x8f, 0xde, 0x22, 0xa1, 0x53, 0x32, 0xaa, 0xb5, 0xe0,
|
||||
0xf5, 0xcc, 0x40, 0x25, 0xad, 0x33, 0xdc, 0x49, 0xad, 0x66, 0xa0, 0xf8, 0xbc, 0x86, 0x92, 0x3d,
|
||||
0xc0, 0x3c, 0xc3, 0x44, 0xb1, 0x17, 0x78, 0x17, 0x7c, 0xfa, 0x8c, 0x24, 0x56, 0x2c, 0x60, 0xc5,
|
||||
0xd9, 0xe1, 0xfd, 0x5d, 0xe7, 0x48, 0x8b, 0xce, 0x7d, 0xf3, 0xe4, 0xeb, 0xf5, 0x38, 0xfa, 0x73,
|
||||
0x3d, 0x8e, 0x3f, 0xff, 0xfe, 0xfe, 0xe2, 0xa4, 0xe5, 0xeb, 0xda, 0xe5, 0xdd, 0xd8, 0xbf, 0x31,
|
||||
0x49, 0x42, 0x9a, 0x32, 0x72, 0xd4, 0x82, 0xb1, 0x52, 0x2b, 0x1c, 0xda, 0x2b, 0xee, 0xa4, 0x77,
|
||||
0xb8, 0x10, 0x7a, 0xad, 0x1c, 0x4e, 0x1a, 0x14, 0x77, 0x92, 0x0e, 0x49, 0x8f, 0x5b, 0x0b, 0x8e,
|
||||
0x1d, 0x20, 0x0f, 0xc2, 0x53, 0xb1, 0xe0, 0x52, 0xe1, 0xac, 0x41, 0x11, 0x04, 0x4d, 0x09, 0x11,
|
||||
0x06, 0x4a, 0x50, 0x4e, 0xf2, 0x9a, 0xf5, 0xd0, 0xda, 0x23, 0xf4, 0x11, 0x39, 0x28, 0x65, 0xc9,
|
||||
0x12, 0x34, 0xfc, 0xd5, 0x93, 0xcb, 0xcd, 0x92, 0x1d, 0x05, 0x72, 0xb9, 0x59, 0xfa, 0xe6, 0xca,
|
||||
0x70, 0xe5, 0x58, 0x3f, 0x34, 0xa3, 0xa0, 0x23, 0xd2, 0x5f, 0xc2, 0x95, 0x5d, 0x70, 0x03, 0x6c,
|
||||
0x80, 0xc6, 0x7f, 0xed, 0xb7, 0x37, 0x46, 0x5f, 0xc8, 0x1a, 0x18, 0x09, 0xdb, 0x3b, 0x79, 0x36,
|
||||
0xbd, 0xd9, 0xa6, 0xf1, 0xed, 0x36, 0x8d, 0x7f, 0x6d, 0xd3, 0xf8, 0xcb, 0x2e, 0x8d, 0x6e, 0x77,
|
||||
0x69, 0xf4, 0x63, 0x97, 0x46, 0x1f, 0x27, 0x95, 0x74, 0x8b, 0xf5, 0x3c, 0x13, 0x7a, 0x95, 0x6b,
|
||||
0x65, 0xb5, 0x32, 0x39, 0x1e, 0x9f, 0x72, 0xff, 0xbf, 0xdc, 0x55, 0x03, 0x76, 0x9e, 0xe0, 0x57,
|
||||
0x79, 0xfd, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xdd, 0xa9, 0xd7, 0xe1, 0x73, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *Params) Equal(that interface{}) bool {
|
@ -3,7 +3,7 @@ package types_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/dwn/types"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@ -21,13 +21,9 @@ func TestGenesisState_Validate(t *testing.T) {
|
||||
},
|
||||
{
|
||||
desc: "valid genesis state",
|
||||
genState: &types.GenesisState{
|
||||
|
||||
// this line is used by starport scaffolding # types/genesis/validField
|
||||
},
|
||||
valid: true,
|
||||
genState: &types.GenesisState{},
|
||||
valid: true,
|
||||
},
|
||||
// this line is used by starport scaffolding # types/genesis/testcase
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.desc, func(t *testing.T) {
|
@ -12,7 +12,7 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
ModuleName = "vault"
|
||||
ModuleName = "dwn"
|
||||
|
||||
StoreKey = ModuleName
|
||||
|
||||
@ -21,7 +21,7 @@ const (
|
||||
|
||||
var ORMModuleSchema = ormv1alpha1.ModuleSchemaDescriptor{
|
||||
SchemaFile: []*ormv1alpha1.ModuleSchemaDescriptor_FileEntry{
|
||||
{Id: 1, ProtoFileName: "vault/v1/state.proto"},
|
||||
{Id: 1, ProtoFileName: "dwn/v1/state.proto"},
|
||||
},
|
||||
Prefix: []byte{0},
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: vault/v1/query.proto
|
||||
// source: dwn/v1/query.proto
|
||||
|
||||
package types
|
||||
|
||||
@ -36,7 +36,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} }
|
||||
func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryParamsRequest) ProtoMessage() {}
|
||||
func (*QueryParamsRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{0}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{0}
|
||||
}
|
||||
func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -75,7 +75,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} }
|
||||
func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryParamsResponse) ProtoMessage() {}
|
||||
func (*QueryParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{1}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{1}
|
||||
}
|
||||
func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -119,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{2}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{2}
|
||||
}
|
||||
func (m *QuerySchemaRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -158,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{3}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{3}
|
||||
}
|
||||
func (m *QuerySchemaResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -202,7 +202,7 @@ func (m *QueryAllocateRequest) Reset() { *m = QueryAllocateRequest{} }
|
||||
func (m *QueryAllocateRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAllocateRequest) ProtoMessage() {}
|
||||
func (*QueryAllocateRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{4}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{4}
|
||||
}
|
||||
func (m *QueryAllocateRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -244,7 +244,7 @@ func (m *QueryAllocateResponse) Reset() { *m = QueryAllocateResponse{} }
|
||||
func (m *QueryAllocateResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAllocateResponse) ProtoMessage() {}
|
||||
func (*QueryAllocateResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{5}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{5}
|
||||
}
|
||||
func (m *QueryAllocateResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -317,7 +317,7 @@ func (m *QuerySyncRequest) Reset() { *m = QuerySyncRequest{} }
|
||||
func (m *QuerySyncRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuerySyncRequest) ProtoMessage() {}
|
||||
func (*QuerySyncRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{6}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{6}
|
||||
}
|
||||
func (m *QuerySyncRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -368,7 +368,7 @@ func (m *QuerySyncResponse) Reset() { *m = QuerySyncResponse{} }
|
||||
func (m *QuerySyncResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QuerySyncResponse) ProtoMessage() {}
|
||||
func (*QuerySyncResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_e6d49a2800ab3e4b, []int{7}
|
||||
return fileDescriptor_9a31dfed63924cb3, []int{7}
|
||||
}
|
||||
func (m *QuerySyncResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -426,53 +426,53 @@ func (m *QuerySyncResponse) GetChainID() string {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryParamsRequest)(nil), "vault.v1.QueryParamsRequest")
|
||||
proto.RegisterType((*QueryParamsResponse)(nil), "vault.v1.QueryParamsResponse")
|
||||
proto.RegisterType((*QuerySchemaRequest)(nil), "vault.v1.QuerySchemaRequest")
|
||||
proto.RegisterType((*QuerySchemaResponse)(nil), "vault.v1.QuerySchemaResponse")
|
||||
proto.RegisterType((*QueryAllocateRequest)(nil), "vault.v1.QueryAllocateRequest")
|
||||
proto.RegisterType((*QueryAllocateResponse)(nil), "vault.v1.QueryAllocateResponse")
|
||||
proto.RegisterType((*QuerySyncRequest)(nil), "vault.v1.QuerySyncRequest")
|
||||
proto.RegisterType((*QuerySyncResponse)(nil), "vault.v1.QuerySyncResponse")
|
||||
proto.RegisterType((*QueryParamsRequest)(nil), "dwn.v1.QueryParamsRequest")
|
||||
proto.RegisterType((*QueryParamsResponse)(nil), "dwn.v1.QueryParamsResponse")
|
||||
proto.RegisterType((*QuerySchemaRequest)(nil), "dwn.v1.QuerySchemaRequest")
|
||||
proto.RegisterType((*QuerySchemaResponse)(nil), "dwn.v1.QuerySchemaResponse")
|
||||
proto.RegisterType((*QueryAllocateRequest)(nil), "dwn.v1.QueryAllocateRequest")
|
||||
proto.RegisterType((*QueryAllocateResponse)(nil), "dwn.v1.QueryAllocateResponse")
|
||||
proto.RegisterType((*QuerySyncRequest)(nil), "dwn.v1.QuerySyncRequest")
|
||||
proto.RegisterType((*QuerySyncResponse)(nil), "dwn.v1.QuerySyncResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("vault/v1/query.proto", fileDescriptor_e6d49a2800ab3e4b) }
|
||||
func init() { proto.RegisterFile("dwn/v1/query.proto", fileDescriptor_9a31dfed63924cb3) }
|
||||
|
||||
var fileDescriptor_e6d49a2800ab3e4b = []byte{
|
||||
// 515 bytes of a gzipped FileDescriptorProto
|
||||
var fileDescriptor_9a31dfed63924cb3 = []byte{
|
||||
// 520 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x3f, 0x6f, 0xd3, 0x40,
|
||||
0x18, 0xc6, 0xeb, 0xa4, 0x0d, 0xc9, 0x15, 0x21, 0x73, 0x84, 0xc8, 0x32, 0xad, 0x09, 0x56, 0x87,
|
||||
0x4c, 0xb6, 0x5a, 0x76, 0x10, 0x15, 0x0b, 0x1b, 0x18, 0x21, 0x24, 0x96, 0xe8, 0x72, 0x3e, 0x39,
|
||||
0x27, 0x9c, 0x3b, 0xd7, 0x67, 0x47, 0xf5, 0xca, 0xda, 0x05, 0x89, 0x4f, 0xc0, 0xb7, 0x61, 0xac,
|
||||
0xc4, 0xc2, 0x88, 0x12, 0x3e, 0x08, 0xba, 0x3f, 0x8e, 0x1b, 0xa7, 0x85, 0x25, 0xf2, 0x3d, 0xcf,
|
||||
0x9b, 0xdf, 0xf3, 0xbe, 0xbe, 0xd7, 0x60, 0xb8, 0x44, 0x65, 0x5a, 0x84, 0xcb, 0xd3, 0xf0, 0xa2,
|
||||
0x24, 0x79, 0x15, 0x64, 0x39, 0x2f, 0x38, 0xec, 0x2b, 0x35, 0x58, 0x9e, 0xba, 0x47, 0x09, 0xe7,
|
||||
0x49, 0x4a, 0x42, 0x94, 0xd1, 0x10, 0x31, 0xc6, 0x0b, 0x54, 0x50, 0xce, 0x84, 0xae, 0x73, 0x47,
|
||||
0x9b, 0x7f, 0x27, 0x84, 0x11, 0x41, 0x8d, 0xee, 0x0f, 0x01, 0x7c, 0x27, 0x71, 0x6f, 0x51, 0x8e,
|
||||
0x16, 0x22, 0x22, 0x17, 0x25, 0x11, 0x85, 0xff, 0x12, 0x3c, 0xda, 0x52, 0x45, 0xc6, 0x99, 0x20,
|
||||
0x70, 0x02, 0x7a, 0x99, 0x52, 0x1c, 0x6b, 0x6c, 0x4d, 0x0e, 0xcf, 0xec, 0xa0, 0x4e, 0x0f, 0x4c,
|
||||
0xa5, 0xf1, 0x37, 0xd8, 0xf7, 0x78, 0x4e, 0x16, 0xa8, 0x8d, 0xad, 0xd5, 0x06, 0x2b, 0x94, 0xb2,
|
||||
0x8b, 0x35, 0x95, 0xc6, 0xf7, 0x47, 0x60, 0xa8, 0x00, 0xaf, 0xd2, 0x94, 0x63, 0x54, 0x90, 0x1a,
|
||||
0xfc, 0xdd, 0x02, 0x8f, 0x5b, 0x86, 0x61, 0x3b, 0xe0, 0x9e, 0x28, 0x31, 0x26, 0x42, 0xf7, 0xdc,
|
||||
0x8f, 0xea, 0x23, 0xb4, 0x41, 0x17, 0xd3, 0xd8, 0xe9, 0x8c, 0xad, 0xc9, 0x20, 0x92, 0x8f, 0xd0,
|
||||
0x05, 0xfd, 0x05, 0xc2, 0x28, 0xe7, 0x9c, 0x39, 0x5d, 0x25, 0x6f, 0xce, 0xf0, 0x18, 0x80, 0xac,
|
||||
0x9c, 0xa5, 0x14, 0x4f, 0xcb, 0x9c, 0x3a, 0xfb, 0xca, 0x1d, 0x68, 0xe5, 0x43, 0x4e, 0xe1, 0x33,
|
||||
0x70, 0x9f, 0x5c, 0x66, 0x34, 0xaf, 0xa6, 0xb3, 0x94, 0xe3, 0xcf, 0xce, 0xc1, 0xd8, 0x9a, 0x74,
|
||||
0xa3, 0x43, 0xad, 0x9d, 0x4b, 0xc9, 0x3f, 0x01, 0xb6, 0x1e, 0xbe, 0x62, 0xd8, 0xf4, 0x2d, 0x7b,
|
||||
0x88, 0x69, 0xac, 0x3a, 0x1b, 0x44, 0xf2, 0xd1, 0xbf, 0xb2, 0xc0, 0xc3, 0x1b, 0x65, 0xff, 0x9d,
|
||||
0xa2, 0x79, 0x77, 0x9d, 0x7f, 0xbf, 0x3b, 0xc9, 0x40, 0x71, 0x9c, 0x4b, 0x86, 0x1e, 0xae, 0x3e,
|
||||
0x4a, 0x07, 0xcf, 0x11, 0x65, 0x6f, 0x5e, 0x9b, 0xc1, 0xea, 0xe3, 0xd9, 0x55, 0x17, 0x1c, 0xa8,
|
||||
0x6e, 0xe0, 0x14, 0xf4, 0xf4, 0x15, 0xc3, 0xa3, 0x26, 0x61, 0x77, 0x73, 0xdc, 0xe3, 0x3b, 0x5c,
|
||||
0x3d, 0x88, 0xef, 0x7c, 0xf9, 0xf9, 0xe7, 0x5b, 0x07, 0x42, 0x3b, 0xdc, 0xec, 0xa3, 0xde, 0x18,
|
||||
0x19, 0xa0, 0x1b, 0xde, 0x09, 0xd8, 0xda, 0xa1, 0x9d, 0x80, 0xed, 0x5d, 0xba, 0x2d, 0xc0, 0xcc,
|
||||
0x9f, 0x80, 0x7e, 0xbd, 0x1d, 0xd0, 0x6b, 0x41, 0x5a, 0xfb, 0xe4, 0x3e, 0xbd, 0xd3, 0x37, 0x31,
|
||||
0xae, 0x8a, 0x19, 0x42, 0xd8, 0xc4, 0xa0, 0x1a, 0xfe, 0x11, 0xec, 0xcb, 0xcb, 0x83, 0x6e, 0xbb,
|
||||
0xd3, 0xe6, 0xe2, 0xdd, 0x27, 0xb7, 0x7a, 0x06, 0x3e, 0x52, 0x70, 0x1b, 0x3e, 0xb8, 0x31, 0x43,
|
||||
0xc5, 0xf0, 0xf9, 0x8b, 0x1f, 0x2b, 0xcf, 0xba, 0x5e, 0x79, 0xd6, 0xef, 0x95, 0x67, 0x7d, 0x5d,
|
||||
0x7b, 0x7b, 0xd7, 0x6b, 0x6f, 0xef, 0xd7, 0xda, 0xdb, 0xfb, 0x74, 0x92, 0xd0, 0x62, 0x5e, 0xce,
|
||||
0x02, 0xcc, 0x17, 0x21, 0x67, 0x82, 0xb3, 0x3c, 0x54, 0x3f, 0x97, 0x86, 0x50, 0x54, 0x19, 0x11,
|
||||
0xb3, 0x9e, 0xfa, 0xe4, 0x9f, 0xff, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x89, 0x02, 0x8d, 0x5a, 0x4a,
|
||||
0x04, 0x00, 0x00,
|
||||
0x18, 0xc6, 0xe3, 0xa4, 0x0d, 0xc9, 0x15, 0x55, 0xe1, 0x08, 0x95, 0x31, 0xad, 0x15, 0x2c, 0x84,
|
||||
0x32, 0xd9, 0x6a, 0x59, 0x61, 0xa0, 0x62, 0x61, 0x03, 0x57, 0x2c, 0x30, 0x54, 0x97, 0xf3, 0x29,
|
||||
0x39, 0xe1, 0xdc, 0xb9, 0x77, 0x76, 0x5a, 0xaf, 0x6c, 0x6c, 0x48, 0x7c, 0x02, 0xbe, 0x0d, 0x63,
|
||||
0x25, 0x16, 0x46, 0x94, 0xf0, 0x2d, 0x58, 0xd0, 0xfd, 0x71, 0x13, 0x9b, 0x00, 0x8b, 0xe5, 0x7b,
|
||||
0x9e, 0xf3, 0xef, 0x7d, 0x5e, 0xdf, 0x7b, 0x00, 0x26, 0x97, 0x2c, 0x5a, 0x1c, 0x47, 0x17, 0x05,
|
||||
0x11, 0x65, 0x98, 0x09, 0x9e, 0x73, 0xd8, 0x4d, 0x2e, 0x59, 0xb8, 0x38, 0xf6, 0x0e, 0xa7, 0x9c,
|
||||
0x4f, 0x53, 0x12, 0xa1, 0x8c, 0x46, 0x88, 0x31, 0x9e, 0xa3, 0x9c, 0x72, 0x26, 0xcd, 0x2e, 0x6f,
|
||||
0x68, 0xbf, 0x9c, 0x12, 0x46, 0x24, 0xb5, 0x6a, 0x30, 0x04, 0xf0, 0xb5, 0x42, 0xbd, 0x42, 0x02,
|
||||
0xcd, 0x65, 0x4c, 0x2e, 0x0a, 0x22, 0xf3, 0xe0, 0x19, 0xb8, 0x5b, 0x53, 0x65, 0xc6, 0x99, 0x24,
|
||||
0xf0, 0x31, 0xe8, 0x66, 0x5a, 0x71, 0x9d, 0x91, 0x33, 0xde, 0x3b, 0xd9, 0x0f, 0x4d, 0xe5, 0xd0,
|
||||
0xee, 0xb3, 0xee, 0x0d, 0xf4, 0x0c, 0xcf, 0xc8, 0x1c, 0x35, 0xa1, 0x95, 0xba, 0x86, 0x4a, 0xad,
|
||||
0x34, 0xa1, 0x76, 0x9f, 0x75, 0x83, 0x03, 0x30, 0xd4, 0x9f, 0x3f, 0x4f, 0x53, 0x8e, 0x51, 0x4e,
|
||||
0x2a, 0xec, 0x17, 0x07, 0xdc, 0x6b, 0x18, 0x96, 0xec, 0x82, 0x5b, 0xb2, 0xc0, 0x98, 0x48, 0x93,
|
||||
0xb7, 0x17, 0x57, 0x4b, 0x38, 0x00, 0x1d, 0x4c, 0x13, 0xb7, 0x3d, 0x72, 0xc6, 0xfd, 0x58, 0xbd,
|
||||
0x42, 0x0f, 0xf4, 0xe6, 0x08, 0x23, 0xc1, 0x39, 0x73, 0x3b, 0x5a, 0xbe, 0x59, 0xc3, 0x23, 0x00,
|
||||
0xb2, 0x62, 0x92, 0x52, 0x7c, 0x5e, 0x08, 0xea, 0xee, 0x68, 0xb7, 0x6f, 0x94, 0x37, 0x82, 0xc2,
|
||||
0x87, 0xe0, 0x36, 0xb9, 0xca, 0xa8, 0x28, 0xcf, 0x27, 0x29, 0xc7, 0xef, 0xdd, 0xdd, 0x91, 0x33,
|
||||
0xee, 0xc4, 0x7b, 0x46, 0x3b, 0x55, 0x52, 0xf0, 0x08, 0x0c, 0x4c, 0xeb, 0x25, 0xc3, 0x36, 0xb7,
|
||||
0xca, 0x90, 0xd0, 0x44, 0x27, 0xeb, 0xc7, 0xea, 0x35, 0xf8, 0xe8, 0x80, 0x3b, 0x1b, 0xdb, 0xfe,
|
||||
0xdb, 0xc5, 0xfa, 0xcf, 0xb5, 0xff, 0xf5, 0xe7, 0x14, 0x01, 0x25, 0x89, 0x50, 0x04, 0xd3, 0x5a,
|
||||
0xb5, 0x54, 0x0e, 0x9e, 0x21, 0xca, 0x5e, 0xbe, 0xb0, 0x6d, 0x55, 0xcb, 0x93, 0x5f, 0x6d, 0xb0,
|
||||
0xab, 0xb3, 0xc0, 0x77, 0xa0, 0x6b, 0x8e, 0x17, 0x7a, 0x15, 0xff, 0xcf, 0x89, 0xf1, 0x1e, 0x6c,
|
||||
0xf5, 0x4c, 0x0b, 0x81, 0xfb, 0xe1, 0xdb, 0xcf, 0xcf, 0x6d, 0x08, 0x07, 0xd1, 0x02, 0x15, 0x69,
|
||||
0xae, 0xa6, 0xd0, 0x4c, 0x8a, 0x82, 0x9b, 0xb0, 0x0d, 0x78, 0x6d, 0x72, 0x1a, 0xf0, 0xfa, 0xfc,
|
||||
0x6c, 0x83, 0xdb, 0xbe, 0x31, 0xe8, 0x55, 0x33, 0x01, 0x0f, 0x6b, 0x88, 0xc6, 0x0c, 0x79, 0x47,
|
||||
0x7f, 0x71, 0x6d, 0x09, 0x4f, 0x97, 0x18, 0x42, 0xb8, 0x2e, 0x81, 0x2a, 0xf0, 0x19, 0xd8, 0x51,
|
||||
0xc7, 0x05, 0xdd, 0x7a, 0xc6, 0xf5, 0x41, 0x7b, 0xf7, 0xb7, 0x38, 0x16, 0x7c, 0xa0, 0xc1, 0x03,
|
||||
0xb8, 0xbf, 0x91, 0xbd, 0x64, 0xf8, 0xf4, 0xe9, 0xd7, 0xa5, 0xef, 0x5c, 0x2f, 0x7d, 0xe7, 0xc7,
|
||||
0xd2, 0x77, 0x3e, 0xad, 0xfc, 0xd6, 0xf5, 0xca, 0x6f, 0x7d, 0x5f, 0xf9, 0xad, 0xb7, 0xc1, 0x94,
|
||||
0xe6, 0xb3, 0x62, 0x12, 0x62, 0x3e, 0x8f, 0x38, 0x93, 0x9c, 0x89, 0x48, 0x3f, 0xae, 0x22, 0x75,
|
||||
0xbd, 0xf3, 0x32, 0x23, 0x72, 0xd2, 0xd5, 0x57, 0xfb, 0xc9, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||
0x73, 0xa2, 0xa3, 0xc2, 0x2c, 0x04, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -510,7 +510,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient {
|
||||
|
||||
func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) {
|
||||
out := new(QueryParamsResponse)
|
||||
err := c.cc.Invoke(ctx, "/vault.v1.Query/Params", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/dwn.v1.Query/Params", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -519,7 +519,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts .
|
||||
|
||||
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...)
|
||||
err := c.cc.Invoke(ctx, "/dwn.v1.Query/Schema", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -528,7 +528,7 @@ func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts .
|
||||
|
||||
func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, opts ...grpc.CallOption) (*QueryAllocateResponse, error) {
|
||||
out := new(QueryAllocateResponse)
|
||||
err := c.cc.Invoke(ctx, "/vault.v1.Query/Allocate", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/dwn.v1.Query/Allocate", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -537,7 +537,7 @@ func (c *queryClient) Allocate(ctx context.Context, in *QueryAllocateRequest, op
|
||||
|
||||
func (c *queryClient) Sync(ctx context.Context, in *QuerySyncRequest, opts ...grpc.CallOption) (*QuerySyncResponse, error) {
|
||||
out := new(QuerySyncResponse)
|
||||
err := c.cc.Invoke(ctx, "/vault.v1.Query/Sync", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/dwn.v1.Query/Sync", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -590,7 +590,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vault.v1.Query/Params",
|
||||
FullMethod: "/dwn.v1.Query/Params",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest))
|
||||
@ -608,7 +608,7 @@ func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interf
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vault.v1.Query/Schema",
|
||||
FullMethod: "/dwn.v1.Query/Schema",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Schema(ctx, req.(*QuerySchemaRequest))
|
||||
@ -626,7 +626,7 @@ func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(inte
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vault.v1.Query/Allocate",
|
||||
FullMethod: "/dwn.v1.Query/Allocate",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Allocate(ctx, req.(*QueryAllocateRequest))
|
||||
@ -644,7 +644,7 @@ func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vault.v1.Query/Sync",
|
||||
FullMethod: "/dwn.v1.Query/Sync",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Sync(ctx, req.(*QuerySyncRequest))
|
||||
@ -654,7 +654,7 @@ func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interfac
|
||||
|
||||
var Query_serviceDesc = _Query_serviceDesc
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "vault.v1.Query",
|
||||
ServiceName: "dwn.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
@ -675,7 +675,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "vault/v1/query.proto",
|
||||
Metadata: "dwn/v1/query.proto",
|
||||
}
|
||||
|
||||
func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) {
|
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT.
|
||||
// source: vault/v1/query.proto
|
||||
// source: dwn/v1/query.proto
|
||||
|
||||
/*
|
||||
Package types is a reverse proxy.
|
@ -4,7 +4,7 @@ import (
|
||||
"github.com/ipfs/boxo/files"
|
||||
|
||||
"github.com/onsonr/sonr/pkg/core/dwn"
|
||||
"github.com/onsonr/sonr/x/vault/types/static"
|
||||
"github.com/onsonr/sonr/x/dwn/types/static"
|
||||
)
|
||||
|
||||
const (
|
355
x/dwn/types/state.pb.go
Normal file
355
x/dwn/types/state.pb.go
Normal file
@ -0,0 +1,355 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: dwn/v1/state.proto
|
||||
|
||||
package types
|
||||
|
||||
import (
|
||||
_ "cosmossdk.io/orm"
|
||||
fmt "fmt"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
io "io"
|
||||
math "math"
|
||||
math_bits "math/bits"
|
||||
)
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
var _ = proto.Marshal
|
||||
var _ = fmt.Errorf
|
||||
var _ = math.Inf
|
||||
|
||||
// This is a compile-time assertion to ensure that this generated file
|
||||
// is compatible with the proto package it is being compiled against.
|
||||
// A compilation error at this line likely means your copy of the
|
||||
// proto package needs to be updated.
|
||||
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||
|
||||
type ExampleData struct {
|
||||
Account []byte `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
|
||||
Amount uint64 `protobuf:"varint,2,opt,name=amount,proto3" json:"amount,omitempty"`
|
||||
}
|
||||
|
||||
func (m *ExampleData) Reset() { *m = ExampleData{} }
|
||||
func (m *ExampleData) String() string { return proto.CompactTextString(m) }
|
||||
func (*ExampleData) ProtoMessage() {}
|
||||
func (*ExampleData) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_040a9b061177db90, []int{0}
|
||||
}
|
||||
func (m *ExampleData) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *ExampleData) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_ExampleData.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 *ExampleData) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_ExampleData.Merge(m, src)
|
||||
}
|
||||
func (m *ExampleData) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *ExampleData) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_ExampleData.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_ExampleData proto.InternalMessageInfo
|
||||
|
||||
func (m *ExampleData) GetAccount() []byte {
|
||||
if m != nil {
|
||||
return m.Account
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *ExampleData) GetAmount() uint64 {
|
||||
if m != nil {
|
||||
return m.Amount
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*ExampleData)(nil), "dwn.v1.ExampleData")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("dwn/v1/state.proto", fileDescriptor_040a9b061177db90) }
|
||||
|
||||
var fileDescriptor_040a9b061177db90 = []byte{
|
||||
// 205 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4a, 0x29, 0xcf, 0xd3,
|
||||
0x2f, 0x33, 0xd4, 0x2f, 0x2e, 0x49, 0x2c, 0x49, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62,
|
||||
0x4b, 0x29, 0xcf, 0xd3, 0x2b, 0x33, 0x94, 0x12, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0xcf,
|
||||
0x2f, 0xca, 0x05, 0x29, 0xc9, 0x2f, 0xca, 0x85, 0x28, 0x50, 0x4a, 0xe0, 0xe2, 0x76, 0xad, 0x48,
|
||||
0xcc, 0x2d, 0xc8, 0x49, 0x75, 0x49, 0x2c, 0x49, 0x14, 0x92, 0xe0, 0x62, 0x4f, 0x4c, 0x4e, 0xce,
|
||||
0x2f, 0xcd, 0x2b, 0x91, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x09, 0x82, 0x71, 0x85, 0xc4, 0xb8, 0xd8,
|
||||
0x12, 0x73, 0xc1, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x2c, 0x41, 0x50, 0x9e, 0x95, 0xfc, 0xa7, 0x79,
|
||||
0x97, 0xfb, 0x98, 0x25, 0xb9, 0x38, 0xe1, 0x3a, 0x85, 0xb8, 0x60, 0x4a, 0x05, 0x18, 0x25, 0x18,
|
||||
0x9d, 0x6c, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09,
|
||||
0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x4a, 0x29, 0x3d, 0xb3,
|
||||
0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x3f, 0x3f, 0xaf, 0x38, 0x3f, 0xaf, 0x48, 0x1f,
|
||||
0x4c, 0x54, 0xe8, 0x83, 0x7c, 0x52, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x76, 0xa6, 0x31,
|
||||
0x20, 0x00, 0x00, 0xff, 0xff, 0x0d, 0x48, 0x77, 0x36, 0xdd, 0x00, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (m *ExampleData) 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 *ExampleData) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *ExampleData) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Amount != 0 {
|
||||
i = encodeVarintState(dAtA, i, uint64(m.Amount))
|
||||
i--
|
||||
dAtA[i] = 0x10
|
||||
}
|
||||
if len(m.Account) > 0 {
|
||||
i -= len(m.Account)
|
||||
copy(dAtA[i:], m.Account)
|
||||
i = encodeVarintState(dAtA, i, uint64(len(m.Account)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintState(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovState(v)
|
||||
base := offset
|
||||
for v >= 1<<7 {
|
||||
dAtA[offset] = uint8(v&0x7f | 0x80)
|
||||
v >>= 7
|
||||
offset++
|
||||
}
|
||||
dAtA[offset] = uint8(v)
|
||||
return base
|
||||
}
|
||||
func (m *ExampleData) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Account)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovState(uint64(l))
|
||||
}
|
||||
if m.Amount != 0 {
|
||||
n += 1 + sovState(uint64(m.Amount))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovState(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
func sozState(x uint64) (n int) {
|
||||
return sovState(uint64((x << 1) ^ uint64((int64(x) >> 63))))
|
||||
}
|
||||
func (m *ExampleData) 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 ErrIntOverflowState
|
||||
}
|
||||
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: ExampleData: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: ExampleData: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType)
|
||||
}
|
||||
var byteLen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
byteLen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if byteLen < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
postIndex := iNdEx + byteLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Account = append(m.Account[:0], dAtA[iNdEx:postIndex]...)
|
||||
if m.Account == nil {
|
||||
m.Account = []byte{}
|
||||
}
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 0 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType)
|
||||
}
|
||||
m.Amount = 0
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
m.Amount |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipState(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthState
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipState(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
depth := 0
|
||||
for iNdEx < l {
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
wireType := int(wire & 0x7)
|
||||
switch wireType {
|
||||
case 0:
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx++
|
||||
if dAtA[iNdEx-1] < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
case 1:
|
||||
iNdEx += 8
|
||||
case 2:
|
||||
var length int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return 0, ErrIntOverflowState
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
length |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if length < 0 {
|
||||
return 0, ErrInvalidLengthState
|
||||
}
|
||||
iNdEx += length
|
||||
case 3:
|
||||
depth++
|
||||
case 4:
|
||||
if depth == 0 {
|
||||
return 0, ErrUnexpectedEndOfGroupState
|
||||
}
|
||||
depth--
|
||||
case 5:
|
||||
iNdEx += 4
|
||||
default:
|
||||
return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
|
||||
}
|
||||
if iNdEx < 0 {
|
||||
return 0, ErrInvalidLengthState
|
||||
}
|
||||
if depth == 0 {
|
||||
return iNdEx, nil
|
||||
}
|
||||
}
|
||||
return 0, io.ErrUnexpectedEOF
|
||||
}
|
||||
|
||||
var (
|
||||
ErrInvalidLengthState = fmt.Errorf("proto: negative length found during unmarshaling")
|
||||
ErrIntOverflowState = fmt.Errorf("proto: integer overflow")
|
||||
ErrUnexpectedEndOfGroupState = fmt.Errorf("proto: unexpected end of group")
|
||||
)
|
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: vault/v1/tx.proto
|
||||
// source: dwn/v1/tx.proto
|
||||
|
||||
package types
|
||||
|
||||
@ -11,7 +11,6 @@ import (
|
||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||
grpc1 "github.com/cosmos/gogoproto/grpc"
|
||||
proto "github.com/cosmos/gogoproto/proto"
|
||||
_ "google.golang.org/genproto/googleapis/api/annotations"
|
||||
grpc "google.golang.org/grpc"
|
||||
codes "google.golang.org/grpc/codes"
|
||||
status "google.golang.org/grpc/status"
|
||||
@ -47,7 +46,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} }
|
||||
func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgUpdateParams) ProtoMessage() {}
|
||||
func (*MsgUpdateParams) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_311d0123a4881c5c, []int{0}
|
||||
return fileDescriptor_32d2464465560de7, []int{0}
|
||||
}
|
||||
func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -101,7 +100,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse
|
||||
func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgUpdateParamsResponse) ProtoMessage() {}
|
||||
func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_311d0123a4881c5c, []int{1}
|
||||
return fileDescriptor_32d2464465560de7, []int{1}
|
||||
}
|
||||
func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -130,37 +129,140 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() {
|
||||
|
||||
var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgUpdateParams)(nil), "vault.v1.MsgUpdateParams")
|
||||
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "vault.v1.MsgUpdateParamsResponse")
|
||||
// MsgInitialize spawns a New Vault with Unclaimed State. This is a one-time
|
||||
// operation that must be performed interacting with the Vault.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
type MsgInitialize struct {
|
||||
// authority is the address of the governance account.
|
||||
Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"`
|
||||
// params defines the parameters to update.
|
||||
//
|
||||
// NOTE: All parameters must be supplied.
|
||||
Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"`
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("vault/v1/tx.proto", fileDescriptor_311d0123a4881c5c) }
|
||||
func (m *MsgInitialize) Reset() { *m = MsgInitialize{} }
|
||||
func (m *MsgInitialize) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInitialize) ProtoMessage() {}
|
||||
func (*MsgInitialize) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_32d2464465560de7, []int{2}
|
||||
}
|
||||
func (m *MsgInitialize) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgInitialize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgInitialize.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 *MsgInitialize) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInitialize.Merge(m, src)
|
||||
}
|
||||
func (m *MsgInitialize) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgInitialize) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInitialize.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var fileDescriptor_311d0123a4881c5c = []byte{
|
||||
// 338 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x50, 0x4d, 0x4b, 0x02, 0x41,
|
||||
0x18, 0xde, 0xe9, 0x43, 0x72, 0x8a, 0x3e, 0x16, 0x49, 0x5d, 0x62, 0x33, 0xe9, 0x20, 0x42, 0x3b,
|
||||
0x68, 0xd0, 0xa1, 0x43, 0x90, 0xe7, 0x84, 0x30, 0xba, 0x78, 0x89, 0x51, 0x87, 0x71, 0xc1, 0x9d,
|
||||
0x77, 0xd9, 0x77, 0x14, 0xbd, 0x45, 0xb7, 0x6e, 0xfd, 0x14, 0x0f, 0xfd, 0x08, 0x8f, 0xd2, 0xa9,
|
||||
0x53, 0x84, 0x1e, 0xfc, 0x1b, 0xe1, 0xee, 0xda, 0x92, 0xd0, 0x65, 0x98, 0xf7, 0xf9, 0x9a, 0x67,
|
||||
0x5e, 0x7a, 0x34, 0xe0, 0xfd, 0x9e, 0x66, 0x83, 0x0a, 0xd3, 0x43, 0xc7, 0x0f, 0x40, 0x83, 0xb9,
|
||||
0x13, 0x42, 0xce, 0xa0, 0x62, 0x65, 0xdb, 0x80, 0x1e, 0x20, 0xf3, 0x50, 0x2e, 0x15, 0x1e, 0xca,
|
||||
0x48, 0x62, 0xe5, 0x23, 0xe2, 0x29, 0x9c, 0x58, 0x34, 0xc4, 0x54, 0x46, 0x82, 0x84, 0x08, 0x5f,
|
||||
0xde, 0x62, 0xf4, 0x44, 0x02, 0xc8, 0x9e, 0x60, 0xdc, 0x77, 0x19, 0x57, 0x0a, 0x34, 0xd7, 0x2e,
|
||||
0xa8, 0x95, 0xe7, 0xf8, 0xb7, 0x84, 0x14, 0x4a, 0xa0, 0x1b, 0xe3, 0xc5, 0x57, 0x42, 0x0f, 0xea,
|
||||
0x28, 0x1f, 0xfd, 0x0e, 0xd7, 0xe2, 0x9e, 0x07, 0xdc, 0x43, 0xf3, 0x8a, 0xa6, 0x79, 0x5f, 0x77,
|
||||
0x21, 0x70, 0xf5, 0x28, 0x47, 0x0a, 0xa4, 0x94, 0xae, 0xe5, 0x3e, 0xde, 0x2f, 0x32, 0x71, 0x89,
|
||||
0xdb, 0x4e, 0x27, 0x10, 0x88, 0x0f, 0x3a, 0x70, 0x95, 0x6c, 0x24, 0x52, 0xd3, 0xa1, 0x29, 0x3f,
|
||||
0x4c, 0xc8, 0x6d, 0x14, 0x48, 0x69, 0xb7, 0x7a, 0xe8, 0xac, 0xbe, 0xe9, 0x44, 0xc9, 0xb5, 0xad,
|
||||
0xc9, 0xd7, 0xa9, 0xd1, 0x88, 0x55, 0xd7, 0xfb, 0x2f, 0x8b, 0x71, 0x39, 0xf1, 0x17, 0xf3, 0x34,
|
||||
0xbb, 0x56, 0xa5, 0x21, 0xd0, 0x07, 0x85, 0xa2, 0xda, 0xa4, 0x9b, 0x75, 0x94, 0xe6, 0x1d, 0xdd,
|
||||
0xfb, 0xd3, 0x34, 0x9f, 0xbc, 0xb0, 0xe6, 0xb4, 0xce, 0xfe, 0xa5, 0x56, 0xa1, 0xd6, 0xf6, 0xf3,
|
||||
0x62, 0x5c, 0x26, 0xb5, 0x9b, 0xc9, 0xcc, 0x26, 0xd3, 0x99, 0x4d, 0xbe, 0x67, 0x36, 0x79, 0x9b,
|
||||
0xdb, 0xc6, 0x74, 0x6e, 0x1b, 0x9f, 0x73, 0xdb, 0x68, 0x9e, 0x4b, 0x57, 0x77, 0xfb, 0x2d, 0xa7,
|
||||
0x0d, 0x1e, 0x03, 0x85, 0xa0, 0x02, 0x16, 0x1e, 0x43, 0x16, 0x6d, 0x53, 0x8f, 0x7c, 0x81, 0xad,
|
||||
0x54, 0xb8, 0xc9, 0xcb, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9a, 0xa7, 0x73, 0x6d, 0xe8, 0x01,
|
||||
0x00, 0x00,
|
||||
var xxx_messageInfo_MsgInitialize proto.InternalMessageInfo
|
||||
|
||||
func (m *MsgInitialize) GetAuthority() string {
|
||||
if m != nil {
|
||||
return m.Authority
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *MsgInitialize) GetParams() Params {
|
||||
if m != nil {
|
||||
return m.Params
|
||||
}
|
||||
return Params{}
|
||||
}
|
||||
|
||||
// MsgInitializeResponse defines the response structure for executing a
|
||||
// MsgInitialize message.
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
type MsgInitializeResponse struct {
|
||||
}
|
||||
|
||||
func (m *MsgInitializeResponse) Reset() { *m = MsgInitializeResponse{} }
|
||||
func (m *MsgInitializeResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*MsgInitializeResponse) ProtoMessage() {}
|
||||
func (*MsgInitializeResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_32d2464465560de7, []int{3}
|
||||
}
|
||||
func (m *MsgInitializeResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *MsgInitializeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_MsgInitializeResponse.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 *MsgInitializeResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_MsgInitializeResponse.Merge(m, src)
|
||||
}
|
||||
func (m *MsgInitializeResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *MsgInitializeResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_MsgInitializeResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_MsgInitializeResponse proto.InternalMessageInfo
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*MsgUpdateParams)(nil), "dwn.v1.MsgUpdateParams")
|
||||
proto.RegisterType((*MsgUpdateParamsResponse)(nil), "dwn.v1.MsgUpdateParamsResponse")
|
||||
proto.RegisterType((*MsgInitialize)(nil), "dwn.v1.MsgInitialize")
|
||||
proto.RegisterType((*MsgInitializeResponse)(nil), "dwn.v1.MsgInitializeResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("dwn/v1/tx.proto", fileDescriptor_32d2464465560de7) }
|
||||
|
||||
var fileDescriptor_32d2464465560de7 = []byte{
|
||||
// 361 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4f, 0x29, 0xcf, 0xd3,
|
||||
0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0x29, 0xcf,
|
||||
0xd3, 0x2b, 0x33, 0x94, 0x12, 0x4f, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0xd6, 0xcf, 0x2d, 0x4e, 0x07,
|
||||
0xc9, 0xe7, 0x16, 0xa7, 0x43, 0x14, 0x48, 0x89, 0x40, 0x75, 0xa4, 0xa7, 0xe6, 0xa5, 0x16, 0x67,
|
||||
0x16, 0xc3, 0x44, 0xd3, 0xf3, 0xd3, 0xf3, 0xc1, 0x4c, 0x7d, 0x10, 0x0b, 0x2a, 0x2a, 0x09, 0x31,
|
||||
0x24, 0x1e, 0x22, 0x01, 0xe1, 0x40, 0xa4, 0x94, 0xda, 0x19, 0xb9, 0xf8, 0x7d, 0x8b, 0xd3, 0x43,
|
||||
0x0b, 0x52, 0x12, 0x4b, 0x52, 0x03, 0x12, 0x8b, 0x12, 0x73, 0x8b, 0x85, 0xcc, 0xb8, 0x38, 0x13,
|
||||
0x4b, 0x4b, 0x32, 0xf2, 0x8b, 0x32, 0x4b, 0x2a, 0x25, 0x18, 0x15, 0x18, 0x35, 0x38, 0x9d, 0x24,
|
||||
0x2e, 0x6d, 0xd1, 0x15, 0x81, 0x6a, 0x74, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x0e, 0x2e, 0x29,
|
||||
0xca, 0xcc, 0x4b, 0x0f, 0x42, 0x28, 0x15, 0xd2, 0xe1, 0x62, 0x2b, 0x00, 0x9b, 0x20, 0xc1, 0xa4,
|
||||
0xc0, 0xa8, 0xc1, 0x6d, 0xc4, 0xa7, 0x07, 0xf1, 0x84, 0x1e, 0xc4, 0x5c, 0x27, 0x96, 0x13, 0xf7,
|
||||
0xe4, 0x19, 0x82, 0xa0, 0x6a, 0xac, 0xf8, 0x9a, 0x9e, 0x6f, 0xd0, 0x42, 0xe8, 0x56, 0x92, 0xe4,
|
||||
0x12, 0x47, 0x73, 0x48, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x52, 0x2b, 0x23, 0x17,
|
||||
0xaf, 0x6f, 0x71, 0xba, 0x67, 0x5e, 0x66, 0x49, 0x66, 0x62, 0x4e, 0x66, 0x55, 0xea, 0x00, 0x39,
|
||||
0x51, 0x9c, 0x4b, 0x14, 0xc5, 0x19, 0x30, 0x07, 0x1a, 0xcd, 0x62, 0xe4, 0x62, 0xf6, 0x2d, 0x4e,
|
||||
0x17, 0xf2, 0xe0, 0xe2, 0x41, 0x09, 0x49, 0x71, 0x98, 0xf1, 0x68, 0x3e, 0x93, 0x92, 0xc7, 0x21,
|
||||
0x01, 0x33, 0x51, 0xc8, 0x89, 0x8b, 0x0b, 0xc9, 0xbb, 0xa2, 0x48, 0xca, 0x11, 0xc2, 0x52, 0xb2,
|
||||
0x58, 0x85, 0x61, 0x66, 0x48, 0xb1, 0x36, 0x3c, 0xdf, 0xa0, 0xc5, 0xe8, 0x64, 0x73, 0xe2, 0x91,
|
||||
0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1,
|
||||
0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x4a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a,
|
||||
0xc9, 0xf9, 0xb9, 0xfa, 0xf9, 0x79, 0xc5, 0xf9, 0x79, 0x45, 0xfa, 0x60, 0xa2, 0x42, 0x1f, 0x94,
|
||||
0xb8, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xe9, 0xc4, 0x18, 0x10, 0x00, 0x00, 0xff,
|
||||
0xff, 0xbb, 0x62, 0x4e, 0x8b, 0xa2, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@ -179,6 +281,8 @@ type MsgClient interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
|
||||
// Initialize spawns a new Vault
|
||||
Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error)
|
||||
}
|
||||
|
||||
type msgClient struct {
|
||||
@ -191,7 +295,16 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient {
|
||||
|
||||
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
|
||||
out := new(MsgUpdateParamsResponse)
|
||||
err := c.cc.Invoke(ctx, "/vault.v1.Msg/UpdateParams", in, out, opts...)
|
||||
err := c.cc.Invoke(ctx, "/dwn.v1.Msg/UpdateParams", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *msgClient) Initialize(ctx context.Context, in *MsgInitialize, opts ...grpc.CallOption) (*MsgInitializeResponse, error) {
|
||||
out := new(MsgInitializeResponse)
|
||||
err := c.cc.Invoke(ctx, "/dwn.v1.Msg/Initialize", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@ -204,6 +317,8 @@ type MsgServer interface {
|
||||
//
|
||||
// Since: cosmos-sdk 0.47
|
||||
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
|
||||
// Initialize spawns a new Vault
|
||||
Initialize(context.Context, *MsgInitialize) (*MsgInitializeResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedMsgServer can be embedded to have forward compatible implementations.
|
||||
@ -213,6 +328,9 @@ type UnimplementedMsgServer struct {
|
||||
func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
|
||||
}
|
||||
func (*UnimplementedMsgServer) Initialize(ctx context.Context, req *MsgInitialize) (*MsgInitializeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Initialize not implemented")
|
||||
}
|
||||
|
||||
func RegisterMsgServer(s grpc1.Server, srv MsgServer) {
|
||||
s.RegisterService(&_Msg_serviceDesc, srv)
|
||||
@ -228,7 +346,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/vault.v1.Msg/UpdateParams",
|
||||
FullMethod: "/dwn.v1.Msg/UpdateParams",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
|
||||
@ -236,18 +354,40 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Msg_Initialize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(MsgInitialize)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(MsgServer).Initialize(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/dwn.v1.Msg/Initialize",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(MsgServer).Initialize(ctx, req.(*MsgInitialize))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var Msg_serviceDesc = _Msg_serviceDesc
|
||||
var _Msg_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "vault.v1.Msg",
|
||||
ServiceName: "dwn.v1.Msg",
|
||||
HandlerType: (*MsgServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
MethodName: "UpdateParams",
|
||||
Handler: _Msg_UpdateParams_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Initialize",
|
||||
Handler: _Msg_Initialize_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "vault/v1/tx.proto",
|
||||
Metadata: "dwn/v1/tx.proto",
|
||||
}
|
||||
|
||||
func (m *MsgUpdateParams) Marshal() (dAtA []byte, err error) {
|
||||
@ -313,6 +453,69 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error)
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgInitialize) 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 *MsgInitialize) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgInitialize) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
{
|
||||
size, err := m.Params.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintTx(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
if len(m.Authority) > 0 {
|
||||
i -= len(m.Authority)
|
||||
copy(dAtA[i:], m.Authority)
|
||||
i = encodeVarintTx(dAtA, i, uint64(len(m.Authority)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *MsgInitializeResponse) 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 *MsgInitializeResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *MsgInitializeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintTx(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovTx(v)
|
||||
base := offset
|
||||
@ -348,6 +551,30 @@ func (m *MsgUpdateParamsResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgInitialize) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Authority)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
}
|
||||
l = m.Params.Size()
|
||||
n += 1 + l + sovTx(uint64(l))
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *MsgInitializeResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
return n
|
||||
}
|
||||
|
||||
func sovTx(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@ -519,6 +746,171 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgInitialize) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgInitialize: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgInitialize: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
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 ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Authority = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowTx
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *MsgInitializeResponse) 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 ErrIntOverflowTx
|
||||
}
|
||||
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: MsgInitializeResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: MsgInitializeResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthTx
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipTx(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
@ -1,37 +0,0 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
)
|
||||
|
||||
func (k Keeper) Logger() log.Logger {
|
||||
return k.logger
|
||||
}
|
||||
|
||||
// InitGenesis initializes the module's state from a genesis state.
|
||||
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
||||
// this line is used by starport scaffolding # genesis/module/init
|
||||
if err := data.Params.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return k.Params.Set(ctx, data.Params)
|
||||
}
|
||||
|
||||
// ExportGenesis exports the module's state to a genesis state.
|
||||
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
||||
params, err := k.Params.Get(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// this line is used by starport scaffolding # genesis/module/export
|
||||
|
||||
return &types.GenesisState{
|
||||
Params: params,
|
||||
}
|
||||
}
|
@ -1,31 +0,0 @@
|
||||
package keeper_test
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestORM(t *testing.T) {
|
||||
f := SetupTest(t)
|
||||
if f == nil {
|
||||
return
|
||||
}
|
||||
|
||||
// dt := f.k.OrmDB.ExampleDataTable()
|
||||
// acc := []byte("test_acc")
|
||||
// amt := uint64(7)
|
||||
//
|
||||
// err := dt.Insert(f.ctx, &apiv1.ExampleData{
|
||||
// Account: acc,
|
||||
// Amount: amt,
|
||||
// })
|
||||
// require.NoError(t, err)
|
||||
//
|
||||
// d, err := dt.Has(f.ctx, []byte("test_acc"))
|
||||
// require.NoError(t, err)
|
||||
// require.True(t, d)
|
||||
//
|
||||
// res, err := dt.Get(f.ctx, []byte("test_acc"))
|
||||
// require.NoError(t, err)
|
||||
// require.NotNil(t, res)
|
||||
// require.EqualValues(t, amt, res.Amount)
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
package types
|
||||
|
||||
import sdkerrors "cosmossdk.io/errors"
|
||||
|
||||
var (
|
||||
ErrInvalidGenesisState = sdkerrors.Register(ModuleName, 100, "invalid genesis state")
|
||||
ErrInvalidServiceOrigin = sdkerrors.Register(ModuleName, 200, "invalid service origin")
|
||||
ErrUnrecognizedService = sdkerrors.Register(ModuleName, 201, "unrecognized service")
|
||||
ErrInvalidServiceGroup = sdkerrors.Register(ModuleName, 202, "invalid group")
|
||||
)
|
@ -1,12 +1,12 @@
|
||||
# `x/service`
|
||||
# `x/svc`
|
||||
|
||||
The Service module is responsible for managing the registration and authorization of services within the Sonr ecosystem. It provides a secure and verifiable mechanism for registering and authorizing services using Decentralized Identifiers (DIDs).
|
||||
The svc module is responsible for managing the registration and authorization of services within the Sonr ecosystem. It provides a secure and verifiable mechanism for registering and authorizing services using Decentralized Identifiers (DIDs).
|
||||
|
||||
## Concepts
|
||||
|
||||
- **Service**: A decentralized service on the Sonr Blockchain with properties such as ID, authority, origin, name, description, category, tags, and expiry height.
|
||||
- **Service**: A decentralized svc on the Sonr Blockchain with properties such as ID, authority, origin, name, description, category, tags, and expiry height.
|
||||
- **Profile**: Represents a DID alias with properties like ID, subject, origin, and controller.
|
||||
- **Metadata**: Contains information about a service, including name, description, category, icon, and tags.
|
||||
- **Metadata**: Contains information about a svc, including name, description, category, icon, and tags.
|
||||
|
||||
### Dependencies
|
||||
|
||||
@ -42,14 +42,14 @@ Updates the module parameters. Can only be executed by the governance account.
|
||||
|
||||
### MsgRegisterService
|
||||
|
||||
Registers a new service on the blockchain. Requires a valid TXT record in DNS for the origin.
|
||||
Registers a new svc on the blockchain. Requires a valid TXT record in DNS for the origin.
|
||||
|
||||
## Params
|
||||
|
||||
The module has the following parameters:
|
||||
|
||||
- `categories`: List of allowed service categories
|
||||
- `types`: List of allowed service types
|
||||
- `categories`: List of allowed svc categories
|
||||
- `types`: List of allowed svc types
|
||||
|
||||
## Query
|
||||
|
||||
@ -63,7 +63,7 @@ Retrieves all parameters of the module.
|
||||
|
||||
### gRPC
|
||||
|
||||
The module provides a gRPC Query service with the following RPC:
|
||||
The module provides a gRPC Query svc with the following RPC:
|
||||
|
||||
- `Params`: Get all parameters of the module
|
||||
|
||||
@ -77,10 +77,10 @@ The module provides a gRPC Query service with the following RPC:
|
||||
|
||||
## Future Improvements
|
||||
|
||||
- Implement service discovery mechanisms
|
||||
- Add support for service reputation and rating systems
|
||||
- Enhance service metadata with more detailed information
|
||||
- Implement service update and deactivation functionality
|
||||
- Implement svc discovery mechanisms
|
||||
- Add support for svc reputation and rating systems
|
||||
- Enhance svc metadata with more detailed information
|
||||
- Implement svc update and deactivation functionality
|
||||
|
||||
## Tests
|
||||
|
||||
@ -88,4 +88,4 @@ The module provides a gRPC Query service with the following RPC:
|
||||
|
||||
## Appendix
|
||||
|
||||
This module is part of the Sonr blockchain project and interacts with other modules such as DID and NFT modules to provide a comprehensive decentralized service ecosystem.
|
||||
This module is part of the Sonr blockchain project and interacts with other modules such as DID and NFT modules to provide a comprehensive decentralized svc ecosystem.
|
@ -2,7 +2,7 @@ package module
|
||||
|
||||
import (
|
||||
autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
|
||||
modulev1 "github.com/onsonr/sonr/api/service/v1"
|
||||
modulev1 "github.com/onsonr/sonr/api/svc/v1"
|
||||
)
|
||||
|
||||
// AutoCLIOptions implements the autocli.HasAutoCLIConfig interface.
|
@ -6,7 +6,7 @@ import (
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
// !NOTE: Must enable in module.go (disabled in favor of autocli.go)
|
@ -1,13 +1,15 @@
|
||||
package cli
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
// !NOTE: Must enable in module.go (disabled in favor of autocli.go)
|
||||
@ -44,15 +46,15 @@ func MsgUpdateParams() *cobra.Command {
|
||||
|
||||
senderAddress := cliCtx.GetFromAddress()
|
||||
|
||||
// someValue, err := strconv.ParseBool(args[0])
|
||||
// if err != nil {
|
||||
// return err
|
||||
// }
|
||||
//
|
||||
someValue, err := strconv.ParseBool(args[0])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
msg := &types.MsgUpdateParams{
|
||||
Authority: senderAddress.String(),
|
||||
Params: types.Params{
|
||||
// SomeValue: someValue,
|
||||
Params: types.Params{
|
||||
SomeValue: someValue,
|
||||
},
|
||||
}
|
||||
|
@ -3,23 +3,21 @@ package module
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
"cosmossdk.io/core/address"
|
||||
"cosmossdk.io/core/appmodule"
|
||||
"cosmossdk.io/core/store"
|
||||
"cosmossdk.io/depinject"
|
||||
"cosmossdk.io/log"
|
||||
nftkeeper "cosmossdk.io/x/nft/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
modulev1 "github.com/onsonr/sonr/api/service/module/v1"
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
"github.com/onsonr/sonr/x/service/keeper"
|
||||
vaultkeeper "github.com/onsonr/sonr/x/vault/keeper"
|
||||
modulev1 "github.com/onsonr/sonr/api/svc/module/v1"
|
||||
"github.com/onsonr/sonr/x/svc/keeper"
|
||||
)
|
||||
|
||||
var _ appmodule.AppModule = AppModule{}
|
||||
@ -44,12 +42,8 @@ type ModuleInputs struct {
|
||||
StoreService store.KVStoreService
|
||||
AddressCodec address.Codec
|
||||
|
||||
DidKeeper didkeeper.Keeper
|
||||
GroupKeeper groupkeeper.Keeper
|
||||
NFTKeeper nftkeeper.Keeper
|
||||
StakingKeeper stakingkeeper.Keeper
|
||||
SlashingKeeper slashingkeeper.Keeper
|
||||
VaultKeeper vaultkeeper.Keeper
|
||||
}
|
||||
|
||||
type ModuleOutputs struct {
|
||||
@ -62,8 +56,8 @@ type ModuleOutputs struct {
|
||||
func ProvideModule(in ModuleInputs) ModuleOutputs {
|
||||
govAddr := authtypes.NewModuleAddress(govtypes.ModuleName).String()
|
||||
|
||||
k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr, in.DidKeeper, in.GroupKeeper, in.NFTKeeper, in.VaultKeeper)
|
||||
m := NewAppModule(in.Cdc, k, in.DidKeeper)
|
||||
k := keeper.NewKeeper(in.Cdc, in.StoreService, log.NewLogger(os.Stderr), govAddr)
|
||||
m := NewAppModule(in.Cdc, k)
|
||||
|
||||
return ModuleOutputs{Module: m, Keeper: k, Out: depinject.Out{}}
|
||||
}
|
@ -3,7 +3,7 @@ package keeper_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@ -12,8 +12,6 @@ func TestGenesis(t *testing.T) {
|
||||
|
||||
genesisState := &types.GenesisState{
|
||||
Params: types.DefaultParams(),
|
||||
|
||||
// this line is used by starport scaffolding # genesis/test/state
|
||||
}
|
||||
|
||||
f.k.InitGenesis(f.ctx, genesisState)
|
||||
@ -21,5 +19,4 @@ func TestGenesis(t *testing.T) {
|
||||
got := f.k.ExportGenesis(f.ctx)
|
||||
require.NotNil(t, got)
|
||||
|
||||
// this line is used by starport scaffolding # genesis/test/assert
|
||||
}
|
102
x/svc/keeper/keeper.go
Normal file
102
x/svc/keeper/keeper.go
Normal file
@ -0,0 +1,102 @@
|
||||
package keeper
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
storetypes "cosmossdk.io/core/store"
|
||||
"cosmossdk.io/log"
|
||||
"cosmossdk.io/orm/model/ormdb"
|
||||
|
||||
apiv1 "github.com/onsonr/sonr/api/svc/v1"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
type Keeper struct {
|
||||
cdc codec.BinaryCodec
|
||||
|
||||
logger log.Logger
|
||||
|
||||
// state management
|
||||
Schema collections.Schema
|
||||
Params collections.Item[types.Params]
|
||||
OrmDB apiv1.StateStore
|
||||
|
||||
authority string
|
||||
}
|
||||
|
||||
// NewKeeper creates a new Keeper instance
|
||||
func NewKeeper(
|
||||
cdc codec.BinaryCodec,
|
||||
storeService storetypes.KVStoreService,
|
||||
logger log.Logger,
|
||||
authority string,
|
||||
) Keeper {
|
||||
logger = logger.With(log.ModuleKey, "x/"+types.ModuleName)
|
||||
|
||||
sb := collections.NewSchemaBuilder(storeService)
|
||||
|
||||
if authority == "" {
|
||||
authority = authtypes.NewModuleAddress(govtypes.ModuleName).String()
|
||||
}
|
||||
|
||||
db, err := ormdb.NewModuleDB(&types.ORMModuleSchema, ormdb.ModuleDBOptions{KVStoreService: storeService})
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
store, err := apiv1.NewStateStore(db)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
k := Keeper{
|
||||
cdc: cdc,
|
||||
logger: logger,
|
||||
|
||||
Params: collections.NewItem(sb, types.ParamsKey, "params", codec.CollValue[types.Params](cdc)),
|
||||
OrmDB: store,
|
||||
|
||||
authority: authority,
|
||||
}
|
||||
|
||||
schema, err := sb.Build()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
k.Schema = schema
|
||||
|
||||
return k
|
||||
}
|
||||
|
||||
func (k Keeper) Logger() log.Logger {
|
||||
return k.logger
|
||||
}
|
||||
|
||||
// InitGenesis initializes the module's state from a genesis state.
|
||||
func (k *Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error {
|
||||
|
||||
if err := data.Params.Validate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return k.Params.Set(ctx, data.Params)
|
||||
}
|
||||
|
||||
// ExportGenesis exports the module's state to a genesis state.
|
||||
func (k *Keeper) ExportGenesis(ctx context.Context) *types.GenesisState {
|
||||
params, err := k.Params.Get(ctx)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
return &types.GenesisState{
|
||||
Params: params,
|
||||
}
|
||||
}
|
@ -3,12 +3,14 @@ package keeper_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"cosmossdk.io/core/store"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
"cosmossdk.io/log"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
nftkeeper "cosmossdk.io/x/nft/keeper"
|
||||
|
||||
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
"github.com/cosmos/cosmos-sdk/runtime"
|
||||
"github.com/cosmos/cosmos-sdk/testutil"
|
||||
"github.com/cosmos/cosmos-sdk/testutil/integration"
|
||||
simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
|
||||
@ -16,20 +18,16 @@ import (
|
||||
authkeeper "github.com/cosmos/cosmos-sdk/x/auth/keeper"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
|
||||
mintkeeper "github.com/cosmos/cosmos-sdk/x/mint/keeper"
|
||||
minttypes "github.com/cosmos/cosmos-sdk/x/mint/types"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/suite"
|
||||
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
module "github.com/onsonr/sonr/x/service"
|
||||
"github.com/onsonr/sonr/x/service/keeper"
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
vaultkeeper "github.com/onsonr/sonr/x/vault/keeper"
|
||||
module "github.com/onsonr/sonr/x/svc"
|
||||
"github.com/onsonr/sonr/x/svc/keeper"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
var maccPerms = map[string][]string{
|
||||
@ -51,12 +49,8 @@ type testFixture struct {
|
||||
|
||||
accountkeeper authkeeper.AccountKeeper
|
||||
bankkeeper bankkeeper.BaseKeeper
|
||||
didkeeper didkeeper.Keeper
|
||||
groupkeeper groupkeeper.Keeper
|
||||
stakingKeeper *stakingkeeper.Keeper
|
||||
mintkeeper mintkeeper.Keeper
|
||||
nftkeeper nftkeeper.Keeper
|
||||
vaultkeeper vaultkeeper.Keeper
|
||||
|
||||
addrs []sdk.AccAddress
|
||||
govModAddr string
|
||||
@ -65,7 +59,6 @@ type testFixture struct {
|
||||
func SetupTest(t *testing.T) *testFixture {
|
||||
t.Helper()
|
||||
f := new(testFixture)
|
||||
require := require.New(t)
|
||||
|
||||
// Base setup
|
||||
logger := log.NewTestLogger(t)
|
||||
@ -74,20 +67,17 @@ func SetupTest(t *testing.T) *testFixture {
|
||||
f.govModAddr = authtypes.NewModuleAddress(govtypes.ModuleName).String()
|
||||
f.addrs = simtestutil.CreateIncrementalAccounts(3)
|
||||
|
||||
key := storetypes.NewKVStoreKey(types.ModuleName)
|
||||
storeService := runtime.NewKVStoreService(key)
|
||||
testCtx := testutil.DefaultContextWithDB(t, key, storetypes.NewTransientStoreKey("transient_test"))
|
||||
|
||||
f.ctx = testCtx.Ctx
|
||||
keys := storetypes.NewKVStoreKeys(authtypes.ModuleName, banktypes.ModuleName, stakingtypes.ModuleName, minttypes.ModuleName, types.ModuleName)
|
||||
f.ctx = sdk.NewContext(integration.CreateMultiStore(keys, logger), cmtproto.Header{}, false, logger)
|
||||
|
||||
// Register SDK modules.
|
||||
registerBaseSDKModules(f, encCfg, storeService, logger, require)
|
||||
registerBaseSDKModules(logger, f, encCfg, keys)
|
||||
|
||||
// Setup Keeper.
|
||||
f.k = keeper.NewKeeper(encCfg.Codec, storeService, logger, f.govModAddr, f.didkeeper, f.groupkeeper, f.nftkeeper, f.vaultkeeper)
|
||||
f.k = keeper.NewKeeper(encCfg.Codec, runtime.NewKVStoreService(keys[types.ModuleName]), logger, f.govModAddr)
|
||||
f.msgServer = keeper.NewMsgServerImpl(f.k)
|
||||
f.queryServer = keeper.NewQuerier(f.k)
|
||||
f.appModule = module.NewAppModule(encCfg.Codec, f.k, f.didkeeper)
|
||||
f.appModule = module.NewAppModule(encCfg.Codec, f.k)
|
||||
|
||||
return f
|
||||
}
|
||||
@ -95,22 +85,23 @@ func SetupTest(t *testing.T) *testFixture {
|
||||
func registerModuleInterfaces(encCfg moduletestutil.TestEncodingConfig) {
|
||||
authtypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
stakingtypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
banktypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
minttypes.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
|
||||
types.RegisterInterfaces(encCfg.InterfaceRegistry)
|
||||
}
|
||||
|
||||
func registerBaseSDKModules(
|
||||
logger log.Logger,
|
||||
f *testFixture,
|
||||
encCfg moduletestutil.TestEncodingConfig,
|
||||
storeService store.KVStoreService,
|
||||
logger log.Logger,
|
||||
require *require.Assertions,
|
||||
keys map[string]*storetypes.KVStoreKey,
|
||||
) {
|
||||
registerModuleInterfaces(encCfg)
|
||||
|
||||
// Auth Keeper.
|
||||
f.accountkeeper = authkeeper.NewAccountKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[authtypes.StoreKey]),
|
||||
authtypes.ProtoBaseAccount,
|
||||
maccPerms,
|
||||
authcodec.NewBech32Codec(sdk.Bech32MainPrefix), sdk.Bech32MainPrefix,
|
||||
@ -119,7 +110,7 @@ func registerBaseSDKModules(
|
||||
|
||||
// Bank Keeper.
|
||||
f.bankkeeper = bankkeeper.NewBaseKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[banktypes.StoreKey]),
|
||||
f.accountkeeper,
|
||||
nil,
|
||||
f.govModAddr, logger,
|
||||
@ -127,21 +118,16 @@ func registerBaseSDKModules(
|
||||
|
||||
// Staking Keeper.
|
||||
f.stakingKeeper = stakingkeeper.NewKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[stakingtypes.StoreKey]),
|
||||
f.accountkeeper, f.bankkeeper, f.govModAddr,
|
||||
authcodec.NewBech32Codec(sdk.Bech32PrefixValAddr),
|
||||
authcodec.NewBech32Codec(sdk.Bech32PrefixConsAddr),
|
||||
)
|
||||
require.NoError(f.stakingKeeper.SetParams(f.ctx, stakingtypes.DefaultParams()))
|
||||
f.accountkeeper.SetModuleAccount(f.ctx, f.stakingKeeper.GetNotBondedPool(f.ctx))
|
||||
f.accountkeeper.SetModuleAccount(f.ctx, f.stakingKeeper.GetBondedPool(f.ctx))
|
||||
|
||||
// Mint Keeper.
|
||||
f.mintkeeper = mintkeeper.NewKeeper(
|
||||
encCfg.Codec, storeService,
|
||||
encCfg.Codec, runtime.NewKVStoreService(keys[minttypes.StoreKey]),
|
||||
f.stakingKeeper, f.accountkeeper, f.bankkeeper,
|
||||
authtypes.FeeCollectorName, f.govModAddr,
|
||||
)
|
||||
f.accountkeeper.SetModuleAccount(f.ctx, f.accountkeeper.GetModuleAccount(f.ctx, minttypes.ModuleName))
|
||||
f.mintkeeper.InitGenesis(f.ctx, f.accountkeeper, minttypes.DefaultGenesisState())
|
||||
}
|
@ -6,7 +6,7 @@ import (
|
||||
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||
|
||||
"cosmossdk.io/errors"
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
type msgServer struct {
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
func TestParams(t *testing.T) {
|
@ -5,7 +5,7 @@ import (
|
||||
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
var _ types.QueryServer = Querier{}
|
@ -4,27 +4,27 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
|
||||
"cosmossdk.io/client/v2/autocli"
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
abci "github.com/cometbft/cometbft/abci/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/codec"
|
||||
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/module"
|
||||
"github.com/gorilla/mux"
|
||||
"github.com/grpc-ecosystem/grpc-gateway/runtime"
|
||||
|
||||
didkeeper "github.com/onsonr/sonr/x/did/keeper"
|
||||
"github.com/onsonr/sonr/x/vault/keeper"
|
||||
"github.com/onsonr/sonr/x/vault/types"
|
||||
"github.com/onsonr/sonr/x/svc/keeper"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
)
|
||||
|
||||
const (
|
||||
// ConsensusVersion defines the current x/vault module consensus version.
|
||||
// ConsensusVersion defines the current x/svc module consensus version.
|
||||
ConsensusVersion = 1
|
||||
|
||||
// this line is used by starport scaffolding # simapp/module/const
|
||||
)
|
||||
|
||||
var (
|
||||
@ -44,19 +44,16 @@ type AppModule struct {
|
||||
AppModuleBasic
|
||||
|
||||
keeper keeper.Keeper
|
||||
didk didkeeper.Keeper
|
||||
}
|
||||
|
||||
// NewAppModule constructor
|
||||
func NewAppModule(
|
||||
cdc codec.Codec,
|
||||
keeper keeper.Keeper,
|
||||
didkeeper didkeeper.Keeper,
|
||||
) *AppModule {
|
||||
return &AppModule{
|
||||
AppModuleBasic: AppModuleBasic{cdc: cdc},
|
||||
keeper: keeper,
|
||||
didk: didkeeper,
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,6 +90,17 @@ func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux
|
||||
}
|
||||
}
|
||||
|
||||
// Disable in favor of autocli.go. If you wish to use these, it will override AutoCLI methods.
|
||||
/*
|
||||
func (a AppModuleBasic) GetTxCmd() *cobra.Command {
|
||||
return cli.NewTxCmd()
|
||||
}
|
||||
|
||||
func (a AppModuleBasic) GetQueryCmd() *cobra.Command {
|
||||
return cli.GetQueryCmd()
|
||||
}
|
||||
*/
|
||||
|
||||
func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||
types.RegisterLegacyAminoCodec(cdc)
|
||||
}
|
@ -6,7 +6,6 @@ import (
|
||||
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/msgservice"
|
||||
// this line is used by starport scaffolding # 1
|
||||
)
|
||||
|
||||
var (
|
||||
@ -26,7 +25,6 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
|
||||
}
|
||||
|
||||
func RegisterInterfaces(registry types.InterfaceRegistry) {
|
||||
// this line is used by starport scaffolding # 3
|
||||
|
||||
registry.RegisterImplementations(
|
||||
(*sdk.Msg)(nil),
|
@ -1,14 +1,12 @@
|
||||
package types
|
||||
|
||||
// this line is used by starport scaffolding # genesis/types/import
|
||||
|
||||
// DefaultIndex is the default global index
|
||||
const DefaultIndex uint64 = 1
|
||||
|
||||
// DefaultGenesis returns the default genesis state
|
||||
func DefaultGenesis() *GenesisState {
|
||||
return &GenesisState{
|
||||
// this line is used by starport scaffolding # genesis/types/default
|
||||
|
||||
Params: DefaultParams(),
|
||||
}
|
||||
}
|
||||
@ -16,6 +14,6 @@ func DefaultGenesis() *GenesisState {
|
||||
// Validate performs basic genesis state validation returning an error upon any
|
||||
// failure.
|
||||
func (gs GenesisState) Validate() error {
|
||||
// this line is used by starport scaffolding # genesis/types/validate
|
||||
|
||||
return gs.Params.Validate()
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||
// source: service/v1/genesis.proto
|
||||
// source: svc/v1/genesis.proto
|
||||
|
||||
package types
|
||||
|
||||
@ -34,7 +34,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} }
|
||||
func (m *GenesisState) String() string { return proto.CompactTextString(m) }
|
||||
func (*GenesisState) ProtoMessage() {}
|
||||
func (*GenesisState) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0ce55e499988823a, []int{0}
|
||||
return fileDescriptor_86658d95daaa12a9, []int{0}
|
||||
}
|
||||
func (m *GenesisState) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -79,7 +79,7 @@ type Params struct {
|
||||
func (m *Params) Reset() { *m = Params{} }
|
||||
func (*Params) ProtoMessage() {}
|
||||
func (*Params) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0ce55e499988823a, []int{1}
|
||||
return fileDescriptor_86658d95daaa12a9, []int{1}
|
||||
}
|
||||
func (m *Params) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -130,7 +130,7 @@ func (m *ServiceCategories) Reset() { *m = ServiceCategories{} }
|
||||
func (m *ServiceCategories) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServiceCategories) ProtoMessage() {}
|
||||
func (*ServiceCategories) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0ce55e499988823a, []int{2}
|
||||
return fileDescriptor_86658d95daaa12a9, []int{2}
|
||||
}
|
||||
func (m *ServiceCategories) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -174,7 +174,7 @@ func (m *ServiceTypes) Reset() { *m = ServiceTypes{} }
|
||||
func (m *ServiceTypes) String() string { return proto.CompactTextString(m) }
|
||||
func (*ServiceTypes) ProtoMessage() {}
|
||||
func (*ServiceTypes) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0ce55e499988823a, []int{3}
|
||||
return fileDescriptor_86658d95daaa12a9, []int{3}
|
||||
}
|
||||
func (m *ServiceTypes) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -226,7 +226,7 @@ func (m *Service) Reset() { *m = Service{} }
|
||||
func (m *Service) String() string { return proto.CompactTextString(m) }
|
||||
func (*Service) ProtoMessage() {}
|
||||
func (*Service) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_0ce55e499988823a, []int{4}
|
||||
return fileDescriptor_86658d95daaa12a9, []int{4}
|
||||
}
|
||||
func (m *Service) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@ -312,45 +312,45 @@ func (m *Service) GetExpiryHeight() int64 {
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*GenesisState)(nil), "service.v1.GenesisState")
|
||||
proto.RegisterType((*Params)(nil), "service.v1.Params")
|
||||
proto.RegisterType((*ServiceCategories)(nil), "service.v1.ServiceCategories")
|
||||
proto.RegisterType((*ServiceTypes)(nil), "service.v1.ServiceTypes")
|
||||
proto.RegisterType((*Service)(nil), "service.v1.Service")
|
||||
proto.RegisterType((*GenesisState)(nil), "svc.v1.GenesisState")
|
||||
proto.RegisterType((*Params)(nil), "svc.v1.Params")
|
||||
proto.RegisterType((*ServiceCategories)(nil), "svc.v1.ServiceCategories")
|
||||
proto.RegisterType((*ServiceTypes)(nil), "svc.v1.ServiceTypes")
|
||||
proto.RegisterType((*Service)(nil), "svc.v1.Service")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("service/v1/genesis.proto", fileDescriptor_0ce55e499988823a) }
|
||||
func init() { proto.RegisterFile("svc/v1/genesis.proto", fileDescriptor_86658d95daaa12a9) }
|
||||
|
||||
var fileDescriptor_0ce55e499988823a = []byte{
|
||||
// 442 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xbf, 0x6e, 0x13, 0x41,
|
||||
0x10, 0xc6, 0x6f, 0x6d, 0xe7, 0x12, 0x4f, 0x9c, 0x48, 0x19, 0x45, 0xd1, 0xca, 0x81, 0xb3, 0x65,
|
||||
0x24, 0x64, 0x51, 0xdc, 0x11, 0xe8, 0x22, 0x90, 0xa2, 0x50, 0x40, 0x19, 0x5d, 0xa8, 0x68, 0xd0,
|
||||
0xc5, 0x5e, 0xad, 0xb7, 0xf0, 0xed, 0x69, 0x77, 0x63, 0xc5, 0xaf, 0x40, 0x45, 0x41, 0x41, 0x99,
|
||||
0x47, 0xe0, 0x31, 0x52, 0xa6, 0x44, 0x14, 0x08, 0xd9, 0x05, 0x3c, 0x06, 0xf2, 0xec, 0x9d, 0x7d,
|
||||
0xfc, 0x69, 0x56, 0xb3, 0xdf, 0xb7, 0xf3, 0xbb, 0x6f, 0x46, 0x07, 0xdc, 0x0a, 0x33, 0x53, 0x23,
|
||||
0x91, 0xcc, 0x4e, 0x12, 0x29, 0x72, 0x61, 0x95, 0x8d, 0x0b, 0xa3, 0x9d, 0x46, 0x28, 0x9d, 0x78,
|
||||
0x76, 0xd2, 0x3d, 0xc8, 0xa6, 0x2a, 0xd7, 0x09, 0x9d, 0xde, 0xee, 0x1e, 0x4a, 0x2d, 0x35, 0x95,
|
||||
0xc9, 0xaa, 0xf2, 0xea, 0xe0, 0x0c, 0x3a, 0xaf, 0x3d, 0xe5, 0xd2, 0x65, 0x4e, 0xe0, 0x53, 0x08,
|
||||
0x8b, 0xcc, 0x64, 0x53, 0xcb, 0x59, 0x9f, 0x0d, 0x77, 0x9f, 0x61, 0xbc, 0xa1, 0xc6, 0x17, 0xe4,
|
||||
0x9c, 0xb7, 0xee, 0xbe, 0xf7, 0x82, 0xb4, 0x7c, 0x37, 0xf8, 0xc4, 0x20, 0xf4, 0x06, 0xbe, 0x04,
|
||||
0x18, 0x65, 0x4e, 0x48, 0x6d, 0x94, 0xa8, 0x00, 0x0f, 0xeb, 0x80, 0x4b, 0x5f, 0xbe, 0x5a, 0x3f,
|
||||
0x4a, 0x6b, 0x0d, 0x18, 0xc3, 0x96, 0x9b, 0x17, 0xc2, 0xf2, 0x06, 0x75, 0xf2, 0xff, 0x74, 0xbe,
|
||||
0x5d, 0xf9, 0xa9, 0x7f, 0x76, 0x7a, 0xfc, 0xf9, 0xb6, 0x17, 0xfc, 0xba, 0xed, 0xb1, 0x0f, 0x3f,
|
||||
0xbf, 0x3c, 0xd9, 0xaf, 0xf6, 0x52, 0xc6, 0xba, 0x80, 0x83, 0x7f, 0xbe, 0x86, 0xd1, 0x5f, 0x01,
|
||||
0x9b, 0xc3, 0x76, 0x3d, 0xc1, 0xe9, 0x71, 0x45, 0xc3, 0x8a, 0xb6, 0x31, 0x07, 0x2f, 0xa0, 0x53,
|
||||
0x4f, 0x81, 0x87, 0x55, 0x5c, 0xcf, 0x29, 0x43, 0x1d, 0x55, 0x88, 0xbd, 0x0a, 0x41, 0xfa, 0xe0,
|
||||
0x1b, 0x83, 0xed, 0xb2, 0x1d, 0xf7, 0xa1, 0xa1, 0xc6, 0xb4, 0x9f, 0x76, 0xda, 0x50, 0x63, 0x7c,
|
||||
0x00, 0xed, 0xec, 0xda, 0x4d, 0xb4, 0x51, 0x6e, 0x4e, 0xc3, 0xb7, 0xd3, 0x8d, 0x80, 0x47, 0x10,
|
||||
0x6a, 0xa3, 0xa4, 0xca, 0x79, 0x93, 0xac, 0xf2, 0x86, 0x08, 0xad, 0x3c, 0x9b, 0x0a, 0xde, 0x22,
|
||||
0x95, 0x6a, 0xec, 0xc3, 0xee, 0x58, 0xd8, 0x91, 0x51, 0x85, 0x53, 0x3a, 0xe7, 0x5b, 0x64, 0xd5,
|
||||
0x25, 0xec, 0xc2, 0x4e, 0x39, 0xd3, 0x9c, 0x87, 0x64, 0xaf, 0xef, 0x2b, 0xa2, 0xcb, 0xa4, 0xe5,
|
||||
0xdb, 0x34, 0x10, 0xd5, 0xf8, 0x08, 0xf6, 0xc4, 0x4d, 0xa1, 0xcc, 0xfc, 0xfd, 0x44, 0x28, 0x39,
|
||||
0x71, 0x7c, 0xa7, 0xcf, 0x86, 0xcd, 0xb4, 0xe3, 0xc5, 0x37, 0xa4, 0x9d, 0x9f, 0xdd, 0x2d, 0x22,
|
||||
0x76, 0xbf, 0x88, 0xd8, 0x8f, 0x45, 0xc4, 0x3e, 0x2e, 0xa3, 0xe0, 0x7e, 0x19, 0x05, 0x5f, 0x97,
|
||||
0x51, 0xf0, 0xee, 0xb1, 0x54, 0x6e, 0x72, 0x7d, 0x15, 0x8f, 0xf4, 0x34, 0xd1, 0xb9, 0xd5, 0xb9,
|
||||
0x49, 0xe8, 0xb8, 0x49, 0xfe, 0x58, 0xcf, 0x55, 0x48, 0xbf, 0xe3, 0xf3, 0xdf, 0x01, 0x00, 0x00,
|
||||
0xff, 0xff, 0xe6, 0x6d, 0xb2, 0xb0, 0xdf, 0x02, 0x00, 0x00,
|
||||
var fileDescriptor_86658d95daaa12a9 = []byte{
|
||||
// 441 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x52, 0xb1, 0x6e, 0xdb, 0x30,
|
||||
0x10, 0x15, 0x6d, 0x47, 0x89, 0x2f, 0x89, 0x81, 0x10, 0x46, 0xa0, 0x3a, 0x85, 0x6c, 0xb8, 0x8b,
|
||||
0x11, 0x14, 0x22, 0xd2, 0x4e, 0x0d, 0x32, 0xa5, 0x43, 0x3b, 0x06, 0x4a, 0xa7, 0x2e, 0x05, 0x23,
|
||||
0x13, 0x34, 0x07, 0x8b, 0x02, 0xc9, 0x08, 0xf1, 0x2f, 0x14, 0x1d, 0x3a, 0x76, 0xcc, 0x27, 0xf4,
|
||||
0x33, 0x32, 0x66, 0x2c, 0x3a, 0x14, 0x85, 0x3d, 0xb4, 0x9f, 0x51, 0xe8, 0x28, 0x25, 0x42, 0xba,
|
||||
0x10, 0xc7, 0xf7, 0xee, 0x3d, 0xbe, 0x3b, 0x10, 0x86, 0xb6, 0xcc, 0x58, 0x79, 0xc2, 0xa4, 0xc8,
|
||||
0x85, 0x55, 0x36, 0x29, 0x8c, 0x76, 0x9a, 0x86, 0xb6, 0xcc, 0x92, 0xf2, 0x64, 0x34, 0x94, 0x5a,
|
||||
0x6a, 0x84, 0x58, 0x55, 0x79, 0x76, 0x74, 0xc0, 0x97, 0x2a, 0xd7, 0x0c, 0x4f, 0x0f, 0x4d, 0xcf,
|
||||
0x60, 0xef, 0x9d, 0x77, 0xb8, 0x74, 0xdc, 0x09, 0xfa, 0x12, 0xc2, 0x82, 0x1b, 0xbe, 0xb4, 0x11,
|
||||
0x99, 0x90, 0xd9, 0xee, 0xab, 0x41, 0xe2, 0x1d, 0x93, 0x0b, 0x44, 0xcf, 0x7b, 0x77, 0xbf, 0xc6,
|
||||
0x41, 0x5a, 0xf7, 0x4c, 0xbf, 0x10, 0x08, 0x3d, 0x41, 0xdf, 0x00, 0x64, 0xdc, 0x09, 0xa9, 0x8d,
|
||||
0x12, 0x8d, 0xf8, 0x59, 0x23, 0xbe, 0x14, 0xa6, 0x54, 0x99, 0x78, 0xfb, 0xd0, 0x90, 0xb6, 0x9a,
|
||||
0xe9, 0x31, 0x6c, 0xb9, 0x55, 0x21, 0x6c, 0xd4, 0x41, 0xd5, 0xf0, 0x89, 0xea, 0x43, 0xc5, 0xa5,
|
||||
0xbe, 0xe5, 0xf4, 0xe8, 0xdb, 0xed, 0x38, 0xf8, 0x7b, 0x3b, 0x26, 0x9f, 0xff, 0x7c, 0x3f, 0x1e,
|
||||
0x58, 0xdf, 0xc1, 0xea, 0x38, 0x17, 0x70, 0xf0, 0xdf, 0x4b, 0x34, 0x7e, 0x12, 0xac, 0x3b, 0xeb,
|
||||
0xb7, 0x5f, 0x3f, 0x3d, 0x6a, 0xdc, 0x68, 0xe3, 0xf6, 0x48, 0x56, 0xeb, 0x69, 0xa7, 0xa0, 0xc3,
|
||||
0x26, 0xaa, 0xf7, 0xa9, 0x43, 0x1d, 0x36, 0x16, 0xfb, 0x8d, 0x05, 0xe2, 0xd3, 0x9f, 0x04, 0xb6,
|
||||
0x6b, 0x39, 0x1d, 0x40, 0x47, 0xcd, 0x71, 0x2f, 0xfd, 0xb4, 0xa3, 0xe6, 0xf4, 0x39, 0xf4, 0xf9,
|
||||
0xb5, 0x5b, 0x68, 0xa3, 0xdc, 0x0a, 0x07, 0xef, 0xa7, 0x8f, 0x00, 0x3d, 0x84, 0x50, 0x1b, 0x25,
|
||||
0x55, 0x1e, 0x75, 0x91, 0xaa, 0x6f, 0x94, 0x42, 0x2f, 0xe7, 0x4b, 0x11, 0xf5, 0x10, 0xc5, 0x9a,
|
||||
0x4e, 0x60, 0x77, 0x2e, 0x6c, 0x66, 0x54, 0xe1, 0x94, 0xce, 0xa3, 0x2d, 0xa4, 0xda, 0x10, 0x1d,
|
||||
0xc1, 0x4e, 0x3d, 0xd3, 0x2a, 0x0a, 0x91, 0x7e, 0xb8, 0x57, 0x8e, 0x8e, 0x4b, 0x1b, 0x6d, 0xe3,
|
||||
0x40, 0x58, 0xd3, 0x17, 0xb0, 0x2f, 0x6e, 0x0a, 0x65, 0x56, 0x9f, 0x16, 0x42, 0xc9, 0x85, 0x8b,
|
||||
0x76, 0x26, 0x64, 0xd6, 0x4d, 0xf7, 0x3c, 0xf8, 0x1e, 0xb1, 0xf3, 0xb3, 0xbb, 0x75, 0x4c, 0xee,
|
||||
0xd7, 0x31, 0xf9, 0xbd, 0x8e, 0xc9, 0xd7, 0x4d, 0x1c, 0xdc, 0x6f, 0xe2, 0xe0, 0xc7, 0x26, 0x0e,
|
||||
0x3e, 0x4e, 0xa5, 0x72, 0x8b, 0xeb, 0xab, 0x24, 0xd3, 0x4b, 0xa6, 0x73, 0xab, 0x73, 0xc3, 0xf0,
|
||||
0xb8, 0x61, 0xd5, 0x9f, 0xc5, 0xd5, 0x5c, 0x85, 0xf8, 0xfd, 0x5e, 0xff, 0x0b, 0x00, 0x00, 0xff,
|
||||
0xff, 0x50, 0x14, 0xc4, 0xe2, 0xc7, 0x02, 0x00, 0x00,
|
||||
}
|
||||
|
||||
func (this *Params) Equal(that interface{}) bool {
|
@ -3,7 +3,7 @@ package types_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/onsonr/sonr/x/service/types"
|
||||
"github.com/onsonr/sonr/x/svc/types"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@ -21,13 +21,9 @@ func TestGenesisState_Validate(t *testing.T) {
|
||||
},
|
||||
{
|
||||
desc: "valid genesis state",
|
||||
genState: &types.GenesisState{
|
||||
|
||||
// this line is used by starport scaffolding # types/genesis/validField
|
||||
},
|
||||
valid: true,
|
||||
genState: &types.GenesisState{},
|
||||
valid: true,
|
||||
},
|
||||
// this line is used by starport scaffolding # types/genesis/testcase
|
||||
}
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.desc, func(t *testing.T) {
|
@ -12,7 +12,7 @@ var (
|
||||
)
|
||||
|
||||
const (
|
||||
ModuleName = "service"
|
||||
ModuleName = "svc"
|
||||
|
||||
StoreKey = ModuleName
|
||||
|
||||
@ -21,7 +21,7 @@ const (
|
||||
|
||||
var ORMModuleSchema = ormv1alpha1.ModuleSchemaDescriptor{
|
||||
SchemaFile: []*ormv1alpha1.ModuleSchemaDescriptor_FileEntry{
|
||||
{Id: 1, ProtoFileName: "service/v1/state.proto"},
|
||||
{Id: 1, ProtoFileName: "svc/v1/state.proto"},
|
||||
},
|
||||
Prefix: []byte{0},
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user