feature/did swt ante (#22)

* feat: add support for vault allocation

* feat(dwn): Add IPFS client

* refactor: move GetDefaultBypassFeeMessages to ibc/module.go

* refactor(did): clean up genesis state definition

* feat: remove global integrity proof requirement

* feat: remove gas consumption for tx size

* feat: add registration route

* refactor: centralize response handling in the  package

* feat(types): add account and pubkey types

* refactor: simplify dockerfile process-compose.yaml copy
This commit is contained in:
Prad Nukala
2024-09-24 17:54:33 -04:00
committed by GitHub
parent 750559ff19
commit 97b3f9836a
184 changed files with 4020 additions and 18495 deletions
+5 -763
View File
@@ -16,16 +16,14 @@ import (
)
var (
md_GenesisState protoreflect.MessageDescriptor
fd_GenesisState_params protoreflect.FieldDescriptor
fd_GenesisState_global_integrity protoreflect.FieldDescriptor
md_GenesisState protoreflect.MessageDescriptor
fd_GenesisState_params protoreflect.FieldDescriptor
)
func init() {
file_did_v1_genesis_proto_init()
md_GenesisState = File_did_v1_genesis_proto.Messages().ByName("GenesisState")
fd_GenesisState_params = md_GenesisState.Fields().ByName("params")
fd_GenesisState_global_integrity = md_GenesisState.Fields().ByName("global_integrity")
}
var _ protoreflect.Message = (*fastReflection_GenesisState)(nil)
@@ -99,12 +97,6 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor,
return
}
}
if x.GlobalIntegrity != nil {
value := protoreflect.ValueOfMessage(x.GlobalIntegrity.ProtoReflect())
if !f(fd_GenesisState_global_integrity, value) {
return
}
}
}
// Has reports whether a field is populated.
@@ -122,8 +114,6 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool
switch fd.FullName() {
case "did.v1.GenesisState.params":
return x.Params != nil
case "did.v1.GenesisState.global_integrity":
return x.GlobalIntegrity != nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GenesisState"))
@@ -142,8 +132,6 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.GenesisState.params":
x.Params = nil
case "did.v1.GenesisState.global_integrity":
x.GlobalIntegrity = nil
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GenesisState"))
@@ -163,9 +151,6 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto
case "did.v1.GenesisState.params":
value := x.Params
return protoreflect.ValueOfMessage(value.ProtoReflect())
case "did.v1.GenesisState.global_integrity":
value := x.GlobalIntegrity
return protoreflect.ValueOfMessage(value.ProtoReflect())
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GenesisState"))
@@ -188,8 +173,6 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value
switch fd.FullName() {
case "did.v1.GenesisState.params":
x.Params = value.Message().Interface().(*Params)
case "did.v1.GenesisState.global_integrity":
x.GlobalIntegrity = value.Message().Interface().(*GlobalIntegrity)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GenesisState"))
@@ -215,11 +198,6 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p
x.Params = new(Params)
}
return protoreflect.ValueOfMessage(x.Params.ProtoReflect())
case "did.v1.GenesisState.global_integrity":
if x.GlobalIntegrity == nil {
x.GlobalIntegrity = new(GlobalIntegrity)
}
return protoreflect.ValueOfMessage(x.GlobalIntegrity.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GenesisState"))
@@ -236,9 +214,6 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor)
case "did.v1.GenesisState.params":
m := new(Params)
return protoreflect.ValueOfMessage(m.ProtoReflect())
case "did.v1.GenesisState.global_integrity":
m := new(GlobalIntegrity)
return protoreflect.ValueOfMessage(m.ProtoReflect())
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GenesisState"))
@@ -312,10 +287,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
l = options.Size(x.Params)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.GlobalIntegrity != nil {
l = options.Size(x.GlobalIntegrity)
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil {
n += len(x.unknownFields)
}
@@ -345,20 +316,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields)
}
if x.GlobalIntegrity != nil {
encoded, err := options.Marshal(x.GlobalIntegrity)
if err != nil {
return protoiface.MarshalOutput{
NoUnkeyedLiterals: input.NoUnkeyedLiterals,
Buf: input.Buf,
}, err
}
i -= len(encoded)
copy(dAtA[i:], encoded)
i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded)))
i--
dAtA[i] = 0x12
}
if x.Params != nil {
encoded, err := options.Marshal(x.Params)
if err != nil {
@@ -458,640 +415,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GlobalIntegrity", 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.GlobalIntegrity == nil {
x.GlobalIntegrity = &GlobalIntegrity{}
}
if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GlobalIntegrity); err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
iNdEx = postIndex
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
if err != nil {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err
}
if (skippy < 0) || (iNdEx+skippy) < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
if (iNdEx + skippy) > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
if !options.DiscardUnknown {
x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...)
}
iNdEx += skippy
}
}
if iNdEx > l {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF
}
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil
}
return &protoiface.Methods{
NoUnkeyedLiterals: struct{}{},
Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown,
Size: size,
Marshal: marshal,
Unmarshal: unmarshal,
Merge: nil,
CheckInitialized: nil,
}
}
var (
md_GlobalIntegrity protoreflect.MessageDescriptor
fd_GlobalIntegrity_controller protoreflect.FieldDescriptor
fd_GlobalIntegrity_seed protoreflect.FieldDescriptor
fd_GlobalIntegrity_accumulator protoreflect.FieldDescriptor
fd_GlobalIntegrity_count protoreflect.FieldDescriptor
)
func init() {
file_did_v1_genesis_proto_init()
md_GlobalIntegrity = File_did_v1_genesis_proto.Messages().ByName("GlobalIntegrity")
fd_GlobalIntegrity_controller = md_GlobalIntegrity.Fields().ByName("controller")
fd_GlobalIntegrity_seed = md_GlobalIntegrity.Fields().ByName("seed")
fd_GlobalIntegrity_accumulator = md_GlobalIntegrity.Fields().ByName("accumulator")
fd_GlobalIntegrity_count = md_GlobalIntegrity.Fields().ByName("count")
}
var _ protoreflect.Message = (*fastReflection_GlobalIntegrity)(nil)
type fastReflection_GlobalIntegrity GlobalIntegrity
func (x *GlobalIntegrity) ProtoReflect() protoreflect.Message {
return (*fastReflection_GlobalIntegrity)(x)
}
func (x *GlobalIntegrity) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_genesis_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_GlobalIntegrity_messageType fastReflection_GlobalIntegrity_messageType
var _ protoreflect.MessageType = fastReflection_GlobalIntegrity_messageType{}
type fastReflection_GlobalIntegrity_messageType struct{}
func (x fastReflection_GlobalIntegrity_messageType) Zero() protoreflect.Message {
return (*fastReflection_GlobalIntegrity)(nil)
}
func (x fastReflection_GlobalIntegrity_messageType) New() protoreflect.Message {
return new(fastReflection_GlobalIntegrity)
}
func (x fastReflection_GlobalIntegrity_messageType) Descriptor() protoreflect.MessageDescriptor {
return md_GlobalIntegrity
}
// Descriptor returns message descriptor, which contains only the protobuf
// type information for the message.
func (x *fastReflection_GlobalIntegrity) Descriptor() protoreflect.MessageDescriptor {
return md_GlobalIntegrity
}
// 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_GlobalIntegrity) Type() protoreflect.MessageType {
return _fastReflection_GlobalIntegrity_messageType
}
// New returns a newly allocated and mutable empty message.
func (x *fastReflection_GlobalIntegrity) New() protoreflect.Message {
return new(fastReflection_GlobalIntegrity)
}
// Interface unwraps the message reflection interface and
// returns the underlying ProtoMessage interface.
func (x *fastReflection_GlobalIntegrity) Interface() protoreflect.ProtoMessage {
return (*GlobalIntegrity)(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_GlobalIntegrity) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) {
if x.Controller != "" {
value := protoreflect.ValueOfString(x.Controller)
if !f(fd_GlobalIntegrity_controller, value) {
return
}
}
if x.Seed != "" {
value := protoreflect.ValueOfString(x.Seed)
if !f(fd_GlobalIntegrity_seed, value) {
return
}
}
if len(x.Accumulator) != 0 {
value := protoreflect.ValueOfBytes(x.Accumulator)
if !f(fd_GlobalIntegrity_accumulator, value) {
return
}
}
if x.Count != uint64(0) {
value := protoreflect.ValueOfUint64(x.Count)
if !f(fd_GlobalIntegrity_count, 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_GlobalIntegrity) Has(fd protoreflect.FieldDescriptor) bool {
switch fd.FullName() {
case "did.v1.GlobalIntegrity.controller":
return x.Controller != ""
case "did.v1.GlobalIntegrity.seed":
return x.Seed != ""
case "did.v1.GlobalIntegrity.accumulator":
return len(x.Accumulator) != 0
case "did.v1.GlobalIntegrity.count":
return x.Count != uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GlobalIntegrity"))
}
panic(fmt.Errorf("message did.v1.GlobalIntegrity 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_GlobalIntegrity) Clear(fd protoreflect.FieldDescriptor) {
switch fd.FullName() {
case "did.v1.GlobalIntegrity.controller":
x.Controller = ""
case "did.v1.GlobalIntegrity.seed":
x.Seed = ""
case "did.v1.GlobalIntegrity.accumulator":
x.Accumulator = nil
case "did.v1.GlobalIntegrity.count":
x.Count = uint64(0)
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GlobalIntegrity"))
}
panic(fmt.Errorf("message did.v1.GlobalIntegrity 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_GlobalIntegrity) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value {
switch descriptor.FullName() {
case "did.v1.GlobalIntegrity.controller":
value := x.Controller
return protoreflect.ValueOfString(value)
case "did.v1.GlobalIntegrity.seed":
value := x.Seed
return protoreflect.ValueOfString(value)
case "did.v1.GlobalIntegrity.accumulator":
value := x.Accumulator
return protoreflect.ValueOfBytes(value)
case "did.v1.GlobalIntegrity.count":
value := x.Count
return protoreflect.ValueOfUint64(value)
default:
if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GlobalIntegrity"))
}
panic(fmt.Errorf("message did.v1.GlobalIntegrity 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_GlobalIntegrity) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) {
switch fd.FullName() {
case "did.v1.GlobalIntegrity.controller":
x.Controller = value.Interface().(string)
case "did.v1.GlobalIntegrity.seed":
x.Seed = value.Interface().(string)
case "did.v1.GlobalIntegrity.accumulator":
x.Accumulator = value.Bytes()
case "did.v1.GlobalIntegrity.count":
x.Count = value.Uint()
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GlobalIntegrity"))
}
panic(fmt.Errorf("message did.v1.GlobalIntegrity 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_GlobalIntegrity) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.GlobalIntegrity.controller":
panic(fmt.Errorf("field controller of message did.v1.GlobalIntegrity is not mutable"))
case "did.v1.GlobalIntegrity.seed":
panic(fmt.Errorf("field seed of message did.v1.GlobalIntegrity is not mutable"))
case "did.v1.GlobalIntegrity.accumulator":
panic(fmt.Errorf("field accumulator of message did.v1.GlobalIntegrity is not mutable"))
case "did.v1.GlobalIntegrity.count":
panic(fmt.Errorf("field count of message did.v1.GlobalIntegrity is not mutable"))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GlobalIntegrity"))
}
panic(fmt.Errorf("message did.v1.GlobalIntegrity 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_GlobalIntegrity) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value {
switch fd.FullName() {
case "did.v1.GlobalIntegrity.controller":
return protoreflect.ValueOfString("")
case "did.v1.GlobalIntegrity.seed":
return protoreflect.ValueOfString("")
case "did.v1.GlobalIntegrity.accumulator":
return protoreflect.ValueOfBytes(nil)
case "did.v1.GlobalIntegrity.count":
return protoreflect.ValueOfUint64(uint64(0))
default:
if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.GlobalIntegrity"))
}
panic(fmt.Errorf("message did.v1.GlobalIntegrity 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_GlobalIntegrity) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor {
switch d.FullName() {
default:
panic(fmt.Errorf("%s is not a oneof field in did.v1.GlobalIntegrity", 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_GlobalIntegrity) 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_GlobalIntegrity) 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_GlobalIntegrity) 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_GlobalIntegrity) ProtoMethods() *protoiface.Methods {
size := func(input protoiface.SizeInput) protoiface.SizeOutput {
x := input.Message.Interface().(*GlobalIntegrity)
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.Controller)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Seed)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.Accumulator)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.Count != 0 {
n += 1 + runtime.Sov(uint64(x.Count))
}
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().(*GlobalIntegrity)
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.Count != 0 {
i = runtime.EncodeVarint(dAtA, i, uint64(x.Count))
i--
dAtA[i] = 0x20
}
if len(x.Accumulator) > 0 {
i -= len(x.Accumulator)
copy(dAtA[i:], x.Accumulator)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator)))
i--
dAtA[i] = 0x1a
}
if len(x.Seed) > 0 {
i -= len(x.Seed)
copy(dAtA[i:], x.Seed)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Seed)))
i--
dAtA[i] = 0x12
}
if len(x.Controller) > 0 {
i -= len(x.Controller)
copy(dAtA[i:], x.Controller)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller)))
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().(*GlobalIntegrity)
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: GlobalIntegrity: wiretype end group for non-group")
}
if fieldNum <= 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: GlobalIntegrity: 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 Controller", wireType)
}
var stringLen 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++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
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.Controller = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Seed", wireType)
}
var stringLen 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++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength
}
postIndex := iNdEx + intStringLen
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.Seed = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 3:
if wireType != 2 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulator", 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.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...)
if x.Accumulator == nil {
x.Accumulator = []byte{}
}
iNdEx = postIndex
case 4:
if wireType != 0 {
return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Count", wireType)
}
x.Count = 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.Count |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
default:
iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:])
@@ -1344,7 +667,7 @@ func (x *Params) ProtoReflect() protoreflect.Message {
}
func (x *Params) slowProtoReflect() protoreflect.Message {
mi := &file_did_v1_genesis_proto_msgTypes[2]
mi := &file_did_v1_genesis_proto_msgTypes[1]
if protoimpl.UnsafeEnabled && x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
@@ -7613,8 +6936,6 @@ type GenesisState struct {
// Params defines all the parameters of the module.
Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"`
// GlobalIntegrity defines a zkp integrity proof for the entire DID namespace
GlobalIntegrity *GlobalIntegrity `protobuf:"bytes,2,opt,name=global_integrity,json=globalIntegrity,proto3" json:"global_integrity,omitempty"`
}
func (x *GenesisState) Reset() {
@@ -7644,73 +6965,6 @@ func (x *GenesisState) GetParams() *Params {
return nil
}
func (x *GenesisState) GetGlobalIntegrity() *GlobalIntegrity {
if x != nil {
return x.GlobalIntegrity
}
return nil
}
// GlobalIntegrity defines a zkp integrity proof for the entire DID namespace
type GlobalIntegrity struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"`
Seed string `protobuf:"bytes,2,opt,name=seed,proto3" json:"seed,omitempty"`
Accumulator []byte `protobuf:"bytes,3,opt,name=accumulator,proto3" json:"accumulator,omitempty"`
Count uint64 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
}
func (x *GlobalIntegrity) Reset() {
*x = GlobalIntegrity{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_genesis_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *GlobalIntegrity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*GlobalIntegrity) ProtoMessage() {}
// Deprecated: Use GlobalIntegrity.ProtoReflect.Descriptor instead.
func (*GlobalIntegrity) Descriptor() ([]byte, []int) {
return file_did_v1_genesis_proto_rawDescGZIP(), []int{1}
}
func (x *GlobalIntegrity) GetController() string {
if x != nil {
return x.Controller
}
return ""
}
func (x *GlobalIntegrity) GetSeed() string {
if x != nil {
return x.Seed
}
return ""
}
func (x *GlobalIntegrity) GetAccumulator() []byte {
if x != nil {
return x.Accumulator
}
return nil
}
func (x *GlobalIntegrity) GetCount() uint64 {
if x != nil {
return x.Count
}
return 0
}
// Params defines the set of module parameters.
type Params struct {
state protoimpl.MessageState
@@ -7734,7 +6988,7 @@ type Params struct {
func (x *Params) Reset() {
*x = Params{}
if protoimpl.UnsafeEnabled {
mi := &file_did_v1_genesis_proto_msgTypes[2]
mi := &file_did_v1_genesis_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
@@ -7748,7 +7002,7 @@ func (*Params) ProtoMessage() {}
// Deprecated: Use Params.ProtoReflect.Descriptor instead.
func (*Params) Descriptor() ([]byte, []int) {
return file_did_v1_genesis_proto_rawDescGZIP(), []int{2}
return file_did_v1_genesis_proto_rawDescGZIP(), []int{1}
}
func (x *Params) GetWhitelistedAssets() []*AssetInfo {
@@ -8464,18 +7718,6 @@ func file_did_v1_genesis_proto_init() {
}
}
file_did_v1_genesis_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*GlobalIntegrity); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_did_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*Params); i {
case 0:
return &v.state
+1 -1
View File
@@ -2777,7 +2777,7 @@ var file_did_v1_state_proto_rawDesc = []byte{
0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, 0x01, 0x12,
0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, 0x73, 0x73,
0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x05, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x04, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d,
0x2e, 0x64, 0x69, 0x64, 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,
+2567 -1180
View File
File diff suppressed because it is too large Load Diff
+73 -38
View File
@@ -19,30 +19,31 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService"
Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault"
Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService"
Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx"
Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController"
Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService"
Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams"
)
// MsgClient is the client API for Msg service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type MsgClient interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
// AuthorizeService asserts the given controller is the owner of the given address.
AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error)
// AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database.
// this operation is called by services initiating a controller registration.
AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error)
// AuthorizeService asserts the given controller is the owner of the given address.
AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error)
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages Macaroon for verification.
ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error)
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, 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)
// UpdateParams defines a governance operation for updating the parameters.
UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error)
}
type msgClient struct {
@@ -53,9 +54,9 @@ func NewMsgClient(cc grpc.ClientConnInterface) MsgClient {
return &msgClient{cc}
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
out := new(MsgAllocateVaultResponse)
err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -71,9 +72,9 @@ func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeServic
return out, nil
}
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
out := new(MsgAllocateVaultResponse)
err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...)
func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, error) {
out := new(MsgExecuteTxResponse)
err := c.cc.Invoke(ctx, Msg_ExecuteTx_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -98,23 +99,32 @@ func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService,
return out, nil
}
func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) {
out := new(MsgUpdateParamsResponse)
err := c.cc.Invoke(ctx, Msg_UpdateParams_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// MsgServer is the server API for Msg service.
// All implementations must embed UnimplementedMsgServer
// for forward compatibility
type MsgServer interface {
// UpdateParams defines a governance operation for updating the parameters.
//
// Since: cosmos-sdk 0.47
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
// AuthorizeService asserts the given controller is the owner of the given address.
AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error)
// AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database.
// this operation is called by services initiating a controller registration.
AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error)
// AuthorizeService asserts the given controller is the owner of the given address.
AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error)
// ExecuteTx executes a transaction on the Sonr Blockchain. It leverages Macaroon for verification.
ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error)
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, 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)
// UpdateParams defines a governance operation for updating the parameters.
UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error)
mustEmbedUnimplementedMsgServer()
}
@@ -122,14 +132,14 @@ type MsgServer interface {
type UnimplementedMsgServer struct {
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented")
}
func (UnimplementedMsgServer) AuthorizeService(context.Context, *MsgAuthorizeService) (*MsgAuthorizeServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AuthorizeService not implemented")
}
func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented")
func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented")
}
func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
@@ -137,6 +147,9 @@ func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterCo
func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented")
}
func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented")
}
func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {}
// UnsafeMsgServer may be embedded to opt out of forward compatibility for this service.
@@ -150,20 +163,20 @@ func RegisterMsgServer(s grpc.ServiceRegistrar, srv MsgServer) {
s.RegisterService(&Msg_ServiceDesc, srv)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAllocateVault)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
return srv.(MsgServer).AllocateVault(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
FullMethod: Msg_AllocateVault_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
}
return interceptor(ctx, in, info, handler)
}
@@ -186,20 +199,20 @@ func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec fun
return interceptor(ctx, in, info, handler)
}
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAllocateVault)
func _Msg_ExecuteTx_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgExecuteTx)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).AllocateVault(ctx, in)
return srv.(MsgServer).ExecuteTx(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_AllocateVault_FullMethodName,
FullMethod: Msg_ExecuteTx_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
return srv.(MsgServer).ExecuteTx(ctx, req.(*MsgExecuteTx))
}
return interceptor(ctx, in, info, handler)
}
@@ -240,6 +253,24 @@ func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func
return interceptor(ctx, in, info, handler)
}
func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgUpdateParams)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(MsgServer).UpdateParams(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_UpdateParams_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams))
}
return interceptor(ctx, in, info, handler)
}
// Msg_ServiceDesc is the grpc.ServiceDesc for Msg service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
@@ -248,16 +279,16 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
HandlerType: (*MsgServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
MethodName: "AllocateVault",
Handler: _Msg_AllocateVault_Handler,
},
{
MethodName: "AuthorizeService",
Handler: _Msg_AuthorizeService_Handler,
},
{
MethodName: "AllocateVault",
Handler: _Msg_AllocateVault_Handler,
MethodName: "ExecuteTx",
Handler: _Msg_ExecuteTx_Handler,
},
{
MethodName: "RegisterController",
@@ -267,6 +298,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
MethodName: "RegisterService",
Handler: _Msg_RegisterService_Handler,
},
{
MethodName: "UpdateParams",
Handler: _Msg_UpdateParams_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "did/v1/tx.proto",