From ae35fcee58dd7082e16e55e996c72f1348b0ca6e Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Fri, 26 Jul 2024 12:14:20 -0400 Subject: [PATCH] (no commit message provided) --- api/did/v1/genesis.pulsar.go | 4393 ++++++++++++++++- api/did/v1/state.cosmos_orm.go | 36 + api/did/v1/state.pulsar.go | 163 +- api/did/v1/tx.pulsar.go | 50 +- api/did/v1/tx_grpc.pb.go | 30 +- .../v1/{account.pulsar.go => types.pulsar.go} | 595 ++- go.mod | 12 +- go.sum | 20 +- proto/did/v1/genesis.proto | 57 +- proto/did/v1/state.proto | 1 + proto/did/v1/tx.proto | 4 +- proto/did/v1/{account.proto => types.proto} | 13 +- x/did/keeper/server.go | 14 +- x/did/types/bip32.go | 66 + x/did/types/genesis.go | 13 +- x/did/types/genesis.pb.go | 2388 ++++++++- x/did/types/keys.go | 43 +- x/did/types/state.pb.go | 87 +- x/did/types/tx.pb.go | 96 +- x/did/types/{account.pb.go => types.pb.go} | 294 +- 20 files changed, 7278 insertions(+), 1097 deletions(-) rename api/did/v1/{account.pulsar.go => types.pulsar.go} (76%) rename proto/did/v1/{account.proto => types.proto} (80%) create mode 100644 x/did/types/bip32.go rename x/did/types/{account.pb.go => types.pb.go} (70%) diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index 8f4557a54..eedcc5aa4 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -13,6 +13,7 @@ import ( io "io" math "math" reflect "reflect" + sort "sort" sync "sync" ) @@ -451,10 +452,61 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_Params_1_list)(nil) + +type _Params_1_list struct { + list *[]*AssetInfo +} + +func (x *_Params_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Params_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Params_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AssetInfo) + (*x.list)[i] = concreteValue +} + +func (x *_Params_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*AssetInfo) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Params_1_list) AppendMutable() protoreflect.Value { + v := new(AssetInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Params_1_list) NewElement() protoreflect.Value { + v := new(AssetInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Params_1_list) IsValid() bool { + return x.list != nil +} + var _ protoreflect.List = (*_Params_2_list)(nil) type _Params_2_list struct { - list *[]string + list *[]*ChainInfo } func (x *_Params_2_list) Len() int { @@ -465,99 +517,54 @@ func (x *_Params_2_list) Len() int { } func (x *_Params_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Params_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ChainInfo) (*x.list)[i] = concreteValue } func (x *_Params_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ChainInfo) *x.list = append(*x.list, concreteValue) } func (x *_Params_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Params at list field PropertyAllowlist as it is not of Message kind")) + v := new(ChainInfo) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Params_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_Params_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + v := new(ChainInfo) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Params_2_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Params_3_list)(nil) - -type _Params_3_list struct { - list *[]string -} - -func (x *_Params_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Params_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Params_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Params_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Params_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Params at list field WhitelistedOrigins as it is not of Message kind")) -} - -func (x *_Params_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Params_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Params_3_list) IsValid() bool { - return x.list != nil -} - var ( - md_Params protoreflect.MessageDescriptor - fd_Params_property_allowlist protoreflect.FieldDescriptor - fd_Params_whitelisted_origins protoreflect.FieldDescriptor - fd_Params_assertion_reward_rate protoreflect.FieldDescriptor - fd_Params_encryption_reward_rate protoreflect.FieldDescriptor + md_Params protoreflect.MessageDescriptor + fd_Params_whitelisted_assets protoreflect.FieldDescriptor + fd_Params_whitelisted_chains protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() md_Params = File_did_v1_genesis_proto.Messages().ByName("Params") - fd_Params_property_allowlist = md_Params.Fields().ByName("property_allowlist") - fd_Params_whitelisted_origins = md_Params.Fields().ByName("whitelisted_origins") - fd_Params_assertion_reward_rate = md_Params.Fields().ByName("assertion_reward_rate") - fd_Params_encryption_reward_rate = md_Params.Fields().ByName("encryption_reward_rate") + fd_Params_whitelisted_assets = md_Params.Fields().ByName("whitelisted_assets") + fd_Params_whitelisted_chains = md_Params.Fields().ByName("whitelisted_chains") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -625,27 +632,15 @@ func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.PropertyAllowlist) != 0 { - value := protoreflect.ValueOfList(&_Params_2_list{list: &x.PropertyAllowlist}) - if !f(fd_Params_property_allowlist, value) { + if len(x.WhitelistedAssets) != 0 { + value := protoreflect.ValueOfList(&_Params_1_list{list: &x.WhitelistedAssets}) + if !f(fd_Params_whitelisted_assets, value) { return } } - if len(x.WhitelistedOrigins) != 0 { - value := protoreflect.ValueOfList(&_Params_3_list{list: &x.WhitelistedOrigins}) - if !f(fd_Params_whitelisted_origins, value) { - return - } - } - if x.AssertionRewardRate != float64(0) || math.Signbit(x.AssertionRewardRate) { - value := protoreflect.ValueOfFloat64(x.AssertionRewardRate) - if !f(fd_Params_assertion_reward_rate, value) { - return - } - } - if x.EncryptionRewardRate != float64(0) || math.Signbit(x.EncryptionRewardRate) { - value := protoreflect.ValueOfFloat64(x.EncryptionRewardRate) - if !f(fd_Params_encryption_reward_rate, value) { + if len(x.WhitelistedChains) != 0 { + value := protoreflect.ValueOfList(&_Params_2_list{list: &x.WhitelistedChains}) + if !f(fd_Params_whitelisted_chains, value) { return } } @@ -664,14 +659,10 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Params.property_allowlist": - return len(x.PropertyAllowlist) != 0 - case "did.v1.Params.whitelisted_origins": - return len(x.WhitelistedOrigins) != 0 - case "did.v1.Params.assertion_reward_rate": - return x.AssertionRewardRate != float64(0) || math.Signbit(x.AssertionRewardRate) - case "did.v1.Params.encryption_reward_rate": - return x.EncryptionRewardRate != float64(0) || math.Signbit(x.EncryptionRewardRate) + case "did.v1.Params.whitelisted_assets": + return len(x.WhitelistedAssets) != 0 + case "did.v1.Params.whitelisted_chains": + return len(x.WhitelistedChains) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -688,14 +679,10 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Params.property_allowlist": - x.PropertyAllowlist = nil - case "did.v1.Params.whitelisted_origins": - x.WhitelistedOrigins = nil - case "did.v1.Params.assertion_reward_rate": - x.AssertionRewardRate = float64(0) - case "did.v1.Params.encryption_reward_rate": - x.EncryptionRewardRate = float64(0) + case "did.v1.Params.whitelisted_assets": + x.WhitelistedAssets = nil + case "did.v1.Params.whitelisted_chains": + x.WhitelistedChains = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -712,24 +699,18 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Params.property_allowlist": - if len(x.PropertyAllowlist) == 0 { + case "did.v1.Params.whitelisted_assets": + if len(x.WhitelistedAssets) == 0 { + return protoreflect.ValueOfList(&_Params_1_list{}) + } + listValue := &_Params_1_list{list: &x.WhitelistedAssets} + return protoreflect.ValueOfList(listValue) + case "did.v1.Params.whitelisted_chains": + if len(x.WhitelistedChains) == 0 { return protoreflect.ValueOfList(&_Params_2_list{}) } - listValue := &_Params_2_list{list: &x.PropertyAllowlist} + listValue := &_Params_2_list{list: &x.WhitelistedChains} return protoreflect.ValueOfList(listValue) - case "did.v1.Params.whitelisted_origins": - if len(x.WhitelistedOrigins) == 0 { - return protoreflect.ValueOfList(&_Params_3_list{}) - } - listValue := &_Params_3_list{list: &x.WhitelistedOrigins} - return protoreflect.ValueOfList(listValue) - case "did.v1.Params.assertion_reward_rate": - value := x.AssertionRewardRate - return protoreflect.ValueOfFloat64(value) - case "did.v1.Params.encryption_reward_rate": - value := x.EncryptionRewardRate - return protoreflect.ValueOfFloat64(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -750,18 +731,14 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Params.property_allowlist": + case "did.v1.Params.whitelisted_assets": + lv := value.List() + clv := lv.(*_Params_1_list) + x.WhitelistedAssets = *clv.list + case "did.v1.Params.whitelisted_chains": lv := value.List() clv := lv.(*_Params_2_list) - x.PropertyAllowlist = *clv.list - case "did.v1.Params.whitelisted_origins": - lv := value.List() - clv := lv.(*_Params_3_list) - x.WhitelistedOrigins = *clv.list - case "did.v1.Params.assertion_reward_rate": - x.AssertionRewardRate = value.Float() - case "did.v1.Params.encryption_reward_rate": - x.EncryptionRewardRate = value.Float() + x.WhitelistedChains = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -782,22 +759,18 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Params.property_allowlist": - if x.PropertyAllowlist == nil { - x.PropertyAllowlist = []string{} + case "did.v1.Params.whitelisted_assets": + if x.WhitelistedAssets == nil { + x.WhitelistedAssets = []*AssetInfo{} } - value := &_Params_2_list{list: &x.PropertyAllowlist} + value := &_Params_1_list{list: &x.WhitelistedAssets} return protoreflect.ValueOfList(value) - case "did.v1.Params.whitelisted_origins": - if x.WhitelistedOrigins == nil { - x.WhitelistedOrigins = []string{} + case "did.v1.Params.whitelisted_chains": + if x.WhitelistedChains == nil { + x.WhitelistedChains = []*ChainInfo{} } - value := &_Params_3_list{list: &x.WhitelistedOrigins} + value := &_Params_2_list{list: &x.WhitelistedChains} return protoreflect.ValueOfList(value) - case "did.v1.Params.assertion_reward_rate": - panic(fmt.Errorf("field assertion_reward_rate of message did.v1.Params is not mutable")) - case "did.v1.Params.encryption_reward_rate": - panic(fmt.Errorf("field encryption_reward_rate of message did.v1.Params is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -811,16 +784,12 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Params.property_allowlist": - list := []string{} + case "did.v1.Params.whitelisted_assets": + list := []*AssetInfo{} + return protoreflect.ValueOfList(&_Params_1_list{list: &list}) + case "did.v1.Params.whitelisted_chains": + list := []*ChainInfo{} return protoreflect.ValueOfList(&_Params_2_list{list: &list}) - case "did.v1.Params.whitelisted_origins": - list := []string{} - return protoreflect.ValueOfList(&_Params_3_list{list: &list}) - case "did.v1.Params.assertion_reward_rate": - return protoreflect.ValueOfFloat64(float64(0)) - case "did.v1.Params.encryption_reward_rate": - return protoreflect.ValueOfFloat64(float64(0)) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -890,24 +859,18 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if len(x.PropertyAllowlist) > 0 { - for _, s := range x.PropertyAllowlist { - l = len(s) + if len(x.WhitelistedAssets) > 0 { + for _, e := range x.WhitelistedAssets { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.WhitelistedOrigins) > 0 { - for _, s := range x.WhitelistedOrigins { - l = len(s) + if len(x.WhitelistedChains) > 0 { + for _, e := range x.WhitelistedChains { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if x.AssertionRewardRate != 0 || math.Signbit(x.AssertionRewardRate) { - n += 9 - } - if x.EncryptionRewardRate != 0 || math.Signbit(x.EncryptionRewardRate) { - n += 9 - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -937,36 +900,38 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.EncryptionRewardRate != 0 || math.Signbit(x.EncryptionRewardRate) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.EncryptionRewardRate)))) - i-- - dAtA[i] = 0x29 - } - if x.AssertionRewardRate != 0 || math.Signbit(x.AssertionRewardRate) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.AssertionRewardRate)))) - i-- - dAtA[i] = 0x21 - } - if len(x.WhitelistedOrigins) > 0 { - for iNdEx := len(x.WhitelistedOrigins) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.WhitelistedOrigins[iNdEx]) - copy(dAtA[i:], x.WhitelistedOrigins[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.WhitelistedOrigins[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.PropertyAllowlist) > 0 { - for iNdEx := len(x.PropertyAllowlist) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.PropertyAllowlist[iNdEx]) - copy(dAtA[i:], x.PropertyAllowlist[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PropertyAllowlist[iNdEx]))) + if len(x.WhitelistedChains) > 0 { + for iNdEx := len(x.WhitelistedChains) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.WhitelistedChains[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } + if len(x.WhitelistedAssets) > 0 { + for iNdEx := len(x.WhitelistedAssets) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.WhitelistedAssets[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1016,9 +981,1583 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: 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 WhitelistedAssets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.WhitelistedAssets = append(x.WhitelistedAssets, &AssetInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.WhitelistedAssets[len(x.WhitelistedAssets)-1]); err != nil { + 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 PropertyAllowlist", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistedChains", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.WhitelistedChains = append(x.WhitelistedChains, &ChainInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.WhitelistedChains[len(x.WhitelistedChains)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.Map = (*_Meta_1_map)(nil) + +type _Meta_1_map struct { + m *map[string]string +} + +func (x *_Meta_1_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Meta_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Meta_1_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Meta_1_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Meta_1_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Meta_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Meta_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_Meta_1_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Meta_1_map) IsValid() bool { + return x.m != nil +} + +var ( + md_Meta protoreflect.MessageDescriptor + fd_Meta_data protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_Meta = File_did_v1_genesis_proto.Messages().ByName("Meta") + fd_Meta_data = md_Meta.Fields().ByName("data") +} + +var _ protoreflect.Message = (*fastReflection_Meta)(nil) + +type fastReflection_Meta Meta + +func (x *Meta) ProtoReflect() protoreflect.Message { + return (*fastReflection_Meta)(x) +} + +func (x *Meta) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[2] + 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_Meta_messageType fastReflection_Meta_messageType +var _ protoreflect.MessageType = fastReflection_Meta_messageType{} + +type fastReflection_Meta_messageType struct{} + +func (x fastReflection_Meta_messageType) Zero() protoreflect.Message { + return (*fastReflection_Meta)(nil) +} +func (x fastReflection_Meta_messageType) New() protoreflect.Message { + return new(fastReflection_Meta) +} +func (x fastReflection_Meta_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Meta +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Meta) Descriptor() protoreflect.MessageDescriptor { + return md_Meta +} + +// 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_Meta) Type() protoreflect.MessageType { + return _fastReflection_Meta_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Meta) New() protoreflect.Message { + return new(fastReflection_Meta) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Meta) Interface() protoreflect.ProtoMessage { + return (*Meta)(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_Meta) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Data) != 0 { + value := protoreflect.ValueOfMap(&_Meta_1_map{m: &x.Data}) + if !f(fd_Meta_data, 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_Meta) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Meta.data": + return len(x.Data) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) + } + panic(fmt.Errorf("message did.v1.Meta 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_Meta) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Meta.data": + x.Data = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) + } + panic(fmt.Errorf("message did.v1.Meta 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_Meta) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Meta.data": + if len(x.Data) == 0 { + return protoreflect.ValueOfMap(&_Meta_1_map{}) + } + mapValue := &_Meta_1_map{m: &x.Data} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) + } + panic(fmt.Errorf("message did.v1.Meta 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_Meta) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Meta.data": + mv := value.Map() + cmv := mv.(*_Meta_1_map) + x.Data = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) + } + panic(fmt.Errorf("message did.v1.Meta 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_Meta) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Meta.data": + if x.Data == nil { + x.Data = make(map[string]string) + } + value := &_Meta_1_map{m: &x.Data} + return protoreflect.ValueOfMap(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) + } + panic(fmt.Errorf("message did.v1.Meta 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_Meta) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Meta.data": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Meta_1_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) + } + panic(fmt.Errorf("message did.v1.Meta 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_Meta) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Meta", 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_Meta) 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_Meta) 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_Meta) 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_Meta) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Meta) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Data) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Data)) + for k := range x.Data { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Data[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Data { + SiZeMaP(k, v) + } + } + } + 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().(*Meta) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Data) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForData := make([]string, 0, len(x.Data)) + for k := range x.Data { + keysForData = append(keysForData, string(k)) + } + sort.Slice(keysForData, func(i, j int) bool { + return keysForData[i] < keysForData[j] + }) + for iNdEx := len(keysForData) - 1; iNdEx >= 0; iNdEx-- { + v := x.Data[string(keysForData[iNdEx])] + out, err := MaRsHaLmAp(keysForData[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Data { + v := x.Data[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + 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().(*Meta) + 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: Meta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Meta: 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 Data", 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.Data == nil { + x.Data = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := 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) + if fieldNum == 1 { + var stringLenmapkey 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++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue 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++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + 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) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Data[mapkey] = mapvalue + 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_AssetInfo protoreflect.MessageDescriptor + fd_AssetInfo_denom protoreflect.FieldDescriptor + fd_AssetInfo_asset_type protoreflect.FieldDescriptor + fd_AssetInfo_origin_chain protoreflect.FieldDescriptor + fd_AssetInfo_origin_denom protoreflect.FieldDescriptor + fd_AssetInfo_origin_type protoreflect.FieldDescriptor + fd_AssetInfo_symbol protoreflect.FieldDescriptor + fd_AssetInfo_decimals protoreflect.FieldDescriptor + fd_AssetInfo_description protoreflect.FieldDescriptor + fd_AssetInfo_image protoreflect.FieldDescriptor + fd_AssetInfo_coinGeckoId protoreflect.FieldDescriptor + fd_AssetInfo_enable protoreflect.FieldDescriptor + fd_AssetInfo_path protoreflect.FieldDescriptor + fd_AssetInfo_channel protoreflect.FieldDescriptor + fd_AssetInfo_port protoreflect.FieldDescriptor + fd_AssetInfo_counter_party protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_AssetInfo = File_did_v1_genesis_proto.Messages().ByName("AssetInfo") + fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") + fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") + fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") + fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") + fd_AssetInfo_origin_type = md_AssetInfo.Fields().ByName("origin_type") + fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") + fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") + fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") + fd_AssetInfo_image = md_AssetInfo.Fields().ByName("image") + fd_AssetInfo_coinGeckoId = md_AssetInfo.Fields().ByName("coinGeckoId") + fd_AssetInfo_enable = md_AssetInfo.Fields().ByName("enable") + fd_AssetInfo_path = md_AssetInfo.Fields().ByName("path") + fd_AssetInfo_channel = md_AssetInfo.Fields().ByName("channel") + fd_AssetInfo_port = md_AssetInfo.Fields().ByName("port") + fd_AssetInfo_counter_party = md_AssetInfo.Fields().ByName("counter_party") +} + +var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) + +type fastReflection_AssetInfo AssetInfo + +func (x *AssetInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AssetInfo)(x) +} + +func (x *AssetInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[3] + 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_AssetInfo_messageType fastReflection_AssetInfo_messageType +var _ protoreflect.MessageType = fastReflection_AssetInfo_messageType{} + +type fastReflection_AssetInfo_messageType struct{} + +func (x fastReflection_AssetInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AssetInfo)(nil) +} +func (x fastReflection_AssetInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AssetInfo) +} +func (x fastReflection_AssetInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AssetInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AssetInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AssetInfo +} + +// 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_AssetInfo) Type() protoreflect.MessageType { + return _fastReflection_AssetInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AssetInfo) New() protoreflect.Message { + return new(fastReflection_AssetInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { + return (*AssetInfo)(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_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_AssetInfo_denom, value) { + return + } + } + if x.AssetType != "" { + value := protoreflect.ValueOfString(x.AssetType) + if !f(fd_AssetInfo_asset_type, value) { + return + } + } + if x.OriginChain != "" { + value := protoreflect.ValueOfString(x.OriginChain) + if !f(fd_AssetInfo_origin_chain, value) { + return + } + } + if x.OriginDenom != "" { + value := protoreflect.ValueOfString(x.OriginDenom) + if !f(fd_AssetInfo_origin_denom, value) { + return + } + } + if x.OriginType != "" { + value := protoreflect.ValueOfString(x.OriginType) + if !f(fd_AssetInfo_origin_type, value) { + return + } + } + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_AssetInfo_symbol, value) { + return + } + } + if x.Decimals != int32(0) { + value := protoreflect.ValueOfInt32(x.Decimals) + if !f(fd_AssetInfo_decimals, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_AssetInfo_description, value) { + return + } + } + if x.Image != "" { + value := protoreflect.ValueOfString(x.Image) + if !f(fd_AssetInfo_image, value) { + return + } + } + if x.CoinGeckoId != "" { + value := protoreflect.ValueOfString(x.CoinGeckoId) + if !f(fd_AssetInfo_coinGeckoId, value) { + return + } + } + if x.Enable != false { + value := protoreflect.ValueOfBool(x.Enable) + if !f(fd_AssetInfo_enable, value) { + return + } + } + if x.Path != "" { + value := protoreflect.ValueOfString(x.Path) + if !f(fd_AssetInfo_path, value) { + return + } + } + if x.Channel != "" { + value := protoreflect.ValueOfString(x.Channel) + if !f(fd_AssetInfo_channel, value) { + return + } + } + if x.Port != "" { + value := protoreflect.ValueOfString(x.Port) + if !f(fd_AssetInfo_port, value) { + return + } + } + if x.CounterParty != nil { + value := protoreflect.ValueOfMessage(x.CounterParty.ProtoReflect()) + if !f(fd_AssetInfo_counter_party, 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_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.AssetInfo.denom": + return x.Denom != "" + case "did.v1.AssetInfo.asset_type": + return x.AssetType != "" + case "did.v1.AssetInfo.origin_chain": + return x.OriginChain != "" + case "did.v1.AssetInfo.origin_denom": + return x.OriginDenom != "" + case "did.v1.AssetInfo.origin_type": + return x.OriginType != "" + case "did.v1.AssetInfo.symbol": + return x.Symbol != "" + case "did.v1.AssetInfo.decimals": + return x.Decimals != int32(0) + case "did.v1.AssetInfo.description": + return x.Description != "" + case "did.v1.AssetInfo.image": + return x.Image != "" + case "did.v1.AssetInfo.coinGeckoId": + return x.CoinGeckoId != "" + case "did.v1.AssetInfo.enable": + return x.Enable != false + case "did.v1.AssetInfo.path": + return x.Path != "" + case "did.v1.AssetInfo.channel": + return x.Channel != "" + case "did.v1.AssetInfo.port": + return x.Port != "" + case "did.v1.AssetInfo.counter_party": + return x.CounterParty != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.AssetInfo.denom": + x.Denom = "" + case "did.v1.AssetInfo.asset_type": + x.AssetType = "" + case "did.v1.AssetInfo.origin_chain": + x.OriginChain = "" + case "did.v1.AssetInfo.origin_denom": + x.OriginDenom = "" + case "did.v1.AssetInfo.origin_type": + x.OriginType = "" + case "did.v1.AssetInfo.symbol": + x.Symbol = "" + case "did.v1.AssetInfo.decimals": + x.Decimals = int32(0) + case "did.v1.AssetInfo.description": + x.Description = "" + case "did.v1.AssetInfo.image": + x.Image = "" + case "did.v1.AssetInfo.coinGeckoId": + x.CoinGeckoId = "" + case "did.v1.AssetInfo.enable": + x.Enable = false + case "did.v1.AssetInfo.path": + x.Path = "" + case "did.v1.AssetInfo.channel": + x.Channel = "" + case "did.v1.AssetInfo.port": + x.Port = "" + case "did.v1.AssetInfo.counter_party": + x.CounterParty = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.AssetInfo.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.asset_type": + value := x.AssetType + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_chain": + value := x.OriginChain + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_denom": + value := x.OriginDenom + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_type": + value := x.OriginType + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.decimals": + value := x.Decimals + return protoreflect.ValueOfInt32(value) + case "did.v1.AssetInfo.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.image": + value := x.Image + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.coinGeckoId": + value := x.CoinGeckoId + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.enable": + value := x.Enable + return protoreflect.ValueOfBool(value) + case "did.v1.AssetInfo.path": + value := x.Path + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.channel": + value := x.Channel + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.port": + value := x.Port + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.counter_party": + value := x.CounterParty + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.AssetInfo.denom": + x.Denom = value.Interface().(string) + case "did.v1.AssetInfo.asset_type": + x.AssetType = value.Interface().(string) + case "did.v1.AssetInfo.origin_chain": + x.OriginChain = value.Interface().(string) + case "did.v1.AssetInfo.origin_denom": + x.OriginDenom = value.Interface().(string) + case "did.v1.AssetInfo.origin_type": + x.OriginType = value.Interface().(string) + case "did.v1.AssetInfo.symbol": + x.Symbol = value.Interface().(string) + case "did.v1.AssetInfo.decimals": + x.Decimals = int32(value.Int()) + case "did.v1.AssetInfo.description": + x.Description = value.Interface().(string) + case "did.v1.AssetInfo.image": + x.Image = value.Interface().(string) + case "did.v1.AssetInfo.coinGeckoId": + x.CoinGeckoId = value.Interface().(string) + case "did.v1.AssetInfo.enable": + x.Enable = value.Bool() + case "did.v1.AssetInfo.path": + x.Path = value.Interface().(string) + case "did.v1.AssetInfo.channel": + x.Channel = value.Interface().(string) + case "did.v1.AssetInfo.port": + x.Port = value.Interface().(string) + case "did.v1.AssetInfo.counter_party": + x.CounterParty = value.Message().Interface().(*Meta) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.AssetInfo.counter_party": + if x.CounterParty == nil { + x.CounterParty = new(Meta) + } + return protoreflect.ValueOfMessage(x.CounterParty.ProtoReflect()) + case "did.v1.AssetInfo.denom": + panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.asset_type": + panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_chain": + panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_denom": + panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_type": + panic(fmt.Errorf("field origin_type of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.symbol": + panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.decimals": + panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.description": + panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.image": + panic(fmt.Errorf("field image of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.coinGeckoId": + panic(fmt.Errorf("field coinGeckoId of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.enable": + panic(fmt.Errorf("field enable of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.path": + panic(fmt.Errorf("field path of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.channel": + panic(fmt.Errorf("field channel of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.port": + panic(fmt.Errorf("field port of message did.v1.AssetInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.AssetInfo.denom": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.asset_type": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_chain": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_denom": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_type": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.symbol": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.decimals": + return protoreflect.ValueOfInt32(int32(0)) + case "did.v1.AssetInfo.description": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.image": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.coinGeckoId": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.enable": + return protoreflect.ValueOfBool(false) + case "did.v1.AssetInfo.path": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.channel": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.port": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.counter_party": + m := new(Meta) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) + } + panic(fmt.Errorf("message did.v1.AssetInfo 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_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.AssetInfo", 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_AssetInfo) 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_AssetInfo) 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_AssetInfo) 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_AssetInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AssetInfo) + 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.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AssetType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Decimals != 0 { + n += 1 + runtime.Sov(uint64(x.Decimals)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Image) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CoinGeckoId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Enable { + n += 2 + } + l = len(x.Path) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Channel) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Port) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.CounterParty != nil { + l = options.Size(x.CounterParty) + 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().(*AssetInfo) + 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.CounterParty != nil { + encoded, err := options.Marshal(x.CounterParty) + 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] = 0x7a + } + if len(x.Port) > 0 { + i -= len(x.Port) + copy(dAtA[i:], x.Port) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Port))) + i-- + dAtA[i] = 0x72 + } + if len(x.Channel) > 0 { + i -= len(x.Channel) + copy(dAtA[i:], x.Channel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Channel))) + i-- + dAtA[i] = 0x6a + } + if len(x.Path) > 0 { + i -= len(x.Path) + copy(dAtA[i:], x.Path) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) + i-- + dAtA[i] = 0x62 + } + if x.Enable { + i-- + if x.Enable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(x.CoinGeckoId) > 0 { + i -= len(x.CoinGeckoId) + copy(dAtA[i:], x.CoinGeckoId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoinGeckoId))) + i-- + dAtA[i] = 0x52 + } + if len(x.Image) > 0 { + i -= len(x.Image) + copy(dAtA[i:], x.Image) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Image))) + i-- + dAtA[i] = 0x4a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x42 + } + if x.Decimals != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0x32 + } + if len(x.OriginType) > 0 { + i -= len(x.OriginType) + copy(dAtA[i:], x.OriginType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginType))) + i-- + dAtA[i] = 0x2a + } + if len(x.OriginDenom) > 0 { + i -= len(x.OriginDenom) + copy(dAtA[i:], x.OriginDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) + i-- + dAtA[i] = 0x22 + } + if len(x.OriginChain) > 0 { + i -= len(x.OriginChain) + copy(dAtA[i:], x.OriginChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) + i-- + dAtA[i] = 0x1a + } + if len(x.AssetType) > 0 { + i -= len(x.AssetType) + copy(dAtA[i:], x.AssetType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) + i-- + dAtA[i] = 0x12 + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + 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().(*AssetInfo) + 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: AssetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: 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 Denom", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1046,11 +2585,43 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.PropertyAllowlist = append(x.PropertyAllowlist, string(dAtA[iNdEx:postIndex])) + x.Denom = 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 AssetType", 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.AssetType = 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 WhitelistedOrigins", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1078,22 +2649,1927 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.WhitelistedOrigins = append(x.WhitelistedOrigins, string(dAtA[iNdEx:postIndex])) + x.OriginChain = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssertionRewardRate", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) } - var v uint64 - if (iNdEx + 8) > l { + 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 } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - x.AssertionRewardRate = float64(math.Float64frombits(v)) + x.OriginDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginType", 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.OriginType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", 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.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + x.Decimals = 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.Decimals |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", 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.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Image", 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.Image = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoinGeckoId", 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.CoinGeckoId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enable", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Enable = bool(v != 0) + case 12: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", 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.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Channel", 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.Channel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Port", 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.Port = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CounterParty", 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.CounterParty == nil { + x.CounterParty = &Meta{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CounterParty); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ChainInfo_7_list)(nil) + +type _ChainInfo_7_list struct { + list *[]*Meta +} + +func (x *_ChainInfo_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Meta) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Meta) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { + v := new(Meta) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { + v := new(Meta) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ChainInfo_8_list)(nil) + +type _ChainInfo_8_list struct { + list *[]*Meta +} + +func (x *_ChainInfo_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Meta) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Meta) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { + v := new(Meta) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { + v := new(Meta) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_8_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ChainInfo_9_list)(nil) + +type _ChainInfo_9_list struct { + list *[]*Meta +} + +func (x *_ChainInfo_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Meta) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Meta) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_9_list) AppendMutable() protoreflect.Value { + v := new(Meta) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_9_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_9_list) NewElement() protoreflect.Value { + v := new(Meta) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_9_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ChainInfo_12_list)(nil) + +type _ChainInfo_12_list struct { + list *[]string +} + +func (x *_ChainInfo_12_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_12_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_ChainInfo_12_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_12_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_12_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ChainInfo at list field FeeRate as it is not of Message kind")) +} + +func (x *_ChainInfo_12_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_12_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_ChainInfo_12_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ChainInfo protoreflect.MessageDescriptor + fd_ChainInfo_chain_id_cosmos protoreflect.FieldDescriptor + fd_ChainInfo_chain_name protoreflect.FieldDescriptor + fd_ChainInfo_symbol protoreflect.FieldDescriptor + fd_ChainInfo_bechAccountPrefix protoreflect.FieldDescriptor + fd_ChainInfo_bechValidatorPrefix protoreflect.FieldDescriptor + fd_ChainInfo_origin_genesis_time protoreflect.FieldDescriptor + fd_ChainInfo_accountType protoreflect.FieldDescriptor + fd_ChainInfo_grpc_endpoint protoreflect.FieldDescriptor + fd_ChainInfo_lcd_endpoint protoreflect.FieldDescriptor + fd_ChainInfo_explorer protoreflect.FieldDescriptor + fd_ChainInfo_fee_base protoreflect.FieldDescriptor + fd_ChainInfo_fee_rate protoreflect.FieldDescriptor + fd_ChainInfo_fee_init_gas_limit protoreflect.FieldDescriptor + fd_ChainInfo_fee_isSimulable protoreflect.FieldDescriptor + fd_ChainInfo_simul_gas_multiply protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ChainInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo") + fd_ChainInfo_chain_id_cosmos = md_ChainInfo.Fields().ByName("chain_id_cosmos") + fd_ChainInfo_chain_name = md_ChainInfo.Fields().ByName("chain_name") + fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") + fd_ChainInfo_bechAccountPrefix = md_ChainInfo.Fields().ByName("bechAccountPrefix") + fd_ChainInfo_bechValidatorPrefix = md_ChainInfo.Fields().ByName("bechValidatorPrefix") + fd_ChainInfo_origin_genesis_time = md_ChainInfo.Fields().ByName("origin_genesis_time") + fd_ChainInfo_accountType = md_ChainInfo.Fields().ByName("accountType") + fd_ChainInfo_grpc_endpoint = md_ChainInfo.Fields().ByName("grpc_endpoint") + fd_ChainInfo_lcd_endpoint = md_ChainInfo.Fields().ByName("lcd_endpoint") + fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") + fd_ChainInfo_fee_base = md_ChainInfo.Fields().ByName("fee_base") + fd_ChainInfo_fee_rate = md_ChainInfo.Fields().ByName("fee_rate") + fd_ChainInfo_fee_init_gas_limit = md_ChainInfo.Fields().ByName("fee_init_gas_limit") + fd_ChainInfo_fee_isSimulable = md_ChainInfo.Fields().ByName("fee_isSimulable") + fd_ChainInfo_simul_gas_multiply = md_ChainInfo.Fields().ByName("simul_gas_multiply") +} + +var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) + +type fastReflection_ChainInfo ChainInfo + +func (x *ChainInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ChainInfo)(x) +} + +func (x *ChainInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[4] + 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_ChainInfo_messageType fastReflection_ChainInfo_messageType +var _ protoreflect.MessageType = fastReflection_ChainInfo_messageType{} + +type fastReflection_ChainInfo_messageType struct{} + +func (x fastReflection_ChainInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ChainInfo)(nil) +} +func (x fastReflection_ChainInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ChainInfo) +} +func (x fastReflection_ChainInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ChainInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo +} + +// 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_ChainInfo) Type() protoreflect.MessageType { + return _fastReflection_ChainInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ChainInfo) New() protoreflect.Message { + return new(fastReflection_ChainInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ChainInfo) Interface() protoreflect.ProtoMessage { + return (*ChainInfo)(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_ChainInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ChainIdCosmos != "" { + value := protoreflect.ValueOfString(x.ChainIdCosmos) + if !f(fd_ChainInfo_chain_id_cosmos, value) { + return + } + } + if x.ChainName != "" { + value := protoreflect.ValueOfString(x.ChainName) + if !f(fd_ChainInfo_chain_name, value) { + return + } + } + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_ChainInfo_symbol, value) { + return + } + } + if x.BechAccountPrefix != "" { + value := protoreflect.ValueOfString(x.BechAccountPrefix) + if !f(fd_ChainInfo_bechAccountPrefix, value) { + return + } + } + if x.BechValidatorPrefix != "" { + value := protoreflect.ValueOfString(x.BechValidatorPrefix) + if !f(fd_ChainInfo_bechValidatorPrefix, value) { + return + } + } + if x.OriginGenesisTime != "" { + value := protoreflect.ValueOfString(x.OriginGenesisTime) + if !f(fd_ChainInfo_origin_genesis_time, value) { + return + } + } + if len(x.AccountType) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.AccountType}) + if !f(fd_ChainInfo_accountType, value) { + return + } + } + if len(x.GrpcEndpoint) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.GrpcEndpoint}) + if !f(fd_ChainInfo_grpc_endpoint, value) { + return + } + } + if len(x.LcdEndpoint) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_9_list{list: &x.LcdEndpoint}) + if !f(fd_ChainInfo_lcd_endpoint, value) { + return + } + } + if x.Explorer != nil { + value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + if !f(fd_ChainInfo_explorer, value) { + return + } + } + if x.FeeBase != "" { + value := protoreflect.ValueOfString(x.FeeBase) + if !f(fd_ChainInfo_fee_base, value) { + return + } + } + if len(x.FeeRate) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_12_list{list: &x.FeeRate}) + if !f(fd_ChainInfo_fee_rate, value) { + return + } + } + if x.FeeInitGasLimit != int32(0) { + value := protoreflect.ValueOfInt32(x.FeeInitGasLimit) + if !f(fd_ChainInfo_fee_init_gas_limit, value) { + return + } + } + if x.FeeIsSimulable != false { + value := protoreflect.ValueOfBool(x.FeeIsSimulable) + if !f(fd_ChainInfo_fee_isSimulable, value) { + return + } + } + if x.SimulGasMultiply != float64(0) || math.Signbit(x.SimulGasMultiply) { + value := protoreflect.ValueOfFloat64(x.SimulGasMultiply) + if !f(fd_ChainInfo_simul_gas_multiply, 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_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ChainInfo.chain_id_cosmos": + return x.ChainIdCosmos != "" + case "did.v1.ChainInfo.chain_name": + return x.ChainName != "" + case "did.v1.ChainInfo.symbol": + return x.Symbol != "" + case "did.v1.ChainInfo.bechAccountPrefix": + return x.BechAccountPrefix != "" + case "did.v1.ChainInfo.bechValidatorPrefix": + return x.BechValidatorPrefix != "" + case "did.v1.ChainInfo.origin_genesis_time": + return x.OriginGenesisTime != "" + case "did.v1.ChainInfo.accountType": + return len(x.AccountType) != 0 + case "did.v1.ChainInfo.grpc_endpoint": + return len(x.GrpcEndpoint) != 0 + case "did.v1.ChainInfo.lcd_endpoint": + return len(x.LcdEndpoint) != 0 + case "did.v1.ChainInfo.explorer": + return x.Explorer != nil + case "did.v1.ChainInfo.fee_base": + return x.FeeBase != "" + case "did.v1.ChainInfo.fee_rate": + return len(x.FeeRate) != 0 + case "did.v1.ChainInfo.fee_init_gas_limit": + return x.FeeInitGasLimit != int32(0) + case "did.v1.ChainInfo.fee_isSimulable": + return x.FeeIsSimulable != false + case "did.v1.ChainInfo.simul_gas_multiply": + return x.SimulGasMultiply != float64(0) || math.Signbit(x.SimulGasMultiply) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ChainInfo.chain_id_cosmos": + x.ChainIdCosmos = "" + case "did.v1.ChainInfo.chain_name": + x.ChainName = "" + case "did.v1.ChainInfo.symbol": + x.Symbol = "" + case "did.v1.ChainInfo.bechAccountPrefix": + x.BechAccountPrefix = "" + case "did.v1.ChainInfo.bechValidatorPrefix": + x.BechValidatorPrefix = "" + case "did.v1.ChainInfo.origin_genesis_time": + x.OriginGenesisTime = "" + case "did.v1.ChainInfo.accountType": + x.AccountType = nil + case "did.v1.ChainInfo.grpc_endpoint": + x.GrpcEndpoint = nil + case "did.v1.ChainInfo.lcd_endpoint": + x.LcdEndpoint = nil + case "did.v1.ChainInfo.explorer": + x.Explorer = nil + case "did.v1.ChainInfo.fee_base": + x.FeeBase = "" + case "did.v1.ChainInfo.fee_rate": + x.FeeRate = nil + case "did.v1.ChainInfo.fee_init_gas_limit": + x.FeeInitGasLimit = int32(0) + case "did.v1.ChainInfo.fee_isSimulable": + x.FeeIsSimulable = false + case "did.v1.ChainInfo.simul_gas_multiply": + x.SimulGasMultiply = float64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ChainInfo.chain_id_cosmos": + value := x.ChainIdCosmos + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.chain_name": + value := x.ChainName + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.bechAccountPrefix": + value := x.BechAccountPrefix + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.bechValidatorPrefix": + value := x.BechValidatorPrefix + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.origin_genesis_time": + value := x.OriginGenesisTime + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.accountType": + if len(x.AccountType) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_7_list{}) + } + listValue := &_ChainInfo_7_list{list: &x.AccountType} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.grpc_endpoint": + if len(x.GrpcEndpoint) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_8_list{}) + } + listValue := &_ChainInfo_8_list{list: &x.GrpcEndpoint} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.lcd_endpoint": + if len(x.LcdEndpoint) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_9_list{}) + } + listValue := &_ChainInfo_9_list{list: &x.LcdEndpoint} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.explorer": + value := x.Explorer + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.ChainInfo.fee_base": + value := x.FeeBase + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.fee_rate": + if len(x.FeeRate) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_12_list{}) + } + listValue := &_ChainInfo_12_list{list: &x.FeeRate} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.fee_init_gas_limit": + value := x.FeeInitGasLimit + return protoreflect.ValueOfInt32(value) + case "did.v1.ChainInfo.fee_isSimulable": + value := x.FeeIsSimulable + return protoreflect.ValueOfBool(value) + case "did.v1.ChainInfo.simul_gas_multiply": + value := x.SimulGasMultiply + return protoreflect.ValueOfFloat64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ChainInfo.chain_id_cosmos": + x.ChainIdCosmos = value.Interface().(string) + case "did.v1.ChainInfo.chain_name": + x.ChainName = value.Interface().(string) + case "did.v1.ChainInfo.symbol": + x.Symbol = value.Interface().(string) + case "did.v1.ChainInfo.bechAccountPrefix": + x.BechAccountPrefix = value.Interface().(string) + case "did.v1.ChainInfo.bechValidatorPrefix": + x.BechValidatorPrefix = value.Interface().(string) + case "did.v1.ChainInfo.origin_genesis_time": + x.OriginGenesisTime = value.Interface().(string) + case "did.v1.ChainInfo.accountType": + lv := value.List() + clv := lv.(*_ChainInfo_7_list) + x.AccountType = *clv.list + case "did.v1.ChainInfo.grpc_endpoint": + lv := value.List() + clv := lv.(*_ChainInfo_8_list) + x.GrpcEndpoint = *clv.list + case "did.v1.ChainInfo.lcd_endpoint": + lv := value.List() + clv := lv.(*_ChainInfo_9_list) + x.LcdEndpoint = *clv.list + case "did.v1.ChainInfo.explorer": + x.Explorer = value.Message().Interface().(*Meta) + case "did.v1.ChainInfo.fee_base": + x.FeeBase = value.Interface().(string) + case "did.v1.ChainInfo.fee_rate": + lv := value.List() + clv := lv.(*_ChainInfo_12_list) + x.FeeRate = *clv.list + case "did.v1.ChainInfo.fee_init_gas_limit": + x.FeeInitGasLimit = int32(value.Int()) + case "did.v1.ChainInfo.fee_isSimulable": + x.FeeIsSimulable = value.Bool() + case "did.v1.ChainInfo.simul_gas_multiply": + x.SimulGasMultiply = value.Float() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.accountType": + if x.AccountType == nil { + x.AccountType = []*Meta{} + } + value := &_ChainInfo_7_list{list: &x.AccountType} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.grpc_endpoint": + if x.GrpcEndpoint == nil { + x.GrpcEndpoint = []*Meta{} + } + value := &_ChainInfo_8_list{list: &x.GrpcEndpoint} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.lcd_endpoint": + if x.LcdEndpoint == nil { + x.LcdEndpoint = []*Meta{} + } + value := &_ChainInfo_9_list{list: &x.LcdEndpoint} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.explorer": + if x.Explorer == nil { + x.Explorer = new(Meta) + } + return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + case "did.v1.ChainInfo.fee_rate": + if x.FeeRate == nil { + x.FeeRate = []string{} + } + value := &_ChainInfo_12_list{list: &x.FeeRate} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.chain_id_cosmos": + panic(fmt.Errorf("field chain_id_cosmos of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.chain_name": + panic(fmt.Errorf("field chain_name of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.symbol": + panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.bechAccountPrefix": + panic(fmt.Errorf("field bechAccountPrefix of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.bechValidatorPrefix": + panic(fmt.Errorf("field bechValidatorPrefix of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.origin_genesis_time": + panic(fmt.Errorf("field origin_genesis_time of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.fee_base": + panic(fmt.Errorf("field fee_base of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.fee_init_gas_limit": + panic(fmt.Errorf("field fee_init_gas_limit of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.fee_isSimulable": + panic(fmt.Errorf("field fee_isSimulable of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.simul_gas_multiply": + panic(fmt.Errorf("field simul_gas_multiply of message did.v1.ChainInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.chain_id_cosmos": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.chain_name": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.symbol": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.bechAccountPrefix": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.bechValidatorPrefix": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.origin_genesis_time": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.accountType": + list := []*Meta{} + return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) + case "did.v1.ChainInfo.grpc_endpoint": + list := []*Meta{} + return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) + case "did.v1.ChainInfo.lcd_endpoint": + list := []*Meta{} + return protoreflect.ValueOfList(&_ChainInfo_9_list{list: &list}) + case "did.v1.ChainInfo.explorer": + m := new(Meta) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ChainInfo.fee_base": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.fee_rate": + list := []string{} + return protoreflect.ValueOfList(&_ChainInfo_12_list{list: &list}) + case "did.v1.ChainInfo.fee_init_gas_limit": + return protoreflect.ValueOfInt32(int32(0)) + case "did.v1.ChainInfo.fee_isSimulable": + return protoreflect.ValueOfBool(false) + case "did.v1.ChainInfo.simul_gas_multiply": + return protoreflect.ValueOfFloat64(float64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo 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_ChainInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo", 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_ChainInfo) 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_ChainInfo) 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_ChainInfo) 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_ChainInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ChainInfo) + 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.ChainIdCosmos) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BechAccountPrefix) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.BechValidatorPrefix) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginGenesisTime) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.AccountType) > 0 { + for _, e := range x.AccountType { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.GrpcEndpoint) > 0 { + for _, e := range x.GrpcEndpoint { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.LcdEndpoint) > 0 { + for _, e := range x.LcdEndpoint { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Explorer != nil { + l = options.Size(x.Explorer) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.FeeBase) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.FeeRate) > 0 { + for _, s := range x.FeeRate { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.FeeInitGasLimit != 0 { + n += 1 + runtime.Sov(uint64(x.FeeInitGasLimit)) + } + if x.FeeIsSimulable { + n += 2 + } + if x.SimulGasMultiply != 0 || math.Signbit(x.SimulGasMultiply) { + n += 9 + } + 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().(*ChainInfo) + 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.SimulGasMultiply != 0 || math.Signbit(x.SimulGasMultiply) { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.SimulGasMultiply)))) + i-- + dAtA[i] = 0x79 + } + if x.FeeIsSimulable { + i-- + if x.FeeIsSimulable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if x.FeeInitGasLimit != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.FeeInitGasLimit)) + i-- + dAtA[i] = 0x68 + } + if len(x.FeeRate) > 0 { + for iNdEx := len(x.FeeRate) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.FeeRate[iNdEx]) + copy(dAtA[i:], x.FeeRate[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRate[iNdEx]))) + i-- + dAtA[i] = 0x62 + } + } + if len(x.FeeBase) > 0 { + i -= len(x.FeeBase) + copy(dAtA[i:], x.FeeBase) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeBase))) + i-- + dAtA[i] = 0x5a + } + if x.Explorer != nil { + encoded, err := options.Marshal(x.Explorer) + 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] = 0x52 + } + if len(x.LcdEndpoint) > 0 { + for iNdEx := len(x.LcdEndpoint) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.LcdEndpoint[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + } + if len(x.GrpcEndpoint) > 0 { + for iNdEx := len(x.GrpcEndpoint) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.GrpcEndpoint[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.AccountType) > 0 { + for iNdEx := len(x.AccountType) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.AccountType[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.OriginGenesisTime) > 0 { + i -= len(x.OriginGenesisTime) + copy(dAtA[i:], x.OriginGenesisTime) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginGenesisTime))) + i-- + dAtA[i] = 0x32 + } + if len(x.BechValidatorPrefix) > 0 { + i -= len(x.BechValidatorPrefix) + copy(dAtA[i:], x.BechValidatorPrefix) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BechValidatorPrefix))) + i-- + dAtA[i] = 0x2a + } + if len(x.BechAccountPrefix) > 0 { + i -= len(x.BechAccountPrefix) + copy(dAtA[i:], x.BechAccountPrefix) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BechAccountPrefix))) + i-- + dAtA[i] = 0x22 + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0x1a + } + if len(x.ChainName) > 0 { + i -= len(x.ChainName) + copy(dAtA[i:], x.ChainName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) + i-- + dAtA[i] = 0x12 + } + if len(x.ChainIdCosmos) > 0 { + i -= len(x.ChainIdCosmos) + copy(dAtA[i:], x.ChainIdCosmos) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainIdCosmos))) + 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().(*ChainInfo) + 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: ChainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: 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 ChainIdCosmos", 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.ChainIdCosmos = 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 ChainName", 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.ChainName = 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 Symbol", 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.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BechAccountPrefix", 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.BechAccountPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BechValidatorPrefix", 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.BechValidatorPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginGenesisTime", 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.OriginGenesisTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AccountType = append(x.AccountType, &Meta{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AccountType[len(x.AccountType)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoint", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.GrpcEndpoint = append(x.GrpcEndpoint, &Meta{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoint[len(x.GrpcEndpoint)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LcdEndpoint", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.LcdEndpoint = append(x.LcdEndpoint, &Meta{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LcdEndpoint[len(x.LcdEndpoint)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", 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.Explorer == nil { + x.Explorer = &Meta{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeBase", 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.FeeBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeRate", 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.FeeRate = append(x.FeeRate, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 13: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInitGasLimit", wireType) + } + x.FeeInitGasLimit = 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.FeeInitGasLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeIsSimulable", wireType) + } + var v 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++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.FeeIsSimulable = bool(v != 0) + case 15: if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EncryptionRewardRate", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SimulGasMultiply", wireType) } var v uint64 if (iNdEx + 8) > l { @@ -1101,7 +4577,7 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) iNdEx += 8 - x.EncryptionRewardRate = float64(math.Float64frombits(v)) + x.SimulGasMultiply = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1193,14 +4669,10 @@ type Params struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Property Allowlist - PropertyAllowlist []string `protobuf:"bytes,2,rep,name=property_allowlist,json=propertyAllowlist,proto3" json:"property_allowlist,omitempty"` - // Whitelisted Verifications - WhitelistedOrigins []string `protobuf:"bytes,3,rep,name=whitelisted_origins,json=whitelistedOrigins,proto3" json:"whitelisted_origins,omitempty"` - // Assertion Reward Rate - AssertionRewardRate float64 `protobuf:"fixed64,4,opt,name=assertion_reward_rate,json=assertionRewardRate,proto3" json:"assertion_reward_rate,omitempty"` - // Encryption Reward Rate - EncryptionRewardRate float64 `protobuf:"fixed64,5,opt,name=encryption_reward_rate,json=encryptionRewardRate,proto3" json:"encryption_reward_rate,omitempty"` + // Whitelisted Assets + WhitelistedAssets []*AssetInfo `protobuf:"bytes,1,rep,name=whitelisted_assets,json=whitelistedAssets,proto3" json:"whitelisted_assets,omitempty"` + // Whitelisted Blockchains + WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` } func (x *Params) Reset() { @@ -1223,30 +4695,347 @@ func (*Params) Descriptor() ([]byte, []int) { return file_did_v1_genesis_proto_rawDescGZIP(), []int{1} } -func (x *Params) GetPropertyAllowlist() []string { +func (x *Params) GetWhitelistedAssets() []*AssetInfo { if x != nil { - return x.PropertyAllowlist + return x.WhitelistedAssets } return nil } -func (x *Params) GetWhitelistedOrigins() []string { +func (x *Params) GetWhitelistedChains() []*ChainInfo { if x != nil { - return x.WhitelistedOrigins + return x.WhitelistedChains } return nil } -func (x *Params) GetAssertionRewardRate() float64 { +// Meta represents +type Meta struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Key value data for the Property + Data map[string]string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *Meta) Reset() { + *x = Meta{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Meta) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Meta) ProtoMessage() {} + +// Deprecated: Use Meta.ProtoReflect.Descriptor instead. +func (*Meta) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} +} + +func (x *Meta) GetData() map[string]string { if x != nil { - return x.AssertionRewardRate + return x.Data + } + return nil +} + +type AssetInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OriginChain string `protobuf:"bytes,3,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` + OriginDenom string `protobuf:"bytes,4,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` + OriginType string `protobuf:"bytes,5,opt,name=origin_type,json=originType,proto3" json:"origin_type,omitempty"` + Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + Image string `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` + CoinGeckoId string `protobuf:"bytes,10,opt,name=coinGeckoId,proto3" json:"coinGeckoId,omitempty"` + Enable bool `protobuf:"varint,11,opt,name=enable,proto3" json:"enable,omitempty"` + Path string `protobuf:"bytes,12,opt,name=path,proto3" json:"path,omitempty"` + Channel string `protobuf:"bytes,13,opt,name=channel,proto3" json:"channel,omitempty"` + Port string `protobuf:"bytes,14,opt,name=port,proto3" json:"port,omitempty"` + CounterParty *Meta `protobuf:"bytes,15,opt,name=counter_party,json=counterParty,proto3" json:"counter_party,omitempty"` +} + +func (x *AssetInfo) Reset() { + *x = AssetInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssetInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetInfo) ProtoMessage() {} + +// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead. +func (*AssetInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{3} +} + +func (x *AssetInfo) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *AssetInfo) GetAssetType() string { + if x != nil { + return x.AssetType + } + return "" +} + +func (x *AssetInfo) GetOriginChain() string { + if x != nil { + return x.OriginChain + } + return "" +} + +func (x *AssetInfo) GetOriginDenom() string { + if x != nil { + return x.OriginDenom + } + return "" +} + +func (x *AssetInfo) GetOriginType() string { + if x != nil { + return x.OriginType + } + return "" +} + +func (x *AssetInfo) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *AssetInfo) GetDecimals() int32 { + if x != nil { + return x.Decimals } return 0 } -func (x *Params) GetEncryptionRewardRate() float64 { +func (x *AssetInfo) GetDescription() string { if x != nil { - return x.EncryptionRewardRate + return x.Description + } + return "" +} + +func (x *AssetInfo) GetImage() string { + if x != nil { + return x.Image + } + return "" +} + +func (x *AssetInfo) GetCoinGeckoId() string { + if x != nil { + return x.CoinGeckoId + } + return "" +} + +func (x *AssetInfo) GetEnable() bool { + if x != nil { + return x.Enable + } + return false +} + +func (x *AssetInfo) GetPath() string { + if x != nil { + return x.Path + } + return "" +} + +func (x *AssetInfo) GetChannel() string { + if x != nil { + return x.Channel + } + return "" +} + +func (x *AssetInfo) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + +func (x *AssetInfo) GetCounterParty() *Meta { + if x != nil { + return x.CounterParty + } + return nil +} + +type ChainInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ChainIdCosmos string `protobuf:"bytes,1,opt,name=chain_id_cosmos,json=chainIdCosmos,proto3" json:"chain_id_cosmos,omitempty"` + ChainName string `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + BechAccountPrefix string `protobuf:"bytes,4,opt,name=bechAccountPrefix,proto3" json:"bechAccountPrefix,omitempty"` + BechValidatorPrefix string `protobuf:"bytes,5,opt,name=bechValidatorPrefix,proto3" json:"bechValidatorPrefix,omitempty"` + OriginGenesisTime string `protobuf:"bytes,6,opt,name=origin_genesis_time,json=originGenesisTime,proto3" json:"origin_genesis_time,omitempty"` + AccountType []*Meta `protobuf:"bytes,7,rep,name=accountType,proto3" json:"accountType,omitempty"` + GrpcEndpoint []*Meta `protobuf:"bytes,8,rep,name=grpc_endpoint,json=grpcEndpoint,proto3" json:"grpc_endpoint,omitempty"` + LcdEndpoint []*Meta `protobuf:"bytes,9,rep,name=lcd_endpoint,json=lcdEndpoint,proto3" json:"lcd_endpoint,omitempty"` + Explorer *Meta `protobuf:"bytes,10,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeBase string `protobuf:"bytes,11,opt,name=fee_base,json=feeBase,proto3" json:"fee_base,omitempty"` + FeeRate []string `protobuf:"bytes,12,rep,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` + FeeInitGasLimit int32 `protobuf:"varint,13,opt,name=fee_init_gas_limit,json=feeInitGasLimit,proto3" json:"fee_init_gas_limit,omitempty"` + FeeIsSimulable bool `protobuf:"varint,14,opt,name=fee_isSimulable,json=feeIsSimulable,proto3" json:"fee_isSimulable,omitempty"` + SimulGasMultiply float64 `protobuf:"fixed64,15,opt,name=simul_gas_multiply,json=simulGasMultiply,proto3" json:"simul_gas_multiply,omitempty"` +} + +func (x *ChainInfo) Reset() { + *x = ChainInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo) ProtoMessage() {} + +// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{4} +} + +func (x *ChainInfo) GetChainIdCosmos() string { + if x != nil { + return x.ChainIdCosmos + } + return "" +} + +func (x *ChainInfo) GetChainName() string { + if x != nil { + return x.ChainName + } + return "" +} + +func (x *ChainInfo) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *ChainInfo) GetBechAccountPrefix() string { + if x != nil { + return x.BechAccountPrefix + } + return "" +} + +func (x *ChainInfo) GetBechValidatorPrefix() string { + if x != nil { + return x.BechValidatorPrefix + } + return "" +} + +func (x *ChainInfo) GetOriginGenesisTime() string { + if x != nil { + return x.OriginGenesisTime + } + return "" +} + +func (x *ChainInfo) GetAccountType() []*Meta { + if x != nil { + return x.AccountType + } + return nil +} + +func (x *ChainInfo) GetGrpcEndpoint() []*Meta { + if x != nil { + return x.GrpcEndpoint + } + return nil +} + +func (x *ChainInfo) GetLcdEndpoint() []*Meta { + if x != nil { + return x.LcdEndpoint + } + return nil +} + +func (x *ChainInfo) GetExplorer() *Meta { + if x != nil { + return x.Explorer + } + return nil +} + +func (x *ChainInfo) GetFeeBase() string { + if x != nil { + return x.FeeBase + } + return "" +} + +func (x *ChainInfo) GetFeeRate() []string { + if x != nil { + return x.FeeRate + } + return nil +} + +func (x *ChainInfo) GetFeeInitGasLimit() int32 { + if x != nil { + return x.FeeInitGasLimit + } + return 0 +} + +func (x *ChainInfo) GetFeeIsSimulable() bool { + if x != nil { + return x.FeeIsSimulable + } + return false +} + +func (x *ChainInfo) GetSimulGasMultiply() float64 { + if x != nil { + return x.SimulGasMultiply } return 0 } @@ -1262,30 +5051,102 @@ var file_did_v1_genesis_proto_rawDesc = []byte{ 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xeb, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x61, 0x6c, 0x6c, - 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x11, 0x70, 0x72, - 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, - 0x2f, 0x0a, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x73, - 0x12, 0x32, 0x0a, 0x15, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x65, - 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x01, 0x52, - 0x13, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, - 0x52, 0x61, 0x74, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x72, 0x65, 0x77, 0x61, 0x72, 0x64, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x01, 0x52, 0x14, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x77, 0x61, 0x72, 0x64, 0x52, 0x61, 0x74, 0x65, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, - 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, - 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, - 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, + 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, + 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, + 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, + 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, + 0x61, 0x69, 0x6e, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, + 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x82, 0x01, + 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, + 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x15, 0x98, 0xa0, 0x1f, + 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x08, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x65, + 0x74, 0x61, 0x22, 0xc2, 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, + 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, + 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x69, 0x6e, + 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6f, 0x69, 0x6e, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, + 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, + 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, + 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x22, 0xf2, 0x04, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, + 0x64, 0x5f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x12, 0x1d, 0x0a, + 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, + 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x62, 0x65, 0x63, 0x68, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x11, 0x62, 0x65, 0x63, 0x68, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x66, + 0x69, 0x78, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x65, 0x63, 0x68, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x13, 0x62, 0x65, 0x63, 0x68, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, + 0x65, 0x66, 0x69, 0x78, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, + 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x0c, 0x6c, 0x63, 0x64, 0x5f, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x6c, 0x63, 0x64, + 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6c, + 0x6f, 0x72, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, + 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x18, 0x0b, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x65, 0x65, 0x42, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, + 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x12, 0x66, 0x65, 0x65, 0x5f, + 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, + 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x73, 0x53, + 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, + 0x66, 0x65, 0x65, 0x49, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, + 0x0a, 0x12, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x70, 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x69, 0x6d, 0x75, + 0x6c, 0x47, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x42, 0x7c, 0x0a, 0x0a, + 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, + 0x73, 0x69, 0x73, 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, 0x68, 0x77, + 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, + 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, + 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1300,18 +5161,30 @@ func file_did_v1_genesis_proto_rawDescGZIP() []byte { return file_did_v1_genesis_proto_rawDescData } -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_did_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: did.v1.GenesisState (*Params)(nil), // 1: did.v1.Params + (*Meta)(nil), // 2: did.v1.Meta + (*AssetInfo)(nil), // 3: did.v1.AssetInfo + (*ChainInfo)(nil), // 4: did.v1.ChainInfo + nil, // 5: did.v1.Meta.DataEntry } var file_did_v1_genesis_proto_depIdxs = []int32{ 1, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] 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 + 3, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo + 4, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo + 5, // 3: did.v1.Meta.data:type_name -> did.v1.Meta.DataEntry + 2, // 4: did.v1.AssetInfo.counter_party:type_name -> did.v1.Meta + 2, // 5: did.v1.ChainInfo.accountType:type_name -> did.v1.Meta + 2, // 6: did.v1.ChainInfo.grpc_endpoint:type_name -> did.v1.Meta + 2, // 7: did.v1.ChainInfo.lcd_endpoint:type_name -> did.v1.Meta + 2, // 8: did.v1.ChainInfo.explorer:type_name -> did.v1.Meta + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_did_v1_genesis_proto_init() } @@ -1344,6 +5217,42 @@ func file_did_v1_genesis_proto_init() { return nil } } + file_did_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Meta); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*AssetInfo); 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[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo); 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{ @@ -1351,7 +5260,7 @@ func file_did_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 6, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index 36a851976..a8d8a1386 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -17,6 +17,9 @@ type AliasesTable interface { 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) (*Aliases, error) + HasByHandle(ctx context.Context, handle string) (found bool, err error) + // GetByHandle returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByHandle(ctx context.Context, handle string) (*Aliases, error) List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error @@ -57,6 +60,19 @@ func (this AliasesIdIndexKey) WithId(id string) AliasesIdIndexKey { return this } +type AliasesHandleIndexKey struct { + vs []interface{} +} + +func (x AliasesHandleIndexKey) id() uint32 { return 1 } +func (x AliasesHandleIndexKey) values() []interface{} { return x.vs } +func (x AliasesHandleIndexKey) aliasesIndexKey() {} + +func (this AliasesHandleIndexKey) WithHandle(handle string) AliasesHandleIndexKey { + this.vs = []interface{}{handle} + return this +} + type aliasesTable struct { table ormtable.Table } @@ -93,6 +109,26 @@ func (this aliasesTable) Get(ctx context.Context, id string) (*Aliases, error) { return &aliases, nil } +func (this aliasesTable) HasByHandle(ctx context.Context, handle string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + handle, + ) +} + +func (this aliasesTable) GetByHandle(ctx context.Context, handle string) (*Aliases, error) { + var aliases Aliases + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &aliases, + handle, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &aliases, nil +} + func (this aliasesTable) List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) return AliasesIterator{it}, err diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 8ca876f9b..026d2fde6 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -5126,7 +5126,7 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 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, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x99, 0x01, 0x0a, 0x07, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, @@ -5135,88 +5135,89 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, - 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, - 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, - 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x3b, 0x0a, - 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, - 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x41, - 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, - 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, - 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, - 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, - 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x03, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1c, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x16, 0x0a, + 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, + 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, + 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, + 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, + 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, + 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, + 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, + 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, + 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, + 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, + 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, + 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, + 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, + 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, + 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, - 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, - 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, - 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, - 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, - 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, - 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, - 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, - 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, - 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, - 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, - 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, - 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, - 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x1a, - 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x05, 0x22, 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, - 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, - 0x12, 0x29, 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, - 0x69, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x06, 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, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, - 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, + 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, + 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, + 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, + 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, + 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, + 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, + 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x22, + 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, + 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, + 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, + 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, + 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, + 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, + 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, + 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index ca891f181..3dad1b969 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -3391,33 +3391,33 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xa0, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, + 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x14, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1f, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, - 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, - 0x27, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, - 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x12, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, - 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x29, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 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, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, - 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, - 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x27, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x12, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x1a, 0x29, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, + 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 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, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, + 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, + 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, + 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3445,10 +3445,10 @@ var file_did_v1_tx_proto_goTypes = []interface{}{ var file_did_v1_tx_proto_depIdxs = []int32{ 6, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params 0, // 1: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 2, // 2: did.v1.Msg.InitializeController:input_type -> did.v1.MsgInitializeController + 2, // 2: did.v1.Msg.RegisterController:input_type -> did.v1.MsgInitializeController 4, // 3: did.v1.Msg.AuthenticateController:input_type -> did.v1.MsgAuthenticateController 1, // 4: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 3, // 5: did.v1.Msg.InitializeController:output_type -> did.v1.MsgInitializeControllerResponse + 3, // 5: did.v1.Msg.RegisterController:output_type -> did.v1.MsgInitializeControllerResponse 5, // 6: did.v1.Msg.AuthenticateController:output_type -> did.v1.MsgAuthenticateControllerResponse 4, // [4:7] is the sub-list for method output_type 1, // [1:4] is the sub-list for method input_type diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index 3b7853751..21ed312a1 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -20,7 +20,7 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" - Msg_InitializeController_FullMethodName = "/did.v1.Msg/InitializeController" + Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" Msg_AuthenticateController_FullMethodName = "/did.v1.Msg/AuthenticateController" ) @@ -32,8 +32,8 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // InitializeController initializes a controller with the given assertions, keyshares, and verifications. - InitializeController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) // AuthenticateController asserts the given controller is the owner of the given address. AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) } @@ -55,9 +55,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) InitializeController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { +func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { out := new(MsgInitializeControllerResponse) - err := c.cc.Invoke(ctx, Msg_InitializeController_FullMethodName, in, out, opts...) + err := c.cc.Invoke(ctx, Msg_RegisterController_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -81,8 +81,8 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // InitializeController initializes a controller with the given assertions, keyshares, and verifications. - InitializeController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) // AuthenticateController asserts the given controller is the owner of the given address. AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) mustEmbedUnimplementedMsgServer() @@ -95,8 +95,8 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) InitializeController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InitializeController not implemented") +func (UnimplementedMsgServer) RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } func (UnimplementedMsgServer) AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") @@ -132,20 +132,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_InitializeController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgInitializeController) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).InitializeController(ctx, in) + return srv.(MsgServer).RegisterController(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_InitializeController_FullMethodName, + FullMethod: Msg_RegisterController_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).InitializeController(ctx, req.(*MsgInitializeController)) + return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController)) } return interceptor(ctx, in, info, handler) } @@ -180,8 +180,8 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "InitializeController", - Handler: _Msg_InitializeController_Handler, + MethodName: "RegisterController", + Handler: _Msg_RegisterController_Handler, }, { MethodName: "AuthenticateController", diff --git a/api/did/v1/account.pulsar.go b/api/did/v1/types.pulsar.go similarity index 76% rename from api/did/v1/account.pulsar.go rename to api/did/v1/types.pulsar.go index 6a0288ea2..475fe7f8b 100644 --- a/api/did/v1/account.pulsar.go +++ b/api/did/v1/types.pulsar.go @@ -2,6 +2,7 @@ package didv1 import ( + _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -15,272 +16,272 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_DIDDocument_2_list)(nil) +var _ protoreflect.List = (*_BaseDocument_2_list)(nil) -type _DIDDocument_2_list struct { +type _BaseDocument_2_list struct { list *[]*VerificationMethod } -func (x *_DIDDocument_2_list) Len() int { +func (x *_BaseDocument_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DIDDocument_2_list) Get(i int) protoreflect.Value { +func (x *_BaseDocument_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_DIDDocument_2_list) Set(i int, value protoreflect.Value) { +func (x *_BaseDocument_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*VerificationMethod) (*x.list)[i] = concreteValue } -func (x *_DIDDocument_2_list) Append(value protoreflect.Value) { +func (x *_BaseDocument_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*VerificationMethod) *x.list = append(*x.list, concreteValue) } -func (x *_DIDDocument_2_list) AppendMutable() protoreflect.Value { +func (x *_BaseDocument_2_list) AppendMutable() protoreflect.Value { v := new(VerificationMethod) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_DIDDocument_2_list) Truncate(n int) { +func (x *_BaseDocument_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_DIDDocument_2_list) NewElement() protoreflect.Value { +func (x *_BaseDocument_2_list) NewElement() protoreflect.Value { v := new(VerificationMethod) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_DIDDocument_2_list) IsValid() bool { +func (x *_BaseDocument_2_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_DIDDocument_4_list)(nil) +var _ protoreflect.List = (*_BaseDocument_4_list)(nil) -type _DIDDocument_4_list struct { +type _BaseDocument_4_list struct { list *[]string } -func (x *_DIDDocument_4_list) Len() int { +func (x *_BaseDocument_4_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DIDDocument_4_list) Get(i int) protoreflect.Value { +func (x *_BaseDocument_4_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_DIDDocument_4_list) Set(i int, value protoreflect.Value) { +func (x *_BaseDocument_4_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_DIDDocument_4_list) Append(value protoreflect.Value) { +func (x *_BaseDocument_4_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_DIDDocument_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DIDDocument at list field Authentication as it is not of Message kind")) +func (x *_BaseDocument_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field Authentication as it is not of Message kind")) } -func (x *_DIDDocument_4_list) Truncate(n int) { +func (x *_BaseDocument_4_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_DIDDocument_4_list) NewElement() protoreflect.Value { +func (x *_BaseDocument_4_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_DIDDocument_4_list) IsValid() bool { +func (x *_BaseDocument_4_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_DIDDocument_5_list)(nil) +var _ protoreflect.List = (*_BaseDocument_5_list)(nil) -type _DIDDocument_5_list struct { +type _BaseDocument_5_list struct { list *[]string } -func (x *_DIDDocument_5_list) Len() int { +func (x *_BaseDocument_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DIDDocument_5_list) Get(i int) protoreflect.Value { +func (x *_BaseDocument_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_DIDDocument_5_list) Set(i int, value protoreflect.Value) { +func (x *_BaseDocument_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_DIDDocument_5_list) Append(value protoreflect.Value) { +func (x *_BaseDocument_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_DIDDocument_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DIDDocument at list field AssertionMethod as it is not of Message kind")) +func (x *_BaseDocument_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field AssertionMethod as it is not of Message kind")) } -func (x *_DIDDocument_5_list) Truncate(n int) { +func (x *_BaseDocument_5_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_DIDDocument_5_list) NewElement() protoreflect.Value { +func (x *_BaseDocument_5_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_DIDDocument_5_list) IsValid() bool { +func (x *_BaseDocument_5_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_DIDDocument_7_list)(nil) +var _ protoreflect.List = (*_BaseDocument_7_list)(nil) -type _DIDDocument_7_list struct { +type _BaseDocument_7_list struct { list *[]string } -func (x *_DIDDocument_7_list) Len() int { +func (x *_BaseDocument_7_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DIDDocument_7_list) Get(i int) protoreflect.Value { +func (x *_BaseDocument_7_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_DIDDocument_7_list) Set(i int, value protoreflect.Value) { +func (x *_BaseDocument_7_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_DIDDocument_7_list) Append(value protoreflect.Value) { +func (x *_BaseDocument_7_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_DIDDocument_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DIDDocument at list field CapabilityDelegation as it is not of Message kind")) +func (x *_BaseDocument_7_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field CapabilityDelegation as it is not of Message kind")) } -func (x *_DIDDocument_7_list) Truncate(n int) { +func (x *_BaseDocument_7_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_DIDDocument_7_list) NewElement() protoreflect.Value { +func (x *_BaseDocument_7_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_DIDDocument_7_list) IsValid() bool { +func (x *_BaseDocument_7_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_DIDDocument_8_list)(nil) +var _ protoreflect.List = (*_BaseDocument_8_list)(nil) -type _DIDDocument_8_list struct { +type _BaseDocument_8_list struct { list *[]string } -func (x *_DIDDocument_8_list) Len() int { +func (x *_BaseDocument_8_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_DIDDocument_8_list) Get(i int) protoreflect.Value { +func (x *_BaseDocument_8_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_DIDDocument_8_list) Set(i int, value protoreflect.Value) { +func (x *_BaseDocument_8_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_DIDDocument_8_list) Append(value protoreflect.Value) { +func (x *_BaseDocument_8_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_DIDDocument_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DIDDocument at list field CapabilityInvocation as it is not of Message kind")) +func (x *_BaseDocument_8_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field CapabilityInvocation as it is not of Message kind")) } -func (x *_DIDDocument_8_list) Truncate(n int) { +func (x *_BaseDocument_8_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_DIDDocument_8_list) NewElement() protoreflect.Value { +func (x *_BaseDocument_8_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_DIDDocument_8_list) IsValid() bool { +func (x *_BaseDocument_8_list) IsValid() bool { return x.list != nil } var ( - md_DIDDocument protoreflect.MessageDescriptor - fd_DIDDocument_id protoreflect.FieldDescriptor - fd_DIDDocument_verification_methods protoreflect.FieldDescriptor - fd_DIDDocument_authentication protoreflect.FieldDescriptor - fd_DIDDocument_assertion_method protoreflect.FieldDescriptor - fd_DIDDocument_capability_delegation protoreflect.FieldDescriptor - fd_DIDDocument_capability_invocation protoreflect.FieldDescriptor + md_BaseDocument protoreflect.MessageDescriptor + fd_BaseDocument_id protoreflect.FieldDescriptor + fd_BaseDocument_verification_methods protoreflect.FieldDescriptor + fd_BaseDocument_authentication protoreflect.FieldDescriptor + fd_BaseDocument_assertion_method protoreflect.FieldDescriptor + fd_BaseDocument_capability_delegation protoreflect.FieldDescriptor + fd_BaseDocument_capability_invocation protoreflect.FieldDescriptor ) func init() { - file_did_v1_account_proto_init() - md_DIDDocument = File_did_v1_account_proto.Messages().ByName("DIDDocument") - fd_DIDDocument_id = md_DIDDocument.Fields().ByName("id") - fd_DIDDocument_verification_methods = md_DIDDocument.Fields().ByName("verification_methods") - fd_DIDDocument_authentication = md_DIDDocument.Fields().ByName("authentication") - fd_DIDDocument_assertion_method = md_DIDDocument.Fields().ByName("assertion_method") - fd_DIDDocument_capability_delegation = md_DIDDocument.Fields().ByName("capability_delegation") - fd_DIDDocument_capability_invocation = md_DIDDocument.Fields().ByName("capability_invocation") + file_did_v1_types_proto_init() + md_BaseDocument = File_did_v1_types_proto.Messages().ByName("BaseDocument") + fd_BaseDocument_id = md_BaseDocument.Fields().ByName("id") + fd_BaseDocument_verification_methods = md_BaseDocument.Fields().ByName("verification_methods") + fd_BaseDocument_authentication = md_BaseDocument.Fields().ByName("authentication") + fd_BaseDocument_assertion_method = md_BaseDocument.Fields().ByName("assertion_method") + fd_BaseDocument_capability_delegation = md_BaseDocument.Fields().ByName("capability_delegation") + fd_BaseDocument_capability_invocation = md_BaseDocument.Fields().ByName("capability_invocation") } -var _ protoreflect.Message = (*fastReflection_DIDDocument)(nil) +var _ protoreflect.Message = (*fastReflection_BaseDocument)(nil) -type fastReflection_DIDDocument DIDDocument +type fastReflection_BaseDocument BaseDocument -func (x *DIDDocument) ProtoReflect() protoreflect.Message { - return (*fastReflection_DIDDocument)(x) +func (x *BaseDocument) ProtoReflect() protoreflect.Message { + return (*fastReflection_BaseDocument)(x) } -func (x *DIDDocument) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_account_proto_msgTypes[0] +func (x *BaseDocument) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -291,43 +292,43 @@ func (x *DIDDocument) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_DIDDocument_messageType fastReflection_DIDDocument_messageType -var _ protoreflect.MessageType = fastReflection_DIDDocument_messageType{} +var _fastReflection_BaseDocument_messageType fastReflection_BaseDocument_messageType +var _ protoreflect.MessageType = fastReflection_BaseDocument_messageType{} -type fastReflection_DIDDocument_messageType struct{} +type fastReflection_BaseDocument_messageType struct{} -func (x fastReflection_DIDDocument_messageType) Zero() protoreflect.Message { - return (*fastReflection_DIDDocument)(nil) +func (x fastReflection_BaseDocument_messageType) Zero() protoreflect.Message { + return (*fastReflection_BaseDocument)(nil) } -func (x fastReflection_DIDDocument_messageType) New() protoreflect.Message { - return new(fastReflection_DIDDocument) +func (x fastReflection_BaseDocument_messageType) New() protoreflect.Message { + return new(fastReflection_BaseDocument) } -func (x fastReflection_DIDDocument_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DIDDocument +func (x fastReflection_BaseDocument_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_BaseDocument } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_DIDDocument) Descriptor() protoreflect.MessageDescriptor { - return md_DIDDocument +func (x *fastReflection_BaseDocument) Descriptor() protoreflect.MessageDescriptor { + return md_BaseDocument } // 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_DIDDocument) Type() protoreflect.MessageType { - return _fastReflection_DIDDocument_messageType +func (x *fastReflection_BaseDocument) Type() protoreflect.MessageType { + return _fastReflection_BaseDocument_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_DIDDocument) New() protoreflect.Message { - return new(fastReflection_DIDDocument) +func (x *fastReflection_BaseDocument) New() protoreflect.Message { + return new(fastReflection_BaseDocument) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_DIDDocument) Interface() protoreflect.ProtoMessage { - return (*DIDDocument)(x) +func (x *fastReflection_BaseDocument) Interface() protoreflect.ProtoMessage { + return (*BaseDocument)(x) } // Range iterates over every populated field in an undefined order, @@ -335,40 +336,40 @@ func (x *fastReflection_DIDDocument) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_DIDDocument) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_BaseDocument) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_DIDDocument_id, value) { + if !f(fd_BaseDocument_id, value) { return } } if len(x.VerificationMethods) != 0 { - value := protoreflect.ValueOfList(&_DIDDocument_2_list{list: &x.VerificationMethods}) - if !f(fd_DIDDocument_verification_methods, value) { + value := protoreflect.ValueOfList(&_BaseDocument_2_list{list: &x.VerificationMethods}) + if !f(fd_BaseDocument_verification_methods, value) { return } } if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_DIDDocument_4_list{list: &x.Authentication}) - if !f(fd_DIDDocument_authentication, value) { + value := protoreflect.ValueOfList(&_BaseDocument_4_list{list: &x.Authentication}) + if !f(fd_BaseDocument_authentication, value) { return } } if len(x.AssertionMethod) != 0 { - value := protoreflect.ValueOfList(&_DIDDocument_5_list{list: &x.AssertionMethod}) - if !f(fd_DIDDocument_assertion_method, value) { + value := protoreflect.ValueOfList(&_BaseDocument_5_list{list: &x.AssertionMethod}) + if !f(fd_BaseDocument_assertion_method, value) { return } } if len(x.CapabilityDelegation) != 0 { - value := protoreflect.ValueOfList(&_DIDDocument_7_list{list: &x.CapabilityDelegation}) - if !f(fd_DIDDocument_capability_delegation, value) { + value := protoreflect.ValueOfList(&_BaseDocument_7_list{list: &x.CapabilityDelegation}) + if !f(fd_BaseDocument_capability_delegation, value) { return } } if len(x.CapabilityInvocation) != 0 { - value := protoreflect.ValueOfList(&_DIDDocument_8_list{list: &x.CapabilityInvocation}) - if !f(fd_DIDDocument_capability_invocation, value) { + value := protoreflect.ValueOfList(&_BaseDocument_8_list{list: &x.CapabilityInvocation}) + if !f(fd_BaseDocument_capability_invocation, value) { return } } @@ -385,25 +386,25 @@ func (x *fastReflection_DIDDocument) Range(f func(protoreflect.FieldDescriptor, // 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_DIDDocument) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_BaseDocument) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.DIDDocument.id": + case "did.v1.BaseDocument.id": return x.Id != "" - case "did.v1.DIDDocument.verification_methods": + case "did.v1.BaseDocument.verification_methods": return len(x.VerificationMethods) != 0 - case "did.v1.DIDDocument.authentication": + case "did.v1.BaseDocument.authentication": return len(x.Authentication) != 0 - case "did.v1.DIDDocument.assertion_method": + case "did.v1.BaseDocument.assertion_method": return len(x.AssertionMethod) != 0 - case "did.v1.DIDDocument.capability_delegation": + case "did.v1.BaseDocument.capability_delegation": return len(x.CapabilityDelegation) != 0 - case "did.v1.DIDDocument.capability_invocation": + case "did.v1.BaseDocument.capability_invocation": return len(x.CapabilityInvocation) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DIDDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) } - panic(fmt.Errorf("message did.v1.DIDDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) } } @@ -413,25 +414,25 @@ func (x *fastReflection_DIDDocument) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DIDDocument) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_BaseDocument) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.DIDDocument.id": + case "did.v1.BaseDocument.id": x.Id = "" - case "did.v1.DIDDocument.verification_methods": + case "did.v1.BaseDocument.verification_methods": x.VerificationMethods = nil - case "did.v1.DIDDocument.authentication": + case "did.v1.BaseDocument.authentication": x.Authentication = nil - case "did.v1.DIDDocument.assertion_method": + case "did.v1.BaseDocument.assertion_method": x.AssertionMethod = nil - case "did.v1.DIDDocument.capability_delegation": + case "did.v1.BaseDocument.capability_delegation": x.CapabilityDelegation = nil - case "did.v1.DIDDocument.capability_invocation": + case "did.v1.BaseDocument.capability_invocation": x.CapabilityInvocation = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DIDDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) } - panic(fmt.Errorf("message did.v1.DIDDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) } } @@ -441,46 +442,46 @@ func (x *fastReflection_DIDDocument) Clear(fd protoreflect.FieldDescriptor) { // 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_DIDDocument) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_BaseDocument) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.DIDDocument.id": + case "did.v1.BaseDocument.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.DIDDocument.verification_methods": + case "did.v1.BaseDocument.verification_methods": if len(x.VerificationMethods) == 0 { - return protoreflect.ValueOfList(&_DIDDocument_2_list{}) + return protoreflect.ValueOfList(&_BaseDocument_2_list{}) } - listValue := &_DIDDocument_2_list{list: &x.VerificationMethods} + listValue := &_BaseDocument_2_list{list: &x.VerificationMethods} return protoreflect.ValueOfList(listValue) - case "did.v1.DIDDocument.authentication": + case "did.v1.BaseDocument.authentication": if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_DIDDocument_4_list{}) + return protoreflect.ValueOfList(&_BaseDocument_4_list{}) } - listValue := &_DIDDocument_4_list{list: &x.Authentication} + listValue := &_BaseDocument_4_list{list: &x.Authentication} return protoreflect.ValueOfList(listValue) - case "did.v1.DIDDocument.assertion_method": + case "did.v1.BaseDocument.assertion_method": if len(x.AssertionMethod) == 0 { - return protoreflect.ValueOfList(&_DIDDocument_5_list{}) + return protoreflect.ValueOfList(&_BaseDocument_5_list{}) } - listValue := &_DIDDocument_5_list{list: &x.AssertionMethod} + listValue := &_BaseDocument_5_list{list: &x.AssertionMethod} return protoreflect.ValueOfList(listValue) - case "did.v1.DIDDocument.capability_delegation": + case "did.v1.BaseDocument.capability_delegation": if len(x.CapabilityDelegation) == 0 { - return protoreflect.ValueOfList(&_DIDDocument_7_list{}) + return protoreflect.ValueOfList(&_BaseDocument_7_list{}) } - listValue := &_DIDDocument_7_list{list: &x.CapabilityDelegation} + listValue := &_BaseDocument_7_list{list: &x.CapabilityDelegation} return protoreflect.ValueOfList(listValue) - case "did.v1.DIDDocument.capability_invocation": + case "did.v1.BaseDocument.capability_invocation": if len(x.CapabilityInvocation) == 0 { - return protoreflect.ValueOfList(&_DIDDocument_8_list{}) + return protoreflect.ValueOfList(&_BaseDocument_8_list{}) } - listValue := &_DIDDocument_8_list{list: &x.CapabilityInvocation} + listValue := &_BaseDocument_8_list{list: &x.CapabilityInvocation} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DIDDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) } - panic(fmt.Errorf("message did.v1.DIDDocument does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", descriptor.FullName())) } } @@ -494,35 +495,35 @@ func (x *fastReflection_DIDDocument) Get(descriptor protoreflect.FieldDescriptor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DIDDocument) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_BaseDocument) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.DIDDocument.id": + case "did.v1.BaseDocument.id": x.Id = value.Interface().(string) - case "did.v1.DIDDocument.verification_methods": + case "did.v1.BaseDocument.verification_methods": lv := value.List() - clv := lv.(*_DIDDocument_2_list) + clv := lv.(*_BaseDocument_2_list) x.VerificationMethods = *clv.list - case "did.v1.DIDDocument.authentication": + case "did.v1.BaseDocument.authentication": lv := value.List() - clv := lv.(*_DIDDocument_4_list) + clv := lv.(*_BaseDocument_4_list) x.Authentication = *clv.list - case "did.v1.DIDDocument.assertion_method": + case "did.v1.BaseDocument.assertion_method": lv := value.List() - clv := lv.(*_DIDDocument_5_list) + clv := lv.(*_BaseDocument_5_list) x.AssertionMethod = *clv.list - case "did.v1.DIDDocument.capability_delegation": + case "did.v1.BaseDocument.capability_delegation": lv := value.List() - clv := lv.(*_DIDDocument_7_list) + clv := lv.(*_BaseDocument_7_list) x.CapabilityDelegation = *clv.list - case "did.v1.DIDDocument.capability_invocation": + case "did.v1.BaseDocument.capability_invocation": lv := value.List() - clv := lv.(*_DIDDocument_8_list) + clv := lv.(*_BaseDocument_8_list) x.CapabilityInvocation = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DIDDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) } - panic(fmt.Errorf("message did.v1.DIDDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) } } @@ -536,85 +537,85 @@ func (x *fastReflection_DIDDocument) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DIDDocument) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_BaseDocument) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.DIDDocument.verification_methods": + case "did.v1.BaseDocument.verification_methods": if x.VerificationMethods == nil { x.VerificationMethods = []*VerificationMethod{} } - value := &_DIDDocument_2_list{list: &x.VerificationMethods} + value := &_BaseDocument_2_list{list: &x.VerificationMethods} return protoreflect.ValueOfList(value) - case "did.v1.DIDDocument.authentication": + case "did.v1.BaseDocument.authentication": if x.Authentication == nil { x.Authentication = []string{} } - value := &_DIDDocument_4_list{list: &x.Authentication} + value := &_BaseDocument_4_list{list: &x.Authentication} return protoreflect.ValueOfList(value) - case "did.v1.DIDDocument.assertion_method": + case "did.v1.BaseDocument.assertion_method": if x.AssertionMethod == nil { x.AssertionMethod = []string{} } - value := &_DIDDocument_5_list{list: &x.AssertionMethod} + value := &_BaseDocument_5_list{list: &x.AssertionMethod} return protoreflect.ValueOfList(value) - case "did.v1.DIDDocument.capability_delegation": + case "did.v1.BaseDocument.capability_delegation": if x.CapabilityDelegation == nil { x.CapabilityDelegation = []string{} } - value := &_DIDDocument_7_list{list: &x.CapabilityDelegation} + value := &_BaseDocument_7_list{list: &x.CapabilityDelegation} return protoreflect.ValueOfList(value) - case "did.v1.DIDDocument.capability_invocation": + case "did.v1.BaseDocument.capability_invocation": if x.CapabilityInvocation == nil { x.CapabilityInvocation = []string{} } - value := &_DIDDocument_8_list{list: &x.CapabilityInvocation} + value := &_BaseDocument_8_list{list: &x.CapabilityInvocation} return protoreflect.ValueOfList(value) - case "did.v1.DIDDocument.id": - panic(fmt.Errorf("field id of message did.v1.DIDDocument is not mutable")) + case "did.v1.BaseDocument.id": + panic(fmt.Errorf("field id of message did.v1.BaseDocument is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DIDDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) } - panic(fmt.Errorf("message did.v1.DIDDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.BaseDocument 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_DIDDocument) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_BaseDocument) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.DIDDocument.id": + case "did.v1.BaseDocument.id": return protoreflect.ValueOfString("") - case "did.v1.DIDDocument.verification_methods": + case "did.v1.BaseDocument.verification_methods": list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_DIDDocument_2_list{list: &list}) - case "did.v1.DIDDocument.authentication": + return protoreflect.ValueOfList(&_BaseDocument_2_list{list: &list}) + case "did.v1.BaseDocument.authentication": list := []string{} - return protoreflect.ValueOfList(&_DIDDocument_4_list{list: &list}) - case "did.v1.DIDDocument.assertion_method": + return protoreflect.ValueOfList(&_BaseDocument_4_list{list: &list}) + case "did.v1.BaseDocument.assertion_method": list := []string{} - return protoreflect.ValueOfList(&_DIDDocument_5_list{list: &list}) - case "did.v1.DIDDocument.capability_delegation": + return protoreflect.ValueOfList(&_BaseDocument_5_list{list: &list}) + case "did.v1.BaseDocument.capability_delegation": list := []string{} - return protoreflect.ValueOfList(&_DIDDocument_7_list{list: &list}) - case "did.v1.DIDDocument.capability_invocation": + return protoreflect.ValueOfList(&_BaseDocument_7_list{list: &list}) + case "did.v1.BaseDocument.capability_invocation": list := []string{} - return protoreflect.ValueOfList(&_DIDDocument_8_list{list: &list}) + return protoreflect.ValueOfList(&_BaseDocument_8_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DIDDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) } - panic(fmt.Errorf("message did.v1.DIDDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.BaseDocument 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_DIDDocument) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_BaseDocument) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.DIDDocument", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.BaseDocument", d.FullName())) } panic("unreachable") } @@ -622,7 +623,7 @@ func (x *fastReflection_DIDDocument) WhichOneof(d protoreflect.OneofDescriptor) // 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_DIDDocument) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_BaseDocument) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -633,7 +634,7 @@ func (x *fastReflection_DIDDocument) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DIDDocument) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_BaseDocument) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -645,7 +646,7 @@ func (x *fastReflection_DIDDocument) SetUnknown(fields protoreflect.RawFields) { // 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_DIDDocument) IsValid() bool { +func (x *fastReflection_BaseDocument) IsValid() bool { return x != nil } @@ -655,9 +656,9 @@ func (x *fastReflection_DIDDocument) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_DIDDocument) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_BaseDocument) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DIDDocument) + x := input.Message.Interface().(*BaseDocument) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -713,7 +714,7 @@ func (x *fastReflection_DIDDocument) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DIDDocument) + x := input.Message.Interface().(*BaseDocument) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -802,7 +803,7 @@ func (x *fastReflection_DIDDocument) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DIDDocument) + x := input.Message.Interface().(*BaseDocument) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -834,10 +835,10 @@ func (x *fastReflection_DIDDocument) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DIDDocument: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BaseDocument: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DIDDocument: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BaseDocument: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1160,8 +1161,8 @@ var ( ) func init() { - file_did_v1_account_proto_init() - md_VerificationMethod = File_did_v1_account_proto.Messages().ByName("VerificationMethod") + file_did_v1_types_proto_init() + md_VerificationMethod = File_did_v1_types_proto.Messages().ByName("VerificationMethod") fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id") fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller") fd_VerificationMethod_public_key_multibase = md_VerificationMethod.Fields().ByName("public_key_multibase") @@ -1177,7 +1178,7 @@ func (x *VerificationMethod) ProtoReflect() protoreflect.Message { } func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_account_proto_msgTypes[1] + mi := &file_did_v1_types_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1921,14 +1922,11 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { } } -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 // protoc (unknown) -// source: did/v1/account.proto +// source: did/v1/types.proto const ( // Verify that this generated code is sufficiently up-to-date. @@ -1937,8 +1935,8 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// DIDDocument defines a DID document -type DIDDocument struct { +// BaseDocument defines a DID document +type BaseDocument struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1951,62 +1949,62 @@ type DIDDocument struct { CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` } -func (x *DIDDocument) Reset() { - *x = DIDDocument{} +func (x *BaseDocument) Reset() { + *x = BaseDocument{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_account_proto_msgTypes[0] + mi := &file_did_v1_types_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *DIDDocument) String() string { +func (x *BaseDocument) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DIDDocument) ProtoMessage() {} +func (*BaseDocument) ProtoMessage() {} -// Deprecated: Use DIDDocument.ProtoReflect.Descriptor instead. -func (*DIDDocument) Descriptor() ([]byte, []int) { - return file_did_v1_account_proto_rawDescGZIP(), []int{0} +// Deprecated: Use BaseDocument.ProtoReflect.Descriptor instead. +func (*BaseDocument) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{0} } -func (x *DIDDocument) GetId() string { +func (x *BaseDocument) GetId() string { if x != nil { return x.Id } return "" } -func (x *DIDDocument) GetVerificationMethods() []*VerificationMethod { +func (x *BaseDocument) GetVerificationMethods() []*VerificationMethod { if x != nil { return x.VerificationMethods } return nil } -func (x *DIDDocument) GetAuthentication() []string { +func (x *BaseDocument) GetAuthentication() []string { if x != nil { return x.Authentication } return nil } -func (x *DIDDocument) GetAssertionMethod() []string { +func (x *BaseDocument) GetAssertionMethod() []string { if x != nil { return x.AssertionMethod } return nil } -func (x *DIDDocument) GetCapabilityDelegation() []string { +func (x *BaseDocument) GetCapabilityDelegation() []string { if x != nil { return x.CapabilityDelegation } return nil } -func (x *DIDDocument) GetCapabilityInvocation() []string { +func (x *BaseDocument) GetCapabilityInvocation() []string { if x != nil { return x.CapabilityInvocation } @@ -2030,7 +2028,7 @@ type VerificationMethod struct { func (x *VerificationMethod) Reset() { *x = VerificationMethod{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_account_proto_msgTypes[1] + mi := &file_did_v1_types_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2044,7 +2042,7 @@ func (*VerificationMethod) ProtoMessage() {} // Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_account_proto_rawDescGZIP(), []int{1} + return file_did_v1_types_proto_rawDescGZIP(), []int{1} } func (x *VerificationMethod) GetId() string { @@ -2075,82 +2073,83 @@ func (x *VerificationMethod) GetPublicKeyJwks() map[string]string { return nil } -var File_did_v1_account_proto protoreflect.FileDescriptor +var File_did_v1_types_proto protoreflect.FileDescriptor -var file_did_v1_account_proto_rawDesc = []byte{ - 0x0a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa9, 0x02, 0x0a, 0x0b, 0x44, 0x49, 0x44, 0x44, 0x6f, 0x63, - 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, - 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, - 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, - 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0f, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x04, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, - 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, - 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, - 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, - 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x0c, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 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, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, - 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, - 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_did_v1_types_proto_rawDesc = []byte{ + 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, + 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x02, 0x0a, + 0x0c, 0x42, 0x61, 0x73, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, + 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, + 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, + 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, + 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, + 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, + 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, + 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, + 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, + 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, + 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x7a, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, + 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, 0x68, 0x77, 0x61, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, + 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_did_v1_account_proto_rawDescOnce sync.Once - file_did_v1_account_proto_rawDescData = file_did_v1_account_proto_rawDesc + file_did_v1_types_proto_rawDescOnce sync.Once + file_did_v1_types_proto_rawDescData = file_did_v1_types_proto_rawDesc ) -func file_did_v1_account_proto_rawDescGZIP() []byte { - file_did_v1_account_proto_rawDescOnce.Do(func() { - file_did_v1_account_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_account_proto_rawDescData) +func file_did_v1_types_proto_rawDescGZIP() []byte { + file_did_v1_types_proto_rawDescOnce.Do(func() { + file_did_v1_types_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_types_proto_rawDescData) }) - return file_did_v1_account_proto_rawDescData + return file_did_v1_types_proto_rawDescData } -var file_did_v1_account_proto_msgTypes = make([]protoimpl.MessageInfo, 3) -var file_did_v1_account_proto_goTypes = []interface{}{ - (*DIDDocument)(nil), // 0: did.v1.DIDDocument +var file_did_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_did_v1_types_proto_goTypes = []interface{}{ + (*BaseDocument)(nil), // 0: did.v1.BaseDocument (*VerificationMethod)(nil), // 1: did.v1.VerificationMethod nil, // 2: did.v1.VerificationMethod.PublicKeyJwksEntry } -var file_did_v1_account_proto_depIdxs = []int32{ - 1, // 0: did.v1.DIDDocument.verification_methods:type_name -> did.v1.VerificationMethod +var file_did_v1_types_proto_depIdxs = []int32{ + 1, // 0: did.v1.BaseDocument.verification_methods:type_name -> did.v1.VerificationMethod 2, // 1: did.v1.VerificationMethod.public_key_jwks:type_name -> did.v1.VerificationMethod.PublicKeyJwksEntry 2, // [2:2] is the sub-list for method output_type 2, // [2:2] is the sub-list for method input_type @@ -2159,15 +2158,15 @@ var file_did_v1_account_proto_depIdxs = []int32{ 0, // [0:2] is the sub-list for field type_name } -func init() { file_did_v1_account_proto_init() } -func file_did_v1_account_proto_init() { - if File_did_v1_account_proto != nil { +func init() { file_did_v1_types_proto_init() } +func file_did_v1_types_proto_init() { + if File_did_v1_types_proto != nil { return } file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { - file_did_v1_account_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DIDDocument); i { + file_did_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*BaseDocument); i { case 0: return &v.state case 1: @@ -2178,7 +2177,7 @@ func file_did_v1_account_proto_init() { return nil } } - file_did_v1_account_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerificationMethod); i { case 0: return &v.state @@ -2195,18 +2194,18 @@ func file_did_v1_account_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_did_v1_account_proto_rawDesc, + RawDescriptor: file_did_v1_types_proto_rawDesc, NumEnums: 0, NumMessages: 3, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_did_v1_account_proto_goTypes, - DependencyIndexes: file_did_v1_account_proto_depIdxs, - MessageInfos: file_did_v1_account_proto_msgTypes, + GoTypes: file_did_v1_types_proto_goTypes, + DependencyIndexes: file_did_v1_types_proto_depIdxs, + MessageInfos: file_did_v1_types_proto_msgTypes, }.Build() - File_did_v1_account_proto = out.File - file_did_v1_account_proto_rawDesc = nil - file_did_v1_account_proto_goTypes = nil - file_did_v1_account_proto_depIdxs = nil + File_did_v1_types_proto = out.File + file_did_v1_types_proto_rawDesc = nil + file_did_v1_types_proto_goTypes = nil + file_did_v1_types_proto_depIdxs = nil } diff --git a/go.mod b/go.mod index 703b833e7..06a70b71c 100644 --- a/go.mod +++ b/go.mod @@ -42,6 +42,7 @@ require ( cosmossdk.io/x/nft v0.1.0 cosmossdk.io/x/tx v0.13.3 cosmossdk.io/x/upgrade v0.1.1 + github.com/btcsuite/btcd/btcec/v2 v2.3.3 github.com/cometbft/cometbft v0.38.8 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 @@ -56,6 +57,7 @@ require ( github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/ipfs/kubo v0.29.0 github.com/joho/godotenv v1.5.1 + github.com/onsonr/crypto v1.5.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -64,6 +66,7 @@ require ( github.com/strangelove-ventures/poa v0.50.0 github.com/strangelove-ventures/tokenfactory v0.50.0 github.com/stretchr/testify v1.9.0 + golang.org/x/crypto v0.25.0 google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 @@ -79,7 +82,6 @@ require ( github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect - github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -87,9 +89,9 @@ require ( github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/bits-and-blooms/bitset v1.13.0 // indirect github.com/blang/semver/v4 v4.0.0 // indirect - github.com/btcsuite/btcd/btcec/v2 v2.3.3 // indirect github.com/btcsuite/btcd/btcutil v1.1.5 // indirect github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect + github.com/bwesterb/go-ristretto v1.2.3 // indirect github.com/cenkalti/backoff/v4 v4.3.0 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.3.0 // indirect @@ -102,6 +104,8 @@ require ( github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cometbft/cometbft-db v0.9.1 // indirect + github.com/consensys/bavard v0.1.13 // indirect + github.com/consensys/gnark-crypto v0.12.1 // indirect github.com/cosmos/btcutil v1.0.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect @@ -121,6 +125,7 @@ require ( github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect + github.com/ethereum/go-ethereum v1.14.6 // indirect github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -223,6 +228,7 @@ require ( github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect + github.com/mmcloughlin/addchain v0.4.0 // indirect github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect @@ -283,7 +289,6 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.27.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect - golang.org/x/crypto v0.25.0 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/mod v0.18.0 // indirect golang.org/x/net v0.26.0 // indirect @@ -306,5 +311,6 @@ require ( lukechampine.com/blake3 v1.3.0 // indirect nhooyr.io/websocket v1.8.10 // indirect pgregory.net/rapid v1.1.0 // indirect + rsc.io/tmplfunc v0.0.3 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index c4a3ada3b..b962d0444 100644 --- a/go.sum +++ b/go.sum @@ -901,6 +901,8 @@ github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtE github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/bufbuild/protocompile v0.6.0 h1:Uu7WiSQ6Yj9DbkdnOe7U4mNKp58y9WDMKDn28/ZlunY= github.com/bufbuild/protocompile v0.6.0/go.mod h1:YNP35qEYoYGme7QMtz5SBCoN4kL4g12jTtjuzRNdjpE= +github.com/bwesterb/go-ristretto v1.2.3 h1:1w53tCkGhCQ5djbat3+MH0BAQ5Kfgbt56UZQ/JMzngw= +github.com/bwesterb/go-ristretto v1.2.3/go.mod h1:fUIoIZaG73pV5biE2Blr2xEzDoMj7NFEuV9ekS419A0= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= @@ -967,6 +969,10 @@ github.com/cometbft/cometbft v0.38.8 h1:XyJ9Cu3xqap6xtNxiemrO8roXZ+KS2Zlu7qQ0w1t github.com/cometbft/cometbft v0.38.8/go.mod h1:xOoGZrtUT+A5izWfHSJgl0gYZUE7lu7Z2XIS1vWG/QQ= github.com/cometbft/cometbft-db v0.9.1 h1:MIhVX5ja5bXNHF8EYrThkG9F7r9kSfv8BX4LWaxWJ4M= github.com/cometbft/cometbft-db v0.9.1/go.mod h1:iliyWaoV0mRwBJoizElCwwRA9Tf7jZJOURcRZF9m60U= +github.com/consensys/bavard v0.1.13 h1:oLhMLOFGTLdlda/kma4VOJazblc7IM5y5QPd2A/YjhQ= +github.com/consensys/bavard v0.1.13/go.mod h1:9ItSMtA/dXMAiL7BG6bqW2m3NdSEObYWoH223nGHukI= +github.com/consensys/gnark-crypto v0.12.1 h1:lHH39WuuFgVHONRl3J0LRBtuYdQTumFSDtJF7HpyG8M= +github.com/consensys/gnark-crypto v0.12.1/go.mod h1:v2Gy7L/4ZRosZ7Ivs+9SfUDr0f5UlG+EM5t7MPHiLuY= github.com/containerd/cgroups v1.1.0 h1:v8rEWFl6EoqHB+swVNjVoCJE8o3jX7e8nqBGPLaDFBM= github.com/containerd/cgroups v1.1.0/go.mod h1:6ppBcbh/NOOUU+dMKrykgaBnK9lCIBxHqJDGwsa1mIw= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= @@ -983,8 +989,6 @@ github.com/cosmos/cosmos-proto v1.0.0-beta.5 h1:eNcayDLpip+zVLRLYafhzLvQlSmyab+R github.com/cosmos/cosmos-proto v1.0.0-beta.5/go.mod h1:hQGLpiIUloJBMdQMMWb/4wRApmI9hjHH05nefC0Ojec= github.com/cosmos/cosmos-sdk v0.50.5 h1:MOEi+DKYgW67YaPgB+Pf+nHbD3V9S/ayitRKJYLfGIA= github.com/cosmos/cosmos-sdk v0.50.5/go.mod h1:oV/k6GJgXV9QPoM2fsYDPPsyPBgQbdotv532O6Mz1OQ= -github.com/cosmos/cosmos-sdk v0.50.7 h1:LsBGKxifENR/DN4E1RZaitsyL93HU44x0p8EnMHp4V4= -github.com/cosmos/cosmos-sdk v0.50.7/go.mod h1:84xDDJEHttRT7NDGwBaUOLVOMN0JNE9x7NbsYIxXs1s= github.com/cosmos/go-bip39 v1.0.0 h1:pcomnQdrdH22njcAatO0yWojsUnCO3y2tNoV1cb6hHY= github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4xuwvCdJw= github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= @@ -1086,6 +1090,8 @@ github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6Ni github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= +github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWXVKaaC8= +github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -1296,6 +1302,7 @@ github.com/google/s2a-go v0.1.3/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkj github.com/google/s2a-go v0.1.4/go.mod h1:Ej+mSEMGRnqRzjc7VtF+jdBwYG5fuJfiZ8ELkjEwM0A= github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o= github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw= +github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -1587,6 +1594,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= +github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= +github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= @@ -1692,6 +1701,9 @@ github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUb github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/mmcloughlin/addchain v0.4.0 h1:SobOdjm2xLj1KkXN5/n0xTIWyZA2+s99UCY1iPfkHRY= +github.com/mmcloughlin/addchain v0.4.0/go.mod h1:A86O+tHqZLMNO4w6ZZ4FlVQEadcoqkyU72HC5wJ4RlU= +github.com/mmcloughlin/profile v0.1.1/go.mod h1:IhHD7q1ooxgwTgjxQYkACGA77oFTDdFVejUS1/tS/qU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= @@ -1761,6 +1773,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= +github.com/onsonr/crypto v1.5.0 h1:iAmjTdzuu6inJL48/gHsLcQsyq+GbnVaKSBxlkpkBnE= +github.com/onsonr/crypto v1.5.0/go.mod h1:g77+cbK6mD5qILg4dN6d2X9fNtYrEUAOQ6JIlj12Um0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= @@ -3008,6 +3022,8 @@ rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= +rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= +rsc.io/tmplfunc v0.0.3/go.mod h1:AG3sTPzElb1Io3Yg4voV9AGZJuleGAwaVRxL9M49PhA= sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sigs.k8s.io/yaml v1.4.0 h1:Mk1wCc2gy/F0THH0TAp1QYyJNzRm2KCLy3o5ASXVI5E= sigs.k8s.io/yaml v1.4.0/go.mod h1:Ejl7/uTz7PSA4eKMyQCUTnhZYNmLIl+5c2lQPGR2BPY= diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 88ec7241b..66da7d357 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -17,17 +17,56 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - // Property Allowlist - repeated string property_allowlist = 2; + // Whitelisted Assets + repeated AssetInfo whitelisted_assets = 1; - // Whitelisted Verifications - repeated string whitelisted_origins = 3; + // Whitelisted Blockchains + repeated ChainInfo whitelisted_chains = 2; +} - // Assertion Reward Rate - double assertion_reward_rate = 4; - - // Encryption Reward Rate - double encryption_reward_rate = 5; +// Meta represents +message Meta { + option (amino.name) = "did/meta"; + option (gogoproto.equal) = true; + option (gogoproto.goproto_stringer) = false; + + // Key value data for the Property + map data = 1; } +message AssetInfo { + string denom = 1; + string asset_type = 2; + string origin_chain = 3; + string origin_denom = 4; + string origin_type = 5; + string symbol = 6; + int32 decimals = 7; + string description = 8; + string image = 9; + string coinGeckoId = 10; + bool enable = 11; + string path = 12; + string channel = 13; + string port = 14; + Meta counter_party = 15; +} + +message ChainInfo { + string chain_id_cosmos = 1; + string chain_name = 2; + string symbol = 3; + string bechAccountPrefix = 4; + string bechValidatorPrefix = 5; + string origin_genesis_time = 6; + repeated Meta accountType = 7; + repeated Meta grpc_endpoint = 8; + repeated Meta lcd_endpoint = 9; + Meta explorer = 10; + string fee_base = 11; + repeated string fee_rate = 12; + int32 fee_init_gas_limit = 13; + bool fee_isSimulable = 14; + double simul_gas_multiply = 15; +} diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 3712201ec..d821c75ab 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -11,6 +11,7 @@ message Aliases { option (cosmos.orm.v1.table) = { id: 1 primary_key: {fields: "id"} + index: { id: 1, fields: "handle", unique: true } }; // The unique identifier of the alias diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index ec00a2611..a707feb32 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -16,8 +16,8 @@ service Msg { // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // InitializeController initializes a controller with the given assertions, keyshares, and verifications. - rpc InitializeController(MsgInitializeController) returns (MsgInitializeControllerResponse); + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + rpc RegisterController(MsgInitializeController) returns (MsgInitializeControllerResponse); // AuthenticateController asserts the given controller is the owner of the given address. rpc AuthenticateController(MsgAuthenticateController) returns (MsgAuthenticateControllerResponse); diff --git a/proto/did/v1/account.proto b/proto/did/v1/types.proto similarity index 80% rename from proto/did/v1/account.proto rename to proto/did/v1/types.proto index b4223f4bd..32994f964 100644 --- a/proto/did/v1/account.proto +++ b/proto/did/v1/types.proto @@ -1,16 +1,17 @@ -// Copyright Tharsis Labs Ltd.(Evmos) -// SPDX-License-Identifier:ENCL-1.0(https://github.com/evmos/evmos/blob/main/LICENSE) syntax = "proto3"; + package did.v1; -import "cosmos_proto/cosmos.proto"; -import "gogoproto/gogo.proto"; +import "cosmos/msg/v1/msg.proto"; import "did/v1/genesis.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; option go_package = "github.com/onsonr/hway/x/did/types"; -// DIDDocument defines a DID document -message DIDDocument { + +// BaseDocument defines a DID document +message BaseDocument { string id = 1; repeated VerificationMethod verification_methods = 2; repeated string authentication = 4; diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index 9c5b69973..708528065 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -3,7 +3,6 @@ package keeper import ( "context" - sdk "github.com/cosmos/cosmos-sdk/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" @@ -21,12 +20,6 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { return &msgServer{k: keeper} } -// InitializeController implements types.MsgServer. -func (ms msgServer) InitializeController(goCtx context.Context, msg *types.MsgInitializeController) (*types.MsgInitializeControllerResponse, error) { - _ = sdk.UnwrapSDKContext(goCtx) - return &types.MsgInitializeControllerResponse{}, nil -} - // UpdateParams updates the x/did module parameters. func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { if ms.k.authority != msg.Authority { @@ -42,3 +35,10 @@ func (ms msgServer) AuthenticateController(ctx context.Context, msg *types.MsgAu panic("AuthenticateController is unimplemented") return &types.MsgAuthenticateControllerResponse{}, nil } + +// RegisterController implements types.MsgServer. +func (ms msgServer) RegisterController(ctx context.Context, msg *types.MsgInitializeController) (*types.MsgInitializeControllerResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + panic("RegisterController is unimplemented") + return &types.MsgInitializeControllerResponse{}, nil +} diff --git a/x/did/types/bip32.go b/x/did/types/bip32.go new file mode 100644 index 000000000..9c54b6e2d --- /dev/null +++ b/x/did/types/bip32.go @@ -0,0 +1,66 @@ +package types + +import ( + "crypto/hmac" + "crypto/sha512" + "encoding/binary" + "errors" + "math/big" + + "github.com/btcsuite/btcd/btcec/v2" +) + +// ComputePublicKey computes the public key of a child key given the extended public key, chain code, and index. +func ComputePublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, error) { + // Check if the index is a hardened child key + if chainCode&0x80000000 != 0 && index < 0 { + return nil, errors.New("invalid index") + } + + // Serialize the public key + pubKey, err := btcec.ParsePubKey(extPubKey) + if err != nil { + return nil, err + } + pubKeyBytes := pubKey.SerializeCompressed() + + // Serialize the index + indexBytes := make([]byte, 4) + binary.BigEndian.PutUint32(indexBytes, uint32(index)) + + // Compute the HMAC-SHA512 + mac := hmac.New(sha512.New, []byte{byte(chainCode)}) + mac.Write(pubKeyBytes) + mac.Write(indexBytes) + I := mac.Sum(nil) + + // Split I into two 32-byte sequences + IL := I[:32] + + // Convert IL to a big integer + ilNum := new(big.Int).SetBytes(IL) + + // Check if parse256(IL) >= n + curve := btcec.S256() + if ilNum.Cmp(curve.N) >= 0 { + return nil, errors.New("invalid child key") + } + + // Compute the child public key + ilx, ily := curve.ScalarBaseMult(IL) + childX, childY := curve.Add(ilx, ily, pubKey.X(), pubKey.Y()) + lx := newBigIntFieldVal(childX) + ly := newBigIntFieldVal(childY) + + // Create the child public key + childPubKey := btcec.NewPublicKey(lx, ly) + childPubKeyBytes := childPubKey.SerializeCompressed() + return childPubKeyBytes, nil +} + +// newBigIntFieldVal creates a new field value from a big integer. +func newBigIntFieldVal(val *big.Int) *btcec.FieldVal { + lx := new(btcec.FieldVal) + lx.SetByteSlice(val.Bytes()) + return lx +} diff --git a/x/did/types/genesis.go b/x/did/types/genesis.go index e770dfc5c..27328baac 100644 --- a/x/did/types/genesis.go +++ b/x/did/types/genesis.go @@ -25,18 +25,7 @@ func (gs GenesisState) Validate() error { // DefaultParams returns default module parameters. func DefaultParams() Params { - return Params{ - PropertyAllowlist: []string{ - "email", - "phone", - }, - AssertionRewardRate: 0.35, - EncryptionRewardRate: 0.5, - WhitelistedOrigins: []string{ - "sonr.local", - "sonr.id", - }, - } + return Params{} } // Stringer method for Params. diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index 8ec7748a4..bda419ca8 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -6,18 +6,21 @@ package types import ( encoding_binary "encoding/binary" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" io "io" math "math" math_bits "math/bits" + + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" ) // Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +var ( + _ = proto.Marshal + _ = fmt.Errorf + _ = 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. @@ -37,9 +40,11 @@ func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { return fileDescriptor_fda181cae44f7c00, []int{0} } + func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) @@ -52,12 +57,15 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } + func (m *GenesisState) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState.Merge(m, src) } + func (m *GenesisState) XXX_Size() int { return m.Size() } + func (m *GenesisState) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState.DiscardUnknown(m) } @@ -73,14 +81,10 @@ func (m *GenesisState) GetParams() Params { // Params defines the set of module parameters. type Params struct { - // Property Allowlist - PropertyAllowlist []string `protobuf:"bytes,2,rep,name=property_allowlist,json=propertyAllowlist,proto3" json:"property_allowlist,omitempty"` - // Whitelisted Verifications - WhitelistedOrigins []string `protobuf:"bytes,3,rep,name=whitelisted_origins,json=whitelistedOrigins,proto3" json:"whitelisted_origins,omitempty"` - // Assertion Reward Rate - AssertionRewardRate float64 `protobuf:"fixed64,4,opt,name=assertion_reward_rate,json=assertionRewardRate,proto3" json:"assertion_reward_rate,omitempty"` - // Encryption Reward Rate - EncryptionRewardRate float64 `protobuf:"fixed64,5,opt,name=encryption_reward_rate,json=encryptionRewardRate,proto3" json:"encryption_reward_rate,omitempty"` + // Whitelisted Assets + WhitelistedAssets []*AssetInfo `protobuf:"bytes,1,rep,name=whitelisted_assets,json=whitelistedAssets,proto3" json:"whitelisted_assets,omitempty"` + // Whitelisted Blockchains + WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -88,9 +92,11 @@ func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_fda181cae44f7c00, []int{1} } + func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } + func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Params.Marshal(b, m, deterministic) @@ -103,42 +109,403 @@ func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } + func (m *Params) XXX_Merge(src proto.Message) { xxx_messageInfo_Params.Merge(m, src) } + func (m *Params) XXX_Size() int { return m.Size() } + func (m *Params) XXX_DiscardUnknown() { xxx_messageInfo_Params.DiscardUnknown(m) } var xxx_messageInfo_Params proto.InternalMessageInfo -func (m *Params) GetPropertyAllowlist() []string { +func (m *Params) GetWhitelistedAssets() []*AssetInfo { if m != nil { - return m.PropertyAllowlist + return m.WhitelistedAssets } return nil } -func (m *Params) GetWhitelistedOrigins() []string { +func (m *Params) GetWhitelistedChains() []*ChainInfo { if m != nil { - return m.WhitelistedOrigins + return m.WhitelistedChains } return nil } -func (m *Params) GetAssertionRewardRate() float64 { +// Meta represents +type Meta struct { + // Key value data for the Property + Data map[string]string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *Meta) Reset() { *m = Meta{} } +func (*Meta) ProtoMessage() {} +func (*Meta) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{2} +} + +func (m *Meta) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Meta.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 *Meta) XXX_Merge(src proto.Message) { + xxx_messageInfo_Meta.Merge(m, src) +} + +func (m *Meta) XXX_Size() int { + return m.Size() +} + +func (m *Meta) XXX_DiscardUnknown() { + xxx_messageInfo_Meta.DiscardUnknown(m) +} + +var xxx_messageInfo_Meta proto.InternalMessageInfo + +func (m *Meta) GetData() map[string]string { if m != nil { - return m.AssertionRewardRate + return m.Data + } + return nil +} + +type AssetInfo struct { + Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` + AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OriginChain string `protobuf:"bytes,3,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` + OriginDenom string `protobuf:"bytes,4,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` + OriginType string `protobuf:"bytes,5,opt,name=origin_type,json=originType,proto3" json:"origin_type,omitempty"` + Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` + Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + Image string `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` + CoinGeckoId string `protobuf:"bytes,10,opt,name=coinGeckoId,proto3" json:"coinGeckoId,omitempty"` + Enable bool `protobuf:"varint,11,opt,name=enable,proto3" json:"enable,omitempty"` + Path string `protobuf:"bytes,12,opt,name=path,proto3" json:"path,omitempty"` + Channel string `protobuf:"bytes,13,opt,name=channel,proto3" json:"channel,omitempty"` + Port string `protobuf:"bytes,14,opt,name=port,proto3" json:"port,omitempty"` + CounterParty *Meta `protobuf:"bytes,15,opt,name=counter_party,json=counterParty,proto3" json:"counter_party,omitempty"` +} + +func (m *AssetInfo) Reset() { *m = AssetInfo{} } +func (m *AssetInfo) String() string { return proto.CompactTextString(m) } +func (*AssetInfo) ProtoMessage() {} +func (*AssetInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{3} +} + +func (m *AssetInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_AssetInfo.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 *AssetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssetInfo.Merge(m, src) +} + +func (m *AssetInfo) XXX_Size() int { + return m.Size() +} + +func (m *AssetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AssetInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_AssetInfo proto.InternalMessageInfo + +func (m *AssetInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *AssetInfo) GetAssetType() string { + if m != nil { + return m.AssetType + } + return "" +} + +func (m *AssetInfo) GetOriginChain() string { + if m != nil { + return m.OriginChain + } + return "" +} + +func (m *AssetInfo) GetOriginDenom() string { + if m != nil { + return m.OriginDenom + } + return "" +} + +func (m *AssetInfo) GetOriginType() string { + if m != nil { + return m.OriginType + } + return "" +} + +func (m *AssetInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *AssetInfo) GetDecimals() int32 { + if m != nil { + return m.Decimals } return 0 } -func (m *Params) GetEncryptionRewardRate() float64 { +func (m *AssetInfo) GetDescription() string { if m != nil { - return m.EncryptionRewardRate + return m.Description + } + return "" +} + +func (m *AssetInfo) GetImage() string { + if m != nil { + return m.Image + } + return "" +} + +func (m *AssetInfo) GetCoinGeckoId() string { + if m != nil { + return m.CoinGeckoId + } + return "" +} + +func (m *AssetInfo) GetEnable() bool { + if m != nil { + return m.Enable + } + return false +} + +func (m *AssetInfo) GetPath() string { + if m != nil { + return m.Path + } + return "" +} + +func (m *AssetInfo) GetChannel() string { + if m != nil { + return m.Channel + } + return "" +} + +func (m *AssetInfo) GetPort() string { + if m != nil { + return m.Port + } + return "" +} + +func (m *AssetInfo) GetCounterParty() *Meta { + if m != nil { + return m.CounterParty + } + return nil +} + +type ChainInfo struct { + ChainIdCosmos string `protobuf:"bytes,1,opt,name=chain_id_cosmos,json=chainIdCosmos,proto3" json:"chain_id_cosmos,omitempty"` + ChainName string `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + BechAccountPrefix string `protobuf:"bytes,4,opt,name=bechAccountPrefix,proto3" json:"bechAccountPrefix,omitempty"` + BechValidatorPrefix string `protobuf:"bytes,5,opt,name=bechValidatorPrefix,proto3" json:"bechValidatorPrefix,omitempty"` + OriginGenesisTime string `protobuf:"bytes,6,opt,name=origin_genesis_time,json=originGenesisTime,proto3" json:"origin_genesis_time,omitempty"` + AccountType []*Meta `protobuf:"bytes,7,rep,name=accountType,proto3" json:"accountType,omitempty"` + GrpcEndpoint []*Meta `protobuf:"bytes,8,rep,name=grpc_endpoint,json=grpcEndpoint,proto3" json:"grpc_endpoint,omitempty"` + LcdEndpoint []*Meta `protobuf:"bytes,9,rep,name=lcd_endpoint,json=lcdEndpoint,proto3" json:"lcd_endpoint,omitempty"` + Explorer *Meta `protobuf:"bytes,10,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeBase string `protobuf:"bytes,11,opt,name=fee_base,json=feeBase,proto3" json:"fee_base,omitempty"` + FeeRate []string `protobuf:"bytes,12,rep,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` + FeeInitGasLimit int32 `protobuf:"varint,13,opt,name=fee_init_gas_limit,json=feeInitGasLimit,proto3" json:"fee_init_gas_limit,omitempty"` + FeeIsSimulable bool `protobuf:"varint,14,opt,name=fee_isSimulable,json=feeIsSimulable,proto3" json:"fee_isSimulable,omitempty"` + SimulGasMultiply float64 `protobuf:"fixed64,15,opt,name=simul_gas_multiply,json=simulGasMultiply,proto3" json:"simul_gas_multiply,omitempty"` +} + +func (m *ChainInfo) Reset() { *m = ChainInfo{} } +func (m *ChainInfo) String() string { return proto.CompactTextString(m) } +func (*ChainInfo) ProtoMessage() {} +func (*ChainInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{4} +} + +func (m *ChainInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} + +func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainInfo.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 *ChainInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainInfo.Merge(m, src) +} + +func (m *ChainInfo) XXX_Size() int { + return m.Size() +} + +func (m *ChainInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ChainInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainInfo proto.InternalMessageInfo + +func (m *ChainInfo) GetChainIdCosmos() string { + if m != nil { + return m.ChainIdCosmos + } + return "" +} + +func (m *ChainInfo) GetChainName() string { + if m != nil { + return m.ChainName + } + return "" +} + +func (m *ChainInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *ChainInfo) GetBechAccountPrefix() string { + if m != nil { + return m.BechAccountPrefix + } + return "" +} + +func (m *ChainInfo) GetBechValidatorPrefix() string { + if m != nil { + return m.BechValidatorPrefix + } + return "" +} + +func (m *ChainInfo) GetOriginGenesisTime() string { + if m != nil { + return m.OriginGenesisTime + } + return "" +} + +func (m *ChainInfo) GetAccountType() []*Meta { + if m != nil { + return m.AccountType + } + return nil +} + +func (m *ChainInfo) GetGrpcEndpoint() []*Meta { + if m != nil { + return m.GrpcEndpoint + } + return nil +} + +func (m *ChainInfo) GetLcdEndpoint() []*Meta { + if m != nil { + return m.LcdEndpoint + } + return nil +} + +func (m *ChainInfo) GetExplorer() *Meta { + if m != nil { + return m.Explorer + } + return nil +} + +func (m *ChainInfo) GetFeeBase() string { + if m != nil { + return m.FeeBase + } + return "" +} + +func (m *ChainInfo) GetFeeRate() []string { + if m != nil { + return m.FeeRate + } + return nil +} + +func (m *ChainInfo) GetFeeInitGasLimit() int32 { + if m != nil { + return m.FeeInitGasLimit + } + return 0 +} + +func (m *ChainInfo) GetFeeIsSimulable() bool { + if m != nil { + return m.FeeIsSimulable + } + return false +} + +func (m *ChainInfo) GetSimulGasMultiply() float64 { + if m != nil { + return m.SimulGasMultiply } return 0 } @@ -146,34 +513,70 @@ func (m *Params) GetEncryptionRewardRate() float64 { func init() { proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*Params)(nil), "did.v1.Params") + proto.RegisterType((*Meta)(nil), "did.v1.Meta") + proto.RegisterMapType((map[string]string)(nil), "did.v1.Meta.DataEntry") + proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") + proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") } func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 338 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x31, 0x4f, 0x02, 0x31, - 0x14, 0xc7, 0xaf, 0x82, 0x97, 0x58, 0x8d, 0x09, 0x05, 0xf5, 0xc2, 0x70, 0x10, 0x26, 0x62, 0xf4, - 0x1a, 0xd0, 0xc9, 0xb0, 0xc8, 0xe2, 0xa8, 0x39, 0x37, 0x97, 0x4b, 0xe1, 0x9a, 0xa3, 0x09, 0xb4, - 0x97, 0xb6, 0x72, 0xde, 0x57, 0x70, 0x72, 0x74, 0xe4, 0x23, 0xf8, 0x31, 0x18, 0x19, 0x9d, 0x8c, - 0x81, 0x41, 0x13, 0xbf, 0x84, 0xb9, 0x56, 0xc4, 0xc4, 0xa5, 0xe9, 0xfb, 0xff, 0xde, 0xef, 0x25, - 0xef, 0xc1, 0x5a, 0xcc, 0x62, 0x3c, 0xed, 0xe0, 0x84, 0x72, 0xaa, 0x98, 0x0a, 0x52, 0x29, 0xb4, - 0x40, 0x6e, 0xcc, 0xe2, 0x60, 0xda, 0xa9, 0xd7, 0x12, 0x91, 0x08, 0x13, 0xe1, 0xe2, 0x67, 0x69, - 0xbd, 0x42, 0x26, 0x8c, 0x0b, 0x6c, 0x5e, 0x1b, 0xb5, 0x7a, 0x70, 0xef, 0xca, 0x4e, 0xb8, 0xd5, - 0x44, 0x53, 0x74, 0x02, 0xdd, 0x94, 0x48, 0x32, 0x51, 0x1e, 0x68, 0x82, 0xf6, 0x6e, 0x77, 0x3f, - 0xb0, 0x13, 0x83, 0x1b, 0x93, 0xf6, 0xcb, 0xf3, 0xb7, 0x86, 0x13, 0xfe, 0xf4, 0xb4, 0xbe, 0x00, - 0x74, 0x2d, 0x40, 0xa7, 0x10, 0xa5, 0x52, 0xa4, 0x54, 0xea, 0x3c, 0x22, 0xe3, 0xb1, 0xc8, 0xc6, - 0x4c, 0x69, 0x6f, 0xab, 0x59, 0x6a, 0xef, 0x84, 0x95, 0x35, 0xb9, 0x5c, 0x03, 0x84, 0x61, 0x35, - 0x1b, 0x31, 0x4d, 0x8b, 0x82, 0xc6, 0x91, 0x90, 0x2c, 0x61, 0x5c, 0x79, 0x25, 0xd3, 0x8f, 0xfe, - 0xa0, 0x6b, 0x4b, 0x50, 0x17, 0x1e, 0x10, 0xa5, 0xa8, 0xd4, 0x4c, 0xf0, 0x48, 0xd2, 0x8c, 0xc8, - 0x38, 0x92, 0x44, 0x53, 0xaf, 0xdc, 0x04, 0x6d, 0x10, 0x56, 0x7f, 0x61, 0x68, 0x58, 0x58, 0x2c, - 0x73, 0x0e, 0x0f, 0x29, 0x1f, 0xca, 0x3c, 0xfd, 0x27, 0x6d, 0x1b, 0xa9, 0xb6, 0xa1, 0x1b, 0xeb, - 0xe2, 0xe8, 0x79, 0xd6, 0x70, 0x3e, 0x67, 0x0d, 0xf0, 0xf8, 0xf1, 0x72, 0x0c, 0x8b, 0x33, 0xdb, - 0x6d, 0xfb, 0xbd, 0xf9, 0xd2, 0x07, 0x8b, 0xa5, 0x0f, 0xde, 0x97, 0x3e, 0x78, 0x5a, 0xf9, 0xce, - 0x62, 0xe5, 0x3b, 0xaf, 0x2b, 0xdf, 0xb9, 0x6b, 0x25, 0x4c, 0x8f, 0xee, 0x07, 0xc1, 0x50, 0x4c, - 0xb0, 0xe0, 0x4a, 0x70, 0x89, 0x47, 0x19, 0xc9, 0xf1, 0x03, 0x2e, 0x74, 0x9d, 0xa7, 0x54, 0x0d, - 0x5c, 0x73, 0xf0, 0xb3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xc5, 0x76, 0x33, 0xb9, 0x01, - 0x00, 0x00, + // 859 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x31, 0x6f, 0x1b, 0x37, + 0x14, 0xd6, 0x45, 0xb2, 0x2c, 0x3d, 0xc9, 0x76, 0xc4, 0xb8, 0x29, 0x6b, 0xa0, 0xb2, 0xaa, 0xa1, + 0x15, 0x52, 0x43, 0x57, 0xa7, 0x43, 0x0b, 0x23, 0x43, 0xe3, 0x24, 0x30, 0x0c, 0x34, 0x85, 0x71, + 0x09, 0x3a, 0x74, 0x39, 0x50, 0x77, 0x94, 0x44, 0xe4, 0x8e, 0x3c, 0x1c, 0x29, 0xc7, 0x5a, 0x3b, + 0x76, 0xea, 0xd8, 0x31, 0x4b, 0xf7, 0xfe, 0x86, 0x4e, 0x19, 0x33, 0x76, 0x2a, 0x0a, 0x7b, 0x68, + 0xe7, 0xfe, 0x82, 0x82, 0x8f, 0x94, 0x72, 0xae, 0xbd, 0x08, 0x7c, 0xdf, 0xf7, 0xbd, 0x8f, 0x4f, + 0xef, 0xbd, 0x23, 0xec, 0xa6, 0x22, 0x0d, 0xcf, 0x0f, 0xc3, 0x19, 0x97, 0x5c, 0x0b, 0x3d, 0x2e, + 0x4a, 0x65, 0x14, 0x69, 0xa6, 0x22, 0x1d, 0x9f, 0x1f, 0xee, 0xed, 0xce, 0xd4, 0x4c, 0x21, 0x14, + 0xda, 0x93, 0x63, 0xf7, 0x7a, 0x2c, 0x17, 0x52, 0x85, 0xf8, 0xeb, 0xa0, 0xe1, 0x23, 0xe8, 0x9e, + 0x38, 0x87, 0x17, 0x86, 0x19, 0x4e, 0x0e, 0xa0, 0x59, 0xb0, 0x92, 0xe5, 0x9a, 0x06, 0x83, 0x60, + 0xd4, 0x79, 0xb8, 0x3d, 0x76, 0x8e, 0xe3, 0x33, 0x44, 0x8f, 0x1b, 0x6f, 0xff, 0xdc, 0xaf, 0x45, + 0x5e, 0x33, 0xfc, 0x35, 0x80, 0xa6, 0x23, 0xc8, 0x37, 0x40, 0x5e, 0xcf, 0x85, 0xe1, 0x99, 0xd0, + 0x86, 0xa7, 0x31, 0xd3, 0x9a, 0x1b, 0x6b, 0x52, 0x1f, 0x75, 0x1e, 0xf6, 0x56, 0x26, 0x8f, 0x2d, + 0x7a, 0x2a, 0xa7, 0x2a, 0xea, 0x55, 0xc4, 0x88, 0xde, 0x70, 0x48, 0xe6, 0x4c, 0x48, 0x4d, 0xef, + 0x5c, 0x77, 0x78, 0x62, 0xd1, 0x1b, 0x0e, 0x88, 0xea, 0xa3, 0x0f, 0x7f, 0x79, 0xb3, 0x5f, 0xfb, + 0xe7, 0xcd, 0x7e, 0xf0, 0xd3, 0xdf, 0xbf, 0x3d, 0x00, 0xdb, 0x20, 0x5f, 0xe7, 0x8f, 0x01, 0x34, + 0x9e, 0x73, 0xc3, 0xc8, 0x03, 0x68, 0xa4, 0xcc, 0x30, 0x5f, 0xd7, 0xfd, 0x95, 0xab, 0xe5, 0xc6, + 0x4f, 0x99, 0x61, 0xcf, 0xa4, 0x29, 0x97, 0x11, 0x6a, 0xf6, 0xbe, 0x82, 0xf6, 0x1a, 0x22, 0x77, + 0xa1, 0xfe, 0x8a, 0x2f, 0xb1, 0x29, 0xed, 0xc8, 0x1e, 0xc9, 0x2e, 0x6c, 0x9c, 0xb3, 0x6c, 0xc1, + 0xe9, 0x1d, 0xc4, 0x5c, 0x70, 0x74, 0xe7, 0xeb, 0xe0, 0xe8, 0x83, 0x6a, 0x19, 0x2d, 0x5b, 0x46, + 0xce, 0x0d, 0x1b, 0xfe, 0x5e, 0x87, 0xf6, 0xba, 0x01, 0x36, 0x3d, 0xe5, 0x52, 0xe5, 0xde, 0xd2, + 0x05, 0xe4, 0x63, 0x00, 0xec, 0x5c, 0x6c, 0x96, 0xc5, 0xca, 0xb9, 0x8d, 0xc8, 0xcb, 0x65, 0xc1, + 0xc9, 0x27, 0xd0, 0x55, 0xa5, 0x98, 0x09, 0xe9, 0xba, 0x43, 0xeb, 0x28, 0xe8, 0x38, 0x0c, 0x9b, + 0x50, 0x91, 0x38, 0xfb, 0x46, 0x55, 0xf2, 0x14, 0x2f, 0xd9, 0x07, 0x1f, 0xba, 0x5b, 0x36, 0x50, + 0x01, 0x0e, 0xc2, 0x6b, 0xee, 0x43, 0x53, 0x2f, 0xf3, 0x89, 0xca, 0x68, 0x13, 0x39, 0x1f, 0x91, + 0x3d, 0x68, 0xa5, 0x3c, 0x11, 0x39, 0xcb, 0x34, 0xdd, 0x1c, 0x04, 0xa3, 0x8d, 0x68, 0x1d, 0x93, + 0x01, 0x74, 0x52, 0xae, 0x93, 0x52, 0x14, 0x46, 0x28, 0x49, 0x5b, 0xee, 0xda, 0x0a, 0x64, 0xff, + 0xb1, 0xc8, 0xd9, 0x8c, 0xd3, 0xb6, 0xfb, 0xc7, 0x18, 0xd8, 0xbc, 0x44, 0x09, 0x79, 0xc2, 0x93, + 0x57, 0xea, 0x34, 0xa5, 0xe0, 0xf2, 0x2a, 0x90, 0xad, 0x86, 0x4b, 0x36, 0xc9, 0x38, 0xed, 0x0c, + 0x82, 0x51, 0x2b, 0xf2, 0x11, 0x21, 0xd0, 0x28, 0x98, 0x99, 0xd3, 0x2e, 0xa6, 0xe0, 0x99, 0x50, + 0xd8, 0x4c, 0xe6, 0x4c, 0x4a, 0x9e, 0xd1, 0x2d, 0x84, 0x57, 0x21, 0xaa, 0x55, 0x69, 0xe8, 0xb6, + 0x57, 0xab, 0xd2, 0x90, 0x43, 0xd8, 0x4a, 0xd4, 0x42, 0x1a, 0x5e, 0xc6, 0x05, 0x2b, 0xcd, 0x92, + 0xee, 0xe0, 0xce, 0x77, 0xab, 0x6b, 0x11, 0x75, 0xbd, 0xe4, 0xcc, 0x2a, 0x86, 0xff, 0x36, 0xa0, + 0xbd, 0xde, 0x41, 0xf2, 0x29, 0xec, 0xe0, 0x20, 0x62, 0x91, 0xc6, 0x89, 0xd2, 0xb9, 0xd2, 0x7e, + 0x9c, 0x5b, 0x08, 0x9f, 0xa6, 0x4f, 0x10, 0xb4, 0x63, 0x75, 0x3a, 0xc9, 0xf2, 0xf5, 0x58, 0x11, + 0xf9, 0x8e, 0xe5, 0xd5, 0x7e, 0xd7, 0xaf, 0xf5, 0xfb, 0x00, 0x7a, 0x13, 0x9e, 0xcc, 0x1f, 0x27, + 0x58, 0xc2, 0x59, 0xc9, 0xa7, 0xe2, 0xc2, 0x0f, 0xf4, 0x26, 0x41, 0xbe, 0x80, 0x7b, 0x16, 0xfc, + 0x9e, 0x65, 0x22, 0x65, 0x46, 0x95, 0x5e, 0xef, 0xc6, 0x7b, 0x1b, 0x45, 0xc6, 0x70, 0xcf, 0x2f, + 0x82, 0x7f, 0x45, 0x62, 0x23, 0x72, 0xee, 0x87, 0xde, 0x73, 0x94, 0x7f, 0x1d, 0x5e, 0x8a, 0x9c, + 0x93, 0x31, 0x74, 0x98, 0xbb, 0xd2, 0xae, 0x09, 0xdd, 0xc4, 0x8f, 0xe8, 0x7a, 0xb7, 0xaa, 0x02, + 0xdb, 0xdf, 0x59, 0x59, 0x24, 0x31, 0x97, 0x69, 0xa1, 0x84, 0x34, 0xb4, 0x75, 0x4b, 0x46, 0xd7, + 0x4a, 0x9e, 0x79, 0x05, 0x09, 0xa1, 0x9b, 0x25, 0xe9, 0xfb, 0x8c, 0xf6, 0x6d, 0x77, 0x64, 0x49, + 0xba, 0x4e, 0x18, 0x41, 0x8b, 0x5f, 0x14, 0x99, 0x2a, 0x79, 0x89, 0xcb, 0xf3, 0x7f, 0xf1, 0x9a, + 0x25, 0x1f, 0x41, 0x6b, 0xca, 0x79, 0x3c, 0x61, 0xda, 0x6d, 0x52, 0x3b, 0xda, 0x9c, 0x72, 0x7e, + 0xcc, 0x34, 0x5f, 0x51, 0x25, 0x33, 0x9c, 0x76, 0x07, 0x75, 0x4f, 0x45, 0xf6, 0x41, 0xfc, 0x1c, + 0x88, 0xa5, 0x84, 0x14, 0x26, 0x9e, 0x31, 0x1d, 0x67, 0x22, 0x17, 0x06, 0x97, 0x6b, 0x23, 0xda, + 0x99, 0x72, 0x7e, 0x2a, 0x85, 0x39, 0x61, 0xfa, 0x5b, 0x0b, 0x93, 0xcf, 0x60, 0x07, 0xc5, 0xfa, + 0x85, 0xc8, 0x17, 0x19, 0xee, 0xec, 0x36, 0xee, 0xec, 0xb6, 0x55, 0xbe, 0x47, 0xc9, 0x01, 0x10, + 0x6d, 0x03, 0xb4, 0xcc, 0x17, 0x99, 0x11, 0x45, 0xe6, 0xd6, 0x2f, 0x88, 0xee, 0x22, 0x73, 0xc2, + 0xf4, 0x73, 0x8f, 0x1f, 0x3f, 0x7a, 0x7b, 0xd9, 0x0f, 0xde, 0x5d, 0xf6, 0x83, 0xbf, 0x2e, 0xfb, + 0xc1, 0xcf, 0x57, 0xfd, 0xda, 0xbb, 0xab, 0x7e, 0xed, 0x8f, 0xab, 0x7e, 0xed, 0x87, 0xe1, 0x4c, + 0x98, 0xf9, 0x62, 0x32, 0x4e, 0x54, 0x1e, 0x2a, 0xa9, 0x95, 0x2c, 0xc3, 0xf9, 0x6b, 0xb6, 0x0c, + 0x2f, 0x42, 0xfb, 0xec, 0xd8, 0xcf, 0x5b, 0x4f, 0x9a, 0xf8, 0xd2, 0x7f, 0xf9, 0x5f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x76, 0xe7, 0x1f, 0x84, 0x32, 0x06, 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -195,30 +598,55 @@ func (this *Params) Equal(that interface{}) bool { } else if this == nil { return false } - if len(this.PropertyAllowlist) != len(that1.PropertyAllowlist) { + if len(this.WhitelistedAssets) != len(that1.WhitelistedAssets) { return false } - for i := range this.PropertyAllowlist { - if this.PropertyAllowlist[i] != that1.PropertyAllowlist[i] { + for i := range this.WhitelistedAssets { + if !this.WhitelistedAssets[i].Equal(that1.WhitelistedAssets[i]) { return false } } - if len(this.WhitelistedOrigins) != len(that1.WhitelistedOrigins) { + if len(this.WhitelistedChains) != len(that1.WhitelistedChains) { return false } - for i := range this.WhitelistedOrigins { - if this.WhitelistedOrigins[i] != that1.WhitelistedOrigins[i] { + for i := range this.WhitelistedChains { + if !this.WhitelistedChains[i].Equal(that1.WhitelistedChains[i]) { return false } } - if this.AssertionRewardRate != that1.AssertionRewardRate { - return false - } - if this.EncryptionRewardRate != that1.EncryptionRewardRate { - return false - } return true } + +func (this *Meta) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*Meta) + if !ok { + that2, ok := that.(Meta) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if len(this.Data) != len(that1.Data) { + return false + } + for i := range this.Data { + if this.Data[i] != that1.Data[i] { + return false + } + } + return true +} + func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -272,36 +700,366 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.EncryptionRewardRate != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.EncryptionRewardRate)))) - i-- - dAtA[i] = 0x29 - } - if m.AssertionRewardRate != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.AssertionRewardRate)))) - i-- - dAtA[i] = 0x21 - } - if len(m.WhitelistedOrigins) > 0 { - for iNdEx := len(m.WhitelistedOrigins) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.WhitelistedOrigins[iNdEx]) - copy(dAtA[i:], m.WhitelistedOrigins[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.WhitelistedOrigins[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(m.PropertyAllowlist) > 0 { - for iNdEx := len(m.PropertyAllowlist) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.PropertyAllowlist[iNdEx]) - copy(dAtA[i:], m.PropertyAllowlist[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.PropertyAllowlist[iNdEx]))) + if len(m.WhitelistedChains) > 0 { + for iNdEx := len(m.WhitelistedChains) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.WhitelistedChains[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x12 } } + if len(m.WhitelistedAssets) > 0 { + for iNdEx := len(m.WhitelistedAssets) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.WhitelistedAssets[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *Meta) 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 *Meta) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Meta) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + for k := range m.Data { + v := m.Data[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintGenesis(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintGenesis(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *AssetInfo) 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 *AssetInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.CounterParty != nil { + { + size, err := m.CounterParty.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x7a + } + if len(m.Port) > 0 { + i -= len(m.Port) + copy(dAtA[i:], m.Port) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Port))) + i-- + dAtA[i] = 0x72 + } + if len(m.Channel) > 0 { + i -= len(m.Channel) + copy(dAtA[i:], m.Channel) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Channel))) + i-- + dAtA[i] = 0x6a + } + if len(m.Path) > 0 { + i -= len(m.Path) + copy(dAtA[i:], m.Path) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Path))) + i-- + dAtA[i] = 0x62 + } + if m.Enable { + i-- + if m.Enable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(m.CoinGeckoId) > 0 { + i -= len(m.CoinGeckoId) + copy(dAtA[i:], m.CoinGeckoId) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.CoinGeckoId))) + i-- + dAtA[i] = 0x52 + } + if len(m.Image) > 0 { + i -= len(m.Image) + copy(dAtA[i:], m.Image) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Image))) + i-- + dAtA[i] = 0x4a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x42 + } + if m.Decimals != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x32 + } + if len(m.OriginType) > 0 { + i -= len(m.OriginType) + copy(dAtA[i:], m.OriginType) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginType))) + i-- + dAtA[i] = 0x2a + } + if len(m.OriginDenom) > 0 { + i -= len(m.OriginDenom) + copy(dAtA[i:], m.OriginDenom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginDenom))) + i-- + dAtA[i] = 0x22 + } + if len(m.OriginChain) > 0 { + i -= len(m.OriginChain) + copy(dAtA[i:], m.OriginChain) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginChain))) + i-- + dAtA[i] = 0x1a + } + if len(m.AssetType) > 0 { + i -= len(m.AssetType) + copy(dAtA[i:], m.AssetType) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AssetType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainInfo) 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 *ChainInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.SimulGasMultiply != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SimulGasMultiply)))) + i-- + dAtA[i] = 0x79 + } + if m.FeeIsSimulable { + i-- + if m.FeeIsSimulable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x70 + } + if m.FeeInitGasLimit != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.FeeInitGasLimit)) + i-- + dAtA[i] = 0x68 + } + if len(m.FeeRate) > 0 { + for iNdEx := len(m.FeeRate) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FeeRate[iNdEx]) + copy(dAtA[i:], m.FeeRate[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeeRate[iNdEx]))) + i-- + dAtA[i] = 0x62 + } + } + if len(m.FeeBase) > 0 { + i -= len(m.FeeBase) + copy(dAtA[i:], m.FeeBase) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeeBase))) + i-- + dAtA[i] = 0x5a + } + if m.Explorer != nil { + { + size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if len(m.LcdEndpoint) > 0 { + for iNdEx := len(m.LcdEndpoint) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.LcdEndpoint[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + } + if len(m.GrpcEndpoint) > 0 { + for iNdEx := len(m.GrpcEndpoint) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GrpcEndpoint[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.AccountType) > 0 { + for iNdEx := len(m.AccountType) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.AccountType[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.OriginGenesisTime) > 0 { + i -= len(m.OriginGenesisTime) + copy(dAtA[i:], m.OriginGenesisTime) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginGenesisTime))) + i-- + dAtA[i] = 0x32 + } + if len(m.BechValidatorPrefix) > 0 { + i -= len(m.BechValidatorPrefix) + copy(dAtA[i:], m.BechValidatorPrefix) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.BechValidatorPrefix))) + i-- + dAtA[i] = 0x2a + } + if len(m.BechAccountPrefix) > 0 { + i -= len(m.BechAccountPrefix) + copy(dAtA[i:], m.BechAccountPrefix) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.BechAccountPrefix))) + i-- + dAtA[i] = 0x22 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChainName) > 0 { + i -= len(m.ChainName) + copy(dAtA[i:], m.ChainName) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChainName))) + i-- + dAtA[i] = 0x12 + } + if len(m.ChainIdCosmos) > 0 { + i -= len(m.ChainIdCosmos) + copy(dAtA[i:], m.ChainIdCosmos) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChainIdCosmos))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -316,6 +1074,7 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } + func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -333,22 +1092,174 @@ func (m *Params) Size() (n int) { } var l int _ = l - if len(m.PropertyAllowlist) > 0 { - for _, s := range m.PropertyAllowlist { + if len(m.WhitelistedAssets) > 0 { + for _, e := range m.WhitelistedAssets { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.WhitelistedChains) > 0 { + for _, e := range m.WhitelistedChains { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *Meta) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Data) > 0 { + for k, v := range m.Data { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + 1 + len(v) + sovGenesis(uint64(len(v))) + n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) + } + } + return n +} + +func (m *AssetInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.AssetType) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.OriginChain) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.OriginDenom) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.OriginType) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Decimals != 0 { + n += 1 + sovGenesis(uint64(m.Decimals)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Image) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.CoinGeckoId) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.Enable { + n += 2 + } + l = len(m.Path) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Channel) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Port) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if m.CounterParty != nil { + l = m.CounterParty.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + return n +} + +func (m *ChainInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ChainIdCosmos) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.ChainName) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.BechAccountPrefix) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.BechValidatorPrefix) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.OriginGenesisTime) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.AccountType) > 0 { + for _, e := range m.AccountType { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.GrpcEndpoint) > 0 { + for _, e := range m.GrpcEndpoint { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.LcdEndpoint) > 0 { + for _, e := range m.LcdEndpoint { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + if m.Explorer != nil { + l = m.Explorer.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.FeeBase) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.FeeRate) > 0 { + for _, s := range m.FeeRate { l = len(s) n += 1 + l + sovGenesis(uint64(l)) } } - if len(m.WhitelistedOrigins) > 0 { - for _, s := range m.WhitelistedOrigins { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } + if m.FeeInitGasLimit != 0 { + n += 1 + sovGenesis(uint64(m.FeeInitGasLimit)) } - if m.AssertionRewardRate != 0 { - n += 9 + if m.FeeIsSimulable { + n += 2 } - if m.EncryptionRewardRate != 0 { + if m.SimulGasMultiply != 0 { n += 9 } return n @@ -357,9 +1268,11 @@ func (m *Params) Size() (n int) { func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } + func sozGenesis(x uint64) (n int) { return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } + func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -443,6 +1356,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } + func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -472,11 +1386,45 @@ func (m *Params) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedAssets", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.WhitelistedAssets = append(m.WhitelistedAssets, &AssetInfo{}) + if err := m.WhitelistedAssets[len(m.WhitelistedAssets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PropertyAllowlist", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedChains", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -486,78 +1434,26 @@ func (m *Params) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - m.PropertyAllowlist = append(m.PropertyAllowlist, string(dAtA[iNdEx:postIndex])) + m.WhitelistedChains = append(m.WhitelistedChains, &ChainInfo{}) + if err := m.WhitelistedChains[len(m.WhitelistedChains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field WhitelistedOrigins", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - 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 ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.WhitelistedOrigins = append(m.WhitelistedOrigins, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 4: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field AssertionRewardRate", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.AssertionRewardRate = float64(math.Float64frombits(v)) - case 5: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field EncryptionRewardRate", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.EncryptionRewardRate = float64(math.Float64frombits(v)) default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -579,6 +1475,1190 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } + +func (m *Meta) 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 ErrIntOverflowGenesis + } + 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: Meta: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Meta: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Data == nil { + m.Data = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthGenesis + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthGenesis + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Data[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *AssetInfo) 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 ErrIntOverflowGenesis + } + 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: AssetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Image = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoinGeckoId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoinGeckoId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Enable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enable = bool(v != 0) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Path = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Channel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Port = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 15: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CounterParty", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.CounterParty == nil { + m.CounterParty = &Meta{} + } + if err := m.CounterParty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + +func (m *ChainInfo) 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 ErrIntOverflowGenesis + } + 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: ChainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainIdCosmos", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainIdCosmos = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BechAccountPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BechAccountPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BechValidatorPrefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BechValidatorPrefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginGenesisTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginGenesisTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountType", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountType = append(m.AccountType, &Meta{}) + if err := m.AccountType[len(m.AccountType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoint", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GrpcEndpoint = append(m.GrpcEndpoint, &Meta{}) + if err := m.GrpcEndpoint[len(m.GrpcEndpoint)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field LcdEndpoint", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.LcdEndpoint = append(m.LcdEndpoint, &Meta{}) + if err := m.LcdEndpoint[len(m.LcdEndpoint)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explorer == nil { + m.Explorer = &Meta{} + } + if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 11: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeBase", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeBase = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + 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 ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRate = append(m.FeeRate, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 13: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeInitGasLimit", wireType) + } + m.FeeInitGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FeeInitGasLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 14: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeIsSimulable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.FeeIsSimulable = bool(v != 0) + case 15: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field SimulGasMultiply", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.SimulGasMultiply = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} + func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/keys.go b/x/did/types/keys.go index 1b3f8c894..1f1d7198b 100644 --- a/x/did/types/keys.go +++ b/x/did/types/keys.go @@ -1,15 +1,19 @@ package types import ( + fmt "fmt" + "math/big" + "cosmossdk.io/collections" + "github.com/onsonr/crypto/core/curves" + "github.com/onsonr/crypto/signatures/ecdsa" + "golang.org/x/crypto/sha3" ormv1alpha1 "cosmossdk.io/api/cosmos/orm/v1alpha1" ) -var ( - // ParamsKey saves the current module params. - ParamsKey = collections.NewPrefix(0) -) +// ParamsKey saves the current module params. +var ParamsKey = collections.NewPrefix(0) const ( ModuleName = "did" @@ -25,3 +29,34 @@ var ORMModuleSchema = ormv1alpha1.ModuleSchemaDescriptor{ }, Prefix: []byte{0}, } + +// VerifySignature verifies the signature of a message +func VerifySignature(key []byte, msg []byte, sig []byte) bool { + pp, err := BuildEcPoint(key) + if err != nil { + return false + } + sigEd, err := ecdsa.DeserializeSecp256k1Signature(sig) + if err != nil { + return false + } + hash := sha3.New256() + _, err = hash.Write(msg) + if err != nil { + return false + } + digest := hash.Sum(nil) + return curves.VerifyEcdsa(pp, digest[:], sigEd) +} + +// BuildEcPoint builds an elliptic curve point from a compressed byte slice +func BuildEcPoint(pubKey []byte) (*curves.EcPoint, error) { + crv := curves.K256() + x := new(big.Int).SetBytes(pubKey[1:33]) + y := new(big.Int).SetBytes(pubKey[33:]) + ecCurve, err := crv.ToEllipticCurve() + if err != nil { + return nil, fmt.Errorf("error converting curve: %v", err) + } + return &curves.EcPoint{X: x, Y: y, Curve: ecCurve}, nil +} diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 83d3dc4bb..02b7b8441 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -547,49 +547,50 @@ func init() { func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 672 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0xbf, 0x6e, 0x13, 0x4f, - 0x10, 0xc7, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x49, 0xb4, 0x8a, 0x7e, 0xbf, 0xc3, 0x08, 0x63, 0x8c, - 0x22, 0x85, 0xc6, 0x47, 0xa0, 0x41, 0x09, 0x05, 0x26, 0x49, 0x01, 0x28, 0x12, 0x32, 0x54, 0x34, - 0xd6, 0xfa, 0x76, 0x63, 0x2f, 0x3e, 0xef, 0x9e, 0x76, 0xd7, 0x4e, 0xae, 0xa3, 0x47, 0x42, 0x14, - 0x34, 0x34, 0x79, 0x05, 0x5e, 0x83, 0x32, 0x12, 0x0d, 0x25, 0x4a, 0xde, 0x80, 0x27, 0x40, 0x77, - 0x7b, 0x8e, 0x8f, 0x73, 0x00, 0x21, 0x3a, 0xef, 0x77, 0x76, 0x3c, 0x9f, 0xf9, 0xce, 0xdc, 0x02, - 0x22, 0x8c, 0xb8, 0xb3, 0x6d, 0x57, 0x69, 0xac, 0x69, 0x27, 0x90, 0x42, 0x0b, 0x54, 0x24, 0x8c, - 0x74, 0x66, 0xdb, 0x8d, 0xff, 0x3d, 0xa1, 0x26, 0x42, 0xb9, 0x42, 0x4e, 0xa2, 0x2b, 0x42, 0x4e, - 0xcc, 0x85, 0xc6, 0x46, 0x92, 0x34, 0xa4, 0x9c, 0x2a, 0xa6, 0x8c, 0xda, 0xfe, 0x68, 0x41, 0xa9, - 0xeb, 0x33, 0xac, 0xa8, 0x42, 0xab, 0x90, 0x63, 0xc4, 0xb1, 0x5a, 0xd6, 0x56, 0xa5, 0x97, 0x63, - 0x04, 0xfd, 0x07, 0x45, 0x21, 0xd9, 0x90, 0x71, 0x27, 0x17, 0x6b, 0xc9, 0x29, 0xd2, 0x47, 0x98, - 0x13, 0x9f, 0x3a, 0xb6, 0xd1, 0xcd, 0x09, 0x35, 0x01, 0x3c, 0xc1, 0xb5, 0x14, 0xbe, 0x4f, 0xa5, - 0x93, 0x8f, 0x63, 0x29, 0x25, 0x8a, 0xd3, 0x93, 0x80, 0x49, 0xac, 0x99, 0xe0, 0x4e, 0xa1, 0x65, - 0x6d, 0xe5, 0x7b, 0x29, 0x65, 0x67, 0xf5, 0xfb, 0xe9, 0x97, 0x77, 0x76, 0x19, 0xf2, 0x86, 0xa3, - 0xfd, 0x26, 0x07, 0x95, 0xae, 0x52, 0x54, 0x46, 0xd1, 0x25, 0xba, 0x6b, 0x50, 0x1e, 0xd3, 0xb0, - 0xaf, 0xc3, 0x80, 0x26, 0x7c, 0xa5, 0x31, 0x0d, 0x5f, 0x86, 0x81, 0x01, 0x91, 0x94, 0x50, 0xae, - 0x19, 0xf6, 0x63, 0xc8, 0x5a, 0x2f, 0xa5, 0xa0, 0x5d, 0x28, 0x4f, 0xa8, 0xc6, 0x04, 0x6b, 0xec, - 0xe4, 0x5b, 0xf6, 0x56, 0xf5, 0xde, 0xcd, 0x8e, 0xb1, 0xaf, 0x73, 0x59, 0xaf, 0x73, 0x98, 0xdc, - 0x38, 0xe0, 0x5a, 0x86, 0xbd, 0xcb, 0x84, 0x4c, 0x97, 0x85, 0x6c, 0x97, 0x8d, 0x5d, 0xa8, 0xff, - 0x94, 0x8a, 0xd6, 0xc1, 0x1e, 0xd3, 0x30, 0x21, 0x8f, 0x7e, 0xa2, 0x0d, 0x28, 0xcc, 0xb0, 0x3f, - 0x9d, 0x73, 0x9b, 0xc3, 0x4e, 0xee, 0x81, 0x95, 0xb1, 0x20, 0xd7, 0xfe, 0x60, 0x41, 0xb5, 0xab, - 0x35, 0x8d, 0x26, 0xfd, 0x97, 0x26, 0x5c, 0x16, 0xb1, 0x53, 0x45, 0x22, 0x35, 0x90, 0x42, 0x1c, - 0x25, 0xe3, 0x31, 0x87, 0x3f, 0xf5, 0x94, 0xc1, 0xb2, 0xdb, 0x9f, 0x2c, 0x80, 0xbd, 0xc5, 0x60, - 0xb3, 0x54, 0xeb, 0x60, 0x93, 0x08, 0xdf, 0x74, 0x4c, 0x18, 0x41, 0x77, 0x61, 0x23, 0x98, 0x0e, - 0x7c, 0xe6, 0xf5, 0x23, 0xdc, 0xc9, 0xd4, 0xd7, 0x6c, 0x80, 0xd5, 0x9c, 0x0d, 0x99, 0xd8, 0x33, - 0x1a, 0x1e, 0xce, 0x23, 0xe8, 0x3a, 0x54, 0x66, 0x78, 0xea, 0xeb, 0xbe, 0xc7, 0x48, 0x02, 0x5b, - 0x8e, 0x85, 0x3d, 0x46, 0x50, 0x0b, 0xaa, 0x47, 0x8c, 0x0f, 0xa9, 0x0c, 0x24, 0xe3, 0x3a, 0x06, - 0xae, 0xf5, 0xd2, 0x52, 0x86, 0x38, 0xdf, 0x7e, 0x6b, 0x03, 0xec, 0x53, 0x9f, 0x0e, 0xaf, 0xf6, - 0x71, 0x99, 0xf8, 0x06, 0x80, 0x37, 0xc2, 0x8c, 0x1b, 0x6f, 0x0d, 0x67, 0x25, 0x56, 0x62, 0x77, - 0x6f, 0x43, 0xdd, 0x84, 0x31, 0x21, 0x92, 0x2a, 0x95, 0x20, 0xd6, 0x62, 0xb1, 0x6b, 0x34, 0xb4, - 0x09, 0xab, 0x0b, 0x13, 0xfb, 0x51, 0x01, 0x63, 0x6d, 0x7d, 0xa1, 0xee, 0xff, 0xc6, 0x9c, 0xe2, - 0x2f, 0xcd, 0x39, 0x84, 0xb5, 0x54, 0xc6, 0xeb, 0xe3, 0xb1, 0x72, 0x4a, 0xf1, 0x1e, 0x6f, 0xce, - 0xf7, 0x78, 0xd1, 0x6b, 0xe7, 0xf9, 0x3c, 0xff, 0xe9, 0xf1, 0x58, 0x99, 0x6d, 0xae, 0x07, 0x69, - 0x2d, 0xe9, 0x95, 0x73, 0xea, 0xf7, 0x19, 0x71, 0xca, 0xf1, 0x87, 0x59, 0x49, 0x94, 0x27, 0xa4, - 0xf1, 0x08, 0xd0, 0xf2, 0x7f, 0xfc, 0xc3, 0x5a, 0x17, 0xda, 0xa7, 0x16, 0x94, 0x5e, 0x50, 0x39, - 0x63, 0x1e, 0x5d, 0x1a, 0xc5, 0x2d, 0xa8, 0x29, 0x13, 0x4a, 0xaf, 0x75, 0x35, 0xd1, 0x62, 0xf3, - 0xef, 0xc0, 0xfa, 0xfc, 0x0a, 0xe5, 0x24, 0x10, 0xd1, 0x0e, 0x98, 0x09, 0xad, 0x25, 0xfa, 0x41, - 0x22, 0x5f, 0x31, 0x82, 0xfc, 0x15, 0x23, 0xc8, 0x00, 0x16, 0x1f, 0x3f, 0xfc, 0x7c, 0xde, 0xb4, - 0xce, 0xce, 0x9b, 0xd6, 0xb7, 0xf3, 0xa6, 0xf5, 0xfe, 0xa2, 0xb9, 0x72, 0x76, 0xd1, 0x5c, 0xf9, - 0x7a, 0xd1, 0x5c, 0x79, 0xd5, 0x1e, 0x32, 0x3d, 0x9a, 0x0e, 0x3a, 0x9e, 0x98, 0xb8, 0x82, 0x2b, - 0xc1, 0xa5, 0x3b, 0x3a, 0xc6, 0xa1, 0x7b, 0xe2, 0x46, 0xef, 0x6b, 0x44, 0xac, 0x06, 0xc5, 0xf8, - 0x6d, 0xbd, 0xff, 0x23, 0x00, 0x00, 0xff, 0xff, 0x5d, 0x24, 0xdd, 0x73, 0xa8, 0x05, 0x00, 0x00, + // 685 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x3f, 0x6f, 0x13, 0x4d, + 0x10, 0xc6, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x89, 0xb5, 0x8a, 0xf2, 0xde, 0x6b, 0xc0, 0x18, 0xa3, + 0x48, 0xa1, 0xb1, 0x09, 0x34, 0x28, 0xa1, 0xc0, 0x24, 0x29, 0x00, 0x45, 0x42, 0x86, 0x8a, 0xc6, + 0x5a, 0x7b, 0x37, 0xf6, 0xe2, 0xf3, 0xee, 0x69, 0x77, 0xed, 0xe4, 0x3a, 0x7a, 0x24, 0x44, 0x41, + 0x9d, 0x96, 0x92, 0xaf, 0x41, 0x19, 0x89, 0x86, 0x12, 0x25, 0xdf, 0x80, 0x4f, 0x80, 0xf6, 0xf6, + 0x1c, 0x1f, 0x76, 0x00, 0x21, 0xba, 0xec, 0x33, 0x33, 0x99, 0xdf, 0x3c, 0x33, 0x3e, 0x40, 0x84, + 0x91, 0xd6, 0x74, 0xbb, 0xa5, 0x34, 0xd6, 0xb4, 0x19, 0x48, 0xa1, 0x05, 0xca, 0x12, 0x46, 0x9a, + 0xd3, 0xed, 0xea, 0x7f, 0x7d, 0xa1, 0xc6, 0x42, 0xb5, 0x84, 0x1c, 0x9b, 0x14, 0x21, 0xc7, 0x36, + 0xa1, 0xba, 0x1e, 0x17, 0x0d, 0x28, 0xa7, 0x8a, 0x29, 0xab, 0x36, 0x3e, 0x3a, 0x90, 0x6b, 0xfb, + 0x0c, 0x2b, 0xaa, 0xd0, 0x2a, 0xa4, 0x18, 0xf1, 0x9c, 0xba, 0xb3, 0x55, 0xe8, 0xa4, 0x18, 0x41, + 0x1b, 0x90, 0x15, 0x92, 0x0d, 0x18, 0xf7, 0x52, 0x91, 0x16, 0xbf, 0x8c, 0x3e, 0xc4, 0x9c, 0xf8, + 0xd4, 0x73, 0xad, 0x6e, 0x5f, 0xa8, 0x06, 0xd0, 0x17, 0x5c, 0x4b, 0xe1, 0xfb, 0x54, 0x7a, 0xe9, + 0x28, 0x96, 0x50, 0x4c, 0x9c, 0x9e, 0x04, 0x4c, 0x62, 0xcd, 0x04, 0xf7, 0x32, 0x75, 0x67, 0x2b, + 0xdd, 0x49, 0x28, 0x3b, 0xd7, 0xbf, 0x9f, 0x7e, 0x79, 0xe7, 0x6e, 0x40, 0xda, 0x70, 0xa0, 0xd2, + 0xac, 0x4b, 0xc5, 0xf1, 0x1c, 0xcf, 0x69, 0xbc, 0x49, 0x41, 0xa1, 0xad, 0x14, 0x95, 0x26, 0x77, + 0x89, 0xf5, 0x7f, 0xc8, 0x8f, 0x68, 0xd8, 0xd5, 0x61, 0x40, 0x63, 0xda, 0xdc, 0x88, 0x86, 0x2f, + 0xc3, 0xc0, 0x62, 0x49, 0x4a, 0x28, 0xd7, 0x0c, 0xfb, 0x11, 0x72, 0xa9, 0x93, 0x50, 0xd0, 0x2e, + 0xe4, 0xc7, 0x54, 0x63, 0x82, 0x35, 0xf6, 0xd2, 0x75, 0x77, 0xab, 0x78, 0xef, 0x66, 0xd3, 0x9a, + 0xd9, 0xbc, 0xec, 0xd7, 0x3c, 0x8c, 0x33, 0x0e, 0xb8, 0x96, 0x61, 0xe7, 0xb2, 0x60, 0x61, 0xe6, + 0xcc, 0xe2, 0xcc, 0xd5, 0x5d, 0x28, 0xff, 0x54, 0x8a, 0x2a, 0xe0, 0x8e, 0x68, 0x18, 0x93, 0x9b, + 0x3f, 0xd1, 0x3a, 0x64, 0xa6, 0xd8, 0x9f, 0xcc, 0xb8, 0xed, 0x63, 0x27, 0xf5, 0xc0, 0xd9, 0x59, + 0x8d, 0x0c, 0xc9, 0x5b, 0x43, 0xbc, 0x54, 0xe3, 0x83, 0x03, 0xc5, 0xb6, 0xd6, 0xd4, 0xec, 0xfd, + 0x2f, 0x4d, 0xb8, 0x6c, 0xe2, 0x26, 0x9a, 0x18, 0x35, 0x90, 0x42, 0x1c, 0xc5, 0xcb, 0xb2, 0x8f, + 0x3f, 0xcd, 0xb4, 0x80, 0xe5, 0x36, 0x3e, 0x39, 0x00, 0x7b, 0xf3, 0x35, 0x2f, 0x52, 0x55, 0xc0, + 0x25, 0x06, 0xdf, 0x4e, 0x4c, 0x18, 0x41, 0x77, 0x61, 0x3d, 0x98, 0xf4, 0x7c, 0xd6, 0xef, 0x1a, + 0xdc, 0xf1, 0xc4, 0xd7, 0xac, 0x87, 0xd5, 0x8c, 0x0d, 0xd9, 0xd8, 0x33, 0x1a, 0x1e, 0xce, 0x22, + 0xe8, 0x1a, 0x14, 0xa6, 0x78, 0xe2, 0xeb, 0x6e, 0x9f, 0x91, 0x18, 0x36, 0x1f, 0x09, 0x7b, 0x8c, + 0xa0, 0x3a, 0x14, 0x8f, 0x18, 0x1f, 0x50, 0x19, 0x48, 0xc6, 0x75, 0x04, 0x5c, 0xea, 0x24, 0xa5, + 0x05, 0xe2, 0x74, 0xe3, 0xad, 0x0b, 0xb0, 0x4f, 0x7d, 0x3a, 0xb8, 0xda, 0xc7, 0x65, 0xe2, 0x1b, + 0x00, 0xfd, 0x21, 0x66, 0xdc, 0x7a, 0x6b, 0x39, 0x0b, 0x91, 0x12, 0xb9, 0x7b, 0x1b, 0xca, 0x36, + 0x8c, 0x09, 0x91, 0x54, 0xa9, 0x18, 0xb1, 0x14, 0x89, 0x6d, 0xab, 0xa1, 0x4d, 0x58, 0x9d, 0x9b, + 0xd8, 0x35, 0x0d, 0xac, 0xb5, 0xe5, 0xb9, 0xba, 0xff, 0x1b, 0x73, 0xb2, 0xbf, 0x34, 0xe7, 0x10, + 0xd6, 0x12, 0x15, 0xaf, 0x8f, 0x47, 0xca, 0xcb, 0x45, 0x77, 0xbc, 0x39, 0xbb, 0xe3, 0xf9, 0xac, + 0xcd, 0xe7, 0xb3, 0xfa, 0xa7, 0xc7, 0x23, 0x65, 0xaf, 0xb9, 0x1c, 0x24, 0xb5, 0x78, 0x56, 0xce, + 0xa9, 0xdf, 0x65, 0xc4, 0xcb, 0x47, 0x3f, 0xd3, 0x42, 0xac, 0x3c, 0x21, 0xd5, 0x47, 0x80, 0x96, + 0xff, 0xc7, 0x3f, 0x9c, 0x75, 0xa6, 0x71, 0xea, 0x40, 0xee, 0x05, 0x95, 0x53, 0xd6, 0xa7, 0x4b, + 0xab, 0xb8, 0x05, 0x25, 0x65, 0x43, 0xc9, 0xb3, 0x2e, 0xc6, 0x5a, 0x64, 0xfe, 0x1d, 0xa8, 0xcc, + 0x52, 0x28, 0x27, 0x81, 0x30, 0x37, 0x60, 0x37, 0xb4, 0x16, 0xeb, 0x07, 0xb1, 0x7c, 0xc5, 0x0a, + 0xd2, 0x57, 0xac, 0x60, 0x01, 0x30, 0xfb, 0xf8, 0xe1, 0xe7, 0xf3, 0x9a, 0x73, 0x76, 0x5e, 0x73, + 0xbe, 0x9d, 0xd7, 0x9c, 0xf7, 0x17, 0xb5, 0x95, 0xb3, 0x8b, 0xda, 0xca, 0xd7, 0x8b, 0xda, 0xca, + 0xab, 0xc6, 0x80, 0xe9, 0xe1, 0xa4, 0xd7, 0xec, 0x8b, 0x71, 0x4b, 0x70, 0x25, 0xb8, 0x6c, 0x0d, + 0x8f, 0x71, 0xd8, 0x3a, 0x69, 0x99, 0xaf, 0xad, 0x21, 0x56, 0xbd, 0x6c, 0xf4, 0xa5, 0xbd, 0xff, + 0x23, 0x00, 0x00, 0xff, 0xff, 0x12, 0x6f, 0x94, 0xba, 0xb6, 0x05, 0x00, 0x00, } func (m *Aliases) Marshal() (dAtA []byte, err error) { diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index b76afaa50..90965a275 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -370,40 +370,40 @@ func init() { func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 519 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6b, 0x53, 0x4f, - 0x14, 0xcd, 0x24, 0xf9, 0xe5, 0x47, 0xae, 0xb5, 0x85, 0x47, 0x68, 0x5e, 0x1e, 0xf2, 0xd2, 0x46, - 0xc1, 0x58, 0x34, 0x8f, 0x46, 0x10, 0x11, 0x37, 0x8d, 0x1b, 0x5d, 0x04, 0x24, 0xe2, 0x46, 0x17, - 0x3a, 0xcd, 0x9b, 0x4e, 0x06, 0x93, 0x99, 0x30, 0x77, 0x12, 0x1b, 0x57, 0xe2, 0xc6, 0xad, 0x1f, - 0xc1, 0x8f, 0xd0, 0x85, 0x5f, 0x41, 0xe8, 0xb2, 0xb8, 0x72, 0x25, 0x92, 0x2c, 0x8a, 0xdf, 0x42, - 0xde, 0xbf, 0xfc, 0x69, 0x13, 0x22, 0xe2, 0x6e, 0xe6, 0x9e, 0x73, 0xee, 0x9c, 0x33, 0x73, 0x19, - 0xd8, 0xf2, 0x85, 0xef, 0x0d, 0xf7, 0x3d, 0x73, 0x5c, 0xeb, 0x6b, 0x65, 0x94, 0x95, 0xf3, 0x85, - 0x5f, 0x1b, 0xee, 0x3b, 0xc5, 0xb6, 0xc2, 0x9e, 0x42, 0xaf, 0x87, 0x3c, 0xc0, 0x7b, 0xc8, 0x23, - 0x82, 0x53, 0x88, 0x15, 0x9c, 0x49, 0x86, 0x02, 0x93, 0x2a, 0x57, 0x5c, 0x85, 0x4b, 0x2f, 0x58, - 0xc5, 0xd5, 0x52, 0xd4, 0xe4, 0x55, 0x04, 0x44, 0x9b, 0x08, 0xaa, 0x7c, 0x24, 0xb0, 0xd5, 0x44, - 0xfe, 0xbc, 0xef, 0x53, 0xc3, 0x9e, 0x52, 0x4d, 0x7b, 0x68, 0xdd, 0x83, 0x3c, 0x1d, 0x98, 0x8e, - 0xd2, 0xc2, 0x8c, 0x6c, 0xb2, 0x43, 0xaa, 0xf9, 0x86, 0xfd, 0xed, 0xcb, 0x9d, 0x42, 0x2c, 0x3c, - 0xf0, 0x7d, 0xcd, 0x10, 0x9f, 0x19, 0x2d, 0x24, 0x6f, 0xcd, 0xa8, 0xd6, 0x6d, 0xc8, 0xf5, 0xc3, - 0x0e, 0x76, 0x7a, 0x87, 0x54, 0xaf, 0xd4, 0x37, 0x6b, 0x51, 0x88, 0x5a, 0xd4, 0xb7, 0x91, 0x3d, - 0xfd, 0x51, 0x4e, 0xb5, 0x62, 0xce, 0x83, 0xcd, 0x0f, 0xe7, 0x27, 0x7b, 0x33, 0x75, 0xa5, 0x04, - 0xc5, 0x0b, 0x46, 0x5a, 0x0c, 0xfb, 0x4a, 0x22, 0xab, 0x7c, 0x25, 0x21, 0xf6, 0x44, 0x0a, 0x23, - 0x68, 0x57, 0xbc, 0x63, 0x8f, 0x94, 0x34, 0x5a, 0x75, 0xbb, 0x4c, 0xff, 0xb5, 0x59, 0x17, 0x80, - 0x22, 0x32, 0x6d, 0x84, 0x92, 0x81, 0xe1, 0x4c, 0x75, 0xa3, 0x35, 0x57, 0xb1, 0xae, 0x41, 0xfe, - 0x0d, 0x1b, 0x61, 0x87, 0x6a, 0x86, 0x76, 0x26, 0x84, 0x67, 0x05, 0xeb, 0x06, 0x5c, 0x1d, 0x32, - 0x2d, 0x8e, 0x44, 0x9b, 0x46, 0x0d, 0xb2, 0x21, 0x63, 0xb1, 0x78, 0x29, 0xe2, 0x4b, 0x28, 0xaf, - 0x88, 0x91, 0x44, 0xb5, 0xee, 0x03, 0xb4, 0xa7, 0xd5, 0xb5, 0x79, 0xe6, 0xb8, 0x95, 0x5f, 0x04, - 0x4a, 0x4d, 0xe4, 0x07, 0x03, 0xd3, 0x61, 0xd2, 0x04, 0x1e, 0xfe, 0xc5, 0x35, 0x2d, 0xfa, 0x49, - 0xff, 0xb9, 0x1f, 0xab, 0x0e, 0xff, 0xd3, 0x08, 0xb4, 0x33, 0x6b, 0x64, 0x09, 0xd1, 0xda, 0x86, - 0x9c, 0xd2, 0x82, 0x0b, 0x69, 0x67, 0x03, 0x49, 0x2b, 0xde, 0x5d, 0xba, 0xc8, 0xeb, 0xb0, 0xbb, - 0x32, 0x6a, 0x72, 0x95, 0xf5, 0xcf, 0x69, 0xc8, 0x34, 0x91, 0x5b, 0x8f, 0x61, 0x63, 0x61, 0xbc, - 0x8b, 0xc9, 0x58, 0x5e, 0x18, 0x37, 0xa7, 0xbc, 0x02, 0x98, 0x3e, 0xce, 0x6b, 0x28, 0x2c, 0x9d, - 0xc1, 0x79, 0xe1, 0x32, 0x82, 0x73, 0x73, 0x0d, 0x61, 0x7a, 0xc2, 0x11, 0x6c, 0xaf, 0x78, 0xc0, - 0xdd, 0xb9, 0x16, 0xcb, 0x29, 0xce, 0xad, 0xb5, 0x94, 0xe4, 0x1c, 0xe7, 0xbf, 0xf7, 0xe7, 0x27, - 0x7b, 0xa4, 0xf1, 0xf0, 0x74, 0xec, 0x92, 0xb3, 0xb1, 0x4b, 0x7e, 0x8e, 0x5d, 0xf2, 0x69, 0xe2, - 0xa6, 0xce, 0x26, 0x6e, 0xea, 0xfb, 0xc4, 0x4d, 0xbd, 0xa8, 0x70, 0x61, 0x3a, 0x83, 0xc3, 0x5a, - 0x5b, 0xf5, 0x3c, 0x25, 0x51, 0x49, 0xed, 0x75, 0xde, 0xd2, 0x91, 0x77, 0xec, 0x05, 0xff, 0x8e, - 0x19, 0xf5, 0x19, 0x1e, 0xe6, 0xc2, 0x2f, 0xe4, 0xee, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0x57, - 0x4f, 0xb3, 0x3a, 0xbd, 0x04, 0x00, 0x00, + // 525 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6b, 0x13, 0x4f, + 0x14, 0xce, 0x26, 0xf9, 0xe5, 0x47, 0x9e, 0xb5, 0x85, 0xa1, 0x34, 0x9b, 0x45, 0x36, 0x6d, 0x14, + 0x8c, 0x45, 0xb3, 0x34, 0x82, 0x88, 0x78, 0x69, 0xbc, 0xe8, 0x21, 0x20, 0x2b, 0x5e, 0x14, 0x94, + 0x69, 0x76, 0x3a, 0x19, 0x4c, 0x66, 0xc2, 0xbc, 0x49, 0x6c, 0x3c, 0x89, 0x17, 0xaf, 0xfe, 0x05, + 0xfe, 0x0d, 0x3d, 0xf8, 0x2f, 0x08, 0x3d, 0x16, 0x4f, 0x9e, 0x44, 0x92, 0x43, 0xf1, 0xbf, 0x90, + 0xdd, 0xcd, 0x26, 0x9b, 0xb6, 0x21, 0x22, 0xde, 0x76, 0xde, 0xf7, 0xbd, 0x6f, 0xbf, 0xef, 0xcd, + 0x63, 0x60, 0x23, 0x10, 0x81, 0x37, 0xdc, 0xf3, 0xcc, 0x51, 0xbd, 0xaf, 0x95, 0x51, 0xa4, 0x10, + 0x88, 0xa0, 0x3e, 0xdc, 0x73, 0x4a, 0x6d, 0x85, 0x3d, 0x85, 0x5e, 0x0f, 0x79, 0x88, 0xf7, 0x90, + 0xc7, 0x04, 0x67, 0x73, 0xda, 0xc1, 0x99, 0x64, 0x28, 0x30, 0xa9, 0x72, 0xc5, 0x55, 0xf4, 0xe9, + 0x85, 0x5f, 0xd3, 0x6a, 0x39, 0x16, 0x79, 0x1d, 0x03, 0xf1, 0x21, 0x86, 0xaa, 0x1f, 0x2d, 0xd8, + 0x68, 0x21, 0x7f, 0xde, 0x0f, 0xa8, 0x61, 0x4f, 0xa9, 0xa6, 0x3d, 0x24, 0xf7, 0xa0, 0x48, 0x07, + 0xa6, 0xa3, 0xb4, 0x30, 0x23, 0xdb, 0xda, 0xb6, 0x6a, 0xc5, 0xa6, 0xfd, 0xed, 0xcb, 0x9d, 0xcd, + 0x69, 0xe3, 0x7e, 0x10, 0x68, 0x86, 0xf8, 0xcc, 0x68, 0x21, 0xb9, 0x3f, 0xa7, 0x92, 0xdb, 0x50, + 0xe8, 0x47, 0x0a, 0x76, 0x76, 0xdb, 0xaa, 0x5d, 0x69, 0xac, 0xd7, 0xe3, 0x10, 0xf5, 0x58, 0xb7, + 0x99, 0x3f, 0xf9, 0x51, 0xc9, 0xf8, 0x53, 0xce, 0x83, 0xf5, 0x0f, 0x67, 0xc7, 0xbb, 0xf3, 0xee, + 0x6a, 0x19, 0x4a, 0xe7, 0x8c, 0xf8, 0x0c, 0xfb, 0x4a, 0x22, 0xab, 0x7e, 0xb5, 0x22, 0xec, 0x89, + 0x14, 0x46, 0xd0, 0xae, 0x78, 0xc7, 0x1e, 0x29, 0x69, 0xb4, 0xea, 0x76, 0x99, 0xfe, 0x6b, 0xb3, + 0x2e, 0x00, 0x45, 0x64, 0xda, 0x08, 0x25, 0x43, 0xc3, 0xb9, 0xda, 0x9a, 0x9f, 0xaa, 0x90, 0x6b, + 0x50, 0x7c, 0xc3, 0x46, 0xd8, 0xa1, 0x9a, 0xa1, 0x9d, 0x8b, 0xe0, 0x79, 0x81, 0xdc, 0x80, 0xab, + 0x43, 0xa6, 0xc5, 0xa1, 0x68, 0xd3, 0x58, 0x20, 0x1f, 0x31, 0x16, 0x8b, 0x17, 0x22, 0xbe, 0x84, + 0xca, 0x92, 0x18, 0x49, 0x54, 0x72, 0x1f, 0xa0, 0x3d, 0xab, 0xae, 0xcc, 0x93, 0xe2, 0x56, 0x7f, + 0x59, 0x50, 0x6e, 0x21, 0xdf, 0x1f, 0x98, 0x0e, 0x93, 0x26, 0xf4, 0xf0, 0x2f, 0xc6, 0xb4, 0xe8, + 0x27, 0xfb, 0xe7, 0x7e, 0x48, 0x03, 0xfe, 0xa7, 0x31, 0x68, 0xe7, 0x56, 0xb4, 0x25, 0x44, 0xb2, + 0x05, 0x05, 0xa5, 0x05, 0x17, 0xd2, 0xce, 0x87, 0x2d, 0xfe, 0xf4, 0x74, 0x61, 0x90, 0xd7, 0x61, + 0x67, 0x69, 0xd4, 0x64, 0x94, 0x8d, 0xcf, 0x59, 0xc8, 0xb5, 0x90, 0x93, 0xc7, 0xb0, 0xb6, 0xb0, + 0xde, 0xa5, 0x64, 0x2d, 0xcf, 0xad, 0x9b, 0x53, 0x59, 0x02, 0xcc, 0x2e, 0xe7, 0x15, 0x10, 0x9f, + 0x71, 0x81, 0x86, 0xe9, 0xd4, 0x68, 0xd3, 0x6d, 0x97, 0xdd, 0xad, 0x73, 0x73, 0x05, 0x61, 0xa6, + 0x7f, 0x08, 0x5b, 0x4b, 0xae, 0x6f, 0x27, 0x25, 0x71, 0x39, 0xc5, 0xb9, 0xb5, 0x92, 0x92, 0xfc, + 0xc7, 0xf9, 0xef, 0xfd, 0xd9, 0xf1, 0xae, 0xd5, 0x7c, 0x78, 0x32, 0x76, 0xad, 0xd3, 0xb1, 0x6b, + 0xfd, 0x1c, 0xbb, 0xd6, 0xa7, 0x89, 0x9b, 0x39, 0x9d, 0xb8, 0x99, 0xef, 0x13, 0x37, 0xf3, 0xa2, + 0xca, 0x85, 0xe9, 0x0c, 0x0e, 0xea, 0x6d, 0xd5, 0xf3, 0x94, 0x44, 0x25, 0xb5, 0xd7, 0x79, 0x4b, + 0x47, 0xde, 0x91, 0x17, 0xbe, 0x3a, 0x66, 0xd4, 0x67, 0x78, 0x50, 0x88, 0x1e, 0x90, 0xbb, 0xbf, + 0x03, 0x00, 0x00, 0xff, 0xff, 0x74, 0x50, 0x71, 0x32, 0xbb, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -422,8 +422,8 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // InitializeController initializes a controller with the given assertions, keyshares, and verifications. - InitializeController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) // AuthenticateController asserts the given controller is the owner of the given address. AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) } @@ -445,9 +445,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) InitializeController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { +func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { out := new(MsgInitializeControllerResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/InitializeController", in, out, opts...) + err := c.cc.Invoke(ctx, "/did.v1.Msg/RegisterController", in, out, opts...) if err != nil { return nil, err } @@ -469,8 +469,8 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // InitializeController initializes a controller with the given assertions, keyshares, and verifications. - InitializeController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) // AuthenticateController asserts the given controller is the owner of the given address. AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) } @@ -482,8 +482,8 @@ 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) InitializeController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method InitializeController not implemented") +func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } func (*UnimplementedMsgServer) AuthenticateController(ctx context.Context, req *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") @@ -511,20 +511,20 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_InitializeController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(MsgInitializeController) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).InitializeController(ctx, in) + return srv.(MsgServer).RegisterController(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/InitializeController", + FullMethod: "/did.v1.Msg/RegisterController", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).InitializeController(ctx, req.(*MsgInitializeController)) + return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController)) } return interceptor(ctx, in, info, handler) } @@ -556,8 +556,8 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "InitializeController", - Handler: _Msg_InitializeController_Handler, + MethodName: "RegisterController", + Handler: _Msg_RegisterController_Handler, }, { MethodName: "AuthenticateController", diff --git a/x/did/types/account.pb.go b/x/did/types/types.pb.go similarity index 70% rename from x/did/types/account.pb.go rename to x/did/types/types.pb.go index 28b7ca61e..002d96be2 100644 --- a/x/did/types/account.pb.go +++ b/x/did/types/types.pb.go @@ -1,11 +1,12 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/account.proto +// source: did/v1/types.proto package types import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -24,8 +25,8 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// DIDDocument defines a DID document -type DIDDocument struct { +// BaseDocument defines a DID document +type BaseDocument struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` @@ -34,18 +35,18 @@ type DIDDocument struct { CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` } -func (m *DIDDocument) Reset() { *m = DIDDocument{} } -func (m *DIDDocument) String() string { return proto.CompactTextString(m) } -func (*DIDDocument) ProtoMessage() {} -func (*DIDDocument) Descriptor() ([]byte, []int) { - return fileDescriptor_f1c7ebf7d0ca3c72, []int{0} +func (m *BaseDocument) Reset() { *m = BaseDocument{} } +func (m *BaseDocument) String() string { return proto.CompactTextString(m) } +func (*BaseDocument) ProtoMessage() {} +func (*BaseDocument) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{0} } -func (m *DIDDocument) XXX_Unmarshal(b []byte) error { +func (m *BaseDocument) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *BaseDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DIDDocument.Marshal(b, m, deterministic) + return xxx_messageInfo_BaseDocument.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -55,54 +56,54 @@ func (m *DIDDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *DIDDocument) XXX_Merge(src proto.Message) { - xxx_messageInfo_DIDDocument.Merge(m, src) +func (m *BaseDocument) XXX_Merge(src proto.Message) { + xxx_messageInfo_BaseDocument.Merge(m, src) } -func (m *DIDDocument) XXX_Size() int { +func (m *BaseDocument) XXX_Size() int { return m.Size() } -func (m *DIDDocument) XXX_DiscardUnknown() { - xxx_messageInfo_DIDDocument.DiscardUnknown(m) +func (m *BaseDocument) XXX_DiscardUnknown() { + xxx_messageInfo_BaseDocument.DiscardUnknown(m) } -var xxx_messageInfo_DIDDocument proto.InternalMessageInfo +var xxx_messageInfo_BaseDocument proto.InternalMessageInfo -func (m *DIDDocument) GetId() string { +func (m *BaseDocument) GetId() string { if m != nil { return m.Id } return "" } -func (m *DIDDocument) GetVerificationMethods() []*VerificationMethod { +func (m *BaseDocument) GetVerificationMethods() []*VerificationMethod { if m != nil { return m.VerificationMethods } return nil } -func (m *DIDDocument) GetAuthentication() []string { +func (m *BaseDocument) GetAuthentication() []string { if m != nil { return m.Authentication } return nil } -func (m *DIDDocument) GetAssertionMethod() []string { +func (m *BaseDocument) GetAssertionMethod() []string { if m != nil { return m.AssertionMethod } return nil } -func (m *DIDDocument) GetCapabilityDelegation() []string { +func (m *BaseDocument) GetCapabilityDelegation() []string { if m != nil { return m.CapabilityDelegation } return nil } -func (m *DIDDocument) GetCapabilityInvocation() []string { +func (m *BaseDocument) GetCapabilityInvocation() []string { if m != nil { return m.CapabilityInvocation } @@ -123,7 +124,7 @@ func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } func (*VerificationMethod) ProtoMessage() {} func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_f1c7ebf7d0ca3c72, []int{1} + return fileDescriptor_e3176cd2dbe76ac1, []int{1} } func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -181,46 +182,47 @@ func (m *VerificationMethod) GetPublicKeyJwks() map[string]string { } func init() { - proto.RegisterType((*DIDDocument)(nil), "did.v1.DIDDocument") + proto.RegisterType((*BaseDocument)(nil), "did.v1.BaseDocument") proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") proto.RegisterMapType((map[string]string)(nil), "did.v1.VerificationMethod.PublicKeyJwksEntry") } -func init() { proto.RegisterFile("did/v1/account.proto", fileDescriptor_f1c7ebf7d0ca3c72) } +func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) } -var fileDescriptor_f1c7ebf7d0ca3c72 = []byte{ - // 440 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xb1, 0x8e, 0xd3, 0x40, - 0x10, 0x86, 0x63, 0x87, 0x3b, 0xb8, 0x8d, 0xb8, 0x3b, 0x2d, 0x46, 0x32, 0x29, 0xac, 0x28, 0x05, - 0x0a, 0x05, 0x36, 0x77, 0xd7, 0x20, 0x44, 0x81, 0x50, 0x28, 0x0e, 0x14, 0x09, 0x45, 0x82, 0x82, - 0xc6, 0x5a, 0xaf, 0x07, 0x67, 0x89, 0xbd, 0x63, 0x79, 0xd7, 0x0e, 0x7e, 0x0a, 0x78, 0x0d, 0xde, - 0x84, 0x32, 0x25, 0x25, 0x4a, 0x5e, 0x04, 0xc5, 0x76, 0x82, 0x15, 0xeb, 0xba, 0xdd, 0xef, 0xff, - 0xe7, 0xdf, 0x9d, 0xd1, 0x10, 0x2b, 0x14, 0xa1, 0x57, 0x5c, 0x79, 0x8c, 0x73, 0xcc, 0xa5, 0x76, - 0xd3, 0x0c, 0x35, 0xd2, 0xd3, 0x50, 0x84, 0x6e, 0x71, 0x35, 0x7c, 0xc2, 0x51, 0x25, 0xa8, 0xfc, - 0x8a, 0x7a, 0xf5, 0xa5, 0xb6, 0x0c, 0xad, 0x08, 0x23, 0xac, 0xf9, 0xee, 0xb4, 0xa7, 0x4d, 0x5c, - 0x04, 0x12, 0x94, 0x68, 0xbc, 0xe3, 0x5f, 0x26, 0x19, 0x4c, 0x6f, 0xa7, 0x53, 0xe4, 0x79, 0x02, - 0x52, 0xd3, 0x73, 0x62, 0x8a, 0xd0, 0x36, 0x46, 0xc6, 0xe4, 0x6c, 0x6e, 0x8a, 0x90, 0xce, 0x88, - 0x55, 0x40, 0x26, 0xbe, 0x0a, 0xce, 0xb4, 0x40, 0xe9, 0x27, 0xa0, 0x17, 0x18, 0x2a, 0xdb, 0x1c, - 0xf5, 0x27, 0x83, 0xeb, 0xa1, 0x5b, 0xff, 0xc6, 0xfd, 0xdc, 0xf2, 0xcc, 0x2a, 0xcb, 0xfc, 0x51, - 0xd1, 0x61, 0x8a, 0x3e, 0x25, 0xe7, 0x2c, 0xd7, 0x0b, 0x90, 0xba, 0x11, 0xec, 0x7b, 0xa3, 0xfe, - 0xe4, 0x6c, 0x7e, 0x44, 0xe9, 0x33, 0x72, 0xc9, 0x94, 0x82, 0xac, 0xf5, 0xa6, 0x7d, 0x52, 0x39, - 0x2f, 0x0e, 0xbc, 0xce, 0xa4, 0x37, 0xe4, 0x31, 0x67, 0x29, 0x0b, 0x44, 0x2c, 0x74, 0xe9, 0x87, - 0x10, 0x43, 0x54, 0x27, 0xdf, 0xaf, 0xfc, 0xd6, 0x7f, 0x71, 0x7a, 0xd0, 0x8e, 0x8a, 0x84, 0x2c, - 0xb0, 0xf9, 0xce, 0x83, 0xe3, 0xa2, 0xdb, 0x83, 0x36, 0xfe, 0x61, 0x12, 0xda, 0x6d, 0xb4, 0x33, - 0x32, 0x87, 0x10, 0x8e, 0x52, 0x67, 0x18, 0xc7, 0x90, 0xd9, 0x66, 0xc5, 0x5b, 0x84, 0xbe, 0x20, - 0x56, 0x9a, 0x07, 0xb1, 0xe0, 0xfe, 0x12, 0x4a, 0x3f, 0xc9, 0x63, 0x2d, 0x02, 0xa6, 0xc0, 0xee, - 0x57, 0x4e, 0x5a, 0x6b, 0x1f, 0xa0, 0x9c, 0xed, 0x15, 0xfa, 0x89, 0x5c, 0xb4, 0x2a, 0xbe, 0xad, - 0x96, 0xaa, 0x1a, 0xdb, 0xe0, 0xfa, 0xf9, 0xdd, 0xf3, 0x77, 0x3f, 0xee, 0x73, 0xde, 0xaf, 0x96, - 0xea, 0x9d, 0xd4, 0x59, 0x39, 0x7f, 0x98, 0xb6, 0xd9, 0xf0, 0x0d, 0xa1, 0x5d, 0x13, 0xbd, 0x24, - 0xfd, 0x25, 0x94, 0x4d, 0x3f, 0xbb, 0x23, 0xb5, 0xc8, 0x49, 0xc1, 0xe2, 0x1c, 0x9a, 0x5e, 0xea, - 0xcb, 0x2b, 0xf3, 0xa5, 0xf1, 0xf6, 0xf5, 0xef, 0x8d, 0x63, 0xac, 0x37, 0x8e, 0xf1, 0x77, 0xe3, - 0x18, 0x3f, 0xb7, 0x4e, 0x6f, 0xbd, 0x75, 0x7a, 0x7f, 0xb6, 0x4e, 0xef, 0xcb, 0x38, 0x12, 0x7a, - 0x91, 0x07, 0x2e, 0xc7, 0xc4, 0x43, 0xa9, 0x50, 0x66, 0xde, 0x62, 0xc5, 0x4a, 0xef, 0xbb, 0xb7, - 0x5b, 0x43, 0x5d, 0xa6, 0xa0, 0x82, 0xd3, 0x6a, 0x05, 0x6f, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, - 0x27, 0xff, 0x98, 0x0b, 0xe9, 0x02, 0x00, 0x00, +var fileDescriptor_e3176cd2dbe76ac1 = []byte{ + // 449 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6e, 0xd3, 0x40, + 0x10, 0x86, 0x63, 0x87, 0x16, 0xba, 0x85, 0xb6, 0x5a, 0x8c, 0x30, 0x39, 0x58, 0x51, 0x0e, 0x28, + 0x1c, 0xb0, 0x69, 0x7b, 0x41, 0x88, 0x03, 0xaa, 0xca, 0x01, 0x50, 0x24, 0x14, 0x09, 0x0e, 0x5c, + 0xac, 0xb5, 0x3d, 0x38, 0x4b, 0xec, 0x5d, 0xcb, 0xb3, 0x76, 0xf0, 0x53, 0xc0, 0x73, 0xf0, 0x24, + 0x1c, 0x7b, 0xe4, 0x88, 0x92, 0x17, 0x41, 0xd9, 0x75, 0x82, 0x95, 0xa8, 0xb7, 0xd9, 0xff, 0xff, + 0x66, 0x76, 0x66, 0x34, 0x84, 0x26, 0x3c, 0x09, 0xea, 0xf3, 0x40, 0x35, 0x05, 0xa0, 0x5f, 0x94, + 0x52, 0x49, 0x7a, 0x98, 0xf0, 0xc4, 0xaf, 0xcf, 0x07, 0x8f, 0x63, 0x89, 0xb9, 0xc4, 0x20, 0xc7, + 0x74, 0x8d, 0xe4, 0x98, 0x1a, 0x60, 0xe0, 0xb4, 0x49, 0x29, 0x08, 0x40, 0x8e, 0x1b, 0x35, 0x95, + 0xa9, 0xd4, 0x61, 0xb0, 0x8e, 0x5a, 0xf5, 0x89, 0x29, 0x12, 0x1a, 0xc3, 0x3c, 0x8c, 0x35, 0xfa, + 0x65, 0x93, 0xfb, 0x57, 0x0c, 0xe1, 0x5a, 0xc6, 0x55, 0x0e, 0x42, 0xd1, 0x13, 0x62, 0xf3, 0xc4, + 0xb5, 0x86, 0xd6, 0xf8, 0x68, 0x6a, 0xf3, 0x84, 0x4e, 0x88, 0x53, 0x43, 0xc9, 0xbf, 0xf2, 0x98, + 0x29, 0x2e, 0x45, 0x98, 0x83, 0x9a, 0xc9, 0x04, 0x5d, 0x7b, 0xd8, 0x1f, 0x1f, 0x5f, 0x0c, 0x7c, + 0xd3, 0xa7, 0xff, 0xb9, 0xc3, 0x4c, 0x34, 0x32, 0x7d, 0x58, 0xef, 0x69, 0x48, 0x9f, 0x92, 0x13, + 0x56, 0xa9, 0x19, 0x08, 0xd5, 0x1a, 0xee, 0x9d, 0x61, 0x7f, 0x7c, 0x34, 0xdd, 0x51, 0xe9, 0x33, + 0x72, 0xc6, 0x10, 0xa1, 0xec, 0xfc, 0xe9, 0x1e, 0x68, 0xf2, 0x74, 0xab, 0x9b, 0x9a, 0xf4, 0x92, + 0x3c, 0x8a, 0x59, 0xc1, 0x22, 0x9e, 0x71, 0xd5, 0x84, 0x09, 0x64, 0x90, 0x9a, 0xca, 0x77, 0x35, + 0xef, 0xfc, 0x37, 0xaf, 0xb7, 0xde, 0x4e, 0x12, 0x17, 0xb5, 0x6c, 0xdb, 0xb9, 0xb7, 0x9b, 0xf4, + 0x6e, 0xeb, 0x8d, 0x7e, 0xd8, 0x84, 0xee, 0x0f, 0xba, 0xb7, 0x32, 0x8f, 0x90, 0x58, 0x0a, 0x55, + 0xca, 0x2c, 0x83, 0xd2, 0xb5, 0xb5, 0xde, 0x51, 0xe8, 0x0b, 0xe2, 0x14, 0x55, 0x94, 0xf1, 0x38, + 0x9c, 0x43, 0x13, 0xe6, 0x55, 0xa6, 0x78, 0xc4, 0x10, 0xdc, 0xbe, 0x26, 0xa9, 0xf1, 0x3e, 0x40, + 0x33, 0xd9, 0x38, 0xf4, 0x13, 0x39, 0xed, 0x64, 0x7c, 0x5b, 0xcc, 0x51, 0xaf, 0xed, 0xf8, 0xe2, + 0xf9, 0xed, 0xfb, 0xf7, 0x3f, 0x6e, 0xea, 0xbc, 0x5f, 0xcc, 0xf1, 0xad, 0x50, 0x65, 0x33, 0x7d, + 0x50, 0x74, 0xb5, 0xc1, 0x1b, 0x42, 0xf7, 0x21, 0x7a, 0x46, 0xfa, 0x73, 0x68, 0xda, 0x79, 0xd6, + 0x21, 0x75, 0xc8, 0x41, 0xcd, 0xb2, 0x0a, 0xda, 0x59, 0xcc, 0xe3, 0x95, 0xfd, 0xd2, 0xba, 0x7a, + 0xfd, 0x7b, 0xe9, 0x59, 0x37, 0x4b, 0xcf, 0xfa, 0xbb, 0xf4, 0xac, 0x9f, 0x2b, 0xaf, 0x77, 0xb3, + 0xf2, 0x7a, 0x7f, 0x56, 0x5e, 0xef, 0xcb, 0x28, 0xe5, 0x6a, 0x56, 0x45, 0x7e, 0x2c, 0xf3, 0x40, + 0x0a, 0x94, 0xa2, 0x0c, 0x66, 0x0b, 0xd6, 0x04, 0xdf, 0x83, 0xf5, 0xe1, 0xea, 0x53, 0x8f, 0x0e, + 0xf5, 0x0d, 0x5e, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x30, 0x32, 0xf6, 0x01, 0x03, 0x00, + 0x00, } -func (m *DIDDocument) Marshal() (dAtA []byte, err error) { +func (m *BaseDocument) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -230,12 +232,12 @@ func (m *DIDDocument) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DIDDocument) MarshalTo(dAtA []byte) (int, error) { +func (m *BaseDocument) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *BaseDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -244,7 +246,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.CapabilityInvocation[iNdEx]) copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) - i = encodeVarintAccount(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) i-- dAtA[i] = 0x42 } @@ -253,7 +255,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.CapabilityDelegation[iNdEx]) copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) - i = encodeVarintAccount(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) i-- dAtA[i] = 0x3a } @@ -262,7 +264,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.AssertionMethod[iNdEx]) copy(dAtA[i:], m.AssertionMethod[iNdEx]) - i = encodeVarintAccount(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) i-- dAtA[i] = 0x2a } @@ -271,7 +273,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Authentication[iNdEx]) copy(dAtA[i:], m.Authentication[iNdEx]) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Authentication[iNdEx]))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Authentication[iNdEx]))) i-- dAtA[i] = 0x22 } @@ -284,7 +286,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { return 0, err } i -= size - i = encodeVarintAccount(dAtA, i, uint64(size)) + i = encodeVarintTypes(dAtA, i, uint64(size)) } i-- dAtA[i] = 0x12 @@ -293,7 +295,7 @@ func (m *DIDDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } @@ -326,15 +328,15 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { baseI := i i -= len(v) copy(dAtA[i:], v) - i = encodeVarintAccount(dAtA, i, uint64(len(v))) + i = encodeVarintTypes(dAtA, i, uint64(len(v))) i-- dAtA[i] = 0x12 i -= len(k) copy(dAtA[i:], k) - i = encodeVarintAccount(dAtA, i, uint64(len(k))) + i = encodeVarintTypes(dAtA, i, uint64(len(k))) i-- dAtA[i] = 0xa - i = encodeVarintAccount(dAtA, i, uint64(baseI-i)) + i = encodeVarintTypes(dAtA, i, uint64(baseI-i)) i-- dAtA[i] = 0x22 } @@ -342,29 +344,29 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { if len(m.PublicKeyMultibase) > 0 { i -= len(m.PublicKeyMultibase) copy(dAtA[i:], m.PublicKeyMultibase) - i = encodeVarintAccount(dAtA, i, uint64(len(m.PublicKeyMultibase))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKeyMultibase))) i-- dAtA[i] = 0x1a } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Controller))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) i-- dAtA[i] = 0x12 } if len(m.Id) > 0 { i -= len(m.Id) copy(dAtA[i:], m.Id) - i = encodeVarintAccount(dAtA, i, uint64(len(m.Id))) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { - offset -= sovAccount(v) +func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { + offset -= sovTypes(v) base := offset for v >= 1<<7 { dAtA[offset] = uint8(v&0x7f | 0x80) @@ -374,7 +376,7 @@ func encodeVarintAccount(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *DIDDocument) Size() (n int) { +func (m *BaseDocument) Size() (n int) { if m == nil { return 0 } @@ -382,36 +384,36 @@ func (m *DIDDocument) Size() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } if len(m.VerificationMethods) > 0 { for _, e := range m.VerificationMethods { l = e.Size() - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } } if len(m.Authentication) > 0 { for _, s := range m.Authentication { l = len(s) - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } } if len(m.AssertionMethod) > 0 { for _, s := range m.AssertionMethod { l = len(s) - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } } if len(m.CapabilityDelegation) > 0 { for _, s := range m.CapabilityDelegation { l = len(s) - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } } if len(m.CapabilityInvocation) > 0 { for _, s := range m.CapabilityInvocation { l = len(s) - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } } return n @@ -425,34 +427,34 @@ func (m *VerificationMethod) Size() (n int) { _ = l l = len(m.Id) if l > 0 { - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } l = len(m.Controller) if l > 0 { - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } l = len(m.PublicKeyMultibase) if l > 0 { - n += 1 + l + sovAccount(uint64(l)) + n += 1 + l + sovTypes(uint64(l)) } if len(m.PublicKeyJwks) > 0 { for k, v := range m.PublicKeyJwks { _ = k _ = v - mapEntrySize := 1 + len(k) + sovAccount(uint64(len(k))) + 1 + len(v) + sovAccount(uint64(len(v))) - n += mapEntrySize + 1 + sovAccount(uint64(mapEntrySize)) + mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v))) + n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) } } return n } -func sovAccount(x uint64) (n int) { +func sovTypes(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } -func sozAccount(x uint64) (n int) { - return sovAccount(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +func sozTypes(x uint64) (n int) { + return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *DIDDocument) Unmarshal(dAtA []byte) error { +func (m *BaseDocument) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -460,7 +462,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -475,10 +477,10 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DIDDocument: wiretype end group for non-group") + return fmt.Errorf("proto: BaseDocument: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DIDDocument: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: BaseDocument: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -488,7 +490,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -502,11 +504,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -520,7 +522,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -533,11 +535,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -554,7 +556,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -568,11 +570,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -586,7 +588,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -600,11 +602,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -618,7 +620,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -632,11 +634,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -650,7 +652,7 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -664,11 +666,11 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -677,12 +679,12 @@ func (m *DIDDocument) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) + skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -704,7 +706,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -732,7 +734,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -746,11 +748,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -764,7 +766,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -778,11 +780,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -796,7 +798,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -810,11 +812,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } intStringLen := int(stringLen) if intStringLen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + intStringLen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -828,7 +830,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -841,11 +843,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } } if msglen < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postIndex := iNdEx + msglen if postIndex < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postIndex > l { return io.ErrUnexpectedEOF @@ -860,7 +862,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -877,7 +879,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -891,11 +893,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } intStringLenmapkey := int(stringLenmapkey) if intStringLenmapkey < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postStringIndexmapkey := iNdEx + intStringLenmapkey if postStringIndexmapkey < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postStringIndexmapkey > l { return io.ErrUnexpectedEOF @@ -906,7 +908,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { var stringLenmapvalue uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return ErrIntOverflowAccount + return ErrIntOverflowTypes } if iNdEx >= l { return io.ErrUnexpectedEOF @@ -920,11 +922,11 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } intStringLenmapvalue := int(stringLenmapvalue) if intStringLenmapvalue < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } postStringIndexmapvalue := iNdEx + intStringLenmapvalue if postStringIndexmapvalue < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if postStringIndexmapvalue > l { return io.ErrUnexpectedEOF @@ -933,12 +935,12 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { iNdEx = postStringIndexmapvalue } else { iNdEx = entryPreIndex - skippy, err := skipAccount(dAtA[iNdEx:]) + skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if (iNdEx + skippy) > postIndex { return io.ErrUnexpectedEOF @@ -950,12 +952,12 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { iNdEx = postIndex default: iNdEx = preIndex - skippy, err := skipAccount(dAtA[iNdEx:]) + skippy, err := skipTypes(dAtA[iNdEx:]) if err != nil { return err } if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthAccount + return ErrInvalidLengthTypes } if (iNdEx + skippy) > l { return io.ErrUnexpectedEOF @@ -969,7 +971,7 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { } return nil } -func skipAccount(dAtA []byte) (n int, err error) { +func skipTypes(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 depth := 0 @@ -977,7 +979,7 @@ func skipAccount(dAtA []byte) (n int, err error) { var wire uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowAccount + return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -994,7 +996,7 @@ func skipAccount(dAtA []byte) (n int, err error) { case 0: for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowAccount + return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1010,7 +1012,7 @@ func skipAccount(dAtA []byte) (n int, err error) { var length int for shift := uint(0); ; shift += 7 { if shift >= 64 { - return 0, ErrIntOverflowAccount + return 0, ErrIntOverflowTypes } if iNdEx >= l { return 0, io.ErrUnexpectedEOF @@ -1023,14 +1025,14 @@ func skipAccount(dAtA []byte) (n int, err error) { } } if length < 0 { - return 0, ErrInvalidLengthAccount + return 0, ErrInvalidLengthTypes } iNdEx += length case 3: depth++ case 4: if depth == 0 { - return 0, ErrUnexpectedEndOfGroupAccount + return 0, ErrUnexpectedEndOfGroupTypes } depth-- case 5: @@ -1039,7 +1041,7 @@ func skipAccount(dAtA []byte) (n int, err error) { return 0, fmt.Errorf("proto: illegal wireType %d", wireType) } if iNdEx < 0 { - return 0, ErrInvalidLengthAccount + return 0, ErrInvalidLengthTypes } if depth == 0 { return iNdEx, nil @@ -1049,7 +1051,7 @@ func skipAccount(dAtA []byte) (n int, err error) { } var ( - ErrInvalidLengthAccount = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowAccount = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group") + ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") )