Add fields for role and KYC ID for onboarded participants (#43)
All checks were successful
Integration Tests / test-integration (push) Successful in 2m32s
Unit Tests / test-unit (push) Successful in 2m34s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 8m34s
SDK Tests / sdk_tests_auctions (push) Successful in 14m15s
E2E Tests / test-e2e (push) Successful in 2m47s
SDK Tests / sdk_tests (push) Successful in 7m54s

Part of [Sumsub KYC integration in onboarding app](https://www.notion.so/Sumsub-KYC-integration-in-onboarding-app-607b598c9c1d4d12adc71725e2ab5e7e)

Reviewed-on: #43
Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
Prathamesh Musale 2024-07-26 14:42:40 +00:00 committed by nabarun
parent ec6e2f3776
commit 9fab3f8326
13 changed files with 782 additions and 104 deletions

View File

@ -427,6 +427,8 @@ var (
md_Participant protoreflect.MessageDescriptor md_Participant protoreflect.MessageDescriptor
fd_Participant_cosmos_address protoreflect.FieldDescriptor fd_Participant_cosmos_address protoreflect.FieldDescriptor
fd_Participant_nitro_address protoreflect.FieldDescriptor fd_Participant_nitro_address protoreflect.FieldDescriptor
fd_Participant_role protoreflect.FieldDescriptor
fd_Participant_kyc_id protoreflect.FieldDescriptor
) )
func init() { func init() {
@ -434,6 +436,8 @@ func init() {
md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant") md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant")
fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_address") fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_address")
fd_Participant_nitro_address = md_Participant.Fields().ByName("nitro_address") fd_Participant_nitro_address = md_Participant.Fields().ByName("nitro_address")
fd_Participant_role = md_Participant.Fields().ByName("role")
fd_Participant_kyc_id = md_Participant.Fields().ByName("kyc_id")
} }
var _ protoreflect.Message = (*fastReflection_Participant)(nil) var _ protoreflect.Message = (*fastReflection_Participant)(nil)
@ -513,6 +517,18 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
return return
} }
} }
if x.Role != "" {
value := protoreflect.ValueOfString(x.Role)
if !f(fd_Participant_role, value) {
return
}
}
if x.KycId != "" {
value := protoreflect.ValueOfString(x.KycId)
if !f(fd_Participant_kyc_id, value) {
return
}
}
} }
// Has reports whether a field is populated. // Has reports whether a field is populated.
@ -532,6 +548,10 @@ func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
return x.CosmosAddress != "" return x.CosmosAddress != ""
case "cerc.onboarding.v1.Participant.nitro_address": case "cerc.onboarding.v1.Participant.nitro_address":
return x.NitroAddress != "" return x.NitroAddress != ""
case "cerc.onboarding.v1.Participant.role":
return x.Role != ""
case "cerc.onboarding.v1.Participant.kyc_id":
return x.KycId != ""
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -552,6 +572,10 @@ func (x *fastReflection_Participant) Clear(fd protoreflect.FieldDescriptor) {
x.CosmosAddress = "" x.CosmosAddress = ""
case "cerc.onboarding.v1.Participant.nitro_address": case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = "" x.NitroAddress = ""
case "cerc.onboarding.v1.Participant.role":
x.Role = ""
case "cerc.onboarding.v1.Participant.kyc_id":
x.KycId = ""
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -574,6 +598,12 @@ func (x *fastReflection_Participant) Get(descriptor protoreflect.FieldDescriptor
case "cerc.onboarding.v1.Participant.nitro_address": case "cerc.onboarding.v1.Participant.nitro_address":
value := x.NitroAddress value := x.NitroAddress
return protoreflect.ValueOfString(value) return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.Participant.role":
value := x.Role
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.Participant.kyc_id":
value := x.KycId
return protoreflect.ValueOfString(value)
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -598,6 +628,10 @@ func (x *fastReflection_Participant) Set(fd protoreflect.FieldDescriptor, value
x.CosmosAddress = value.Interface().(string) x.CosmosAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.nitro_address": case "cerc.onboarding.v1.Participant.nitro_address":
x.NitroAddress = value.Interface().(string) x.NitroAddress = value.Interface().(string)
case "cerc.onboarding.v1.Participant.role":
x.Role = value.Interface().(string)
case "cerc.onboarding.v1.Participant.kyc_id":
x.KycId = value.Interface().(string)
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -622,6 +656,10 @@ func (x *fastReflection_Participant) Mutable(fd protoreflect.FieldDescriptor) pr
panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.Participant is not mutable")) panic(fmt.Errorf("field cosmos_address of message cerc.onboarding.v1.Participant is not mutable"))
case "cerc.onboarding.v1.Participant.nitro_address": case "cerc.onboarding.v1.Participant.nitro_address":
panic(fmt.Errorf("field nitro_address of message cerc.onboarding.v1.Participant is not mutable")) panic(fmt.Errorf("field nitro_address of message cerc.onboarding.v1.Participant is not mutable"))
case "cerc.onboarding.v1.Participant.role":
panic(fmt.Errorf("field role of message cerc.onboarding.v1.Participant is not mutable"))
case "cerc.onboarding.v1.Participant.kyc_id":
panic(fmt.Errorf("field kyc_id of message cerc.onboarding.v1.Participant is not mutable"))
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -639,6 +677,10 @@ func (x *fastReflection_Participant) NewField(fd protoreflect.FieldDescriptor) p
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.nitro_address": case "cerc.onboarding.v1.Participant.nitro_address":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.role":
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.Participant.kyc_id":
return protoreflect.ValueOfString("")
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.Participant"))
@ -716,6 +758,14 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
if l > 0 { if l > 0 {
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
} }
l = len(x.Role)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.KycId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil { if x.unknownFields != nil {
n += len(x.unknownFields) n += len(x.unknownFields)
} }
@ -745,6 +795,20 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
i -= len(x.unknownFields) i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields) copy(dAtA[i:], x.unknownFields)
} }
if len(x.KycId) > 0 {
i -= len(x.KycId)
copy(dAtA[i:], x.KycId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KycId)))
i--
dAtA[i] = 0x22
}
if len(x.Role) > 0 {
i -= len(x.Role)
copy(dAtA[i:], x.Role)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role)))
i--
dAtA[i] = 0x1a
}
if len(x.NitroAddress) > 0 { if len(x.NitroAddress) > 0 {
i -= len(x.NitroAddress) i -= len(x.NitroAddress)
copy(dAtA[i:], x.NitroAddress) copy(dAtA[i:], x.NitroAddress)
@ -872,6 +936,70 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
} }
x.NitroAddress = string(dAtA[iNdEx:postIndex]) x.NitroAddress = string(dAtA[iNdEx:postIndex])
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 Role", 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.Role = 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 KycId", 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.KycId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:]) skippy, err := runtime.Skip(dAtA[iNdEx:])
@ -1447,8 +1575,14 @@ type Participant struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
// participant's cosmos (laconic) address
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"` CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
// participant's Nitro address
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"` NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
// participant's role (participant | validator)
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty"`
// participant's KYC receipt ID
KycId string `protobuf:"bytes,4,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty"`
} }
func (x *Participant) Reset() { func (x *Participant) Reset() {
@ -1485,6 +1619,20 @@ func (x *Participant) GetNitroAddress() string {
return "" return ""
} }
func (x *Participant) GetRole() string {
if x != nil {
return x.Role
}
return ""
}
func (x *Participant) GetKycId() string {
if x != nil {
return x.KycId
}
return ""
}
// EthPayload defines the payload that is signed by the ethereum private key // EthPayload defines the payload that is signed by the ethereum private key
type EthPayload struct { type EthPayload struct {
state protoimpl.MessageState state protoimpl.MessageState
@ -1544,7 +1692,7 @@ var file_cerc_onboarding_v1_onboarding_proto_rawDesc = []byte{
0x6c, 0x65, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x6c, 0x65, 0x64, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x11, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x22, 0x52, 0x11,
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x22, 0xb9, 0x01, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x64, 0x22, 0xa2, 0x02, 0x0a, 0x0b, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x74, 0x12, 0x56, 0x0a, 0x0e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x74, 0x12, 0x56, 0x0a, 0x0e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x2b, 0x6a, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x2f, 0xf2, 0xde, 0x1f, 0x2b, 0x6a,
0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x61, 0x64, 0x64, 0x72,
@ -1555,29 +1703,35 @@ var file_cerc_onboarding_v1_onboarding_proto_rawDesc = []byte{
0x42, 0x2d, 0xf2, 0xde, 0x1f, 0x29, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6e, 0x69, 0x74, 0x72, 0x42, 0x2d, 0xf2, 0xde, 0x1f, 0x29, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6e, 0x69, 0x74, 0x72,
0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a,
0x22, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x22, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x76, 0x0a, 0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a,
0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f,
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d,
0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x6c, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x36,
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f,
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64,
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x22, 0x52,
0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79,
0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22,
0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19,
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79,
0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4,
0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69,
0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f,
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65,
0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03,
0x6f, 0x74, 0x6f, 0x33, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c,
0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e,
0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c,
0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e,
0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -20,6 +20,8 @@ var (
fd_MsgOnboardParticipant_participant protoreflect.FieldDescriptor fd_MsgOnboardParticipant_participant protoreflect.FieldDescriptor
fd_MsgOnboardParticipant_eth_payload protoreflect.FieldDescriptor fd_MsgOnboardParticipant_eth_payload protoreflect.FieldDescriptor
fd_MsgOnboardParticipant_eth_signature protoreflect.FieldDescriptor fd_MsgOnboardParticipant_eth_signature protoreflect.FieldDescriptor
fd_MsgOnboardParticipant_role protoreflect.FieldDescriptor
fd_MsgOnboardParticipant_kyc_id protoreflect.FieldDescriptor
) )
func init() { func init() {
@ -28,6 +30,8 @@ func init() {
fd_MsgOnboardParticipant_participant = md_MsgOnboardParticipant.Fields().ByName("participant") fd_MsgOnboardParticipant_participant = md_MsgOnboardParticipant.Fields().ByName("participant")
fd_MsgOnboardParticipant_eth_payload = md_MsgOnboardParticipant.Fields().ByName("eth_payload") fd_MsgOnboardParticipant_eth_payload = md_MsgOnboardParticipant.Fields().ByName("eth_payload")
fd_MsgOnboardParticipant_eth_signature = md_MsgOnboardParticipant.Fields().ByName("eth_signature") fd_MsgOnboardParticipant_eth_signature = md_MsgOnboardParticipant.Fields().ByName("eth_signature")
fd_MsgOnboardParticipant_role = md_MsgOnboardParticipant.Fields().ByName("role")
fd_MsgOnboardParticipant_kyc_id = md_MsgOnboardParticipant.Fields().ByName("kyc_id")
} }
var _ protoreflect.Message = (*fastReflection_MsgOnboardParticipant)(nil) var _ protoreflect.Message = (*fastReflection_MsgOnboardParticipant)(nil)
@ -113,6 +117,18 @@ func (x *fastReflection_MsgOnboardParticipant) Range(f func(protoreflect.FieldDe
return return
} }
} }
if x.Role != "" {
value := protoreflect.ValueOfString(x.Role)
if !f(fd_MsgOnboardParticipant_role, value) {
return
}
}
if x.KycId != "" {
value := protoreflect.ValueOfString(x.KycId)
if !f(fd_MsgOnboardParticipant_kyc_id, value) {
return
}
}
} }
// Has reports whether a field is populated. // Has reports whether a field is populated.
@ -134,6 +150,10 @@ func (x *fastReflection_MsgOnboardParticipant) Has(fd protoreflect.FieldDescript
return x.EthPayload != nil return x.EthPayload != nil
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature": case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
return x.EthSignature != "" return x.EthSignature != ""
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
return x.Role != ""
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
return x.KycId != ""
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
@ -156,6 +176,10 @@ func (x *fastReflection_MsgOnboardParticipant) Clear(fd protoreflect.FieldDescri
x.EthPayload = nil x.EthPayload = nil
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature": case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
x.EthSignature = "" x.EthSignature = ""
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
x.Role = ""
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
x.KycId = ""
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
@ -181,6 +205,12 @@ func (x *fastReflection_MsgOnboardParticipant) Get(descriptor protoreflect.Field
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature": case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
value := x.EthSignature value := x.EthSignature
return protoreflect.ValueOfString(value) return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
value := x.Role
return protoreflect.ValueOfString(value)
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
value := x.KycId
return protoreflect.ValueOfString(value)
default: default:
if descriptor.IsExtension() { if descriptor.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
@ -207,6 +237,10 @@ func (x *fastReflection_MsgOnboardParticipant) Set(fd protoreflect.FieldDescript
x.EthPayload = value.Message().Interface().(*EthPayload) x.EthPayload = value.Message().Interface().(*EthPayload)
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature": case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
x.EthSignature = value.Interface().(string) x.EthSignature = value.Interface().(string)
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
x.Role = value.Interface().(string)
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
x.KycId = value.Interface().(string)
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
@ -236,6 +270,10 @@ func (x *fastReflection_MsgOnboardParticipant) Mutable(fd protoreflect.FieldDesc
panic(fmt.Errorf("field participant of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable")) panic(fmt.Errorf("field participant of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature": case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
panic(fmt.Errorf("field eth_signature of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable")) panic(fmt.Errorf("field eth_signature of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
panic(fmt.Errorf("field role of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
panic(fmt.Errorf("field kyc_id of message cerc.onboarding.v1.MsgOnboardParticipant is not mutable"))
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
@ -256,6 +294,10 @@ func (x *fastReflection_MsgOnboardParticipant) NewField(fd protoreflect.FieldDes
return protoreflect.ValueOfMessage(m.ProtoReflect()) return protoreflect.ValueOfMessage(m.ProtoReflect())
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature": case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
return protoreflect.ValueOfString("") return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
return protoreflect.ValueOfString("")
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
return protoreflect.ValueOfString("")
default: default:
if fd.IsExtension() { if fd.IsExtension() {
panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant")) panic(fmt.Errorf("proto3 declared messages do not support extensions: cerc.onboarding.v1.MsgOnboardParticipant"))
@ -337,6 +379,14 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
if l > 0 { if l > 0 {
n += 1 + l + runtime.Sov(uint64(l)) n += 1 + l + runtime.Sov(uint64(l))
} }
l = len(x.Role)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
l = len(x.KycId)
if l > 0 {
n += 1 + l + runtime.Sov(uint64(l))
}
if x.unknownFields != nil { if x.unknownFields != nil {
n += len(x.unknownFields) n += len(x.unknownFields)
} }
@ -366,6 +416,20 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
i -= len(x.unknownFields) i -= len(x.unknownFields)
copy(dAtA[i:], x.unknownFields) copy(dAtA[i:], x.unknownFields)
} }
if len(x.KycId) > 0 {
i -= len(x.KycId)
copy(dAtA[i:], x.KycId)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KycId)))
i--
dAtA[i] = 0x2a
}
if len(x.Role) > 0 {
i -= len(x.Role)
copy(dAtA[i:], x.Role)
i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Role)))
i--
dAtA[i] = 0x22
}
if len(x.EthSignature) > 0 { if len(x.EthSignature) > 0 {
i -= len(x.EthSignature) i -= len(x.EthSignature)
copy(dAtA[i:], x.EthSignature) copy(dAtA[i:], x.EthSignature)
@ -543,6 +607,70 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
} }
x.EthSignature = string(dAtA[iNdEx:postIndex]) x.EthSignature = string(dAtA[iNdEx:postIndex])
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 Role", 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.Role = 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 KycId", 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.KycId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := runtime.Skip(dAtA[iNdEx:]) skippy, err := runtime.Skip(dAtA[iNdEx:])
@ -957,6 +1085,8 @@ type MsgOnboardParticipant struct {
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"` Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
EthPayload *EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload,omitempty"` EthPayload *EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload,omitempty"`
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"` EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
KycId string `protobuf:"bytes,5,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty"`
} }
func (x *MsgOnboardParticipant) Reset() { func (x *MsgOnboardParticipant) Reset() {
@ -1000,6 +1130,20 @@ func (x *MsgOnboardParticipant) GetEthSignature() string {
return "" return ""
} }
func (x *MsgOnboardParticipant) GetRole() string {
if x != nil {
return x.Role
}
return ""
}
func (x *MsgOnboardParticipant) GetKycId() string {
if x != nil {
return x.KycId
}
return ""
}
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response // MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
// type. // type.
type MsgOnboardParticipantResponse struct { type MsgOnboardParticipantResponse struct {
@ -1041,7 +1185,7 @@ var file_cerc_onboarding_v1_tx_proto_rawDesc = []byte{
0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x23,
0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f,
0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72, 0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x70, 0x72,
0x6f, 0x74, 0x6f, 0x22, 0xb7, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x6f, 0x74, 0x6f, 0x22, 0xe2, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x0a, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x20, 0x0a,
0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12,
@ -1051,35 +1195,38 @@ var file_cerc_onboarding_v1_tx_proto_rawDesc = []byte{
0x6c, 0x6f, 0x61, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x50, 0x6c, 0x6f, 0x61, 0x64, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x50,
0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x5f, 0x73, 0x69, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x74, 0x68, 0x5f, 0x73, 0x69,
0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x65,
0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72,
0x2a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12,
0x1d, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x15, 0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x70, 0x61, 0x72,
0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4f,
0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e,
0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xb2, 0x01, 0x0a, 0x03, 0x4d, 0x73,
0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72,
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x12, 0x29, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e,
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73,
0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x67, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70,
0x61, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
0x93, 0x02, 0x29, 0x22, 0x27, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4f, 0x6e, 0x62, 0x6f,
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x52, 0x65,
0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27,
0xb0, 0x2a, 0x01, 0x42, 0xcc, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67,
0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74,
0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcc,
0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f,
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f,
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63,
0xaa, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x43, 0x4f, 0x58, 0xaa, 0x02, 0x12, 0x43, 0x65,
0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x72, 0x63, 0x2e, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31,
0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0xca, 0x02, 0x12, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
0x72, 0x63, 0x3a, 0x3a, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1e, 0x43, 0x65, 0x72, 0x63, 0x5c, 0x4f, 0x6e, 0x62,
0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x43, 0x65, 0x72, 0x63, 0x3a, 0x3a, 0x4f,
0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x33,
} }
var ( var (

View File

@ -33,6 +33,8 @@ type Account {
type Participant { type Participant {
cosmosAddress: String! # Cosmos address of the participant who will be registered. cosmosAddress: String! # Cosmos address of the participant who will be registered.
nitroAddress: String! # Nitro addresss of the participant who will be registered. nitroAddress: String! # Nitro addresss of the participant who will be registered.
role: String! # Participant's role
kycId: String! # Participant's KYC receipt ID
} }
# Value describes a DAG-JSON compatible value. # Value describes a DAG-JSON compatible value.

View File

@ -155,7 +155,9 @@ type ComplexityRoot struct {
Participant struct { Participant struct {
CosmosAddress func(childComplexity int) int CosmosAddress func(childComplexity int) int
KycID func(childComplexity int) int
NitroAddress func(childComplexity int) int NitroAddress func(childComplexity int) int
Role func(childComplexity int) int
} }
PeerInfo struct { PeerInfo struct {
@ -648,6 +650,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Participant.CosmosAddress(childComplexity), true return e.complexity.Participant.CosmosAddress(childComplexity), true
case "Participant.kycId":
if e.complexity.Participant.KycID == nil {
break
}
return e.complexity.Participant.KycID(childComplexity), true
case "Participant.nitroAddress": case "Participant.nitroAddress":
if e.complexity.Participant.NitroAddress == nil { if e.complexity.Participant.NitroAddress == nil {
break break
@ -655,6 +664,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
return e.complexity.Participant.NitroAddress(childComplexity), true return e.complexity.Participant.NitroAddress(childComplexity), true
case "Participant.role":
if e.complexity.Participant.Role == nil {
break
}
return e.complexity.Participant.Role(childComplexity), true
case "PeerInfo.isOutbound": case "PeerInfo.isOutbound":
if e.complexity.PeerInfo.IsOutbound == nil { if e.complexity.PeerInfo.IsOutbound == nil {
break break
@ -3924,6 +3940,94 @@ func (ec *executionContext) fieldContext_Participant_nitroAddress(ctx context.Co
return fc, nil return fc, nil
} }
func (ec *executionContext) _Participant_role(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Participant_role(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.Role, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Participant_role(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Participant",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _Participant_kycId(ctx context.Context, field graphql.CollectedField, obj *Participant) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_Participant_kycId(ctx, field)
if err != nil {
return graphql.Null
}
ctx = graphql.WithFieldContext(ctx, fc)
defer func() {
if r := recover(); r != nil {
ec.Error(ctx, ec.Recover(ctx, r))
ret = graphql.Null
}
}()
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
ctx = rctx // use context from middleware stack in children
return obj.KycID, nil
})
if err != nil {
ec.Error(ctx, err)
return graphql.Null
}
if resTmp == nil {
if !graphql.HasFieldError(ctx, fc) {
ec.Errorf(ctx, "must not be null")
}
return graphql.Null
}
res := resTmp.(string)
fc.Result = res
return ec.marshalNString2string(ctx, field.Selections, res)
}
func (ec *executionContext) fieldContext_Participant_kycId(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
fc = &graphql.FieldContext{
Object: "Participant",
Field: field,
IsMethod: false,
IsResolver: false,
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
return nil, errors.New("field of type String does not have child fields")
},
}
return fc, nil
}
func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) { func (ec *executionContext) _PeerInfo_node(ctx context.Context, field graphql.CollectedField, obj *PeerInfo) (ret graphql.Marshaler) {
fc, err := ec.fieldContext_PeerInfo_node(ctx, field) fc, err := ec.fieldContext_PeerInfo_node(ctx, field)
if err != nil { if err != nil {
@ -4836,6 +4940,10 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
return ec.fieldContext_Participant_cosmosAddress(ctx, field) return ec.fieldContext_Participant_cosmosAddress(ctx, field)
case "nitroAddress": case "nitroAddress":
return ec.fieldContext_Participant_nitroAddress(ctx, field) return ec.fieldContext_Participant_nitroAddress(ctx, field)
case "role":
return ec.fieldContext_Participant_role(ctx, field)
case "kycId":
return ec.fieldContext_Participant_kycId(ctx, field)
} }
return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name) return nil, fmt.Errorf("no field named %q was found under type Participant", field.Name)
}, },
@ -8798,6 +8906,20 @@ func (ec *executionContext) _Participant(ctx context.Context, sel ast.SelectionS
out.Values[i] = ec._Participant_nitroAddress(ctx, field, obj) out.Values[i] = ec._Participant_nitroAddress(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "role":
out.Values[i] = ec._Participant_role(ctx, field, obj)
if out.Values[i] == graphql.Null {
invalids++
}
case "kycId":
out.Values[i] = ec._Participant_kycId(ctx, field, obj)
if out.Values[i] == graphql.Null { if out.Values[i] == graphql.Null {
invalids++ invalids++
} }

View File

@ -138,6 +138,8 @@ type OwnerBonds struct {
type Participant struct { type Participant struct {
CosmosAddress string `json:"cosmosAddress"` CosmosAddress string `json:"cosmosAddress"`
NitroAddress string `json:"nitroAddress"` NitroAddress string `json:"nitroAddress"`
Role string `json:"role"`
KycID string `json:"kycId"`
} }
type PeerInfo struct { type PeerInfo struct {

View File

@ -373,6 +373,8 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
participants[i] = &Participant{ participants[i] = &Participant{
CosmosAddress: p.CosmosAddress, CosmosAddress: p.CosmosAddress,
NitroAddress: p.NitroAddress, NitroAddress: p.NitroAddress,
Role: p.Role,
KycID: p.KycId,
} }
} }

View File

@ -16,14 +16,24 @@ message Params {
// Participant defines the data that will be stored for each enrolled // Participant defines the data that will be stored for each enrolled
// participant // participant
message Participant { message Participant {
// participant's cosmos (laconic) address
string cosmos_address = 1 string cosmos_address = 1
[ (gogoproto.moretags) = [ (gogoproto.moretags) =
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ]; "json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
// participant's Nitro address
string nitro_address = 2 string nitro_address = 2
[ (gogoproto.moretags) = [ (gogoproto.moretags) =
"json:\"nitro_address\" yaml:\"nitro_address\"" ]; "json:\"nitro_address\" yaml:\"nitro_address\"" ];
// participant's role (participant | validator)
string role = 3 [ (gogoproto.moretags) = "json:\"role\" yaml:\"role\"" ];
// participant's KYC receipt ID
string kyc_id = 4
[ (gogoproto.moretags) = "json:\"kyc_id\" yaml:\"kyc_id\"" ];
} }
// EthPayload defines the payload that is signed by the ethereum private key // EthPayload defines the payload that is signed by the ethereum private key
message EthPayload { message EthPayload {
string address = 1 string address = 1

View File

@ -28,6 +28,8 @@ message MsgOnboardParticipant {
string participant = 1; string participant = 1;
EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ]; EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ];
string eth_signature = 3; string eth_signature = 3;
string role = 4;
string kyc_id = 5;
} }
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response // MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response

View File

@ -100,6 +100,8 @@ func (k Keeper) OnboardParticipant(
participant := &onboardingTypes.Participant{ participant := &onboardingTypes.Participant{
CosmosAddress: signerAddress.String(), CosmosAddress: signerAddress.String(),
NitroAddress: nitroAddress, NitroAddress: nitroAddress,
Role: msg.Role,
KycId: msg.KycId,
} }
if err := k.StoreParticipant(ctx, participant); err != nil { if err := k.StoreParticipant(ctx, participant); err != nil {

View File

@ -26,11 +26,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
RpcCommandOptions: []*autocliv1.RpcCommandOptions{ RpcCommandOptions: []*autocliv1.RpcCommandOptions{
{ {
RpcMethod: "OnboardParticipant", RpcMethod: "OnboardParticipant",
Use: "enroll", Use: "enroll [eth_payload] [eth_signature] [role] [kyc_id]",
Short: "Enroll a testnet validator", Short: "Enroll a testnet validator",
PositionalArgs: []*autocliv1.PositionalArgDescriptor{ PositionalArgs: []*autocliv1.PositionalArgDescriptor{
{ProtoField: "eth_payload"}, {ProtoField: "eth_payload"},
{ProtoField: "eth_signature"}, {ProtoField: "eth_signature"},
{ProtoField: "role"},
{ProtoField: "kyc_id"},
}, },
}, },
}, },

View File

@ -1,11 +1,15 @@
package onboarding package onboarding
import ( import (
"fmt"
errorsmod "cosmossdk.io/errors" errorsmod "cosmossdk.io/errors"
sdk "github.com/cosmos/cosmos-sdk/types" sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
) )
var PERMITTED_ROLES = []string{"participant", "validator"}
var _ sdk.Msg = &MsgOnboardParticipant{} var _ sdk.Msg = &MsgOnboardParticipant{}
func (msg MsgOnboardParticipant) ValidateBasic() error { func (msg MsgOnboardParticipant) ValidateBasic() error {
@ -18,7 +22,23 @@ func (msg MsgOnboardParticipant) ValidateBasic() error {
} }
if len(msg.EthSignature) != 132 { if len(msg.EthSignature) != 132 {
return errorsmod.Wrap(sdkerrors.ErrNoSignatures, "Invalid signature.") return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Invalid signature.")
}
if len(msg.KycId) == 0 {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "Empty KYC ID.")
}
isRoleValid := false
for _, v := range PERMITTED_ROLES {
if msg.Role == v {
isRoleValid = true
break
}
}
if !isRoleValid {
return errorsmod.Wrap(sdkerrors.ErrInvalidRequest, fmt.Sprintf("Participant role has to be one of: %v", PERMITTED_ROLES))
} }
return nil return nil

View File

@ -71,8 +71,14 @@ func (m *Params) GetOnboardingEnabled() bool {
// Participant defines the data that will be stored for each enrolled // Participant defines the data that will be stored for each enrolled
// participant // participant
type Participant struct { type Participant struct {
// participant's cosmos (laconic) address
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"` CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty" json:"cosmos_address" yaml:"cosmos_address"`
// participant's Nitro address
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_address"` NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_address"`
// participant's role (participant | validator)
Role string `protobuf:"bytes,3,opt,name=role,proto3" json:"role,omitempty" json:"role" yaml:"role"`
// participant's KYC receipt ID
KycId string `protobuf:"bytes,4,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty" json:"kyc_id" yaml:"kyc_id"`
} }
func (m *Participant) Reset() { *m = Participant{} } func (m *Participant) Reset() { *m = Participant{} }
@ -122,6 +128,20 @@ func (m *Participant) GetNitroAddress() string {
return "" return ""
} }
func (m *Participant) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
func (m *Participant) GetKycId() string {
if m != nil {
return m.KycId
}
return ""
}
// EthPayload defines the payload that is signed by the ethereum private key // EthPayload defines the payload that is signed by the ethereum private key
type EthPayload struct { type EthPayload struct {
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" json:"address" yaml:"address"` Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" json:"address" yaml:"address"`
@ -186,29 +206,32 @@ func init() {
} }
var fileDescriptor_59afed779274eaf0 = []byte{ var fileDescriptor_59afed779274eaf0 = []byte{
// 343 bytes of a gzipped FileDescriptorProto // 399 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4a, 0xc3, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0xce, 0xd2, 0x40,
0x1c, 0xc7, 0x57, 0x85, 0xa9, 0xd1, 0x09, 0x06, 0x05, 0x15, 0x6c, 0x67, 0xbd, 0x4c, 0xc6, 0x5a, 0x14, 0x85, 0xe9, 0x0f, 0xa2, 0x8e, 0x62, 0xe2, 0x44, 0x23, 0x4a, 0xec, 0x60, 0xdd, 0x60, 0x08,
0xc6, 0x0e, 0x82, 0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c, 0x60, 0xd4, 0x0f, 0x2f, 0x0d, 0xe6, 0xea, 0xf9, 0xa7, 0x87, 0x37, 0x09, 0x38, 0x05, 0xdd, 0x44, 0x45, 0xc7, 0xaf,
0xec, 0xf7, 0x8d, 0x9f, 0xe1, 0x35, 0xcb, 0x07, 0x1f, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0x91, 0x7f, 0x5e, 0x95, 0xe8, 0xa9, 0x09, 0x26, 0x2a, 0x6a, 0x42, 0x75, 0xe9, 0xd7, 0x2e, 0xcf, 0xfb,
0x47, 0xeb, 0x34, 0x41, 0x02, 0x00, 0x00, 0xbd, 0xb7, 0xad, 0xdd, 0xde, 0xb6, 0xfe, 0xee, 0x6d, 0xeb, 0xe7, 0xc1, 0xee, 0xec, 0x0e, 0x76,
0xe7, 0xcf, 0xc1, 0xee, 0x7c, 0x99, 0x44, 0x3c, 0x73, 0x73, 0x16, 0xb8, 0x99, 0xc0, 0xf5, 0x75,
0xcd, 0xb8, 0xc0, 0x31, 0xa1, 0x22, 0xe5, 0x94, 0xe1, 0x1f, 0x17, 0x27, 0x18, 0xf4, 0xf5, 0x65,
0x2d, 0xfe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x87, 0xe5, 0xd5, 0x6b, 0xaa, 0x02, 0x00, 0x00,
} }
func (m *Params) Marshal() (dAtA []byte, err error) { func (m *Params) Marshal() (dAtA []byte, err error) {
@ -264,6 +287,20 @@ func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.KycId) > 0 {
i -= len(m.KycId)
copy(dAtA[i:], m.KycId)
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.KycId)))
i--
dAtA[i] = 0x22
}
if len(m.Role) > 0 {
i -= len(m.Role)
copy(dAtA[i:], m.Role)
i = encodeVarintOnboarding(dAtA, i, uint64(len(m.Role)))
i--
dAtA[i] = 0x1a
}
if len(m.NitroAddress) > 0 { if len(m.NitroAddress) > 0 {
i -= len(m.NitroAddress) i -= len(m.NitroAddress)
copy(dAtA[i:], m.NitroAddress) copy(dAtA[i:], m.NitroAddress)
@ -355,6 +392,14 @@ func (m *Participant) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovOnboarding(uint64(l)) n += 1 + l + sovOnboarding(uint64(l))
} }
l = len(m.Role)
if l > 0 {
n += 1 + l + sovOnboarding(uint64(l))
}
l = len(m.KycId)
if l > 0 {
n += 1 + l + sovOnboarding(uint64(l))
}
return n return n
} }
@ -544,6 +589,70 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
} }
m.NitroAddress = string(dAtA[iNdEx:postIndex]) m.NitroAddress = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 3:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOnboarding
}
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 ErrInvalidLengthOnboarding
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthOnboarding
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Role = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field KycId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowOnboarding
}
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 ErrInvalidLengthOnboarding
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthOnboarding
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.KycId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipOnboarding(dAtA[iNdEx:]) skippy, err := skipOnboarding(dAtA[iNdEx:])

View File

@ -36,6 +36,8 @@ type MsgOnboardParticipant struct {
Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"` Participant string `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
EthPayload EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload"` EthPayload EthPayload `protobuf:"bytes,2,opt,name=eth_payload,json=ethPayload,proto3" json:"eth_payload"`
EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"` EthSignature string `protobuf:"bytes,3,opt,name=eth_signature,json=ethSignature,proto3" json:"eth_signature,omitempty"`
Role string `protobuf:"bytes,4,opt,name=role,proto3" json:"role,omitempty"`
KycId string `protobuf:"bytes,5,opt,name=kyc_id,json=kycId,proto3" json:"kyc_id,omitempty"`
} }
func (m *MsgOnboardParticipant) Reset() { *m = MsgOnboardParticipant{} } func (m *MsgOnboardParticipant) Reset() { *m = MsgOnboardParticipant{} }
@ -92,6 +94,20 @@ func (m *MsgOnboardParticipant) GetEthSignature() string {
return "" return ""
} }
func (m *MsgOnboardParticipant) GetRole() string {
if m != nil {
return m.Role
}
return ""
}
func (m *MsgOnboardParticipant) GetKycId() string {
if m != nil {
return m.KycId
}
return ""
}
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response // MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
// type. // type.
type MsgOnboardParticipantResponse struct { type MsgOnboardParticipantResponse struct {
@ -138,31 +154,33 @@ func init() {
func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) } func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) }
var fileDescriptor_6bfde34a550e231e = []byte{ var fileDescriptor_6bfde34a550e231e = []byte{
// 370 bytes of a gzipped FileDescriptorProto // 401 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0x32, 0x41, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8a, 0x13, 0x31,
0x18, 0xc7, 0x77, 0xf4, 0x7d, 0x5f, 0x78, 0xc7, 0x82, 0x58, 0x8a, 0x64, 0xab, 0x55, 0xd6, 0x43, 0x1c, 0xc6, 0x27, 0xbb, 0xed, 0x82, 0xa9, 0x82, 0x04, 0x17, 0x87, 0x51, 0x67, 0xcb, 0xec, 0xc1,
0x2a, 0xb4, 0x83, 0x76, 0xeb, 0x28, 0x78, 0x94, 0xc4, 0x6e, 0x5d, 0x64, 0xdc, 0x1d, 0xc6, 0x01, 0xee, 0x82, 0x13, 0xba, 0xde, 0x3c, 0x16, 0xf6, 0xe0, 0x61, 0xb1, 0xd4, 0x9b, 0x97, 0x92, 0x66,
0x9d, 0x67, 0xd9, 0x99, 0xc4, 0x6e, 0xe1, 0x27, 0x08, 0xfa, 0x08, 0x7d, 0x01, 0xe9, 0xd2, 0x57, 0x42, 0x1a, 0x3a, 0xcd, 0x7f, 0x98, 0xc4, 0xd2, 0xde, 0xa4, 0x4f, 0x20, 0xf8, 0x08, 0xbe, 0x40,
0xf0, 0x28, 0x74, 0xe9, 0x14, 0xa1, 0x81, 0x5f, 0x23, 0x5c, 0x35, 0x17, 0xda, 0xa0, 0xdb, 0xcc, 0xf1, 0x29, 0x7a, 0x2c, 0x78, 0xf1, 0x24, 0x32, 0x15, 0xfa, 0x1a, 0xd2, 0xb4, 0xb5, 0x03, 0x8e,
0xff, 0xf9, 0xf3, 0xff, 0x3d, 0x7f, 0x1e, 0x7c, 0xe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f, 0x02, 0xd0, 0x5b, 0xad, 0x43, 0xef, 0xc7, 0x3a, 0xf4, 0x3e, 0xb4, 0xa4, 0xb2, 0xf1, 0x24, 0x19, 0xc4,
0x00, 0x00, 0x16, 0xdc, 0xce, 0x57, 0x0a, 0x68, 0xca, 0x38, 0x68, 0xc5, 0x13, 0x3a, 0x2d, 0x25, 0x0c, 0xce,
0xdc, 0x2b, 0x78, 0xfd, 0x27, 0x00, 0x00, 0xff, 0xff, 0x75, 0x86, 0x6d, 0xd1, 0xaa, 0x02, 0x00,
0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
@ -267,6 +285,20 @@ func (m *MsgOnboardParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
_ = i _ = i
var l int var l int
_ = l _ = l
if len(m.KycId) > 0 {
i -= len(m.KycId)
copy(dAtA[i:], m.KycId)
i = encodeVarintTx(dAtA, i, uint64(len(m.KycId)))
i--
dAtA[i] = 0x2a
}
if len(m.Role) > 0 {
i -= len(m.Role)
copy(dAtA[i:], m.Role)
i = encodeVarintTx(dAtA, i, uint64(len(m.Role)))
i--
dAtA[i] = 0x22
}
if len(m.EthSignature) > 0 { if len(m.EthSignature) > 0 {
i -= len(m.EthSignature) i -= len(m.EthSignature)
copy(dAtA[i:], m.EthSignature) copy(dAtA[i:], m.EthSignature)
@ -344,6 +376,14 @@ func (m *MsgOnboardParticipant) Size() (n int) {
if l > 0 { if l > 0 {
n += 1 + l + sovTx(uint64(l)) n += 1 + l + sovTx(uint64(l))
} }
l = len(m.Role)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
l = len(m.KycId)
if l > 0 {
n += 1 + l + sovTx(uint64(l))
}
return n return n
} }
@ -488,6 +528,70 @@ func (m *MsgOnboardParticipant) Unmarshal(dAtA []byte) error {
} }
m.EthSignature = string(dAtA[iNdEx:postIndex]) m.EthSignature = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex iNdEx = postIndex
case 4:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.Role = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 5:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field KycId", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowTx
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= uint64(b&0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthTx
}
postIndex := iNdEx + intStringLen
if postIndex < 0 {
return ErrInvalidLengthTx
}
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.KycId = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
default: default:
iNdEx = preIndex iNdEx = preIndex
skippy, err := skipTx(dAtA[iNdEx:]) skippy, err := skipTx(dAtA[iNdEx:])