forked from cerc-io/laconicd
Compare commits
10
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bb9d7f56fe | ||
|
|
debfb82205 | ||
|
|
3c5cd002e1 | ||
|
|
b5a76a920e | ||
|
|
f176a5889e | ||
|
|
5e7d5fc47c | ||
|
|
c162396298 | ||
|
|
7a88c82816 | ||
|
|
9fab3f8326 | ||
|
|
ec6e2f3776 |
@@ -25,6 +25,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
# Copy over binary from the builder
|
||||
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/build/laconicd /usr/bin/laconicd
|
||||
|
||||
# Copy over init script from builder
|
||||
COPY --from=builder /go/src/git.vdb.to/cerc-io/laconicd/scripts/init.sh scripts/init.sh
|
||||
|
||||
WORKDIR /
|
||||
|
||||
# Run laconicd by default
|
||||
|
||||
@@ -427,6 +427,8 @@ var (
|
||||
md_Participant protoreflect.MessageDescriptor
|
||||
fd_Participant_cosmos_address protoreflect.FieldDescriptor
|
||||
fd_Participant_nitro_address protoreflect.FieldDescriptor
|
||||
fd_Participant_role protoreflect.FieldDescriptor
|
||||
fd_Participant_kyc_id protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -434,6 +436,8 @@ func init() {
|
||||
md_Participant = File_cerc_onboarding_v1_onboarding_proto.Messages().ByName("Participant")
|
||||
fd_Participant_cosmos_address = md_Participant.Fields().ByName("cosmos_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)
|
||||
@@ -513,6 +517,18 @@ func (x *fastReflection_Participant) Range(f func(protoreflect.FieldDescriptor,
|
||||
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.
|
||||
@@ -532,6 +548,10 @@ func (x *fastReflection_Participant) Has(fd protoreflect.FieldDescriptor) bool {
|
||||
return x.CosmosAddress != ""
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
return x.NitroAddress != ""
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
return x.Role != ""
|
||||
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||
return x.KycId != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
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 = ""
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
x.NitroAddress = ""
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
x.Role = ""
|
||||
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||
x.KycId = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
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":
|
||||
value := x.NitroAddress
|
||||
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:
|
||||
if descriptor.IsExtension() {
|
||||
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)
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
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:
|
||||
if fd.IsExtension() {
|
||||
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"))
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
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:
|
||||
if fd.IsExtension() {
|
||||
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("")
|
||||
case "cerc.onboarding.v1.Participant.nitro_address":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cerc.onboarding.v1.Participant.role":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cerc.onboarding.v1.Participant.kyc_id":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
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 {
|
||||
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 {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@@ -745,6 +795,20 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
||||
i -= len(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 {
|
||||
i -= len(x.NitroAddress)
|
||||
copy(dAtA[i:], x.NitroAddress)
|
||||
@@ -872,6 +936,70 @@ func (x *fastReflection_Participant) ProtoMethods() *protoiface.Methods {
|
||||
}
|
||||
x.NitroAddress = 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 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:
|
||||
iNdEx = preIndex
|
||||
skippy, err := runtime.Skip(dAtA[iNdEx:])
|
||||
@@ -1447,8 +1575,14 @@ type Participant struct {
|
||||
sizeCache protoimpl.SizeCache
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
||||
// participant's cosmos (laconic) address
|
||||
CosmosAddress string `protobuf:"bytes,1,opt,name=cosmos_address,json=cosmosAddress,proto3" json:"cosmos_address,omitempty"`
|
||||
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
||||
// participant's Nitro address
|
||||
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() {
|
||||
@@ -1485,6 +1619,20 @@ func (x *Participant) GetNitroAddress() string {
|
||||
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
|
||||
type EthPayload struct {
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
@@ -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,
|
||||
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,
|
||||
0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x76, 0x0a,
|
||||
0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61,
|
||||
0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde,
|
||||
0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22,
|
||||
0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52,
|
||||
0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18,
|
||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19, 0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
|
||||
0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22,
|
||||
0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65,
|
||||
0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31,
|
||||
0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f,
|
||||
0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64,
|
||||
0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72,
|
||||
0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69,
|
||||
0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 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,
|
||||
0x0c, 0x6e, 0x69, 0x74, 0x72, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a,
|
||||
0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1b, 0xf2, 0xde, 0x1f,
|
||||
0x17, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x20, 0x79, 0x61, 0x6d,
|
||||
0x6c, 0x3a, 0x22, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x36,
|
||||
0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x1f,
|
||||
0xf2, 0xde, 0x1f, 0x1b, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64,
|
||||
0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x22, 0x52,
|
||||
0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x22, 0x76, 0x0a, 0x0a, 0x45, 0x74, 0x68, 0x50, 0x61, 0x79,
|
||||
0x6c, 0x6f, 0x61, 0x64, 0x12, 0x3b, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18,
|
||||
0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xf2, 0xde, 0x1f, 0x1d, 0x6a, 0x73, 0x6f, 0x6e, 0x3a,
|
||||
0x22, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x20, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22,
|
||||
0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73,
|
||||
0x73, 0x12, 0x2b, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x19,
|
||||
0xf2, 0xde, 0x1f, 0x15, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x20, 0x79,
|
||||
0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6d, 0x73, 0x67, 0x22, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x42, 0xd4,
|
||||
0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
|
||||
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0f, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||
0x72, 0x64, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69,
|
||||
0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f,
|
||||
0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65,
|
||||
0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31,
|
||||
0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03,
|
||||
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 (
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,7 +19,9 @@ import (
|
||||
const _ = grpc.SupportPackageIsVersion7
|
||||
|
||||
const (
|
||||
Query_Participants_FullMethodName = "/cerc.onboarding.v1.Query/Participants"
|
||||
Query_Participants_FullMethodName = "/cerc.onboarding.v1.Query/Participants"
|
||||
Query_GetParticipantByAddress_FullMethodName = "/cerc.onboarding.v1.Query/GetParticipantByAddress"
|
||||
Query_GetParticipantByNitroAddress_FullMethodName = "/cerc.onboarding.v1.Query/GetParticipantByNitroAddress"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
@@ -28,6 +30,10 @@ const (
|
||||
type QueryClient interface {
|
||||
// Participants queries Participants list
|
||||
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
||||
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||
GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error)
|
||||
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||
GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@@ -47,12 +53,34 @@ func (c *queryClient) Participants(ctx context.Context, in *QueryParticipantsReq
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error) {
|
||||
out := new(QueryGetParticipantByAddressResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GetParticipantByAddress_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||
out := new(QueryGetParticipantByNitroAddressResponse)
|
||||
err := c.cc.Invoke(ctx, Query_GetParticipantByNitroAddress_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
type QueryServer interface {
|
||||
// Participants queries Participants list
|
||||
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
||||
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||
GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error)
|
||||
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||
GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
@@ -63,6 +91,12 @@ type UnimplementedQueryServer struct {
|
||||
func (UnimplementedQueryServer) Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByAddress not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByNitroAddress not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -94,6 +128,42 @@ func _Query_Participants_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetParticipantByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetParticipantByAddressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetParticipantByAddress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GetParticipantByAddress_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetParticipantByAddress(ctx, req.(*QueryGetParticipantByAddressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetParticipantByNitroAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetParticipantByNitroAddressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_GetParticipantByNitroAddress_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, req.(*QueryGetParticipantByNitroAddressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -105,6 +175,14 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Participants",
|
||||
Handler: _Query_Participants_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetParticipantByAddress",
|
||||
Handler: _Query_GetParticipantByAddress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetParticipantByNitroAddress",
|
||||
Handler: _Query_GetParticipantByNitroAddress_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cerc/onboarding/v1/query.proto",
|
||||
|
||||
@@ -20,6 +20,8 @@ var (
|
||||
fd_MsgOnboardParticipant_participant protoreflect.FieldDescriptor
|
||||
fd_MsgOnboardParticipant_eth_payload protoreflect.FieldDescriptor
|
||||
fd_MsgOnboardParticipant_eth_signature protoreflect.FieldDescriptor
|
||||
fd_MsgOnboardParticipant_role protoreflect.FieldDescriptor
|
||||
fd_MsgOnboardParticipant_kyc_id protoreflect.FieldDescriptor
|
||||
)
|
||||
|
||||
func init() {
|
||||
@@ -28,6 +30,8 @@ func init() {
|
||||
fd_MsgOnboardParticipant_participant = md_MsgOnboardParticipant.Fields().ByName("participant")
|
||||
fd_MsgOnboardParticipant_eth_payload = md_MsgOnboardParticipant.Fields().ByName("eth_payload")
|
||||
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)
|
||||
@@ -113,6 +117,18 @@ func (x *fastReflection_MsgOnboardParticipant) Range(f func(protoreflect.FieldDe
|
||||
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.
|
||||
@@ -134,6 +150,10 @@ func (x *fastReflection_MsgOnboardParticipant) Has(fd protoreflect.FieldDescript
|
||||
return x.EthPayload != nil
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||
return x.EthSignature != ""
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||
return x.Role != ""
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||
return x.KycId != ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
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
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||
x.EthSignature = ""
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||
x.Role = ""
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||
x.KycId = ""
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
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":
|
||||
value := x.EthSignature
|
||||
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:
|
||||
if descriptor.IsExtension() {
|
||||
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)
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||
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:
|
||||
if fd.IsExtension() {
|
||||
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"))
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||
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:
|
||||
if fd.IsExtension() {
|
||||
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())
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.eth_signature":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.role":
|
||||
return protoreflect.ValueOfString("")
|
||||
case "cerc.onboarding.v1.MsgOnboardParticipant.kyc_id":
|
||||
return protoreflect.ValueOfString("")
|
||||
default:
|
||||
if fd.IsExtension() {
|
||||
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 {
|
||||
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 {
|
||||
n += len(x.unknownFields)
|
||||
}
|
||||
@@ -366,6 +416,20 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
|
||||
i -= len(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 {
|
||||
i -= len(x.EthSignature)
|
||||
copy(dAtA[i:], x.EthSignature)
|
||||
@@ -543,6 +607,70 @@ func (x *fastReflection_MsgOnboardParticipant) ProtoMethods() *protoiface.Method
|
||||
}
|
||||
x.EthSignature = 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 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:
|
||||
iNdEx = preIndex
|
||||
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"`
|
||||
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"`
|
||||
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() {
|
||||
@@ -1000,6 +1130,20 @@ func (x *MsgOnboardParticipant) GetEthSignature() string {
|
||||
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
|
||||
// type.
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
@@ -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,
|
||||
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,
|
||||
0x74, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x10, 0x82, 0xe7, 0xb0,
|
||||
0x2a, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a,
|
||||
0x1d, 0x4d, 0x73, 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, 0x32, 0xb2,
|
||||
0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61,
|
||||
0x72, 0x64, 0x50, 0x61, 0x72, 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, 0x67, 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, 0x68, 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x72,
|
||||
0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12,
|
||||
0x15, 0x0a, 0x06, 0x6b, 0x79, 0x63, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||
0x05, 0x6b, 0x79, 0x63, 0x49, 0x64, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x70, 0x61, 0x72,
|
||||
0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 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, 0x32, 0xb2, 0x01, 0x0a, 0x03, 0x4d, 0x73,
|
||||
0x67, 0x12, 0xa3, 0x01, 0x0a, 0x12, 0x4f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x50, 0x61, 0x72,
|
||||
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,
|
||||
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,
|
||||
0x93, 0x02, 0x29, 0x22, 0x27, 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,
|
||||
0x5f, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7,
|
||||
0xb0, 0x2a, 0x01, 0x42, 0xcc, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63,
|
||||
0x2e, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07,
|
||||
0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76,
|
||||
0x64, 0x62, 0x2e, 0x74, 0x6f, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61,
|
||||
0x63, 0x6f, 0x6e, 0x69, 0x63, 0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f,
|
||||
0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e,
|
||||
0x62, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 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,
|
||||
0x61, 0x6e, 0x74, 0x1a, 0x31, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 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, 0x61, 0x6e, 0x74, 0x52, 0x65,
|
||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x22, 0x27,
|
||||
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, 0x5f, 0x70, 0x61, 0x72, 0x74,
|
||||
0x69, 0x63, 0x69, 0x70, 0x61, 0x6e, 0x74, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xcc,
|
||||
0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x65, 0x72, 0x63, 0x2e, 0x6f, 0x6e, 0x62, 0x6f,
|
||||
0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f,
|
||||
0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x2e, 0x76, 0x64, 0x62, 0x2e, 0x74, 0x6f,
|
||||
0x2f, 0x63, 0x65, 0x72, 0x63, 0x2d, 0x69, 0x6f, 0x2f, 0x6c, 0x61, 0x63, 0x6f, 0x6e, 0x69, 0x63,
|
||||
0x64, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x65, 0x72, 0x63, 0x2f, 0x6f, 0x6e, 0x62, 0x6f, 0x61,
|
||||
0x72, 0x64, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x6e, 0x62, 0x6f, 0x61, 0x72, 0x64,
|
||||
0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 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 (
|
||||
|
||||
+1363
-235
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,7 @@ const (
|
||||
Query_LookupLrn_FullMethodName = "/cerc.registry.v1.Query/LookupLrn"
|
||||
Query_ResolveLrn_FullMethodName = "/cerc.registry.v1.Query/ResolveLrn"
|
||||
Query_GetRegistryModuleBalance_FullMethodName = "/cerc.registry.v1.Query/GetRegistryModuleBalance"
|
||||
Query_Authorities_FullMethodName = "/cerc.registry.v1.Query/Authorities"
|
||||
)
|
||||
|
||||
// QueryClient is the client API for Query service.
|
||||
@@ -52,6 +53,8 @@ type QueryClient interface {
|
||||
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
|
||||
// Get registry module balance
|
||||
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||
// Authorities queries all authorities
|
||||
Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@@ -143,6 +146,15 @@ func (c *queryClient) GetRegistryModuleBalance(ctx context.Context, in *QueryGet
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error) {
|
||||
out := new(QueryAuthoritiesResponse)
|
||||
err := c.cc.Invoke(ctx, Query_Authorities_FullMethodName, in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
// All implementations must embed UnimplementedQueryServer
|
||||
// for forward compatibility
|
||||
@@ -165,6 +177,8 @@ type QueryServer interface {
|
||||
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
|
||||
// Get registry module balance
|
||||
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||
// Authorities queries all authorities
|
||||
Authorities(context.Context, *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error)
|
||||
mustEmbedUnimplementedQueryServer()
|
||||
}
|
||||
|
||||
@@ -199,6 +213,9 @@ func (UnimplementedQueryServer) ResolveLrn(context.Context, *QueryResolveLrnRequ
|
||||
func (UnimplementedQueryServer) GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) Authorities(context.Context, *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Authorities not implemented")
|
||||
}
|
||||
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
|
||||
|
||||
// UnsafeQueryServer may be embedded to opt out of forward compatibility for this service.
|
||||
@@ -374,6 +391,24 @@ func _Query_GetRegistryModuleBalance_Handler(srv interface{}, ctx context.Contex
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Authorities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAuthoritiesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Authorities(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: Query_Authorities_FullMethodName,
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Authorities(ctx, req.(*QueryAuthoritiesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
// Query_ServiceDesc is the grpc.ServiceDesc for Query service.
|
||||
// It's only intended for direct use with grpc.RegisterService,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
@@ -417,6 +452,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetRegistryModuleBalance",
|
||||
Handler: _Query_GetRegistryModuleBalance_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Authorities",
|
||||
Handler: _Query_Authorities_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cerc/registry/v1/query.proto",
|
||||
|
||||
@@ -34,6 +34,7 @@ import (
|
||||
distrkeeper "github.com/cosmos/cosmos-sdk/x/distribution/keeper"
|
||||
"github.com/cosmos/cosmos-sdk/x/genutil"
|
||||
genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types"
|
||||
slashingkeeper "github.com/cosmos/cosmos-sdk/x/slashing/keeper"
|
||||
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
|
||||
|
||||
_ "cosmossdk.io/api/cosmos/tx/config/v1" // import for side-effects
|
||||
@@ -48,6 +49,7 @@ import (
|
||||
_ "github.com/cosmos/cosmos-sdk/x/crisis" // import for side-effects
|
||||
_ "github.com/cosmos/cosmos-sdk/x/distribution" // import for side-effects
|
||||
_ "github.com/cosmos/cosmos-sdk/x/mint" // import for side-effects
|
||||
_ "github.com/cosmos/cosmos-sdk/x/slashing" // import for side-effects
|
||||
_ "github.com/cosmos/cosmos-sdk/x/staking" // import for side-effects
|
||||
)
|
||||
|
||||
@@ -76,6 +78,7 @@ type LaconicApp struct {
|
||||
AccountKeeper authkeeper.AccountKeeper
|
||||
BankKeeper bankkeeper.Keeper
|
||||
StakingKeeper *stakingkeeper.Keeper
|
||||
SlashingKeeper slashingkeeper.Keeper
|
||||
DistrKeeper distrkeeper.Keeper
|
||||
CrisisKeeper *crisiskeeper.Keeper
|
||||
ConsensusParamsKeeper consensuskeeper.Keeper
|
||||
@@ -142,6 +145,7 @@ func NewLaconicApp(
|
||||
&app.AccountKeeper,
|
||||
&app.BankKeeper,
|
||||
&app.StakingKeeper,
|
||||
&app.SlashingKeeper,
|
||||
&app.DistrKeeper,
|
||||
&app.CrisisKeeper,
|
||||
&app.ConsensusParamsKeeper,
|
||||
|
||||
+5
-2
@@ -6,11 +6,11 @@ modules:
|
||||
# During begin block slashing happens after distr.BeginBlocker so that
|
||||
# there is nothing left over in the validator fee pool, so as to keep the CanWithdrawInvariant invariant.
|
||||
# NOTE: staking module is required if HistoricalEntries param > 0
|
||||
begin_blockers: [distribution, staking]
|
||||
begin_blockers: [distribution, slashing, staking]
|
||||
end_blockers: [crisis, staking, auction, registry]
|
||||
# NOTE: The genutils module must occur after staking so that pools are properly initialized with tokens from genesis accounts.
|
||||
# NOTE: The genutils module must also occur after auth so that it can access the params from auth.
|
||||
init_genesis: [auth, bank, distribution, staking, crisis, genutil, auction, bond, registry, onboarding]
|
||||
init_genesis: [auth, bank, distribution, staking, slashing, crisis, genutil, auction, bond, registry, onboarding]
|
||||
override_store_keys:
|
||||
- module_name: auth
|
||||
kv_store_key: acc
|
||||
@@ -39,6 +39,9 @@ modules:
|
||||
- name: staking
|
||||
config:
|
||||
"@type": cosmos.staking.module.v1.Module
|
||||
- name: slashing
|
||||
config:
|
||||
"@type": cosmos.slashing.module.v1.Module
|
||||
- name: distribution
|
||||
config:
|
||||
"@type": cosmos.distribution.module.v1.Module
|
||||
|
||||
@@ -10,6 +10,7 @@ import (
|
||||
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
|
||||
servertypes "github.com/cosmos/cosmos-sdk/server/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
slashingtypes "github.com/cosmos/cosmos-sdk/x/slashing/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/staking"
|
||||
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
|
||||
)
|
||||
@@ -221,4 +222,16 @@ func (app *LaconicApp) prepForZeroHeightGenesis(ctx sdk.Context, jailAllowedAddr
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
/* Handle slashing state. */
|
||||
|
||||
// reset start height on signing infos
|
||||
app.SlashingKeeper.IterateValidatorSigningInfos(
|
||||
ctx,
|
||||
func(addr sdk.ConsAddress, info slashingtypes.ValidatorSigningInfo) (stop bool) {
|
||||
info.StartHeight = 0
|
||||
app.SlashingKeeper.SetValidatorSigningInfo(ctx, addr, info)
|
||||
return false
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -10,9 +10,11 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
CoinUnit = "photon"
|
||||
CoinUnit = "lnt"
|
||||
BaseCoinUnit = "alnt"
|
||||
LntExponent = 18
|
||||
|
||||
DefaultBondDenom = CoinUnit
|
||||
DefaultBondDenom = BaseCoinUnit
|
||||
|
||||
// Bech32PrefixAccAddr defines the Bech32 prefix of an account's address.
|
||||
Bech32PrefixAccAddr = "laconic"
|
||||
@@ -41,6 +43,11 @@ func RegisterDenoms() {
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
err = sdk.RegisterDenom(BaseCoinUnit, math.LegacyNewDecWithPrec(1, LntExponent))
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
func SetAddressPrefixes() {
|
||||
|
||||
@@ -98,7 +98,7 @@ func NewRootCmd() *cobra.Command {
|
||||
|
||||
// overwrite the minimum gas price from the app configuration
|
||||
srvCfg := serverconfig.DefaultConfig()
|
||||
srvCfg.MinGasPrices = "0photon"
|
||||
srvCfg.MinGasPrices = "0alnt"
|
||||
|
||||
// overwrite the block timeout
|
||||
cmtCfg := cmtcfg.DefaultConfig()
|
||||
|
||||
@@ -61,6 +61,7 @@ require (
|
||||
github.com/agnivade/levenshtein v1.1.1 // indirect
|
||||
github.com/beorn7/perks v1.0.1 // indirect
|
||||
github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect
|
||||
github.com/bits-and-blooms/bitset v1.10.0 // indirect
|
||||
github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect
|
||||
github.com/btcsuite/btcd/btcutil v1.1.5 // indirect
|
||||
github.com/btcsuite/btcd/chaincfg/chainhash v1.1.0 // indirect
|
||||
|
||||
@@ -33,6 +33,8 @@ type Account {
|
||||
type Participant {
|
||||
cosmosAddress: String! # Cosmos address 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.
|
||||
@@ -195,6 +197,11 @@ type AuthorityRecord {
|
||||
auction: Auction # Authority auction.
|
||||
}
|
||||
|
||||
type Authority {
|
||||
name: String!
|
||||
entry: AuthorityRecord!
|
||||
}
|
||||
|
||||
# Name record entry, created at a particular height.
|
||||
type NameRecordEntry {
|
||||
id: String! # Target record ID.
|
||||
@@ -239,12 +246,17 @@ type Query {
|
||||
|
||||
# Whether to query all records, not just named ones (false by default).
|
||||
all: Boolean
|
||||
limit: Int
|
||||
offset: Int
|
||||
): [Record]
|
||||
|
||||
#
|
||||
# Naming API.
|
||||
#
|
||||
|
||||
# Get authorities list.
|
||||
getAuthorities(owner: String): [Authority]
|
||||
|
||||
# Lookup authority information.
|
||||
lookupAuthorities(names: [String!]): [AuthorityRecord]!
|
||||
|
||||
@@ -263,4 +275,6 @@ type Query {
|
||||
|
||||
# Query participants.
|
||||
getParticipants: [Participant]!
|
||||
getParticipantByAddress(address: String!): Participant!
|
||||
getParticipantByNitroAddress(nitroAddress: String!): Participant!
|
||||
}
|
||||
|
||||
+726
-15
@@ -87,6 +87,11 @@ type ComplexityRoot struct {
|
||||
Status func(childComplexity int) int
|
||||
}
|
||||
|
||||
Authority struct {
|
||||
Entry func(childComplexity int) int
|
||||
Name func(childComplexity int) int
|
||||
}
|
||||
|
||||
AuthorityRecord struct {
|
||||
Auction func(childComplexity int) int
|
||||
BondID func(childComplexity int) int
|
||||
@@ -155,7 +160,9 @@ type ComplexityRoot struct {
|
||||
|
||||
Participant struct {
|
||||
CosmosAddress func(childComplexity int) int
|
||||
KycID func(childComplexity int) int
|
||||
NitroAddress func(childComplexity int) int
|
||||
Role func(childComplexity int) int
|
||||
}
|
||||
|
||||
PeerInfo struct {
|
||||
@@ -165,18 +172,21 @@ type ComplexityRoot struct {
|
||||
}
|
||||
|
||||
Query struct {
|
||||
GetAccounts func(childComplexity int, addresses []string) int
|
||||
GetAuctionsByIds func(childComplexity int, ids []string) int
|
||||
GetBondsByIds func(childComplexity int, ids []string) int
|
||||
GetParticipants func(childComplexity int) int
|
||||
GetRecordsByIds func(childComplexity int, ids []string) int
|
||||
GetStatus func(childComplexity int) int
|
||||
LookupAuthorities func(childComplexity int, names []string) int
|
||||
LookupNames func(childComplexity int, names []string) int
|
||||
QueryBonds func(childComplexity int, attributes []*KeyValueInput) int
|
||||
QueryBondsByOwner func(childComplexity int, ownerAddresses []string) int
|
||||
QueryRecords func(childComplexity int, attributes []*KeyValueInput, all *bool) int
|
||||
ResolveNames func(childComplexity int, names []string) int
|
||||
GetAccounts func(childComplexity int, addresses []string) int
|
||||
GetAuctionsByIds func(childComplexity int, ids []string) int
|
||||
GetAuthorities func(childComplexity int, owner *string) int
|
||||
GetBondsByIds func(childComplexity int, ids []string) int
|
||||
GetParticipantByAddress func(childComplexity int, address string) int
|
||||
GetParticipantByNitroAddress func(childComplexity int, nitroAddress string) int
|
||||
GetParticipants func(childComplexity int) int
|
||||
GetRecordsByIds func(childComplexity int, ids []string) int
|
||||
GetStatus func(childComplexity int) int
|
||||
LookupAuthorities func(childComplexity int, names []string) int
|
||||
LookupNames func(childComplexity int, names []string) int
|
||||
QueryBonds func(childComplexity int, attributes []*KeyValueInput) int
|
||||
QueryBondsByOwner func(childComplexity int, ownerAddresses []string) int
|
||||
QueryRecords func(childComplexity int, attributes []*KeyValueInput, all *bool, limit *int, offset *int) int
|
||||
ResolveNames func(childComplexity int, names []string) int
|
||||
}
|
||||
|
||||
Record struct {
|
||||
@@ -226,12 +236,15 @@ type QueryResolver interface {
|
||||
QueryBonds(ctx context.Context, attributes []*KeyValueInput) ([]*Bond, error)
|
||||
QueryBondsByOwner(ctx context.Context, ownerAddresses []string) ([]*OwnerBonds, error)
|
||||
GetRecordsByIds(ctx context.Context, ids []string) ([]*Record, error)
|
||||
QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error)
|
||||
QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool, limit *int, offset *int) ([]*Record, error)
|
||||
GetAuthorities(ctx context.Context, owner *string) ([]*Authority, error)
|
||||
LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error)
|
||||
LookupNames(ctx context.Context, names []string) ([]*NameRecord, error)
|
||||
ResolveNames(ctx context.Context, names []string) ([]*Record, error)
|
||||
GetAuctionsByIds(ctx context.Context, ids []string) ([]*Auction, error)
|
||||
GetParticipants(ctx context.Context) ([]*Participant, error)
|
||||
GetParticipantByAddress(ctx context.Context, address string) (*Participant, error)
|
||||
GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error)
|
||||
}
|
||||
|
||||
type executableSchema struct {
|
||||
@@ -452,6 +465,20 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.AuctionBid.Status(childComplexity), true
|
||||
|
||||
case "Authority.entry":
|
||||
if e.complexity.Authority.Entry == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Authority.Entry(childComplexity), true
|
||||
|
||||
case "Authority.name":
|
||||
if e.complexity.Authority.Name == nil {
|
||||
break
|
||||
}
|
||||
|
||||
return e.complexity.Authority.Name(childComplexity), true
|
||||
|
||||
case "AuthorityRecord.auction":
|
||||
if e.complexity.AuthorityRecord.Auction == nil {
|
||||
break
|
||||
@@ -648,6 +675,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
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":
|
||||
if e.complexity.Participant.NitroAddress == nil {
|
||||
break
|
||||
@@ -655,6 +689,13 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
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":
|
||||
if e.complexity.PeerInfo.IsOutbound == nil {
|
||||
break
|
||||
@@ -700,6 +741,18 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Query.GetAuctionsByIds(childComplexity, args["ids"].([]string)), true
|
||||
|
||||
case "Query.getAuthorities":
|
||||
if e.complexity.Query.GetAuthorities == nil {
|
||||
break
|
||||
}
|
||||
|
||||
args, err := ec.field_Query_getAuthorities_args(context.TODO(), rawArgs)
|
||||
if err != nil {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.GetAuthorities(childComplexity, args["owner"].(*string)), true
|
||||
|
||||
case "Query.getBondsByIds":
|
||||
if e.complexity.Query.GetBondsByIds == nil {
|
||||
break
|
||||
@@ -712,6 +765,30 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
|
||||
return e.complexity.Query.GetBondsByIds(childComplexity, args["ids"].([]string)), true
|
||||
|
||||
case "Query.getParticipantByAddress":
|
||||
if e.complexity.Query.GetParticipantByAddress == nil {
|
||||
break
|
||||
}
|
||||
|
||||
args, err := ec.field_Query_getParticipantByAddress_args(context.TODO(), rawArgs)
|
||||
if err != nil {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.GetParticipantByAddress(childComplexity, args["address"].(string)), true
|
||||
|
||||
case "Query.getParticipantByNitroAddress":
|
||||
if e.complexity.Query.GetParticipantByNitroAddress == nil {
|
||||
break
|
||||
}
|
||||
|
||||
args, err := ec.field_Query_getParticipantByNitroAddress_args(context.TODO(), rawArgs)
|
||||
if err != nil {
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.GetParticipantByNitroAddress(childComplexity, args["nitroAddress"].(string)), true
|
||||
|
||||
case "Query.getParticipants":
|
||||
if e.complexity.Query.GetParticipants == nil {
|
||||
break
|
||||
@@ -796,7 +873,7 @@ func (e *executableSchema) Complexity(typeName, field string, childComplexity in
|
||||
return 0, false
|
||||
}
|
||||
|
||||
return e.complexity.Query.QueryRecords(childComplexity, args["attributes"].([]*KeyValueInput), args["all"].(*bool)), true
|
||||
return e.complexity.Query.QueryRecords(childComplexity, args["attributes"].([]*KeyValueInput), args["all"].(*bool), args["limit"].(*int), args["offset"].(*int)), true
|
||||
|
||||
case "Query.resolveNames":
|
||||
if e.complexity.Query.ResolveNames == nil {
|
||||
@@ -1097,6 +1174,21 @@ func (ec *executionContext) field_Query_getAuctionsByIds_args(ctx context.Contex
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_getAuthorities_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 *string
|
||||
if tmp, ok := rawArgs["owner"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("owner"))
|
||||
arg0, err = ec.unmarshalOString2ᚖstring(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["owner"] = arg0
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
@@ -1112,6 +1204,36 @@ func (ec *executionContext) field_Query_getBondsByIds_args(ctx context.Context,
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_getParticipantByAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 string
|
||||
if tmp, ok := rawArgs["address"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("address"))
|
||||
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["address"] = arg0
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_getParticipantByNitroAddress_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
var arg0 string
|
||||
if tmp, ok := rawArgs["nitroAddress"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("nitroAddress"))
|
||||
arg0, err = ec.unmarshalNString2string(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["nitroAddress"] = arg0
|
||||
return args, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) field_Query_getRecordsByIds_args(ctx context.Context, rawArgs map[string]interface{}) (map[string]interface{}, error) {
|
||||
var err error
|
||||
args := map[string]interface{}{}
|
||||
@@ -1208,6 +1330,24 @@ func (ec *executionContext) field_Query_queryRecords_args(ctx context.Context, r
|
||||
}
|
||||
}
|
||||
args["all"] = arg1
|
||||
var arg2 *int
|
||||
if tmp, ok := rawArgs["limit"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("limit"))
|
||||
arg2, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["limit"] = arg2
|
||||
var arg3 *int
|
||||
if tmp, ok := rawArgs["offset"]; ok {
|
||||
ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("offset"))
|
||||
arg3, err = ec.unmarshalOInt2ᚖint(ctx, tmp)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
args["offset"] = arg3
|
||||
return args, nil
|
||||
}
|
||||
|
||||
@@ -2600,6 +2740,110 @@ func (ec *executionContext) fieldContext_AuctionBid_bidAmount(ctx context.Contex
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Authority_name(ctx context.Context, field graphql.CollectedField, obj *Authority) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Authority_name(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.Name, 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_Authority_name(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Authority",
|
||||
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) _Authority_entry(ctx context.Context, field graphql.CollectedField, obj *Authority) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Authority_entry(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.Entry, 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.(*AuthorityRecord)
|
||||
fc.Result = res
|
||||
return ec.marshalNAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Authority_entry(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Authority",
|
||||
Field: field,
|
||||
IsMethod: false,
|
||||
IsResolver: false,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "ownerAddress":
|
||||
return ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field)
|
||||
case "ownerPublicKey":
|
||||
return ec.fieldContext_AuthorityRecord_ownerPublicKey(ctx, field)
|
||||
case "height":
|
||||
return ec.fieldContext_AuthorityRecord_height(ctx, field)
|
||||
case "status":
|
||||
return ec.fieldContext_AuthorityRecord_status(ctx, field)
|
||||
case "bondId":
|
||||
return ec.fieldContext_AuthorityRecord_bondId(ctx, field)
|
||||
case "expiryTime":
|
||||
return ec.fieldContext_AuthorityRecord_expiryTime(ctx, field)
|
||||
case "auction":
|
||||
return ec.fieldContext_AuthorityRecord_auction(ctx, field)
|
||||
}
|
||||
return nil, fmt.Errorf("no field named %q was found under type AuthorityRecord", field.Name)
|
||||
},
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _AuthorityRecord_ownerAddress(ctx context.Context, field graphql.CollectedField, obj *AuthorityRecord) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_AuthorityRecord_ownerAddress(ctx, field)
|
||||
if err != nil {
|
||||
@@ -3924,6 +4168,94 @@ func (ec *executionContext) fieldContext_Participant_nitroAddress(ctx context.Co
|
||||
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) {
|
||||
fc, err := ec.fieldContext_PeerInfo_node(ctx, field)
|
||||
if err != nil {
|
||||
@@ -4452,7 +4784,7 @@ func (ec *executionContext) _Query_queryRecords(ctx context.Context, field graph
|
||||
}()
|
||||
resTmp, err := ec.ResolverMiddleware(ctx, func(rctx context.Context) (interface{}, error) {
|
||||
ctx = rctx // use context from middleware stack in children
|
||||
return ec.resolvers.Query().QueryRecords(rctx, fc.Args["attributes"].([]*KeyValueInput), fc.Args["all"].(*bool))
|
||||
return ec.resolvers.Query().QueryRecords(rctx, fc.Args["attributes"].([]*KeyValueInput), fc.Args["all"].(*bool), fc.Args["limit"].(*int), fc.Args["offset"].(*int))
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
@@ -4508,6 +4840,64 @@ func (ec *executionContext) fieldContext_Query_queryRecords(ctx context.Context,
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query_getAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query_getAuthorities(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 ec.resolvers.Query().GetAuthorities(rctx, fc.Args["owner"].(*string))
|
||||
})
|
||||
if err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return graphql.Null
|
||||
}
|
||||
if resTmp == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
res := resTmp.([]*Authority)
|
||||
fc.Result = res
|
||||
return ec.marshalOAuthority2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Query_getAuthorities(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Query",
|
||||
Field: field,
|
||||
IsMethod: true,
|
||||
IsResolver: true,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "name":
|
||||
return ec.fieldContext_Authority_name(ctx, field)
|
||||
case "entry":
|
||||
return ec.fieldContext_Authority_entry(ctx, field)
|
||||
}
|
||||
return nil, fmt.Errorf("no field named %q was found under type Authority", field.Name)
|
||||
},
|
||||
}
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
err = ec.Recover(ctx, r)
|
||||
ec.Error(ctx, err)
|
||||
}
|
||||
}()
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
if fc.Args, err = ec.field_Query_getAuthorities_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query_lookupAuthorities(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query_lookupAuthorities(ctx, field)
|
||||
if err != nil {
|
||||
@@ -4836,6 +5226,10 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
|
||||
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||
case "nitroAddress":
|
||||
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)
|
||||
},
|
||||
@@ -4843,6 +5237,136 @@ func (ec *executionContext) fieldContext_Query_getParticipants(ctx context.Conte
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query_getParticipantByAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query_getParticipantByAddress(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 ec.resolvers.Query().GetParticipantByAddress(rctx, fc.Args["address"].(string))
|
||||
})
|
||||
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.(*Participant)
|
||||
fc.Result = res
|
||||
return ec.marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Query_getParticipantByAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Query",
|
||||
Field: field,
|
||||
IsMethod: true,
|
||||
IsResolver: true,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "cosmosAddress":
|
||||
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||
case "nitroAddress":
|
||||
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)
|
||||
},
|
||||
}
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
err = ec.Recover(ctx, r)
|
||||
ec.Error(ctx, err)
|
||||
}
|
||||
}()
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
if fc.Args, err = ec.field_Query_getParticipantByAddress_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query_getParticipantByNitroAddress(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query_getParticipantByNitroAddress(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 ec.resolvers.Query().GetParticipantByNitroAddress(rctx, fc.Args["nitroAddress"].(string))
|
||||
})
|
||||
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.(*Participant)
|
||||
fc.Result = res
|
||||
return ec.marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx, field.Selections, res)
|
||||
}
|
||||
|
||||
func (ec *executionContext) fieldContext_Query_getParticipantByNitroAddress(ctx context.Context, field graphql.CollectedField) (fc *graphql.FieldContext, err error) {
|
||||
fc = &graphql.FieldContext{
|
||||
Object: "Query",
|
||||
Field: field,
|
||||
IsMethod: true,
|
||||
IsResolver: true,
|
||||
Child: func(ctx context.Context, field graphql.CollectedField) (*graphql.FieldContext, error) {
|
||||
switch field.Name {
|
||||
case "cosmosAddress":
|
||||
return ec.fieldContext_Participant_cosmosAddress(ctx, field)
|
||||
case "nitroAddress":
|
||||
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)
|
||||
},
|
||||
}
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
err = ec.Recover(ctx, r)
|
||||
ec.Error(ctx, err)
|
||||
}
|
||||
}()
|
||||
ctx = graphql.WithFieldContext(ctx, fc)
|
||||
if fc.Args, err = ec.field_Query_getParticipantByNitroAddress_args(ctx, field.ArgumentMap(ec.Variables)); err != nil {
|
||||
ec.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
return fc, nil
|
||||
}
|
||||
|
||||
func (ec *executionContext) _Query___type(ctx context.Context, field graphql.CollectedField) (ret graphql.Marshaler) {
|
||||
fc, err := ec.fieldContext_Query___type(ctx, field)
|
||||
if err != nil {
|
||||
@@ -8327,6 +8851,41 @@ func (ec *executionContext) _AuctionBid(ctx context.Context, sel ast.SelectionSe
|
||||
return out
|
||||
}
|
||||
|
||||
var authorityImplementors = []string{"Authority"}
|
||||
|
||||
func (ec *executionContext) _Authority(ctx context.Context, sel ast.SelectionSet, obj *Authority) graphql.Marshaler {
|
||||
fields := graphql.CollectFields(ec.OperationContext, sel, authorityImplementors)
|
||||
out := graphql.NewFieldSet(fields)
|
||||
var invalids uint32
|
||||
for i, field := range fields {
|
||||
switch field.Name {
|
||||
case "__typename":
|
||||
out.Values[i] = graphql.MarshalString("Authority")
|
||||
case "name":
|
||||
|
||||
out.Values[i] = ec._Authority_name(ctx, field, obj)
|
||||
|
||||
if out.Values[i] == graphql.Null {
|
||||
invalids++
|
||||
}
|
||||
case "entry":
|
||||
|
||||
out.Values[i] = ec._Authority_entry(ctx, field, obj)
|
||||
|
||||
if out.Values[i] == graphql.Null {
|
||||
invalids++
|
||||
}
|
||||
default:
|
||||
panic("unknown field " + strconv.Quote(field.Name))
|
||||
}
|
||||
}
|
||||
out.Dispatch()
|
||||
if invalids > 0 {
|
||||
return graphql.Null
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
var authorityRecordImplementors = []string{"AuthorityRecord"}
|
||||
|
||||
func (ec *executionContext) _AuthorityRecord(ctx context.Context, sel ast.SelectionSet, obj *AuthorityRecord) graphql.Marshaler {
|
||||
@@ -8798,6 +9357,20 @@ func (ec *executionContext) _Participant(ctx context.Context, sel ast.SelectionS
|
||||
|
||||
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 {
|
||||
invalids++
|
||||
}
|
||||
@@ -9013,6 +9586,26 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||
}
|
||||
|
||||
out.Concurrently(i, func() graphql.Marshaler {
|
||||
return rrm(innerCtx)
|
||||
})
|
||||
case "getAuthorities":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
}
|
||||
}()
|
||||
res = ec._Query_getAuthorities(ctx, field)
|
||||
return res
|
||||
}
|
||||
|
||||
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||
}
|
||||
|
||||
out.Concurrently(i, func() graphql.Marshaler {
|
||||
return rrm(innerCtx)
|
||||
})
|
||||
@@ -9125,6 +9718,52 @@ func (ec *executionContext) _Query(ctx context.Context, sel ast.SelectionSet) gr
|
||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||
}
|
||||
|
||||
out.Concurrently(i, func() graphql.Marshaler {
|
||||
return rrm(innerCtx)
|
||||
})
|
||||
case "getParticipantByAddress":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
}
|
||||
}()
|
||||
res = ec._Query_getParticipantByAddress(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||
}
|
||||
|
||||
out.Concurrently(i, func() graphql.Marshaler {
|
||||
return rrm(innerCtx)
|
||||
})
|
||||
case "getParticipantByNitroAddress":
|
||||
field := field
|
||||
|
||||
innerFunc := func(ctx context.Context) (res graphql.Marshaler) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
}
|
||||
}()
|
||||
res = ec._Query_getParticipantByNitroAddress(ctx, field)
|
||||
if res == graphql.Null {
|
||||
atomic.AddUint32(&invalids, 1)
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
rrm := func(ctx context.Context) graphql.Marshaler {
|
||||
return ec.OperationContext.RootResolverMiddleware(ctx, innerFunc)
|
||||
}
|
||||
|
||||
out.Concurrently(i, func() graphql.Marshaler {
|
||||
return rrm(innerCtx)
|
||||
})
|
||||
@@ -9813,6 +10452,16 @@ func (ec *executionContext) marshalNAuthorityRecord2ᚕᚖgitᚗvdbᚗtoᚋcerc
|
||||
return ret
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v *AuthorityRecord) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._AuthorityRecord(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNBond2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐBond(ctx context.Context, sel ast.SelectionSet, v *Bond) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
@@ -9951,6 +10600,10 @@ func (ec *executionContext) marshalNNodeInfo2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlac
|
||||
return ec._NodeInfo(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNParticipant2gitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v Participant) graphql.Marshaler {
|
||||
return ec._Participant(ctx, sel, &v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v []*Participant) graphql.Marshaler {
|
||||
ret := make(graphql.Array, len(v))
|
||||
var wg sync.WaitGroup
|
||||
@@ -9989,6 +10642,16 @@ func (ec *executionContext) marshalNParticipant2ᚕᚖgitᚗvdbᚗtoᚋcercᚑio
|
||||
return ret
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNParticipant2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐParticipant(ctx context.Context, sel ast.SelectionSet, v *Participant) graphql.Marshaler {
|
||||
if v == nil {
|
||||
if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) {
|
||||
ec.Errorf(ctx, "the requested element is null which the schema does not allow")
|
||||
}
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._Participant(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalNRecord2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐRecord(ctx context.Context, sel ast.SelectionSet, v []*Record) graphql.Marshaler {
|
||||
ret := make(graphql.Array, len(v))
|
||||
var wg sync.WaitGroup
|
||||
@@ -10586,6 +11249,54 @@ func (ec *executionContext) marshalOAuctionBid2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋl
|
||||
return ec._AuctionBid(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOAuthority2ᚕᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx context.Context, sel ast.SelectionSet, v []*Authority) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
ret := make(graphql.Array, len(v))
|
||||
var wg sync.WaitGroup
|
||||
isLen1 := len(v) == 1
|
||||
if !isLen1 {
|
||||
wg.Add(len(v))
|
||||
}
|
||||
for i := range v {
|
||||
i := i
|
||||
fc := &graphql.FieldContext{
|
||||
Index: &i,
|
||||
Result: &v[i],
|
||||
}
|
||||
ctx := graphql.WithFieldContext(ctx, fc)
|
||||
f := func(i int) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
ec.Error(ctx, ec.Recover(ctx, r))
|
||||
ret = nil
|
||||
}
|
||||
}()
|
||||
if !isLen1 {
|
||||
defer wg.Done()
|
||||
}
|
||||
ret[i] = ec.marshalOAuthority2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx, sel, v[i])
|
||||
}
|
||||
if isLen1 {
|
||||
f(i)
|
||||
} else {
|
||||
go f(i)
|
||||
}
|
||||
|
||||
}
|
||||
wg.Wait()
|
||||
|
||||
return ret
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOAuthority2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthority(ctx context.Context, sel ast.SelectionSet, v *Authority) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
}
|
||||
return ec._Authority(ctx, sel, v)
|
||||
}
|
||||
|
||||
func (ec *executionContext) marshalOAuthorityRecord2ᚖgitᚗvdbᚗtoᚋcercᚑioᚋlaconicdᚋgqlᚐAuthorityRecord(ctx context.Context, sel ast.SelectionSet, v *AuthorityRecord) graphql.Marshaler {
|
||||
if v == nil {
|
||||
return graphql.Null
|
||||
|
||||
@@ -52,6 +52,11 @@ type AuctionBid struct {
|
||||
BidAmount *Coin `json:"bidAmount"`
|
||||
}
|
||||
|
||||
type Authority struct {
|
||||
Name string `json:"name"`
|
||||
Entry *AuthorityRecord `json:"entry"`
|
||||
}
|
||||
|
||||
type AuthorityRecord struct {
|
||||
OwnerAddress string `json:"ownerAddress"`
|
||||
OwnerPublicKey string `json:"ownerPublicKey"`
|
||||
@@ -138,6 +143,8 @@ type OwnerBonds struct {
|
||||
type Participant struct {
|
||||
CosmosAddress string `json:"cosmosAddress"`
|
||||
NitroAddress string `json:"nitroAddress"`
|
||||
Role string `json:"role"`
|
||||
KycID string `json:"kycId"`
|
||||
}
|
||||
|
||||
type PeerInfo struct {
|
||||
|
||||
+77
-20
@@ -8,6 +8,7 @@ import (
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
types "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/types/query"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
|
||||
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
|
||||
|
||||
@@ -35,6 +36,36 @@ func (r *Resolver) Query() QueryResolver {
|
||||
|
||||
type queryResolver struct{ *Resolver }
|
||||
|
||||
func (q queryResolver) GetAuthorities(ctx context.Context, owner *string) ([]*Authority, error) {
|
||||
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||
auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
|
||||
|
||||
authoritiesReq := ®istrytypes.QueryAuthoritiesRequest{}
|
||||
if owner != nil {
|
||||
authoritiesReq.Owner = *owner
|
||||
}
|
||||
|
||||
authoritiesResp, err := nsQueryClient.Authorities(ctx, authoritiesReq)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
authorities := make([]*Authority, len(authoritiesResp.GetAuthorities()))
|
||||
for i, a := range authoritiesResp.Authorities {
|
||||
entry, err := getAuthorityRecord(*a.Entry, auctionQueryClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
authorities[i] = &Authority{
|
||||
Name: a.Name,
|
||||
Entry: entry,
|
||||
}
|
||||
}
|
||||
|
||||
return authorities, nil
|
||||
}
|
||||
|
||||
func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([]*AuthorityRecord, error) {
|
||||
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||
auctionQueryClient := auctiontypes.NewQueryClient(q.ctx)
|
||||
@@ -52,29 +83,11 @@ func (q queryResolver) LookupAuthorities(ctx context.Context, names []string) ([
|
||||
}
|
||||
|
||||
nameAuthority := res.GetNameAuthority()
|
||||
gqlNameAuthorityRecord, err := GetGQLNameAuthorityRecord(&nameAuthority)
|
||||
gqlNameAuthorityRecord, err := getAuthorityRecord(nameAuthority, auctionQueryClient)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if nameAuthority.AuctionId != "" {
|
||||
auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.QueryGetAuctionRequest{Id: nameAuthority.GetAuctionId()})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bidsResp, err := auctionQueryClient.GetBids(context.Background(), &auctiontypes.QueryGetBidsRequest{AuctionId: nameAuthority.GetAuctionId()})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gqlAuctionRecord, err := GetGQLAuction(auctionResp.GetAuction(), bidsResp.GetBids())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gqlNameAuthorityRecord.Auction = gqlAuctionRecord
|
||||
}
|
||||
|
||||
gqlResponse = append(gqlResponse, gqlNameAuthorityRecord)
|
||||
}
|
||||
|
||||
@@ -124,14 +137,20 @@ func (q queryResolver) LookupNames(ctx context.Context, names []string) ([]*Name
|
||||
return gqlResponse, nil
|
||||
}
|
||||
|
||||
func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool) ([]*Record, error) {
|
||||
func (q queryResolver) QueryRecords(ctx context.Context, attributes []*KeyValueInput, all *bool, limit *int, offset *int) ([]*Record, error) {
|
||||
nsQueryClient := registrytypes.NewQueryClient(q.ctx)
|
||||
|
||||
pagination := &query.PageRequest{
|
||||
Limit: uint64(*limit),
|
||||
Offset: uint64(*offset),
|
||||
}
|
||||
|
||||
res, err := nsQueryClient.Records(
|
||||
context.Background(),
|
||||
®istrytypes.QueryRecordsRequest{
|
||||
Attributes: toRPCAttributes(attributes),
|
||||
All: (all != nil && *all),
|
||||
Pagination: pagination,
|
||||
},
|
||||
)
|
||||
if err != nil {
|
||||
@@ -373,8 +392,46 @@ func (q queryResolver) GetParticipants(ctx context.Context) ([]*Participant, err
|
||||
participants[i] = &Participant{
|
||||
CosmosAddress: p.CosmosAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
}
|
||||
}
|
||||
|
||||
return participants, nil
|
||||
}
|
||||
|
||||
func (q queryResolver) GetParticipantByAddress(ctx context.Context, address string) (*Participant, error) {
|
||||
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
|
||||
participantResp, err := onboardingQueryClient.GetParticipantByAddress(ctx, &onboardingTypes.QueryGetParticipantByAddressRequest{Address: address})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p := participantResp.Participant
|
||||
participant := &Participant{
|
||||
CosmosAddress: p.CosmosAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
}
|
||||
|
||||
return participant, nil
|
||||
}
|
||||
|
||||
func (q queryResolver) GetParticipantByNitroAddress(ctx context.Context, nitroAddress string) (*Participant, error) {
|
||||
onboardingQueryClient := onboardingTypes.NewQueryClient(q.ctx)
|
||||
participantResp, err := onboardingQueryClient.GetParticipantByNitroAddress(ctx, &onboardingTypes.QueryGetParticipantByNitroAddressRequest{NitroAddress: nitroAddress})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
p := participantResp.Participant
|
||||
participant := &Participant{
|
||||
CosmosAddress: p.CosmosAddress,
|
||||
NitroAddress: p.NitroAddress,
|
||||
Role: p.Role,
|
||||
KycID: p.KycId,
|
||||
}
|
||||
|
||||
return participant, nil
|
||||
}
|
||||
|
||||
+27
@@ -303,3 +303,30 @@ func toRPCAttributes(attrs []*KeyValueInput) []*registrytypes.QueryRecordsReques
|
||||
|
||||
return kvPairs
|
||||
}
|
||||
|
||||
func getAuthorityRecord(nameAuthority registrytypes.NameAuthority, auctionQueryClient auctiontypes.QueryClient) (*AuthorityRecord, error) {
|
||||
gqlNameAuthorityRecord, err := GetGQLNameAuthorityRecord(&nameAuthority)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if nameAuthority.AuctionId != "" {
|
||||
auctionResp, err := auctionQueryClient.GetAuction(context.Background(), &auctiontypes.QueryGetAuctionRequest{Id: nameAuthority.GetAuctionId()})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bidsResp, err := auctionQueryClient.GetBids(context.Background(), &auctiontypes.QueryGetBidsRequest{AuctionId: nameAuthority.GetAuctionId()})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gqlAuctionRecord, err := GetGQLAuction(auctionResp.GetAuction(), bidsResp.GetBids())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
gqlNameAuthorityRecord.Auction = gqlAuctionRecord
|
||||
}
|
||||
|
||||
return gqlNameAuthorityRecord, nil
|
||||
}
|
||||
|
||||
@@ -16,14 +16,24 @@ message Params {
|
||||
// Participant defines the data that will be stored for each enrolled
|
||||
// participant
|
||||
message Participant {
|
||||
// participant's cosmos (laconic) address
|
||||
string cosmos_address = 1
|
||||
[ (gogoproto.moretags) =
|
||||
"json:\"cosmos_address\" yaml:\"cosmos_address\"" ];
|
||||
|
||||
// participant's Nitro address
|
||||
string nitro_address = 2
|
||||
[ (gogoproto.moretags) =
|
||||
"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
|
||||
message EthPayload {
|
||||
string address = 1
|
||||
|
||||
@@ -16,6 +16,19 @@ service Query {
|
||||
returns (QueryParticipantsResponse) {
|
||||
option (google.api.http).get = "/cerc/onboarding/v1/participants";
|
||||
}
|
||||
|
||||
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||
rpc GetParticipantByAddress(QueryGetParticipantByAddressRequest)
|
||||
returns (QueryGetParticipantByAddressResponse) {
|
||||
option (google.api.http).get = "/cerc/onboarding/v1/participants/{address}";
|
||||
}
|
||||
|
||||
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||
rpc GetParticipantByNitroAddress(QueryGetParticipantByNitroAddressRequest)
|
||||
returns (QueryGetParticipantByNitroAddressResponse) {
|
||||
option (google.api.http).get =
|
||||
"/cerc/onboarding/v1/participants/{nitro_address}";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParticipantsRequest queries participants
|
||||
@@ -24,7 +37,7 @@ message QueryParticipantsRequest {
|
||||
cosmos.base.query.v1beta1.PageRequest pagination = 1;
|
||||
}
|
||||
|
||||
// QueryParticipantsResponse is response type for get the participants
|
||||
// QueryParticipantsResponse is response type for querying the participants
|
||||
message QueryParticipantsResponse {
|
||||
repeated Participant participants = 1
|
||||
[ (gogoproto.moretags) = "json:\"participants\" yaml:\"participants\"" ];
|
||||
@@ -32,3 +45,31 @@ message QueryParticipantsResponse {
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryGetParticipantByAddressRequest queries participant by the laconic
|
||||
// address
|
||||
message QueryGetParticipantByAddressRequest {
|
||||
// Laconic address
|
||||
string address = 1;
|
||||
}
|
||||
|
||||
// QueryGetParticipantByAddressResponse is response type for querying
|
||||
// participant by the laconic address
|
||||
message QueryGetParticipantByAddressResponse {
|
||||
// Participant details
|
||||
Participant participant = 1;
|
||||
}
|
||||
|
||||
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
|
||||
// address
|
||||
message QueryGetParticipantByNitroAddressRequest {
|
||||
// Nitro address
|
||||
string nitro_address = 1;
|
||||
}
|
||||
|
||||
// QueryGetParticipantByNitroAddressResponse is response type for querying
|
||||
// participant by the nitro address
|
||||
message QueryGetParticipantByNitroAddressResponse {
|
||||
// Participant details
|
||||
Participant participant = 1;
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ message MsgOnboardParticipant {
|
||||
string participant = 1;
|
||||
EthPayload eth_payload = 2 [ (gogoproto.nullable) = false ];
|
||||
string eth_signature = 3;
|
||||
string role = 4;
|
||||
string kyc_id = 5;
|
||||
}
|
||||
|
||||
// MsgOnboardParticipantResponse defines the Msg/OnboardParticipant response
|
||||
|
||||
@@ -58,6 +58,11 @@ service Query {
|
||||
returns (QueryGetRegistryModuleBalanceResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/balance";
|
||||
}
|
||||
|
||||
// Authorities queries all authorities
|
||||
rpc Authorities(QueryAuthoritiesRequest) returns (QueryAuthoritiesResponse) {
|
||||
option (google.api.http).get = "/cerc/registry/v1/authorities";
|
||||
}
|
||||
}
|
||||
|
||||
// QueryParamsRequest is request type for registry params
|
||||
@@ -152,6 +157,16 @@ message QueryWhoisResponse {
|
||||
];
|
||||
}
|
||||
|
||||
// QueryAuthoritiesRequest is request type to get all authorities
|
||||
message QueryAuthoritiesRequest { string owner = 1; }
|
||||
|
||||
// QueryAuthoritiesResponse is response type for authorities request
|
||||
message QueryAuthoritiesResponse {
|
||||
repeated AuthorityEntry authorities = 1 [ (gogoproto.nullable) = false ];
|
||||
// pagination defines the pagination in the response.
|
||||
cosmos.base.query.v1beta1.PageResponse pagination = 2;
|
||||
}
|
||||
|
||||
// QueryLookupLrnRequest is request type for LookupLrn
|
||||
message QueryLookupLrnRequest { string lrn = 1; }
|
||||
|
||||
|
||||
+40
-9
@@ -1,10 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
KEY="alice"
|
||||
CHAINID="laconic_9000-1"
|
||||
MONIKER="localtestnet"
|
||||
KEYRING="test"
|
||||
LOGLEVEL="${LOGLEVEL:-info}"
|
||||
CHAINID=${CHAINID:-"laconic_9000-1"}
|
||||
MONIKER=${MONIKER:-"localtestnet"}
|
||||
KEYRING=${KEYRING:-"test"}
|
||||
DENOM=${DENOM:-"alnt"}
|
||||
STAKING_AMOUNT=${STAKING_AMOUNT:-"1000000000000000"}
|
||||
LOGLEVEL=${LOGLEVEL:-"info"}
|
||||
|
||||
input_genesis_file=${GENESIS_FILE}
|
||||
|
||||
if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
# validate dependencies are installed
|
||||
@@ -27,7 +31,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
laconicd keys add $KEY --keyring-backend $KEYRING
|
||||
|
||||
# Set moniker and chain-id for Ethermint (Moniker can be anything, chain-id must be an integer)
|
||||
laconicd init $MONIKER --chain-id $CHAINID --default-denom photon
|
||||
laconicd init $MONIKER --chain-id $CHAINID --default-denom $DENOM
|
||||
|
||||
if [[ -f ${input_genesis_file} ]]; then
|
||||
# Use provided genesis config
|
||||
cp $input_genesis_file $HOME/.laconicd/config/genesis.json
|
||||
fi
|
||||
|
||||
update_genesis() {
|
||||
jq "$1" $HOME/.laconicd/config/genesis.json > $HOME/.laconicd/config/tmp_genesis.json &&
|
||||
@@ -58,6 +67,26 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
update_genesis '.app_state["onboarding"]["params"]["onboarding_enabled"]=true'
|
||||
fi
|
||||
|
||||
if [[ "$AUTHORITY_AUCTION_ENABLED" == "true" ]]; then
|
||||
echo "Enabling authority auctions."
|
||||
update_genesis '.app_state["registry"]["params"]["authority_auction_enabled"]=true'
|
||||
fi
|
||||
|
||||
if [[ -n $AUTHORITY_AUCTION_COMMITS_DURATION ]]; then
|
||||
echo "Setting authority_auction_commits_duration to $AUTHORITY_AUCTION_COMMITS_DURATION seconds."
|
||||
update_genesis ".app_state[\"registry\"][\"params\"][\"authority_auction_commits_duration\"]=\"${AUTHORITY_AUCTION_COMMITS_DURATION}s\""
|
||||
fi
|
||||
|
||||
if [[ -n $AUTHORITY_AUCTION_REVEALS_DURATION ]]; then
|
||||
echo "Setting authority_auction_reveals_duration to $AUTHORITY_AUCTION_REVEALS_DURATION seconds."
|
||||
update_genesis ".app_state[\"registry\"][\"params\"][\"authority_auction_reveals_duration\"]=\"${AUTHORITY_AUCTION_REVEALS_DURATION}s\""
|
||||
fi
|
||||
|
||||
if [[ -n $AUTHORITY_GRACE_PERIOD ]]; then
|
||||
echo "Setting authority_grace_period to $AUTHORITY_GRACE_PERIOD seconds."
|
||||
update_genesis ".app_state[\"registry\"][\"params\"][\"authority_grace_period\"]=\"${AUTHORITY_GRACE_PERIOD}s\""
|
||||
fi
|
||||
|
||||
# increase block time (?)
|
||||
update_genesis '.consensus["params"]["block"]["time_iota_ms"]="1000"'
|
||||
|
||||
@@ -70,7 +99,7 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
else
|
||||
sed -i 's/create_empty_blocks = true/create_empty_blocks = false/g' $HOME/.laconicd/config/config.toml
|
||||
fi
|
||||
|
||||
|
||||
# Run this to allow requests from any origin
|
||||
sed -i 's/cors_allowed_origins.*$/cors_allowed_origins = ["*"]/' $HOME/.laconicd/config/config.toml
|
||||
|
||||
@@ -86,10 +115,12 @@ if [ "$1" == "clean" ] || [ ! -d "$HOME/.laconicd/data/blockstore.db" ]; then
|
||||
fi
|
||||
|
||||
# Allocate genesis accounts (cosmos formatted addresses)
|
||||
laconicd genesis add-genesis-account $KEY 100000000000000000000000000photon --keyring-backend $KEYRING
|
||||
# 10^30 alnt | 10^12 lnt
|
||||
laconicd genesis add-genesis-account $KEY 1000000000000000000000000000000$DENOM --keyring-backend $KEYRING
|
||||
|
||||
# Sign genesis transaction
|
||||
laconicd genesis gentx $KEY 1000000000000000000000photon --keyring-backend $KEYRING --chain-id $CHAINID
|
||||
# 10^15 alnt
|
||||
laconicd genesis gentx $KEY $STAKING_AMOUNT$DENOM --keyring-backend $KEYRING --chain-id $CHAINID
|
||||
|
||||
# Collect genesis tx
|
||||
laconicd genesis collect-gentxs
|
||||
@@ -104,7 +135,7 @@ fi
|
||||
laconicd start \
|
||||
--pruning=nothing \
|
||||
--log_level $LOGLEVEL \
|
||||
--minimum-gas-prices=0.0001photon \
|
||||
--minimum-gas-prices=1$DENOM \
|
||||
--api.enable \
|
||||
--rpc.laddr="tcp://0.0.0.0:26657" \
|
||||
--gql-server --gql-playground
|
||||
|
||||
@@ -324,7 +324,7 @@ func (kts *KeeperTestSuite) createAuctionAndCommitBid(commitBid bool) (*types.Au
|
||||
}
|
||||
|
||||
// Create funded account(s)
|
||||
accounts := simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, accCount, math.NewInt(100))
|
||||
accounts := simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, accCount, math.NewInt(1000000))
|
||||
|
||||
params, err := k.GetParams(ctx)
|
||||
if err != nil {
|
||||
|
||||
@@ -49,7 +49,7 @@ func (kts *KeeperTestSuite) createBond() (*bondTypes.Bond, error) {
|
||||
ctx := kts.SdkCtx
|
||||
|
||||
// Create a funded account
|
||||
kts.accounts = simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, 1, math.NewInt(100000000000))
|
||||
kts.accounts = simtestutil.AddTestAddrs(kts.BankKeeper, integrationTest.BondDenomProvider{}, ctx, 1, math.NewInt(1000000000000))
|
||||
|
||||
bond, err := kts.BondKeeper.CreateBond(ctx, kts.accounts[0], sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(1000000000))))
|
||||
if err != nil {
|
||||
|
||||
+7
-6
@@ -13,9 +13,10 @@ import (
|
||||
var (
|
||||
DefaultCommitsDuration = 5 * time.Minute
|
||||
DefaultRevealsDuration = 5 * time.Minute
|
||||
DefaultCommitFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
||||
DefaultRevealFee = sdk.Coin{Amount: sdkmath.NewInt(10), Denom: sdk.DefaultBondDenom}
|
||||
DefaultMinimumBid = sdk.Coin{Amount: sdkmath.NewInt(1000), Denom: sdk.DefaultBondDenom}
|
||||
|
||||
DefaultCommitFee = sdkmath.NewInt(1000) // 10^3 alnt
|
||||
DefaultRevealFee = sdkmath.NewInt(1000) // 10^3 alnt
|
||||
DefaultMinimumBid = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
)
|
||||
|
||||
func NewParams(commitsDuration time.Duration, revealsDuration time.Duration, commitFee sdk.Coin, revealFee sdk.Coin, minimumBid sdk.Coin) Params {
|
||||
@@ -33,9 +34,9 @@ func DefaultParams() Params {
|
||||
return Params{
|
||||
CommitsDuration: DefaultCommitsDuration,
|
||||
RevealsDuration: DefaultRevealsDuration,
|
||||
CommitFee: DefaultCommitFee,
|
||||
RevealFee: DefaultRevealFee,
|
||||
MinimumBid: DefaultMinimumBid,
|
||||
CommitFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultCommitFee),
|
||||
RevealFee: sdk.NewCoin(sdk.DefaultBondDenom, DefaultRevealFee),
|
||||
MinimumBid: sdk.NewCoin(sdk.DefaultBondDenom, DefaultMinimumBid),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import (
|
||||
)
|
||||
|
||||
// DefaultMaxBondAmountTokens are the default parameter values.
|
||||
var DefaultMaxBondAmountTokens = sdkmath.NewInt(100000000000)
|
||||
var DefaultMaxBondAmountTokens = sdkmath.NewInt(1000000000000) // 10^12 alnt
|
||||
|
||||
func NewParams(maxBondAmount sdk.Coin) Params {
|
||||
return Params{MaxBondAmount: maxBondAmount}
|
||||
|
||||
@@ -2,6 +2,7 @@ package keeper
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
"cosmossdk.io/collections"
|
||||
@@ -100,6 +101,8 @@ func (k Keeper) OnboardParticipant(
|
||||
participant := &onboardingTypes.Participant{
|
||||
CosmosAddress: signerAddress.String(),
|
||||
NitroAddress: nitroAddress,
|
||||
Role: msg.Role,
|
||||
KycId: msg.KycId,
|
||||
}
|
||||
|
||||
if err := k.StoreParticipant(ctx, participant); err != nil {
|
||||
@@ -134,3 +137,35 @@ func (k Keeper) ListParticipants(ctx sdk.Context) ([]*onboardingTypes.Participan
|
||||
|
||||
return participants, nil
|
||||
}
|
||||
|
||||
// GetParticipantByAddress - get participant by cosmos (laconic) address.
|
||||
func (k Keeper) GetParticipantByAddress(ctx sdk.Context, address string) (onboardingTypes.Participant, error) {
|
||||
participant, err := k.Participants.Get(ctx, address)
|
||||
if err != nil {
|
||||
if errors.Is(err, collections.ErrNotFound) {
|
||||
return onboardingTypes.Participant{}, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "participant with given address not found.")
|
||||
}
|
||||
return onboardingTypes.Participant{}, err
|
||||
}
|
||||
|
||||
return participant, nil
|
||||
}
|
||||
|
||||
// GetParticipantByNitroAddress - get participant by nitro address.
|
||||
func (k Keeper) GetParticipantByNitroAddress(ctx sdk.Context, nitroAddress string) (onboardingTypes.Participant, error) {
|
||||
var participant onboardingTypes.Participant
|
||||
|
||||
err := k.Participants.Walk(ctx, nil, func(key string, value onboardingTypes.Participant) (bool, error) {
|
||||
if value.NitroAddress == nitroAddress {
|
||||
participant = value
|
||||
return true, nil
|
||||
}
|
||||
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return onboardingTypes.Participant{}, err
|
||||
}
|
||||
|
||||
return participant, nil
|
||||
}
|
||||
|
||||
@@ -3,7 +3,9 @@ package keeper
|
||||
import (
|
||||
"context"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
|
||||
onboardingtypes "git.vdb.to/cerc-io/laconicd/x/onboarding"
|
||||
)
|
||||
@@ -33,3 +35,41 @@ func (qs queryServer) Participants(
|
||||
|
||||
return &onboardingtypes.QueryParticipantsResponse{Participants: resp}, nil
|
||||
}
|
||||
|
||||
// GetParticipantByAddress implements the GetParticipantByAddress query.
|
||||
func (qs queryServer) GetParticipantByAddress(
|
||||
c context.Context,
|
||||
req *onboardingtypes.QueryGetParticipantByAddressRequest,
|
||||
) (*onboardingtypes.QueryGetParticipantByAddressResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
||||
if req.Address == "" {
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "cosmos (laconic) address is required")
|
||||
}
|
||||
|
||||
participant, err := qs.k.GetParticipantByAddress(ctx, req.Address)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &onboardingtypes.QueryGetParticipantByAddressResponse{Participant: &participant}, nil
|
||||
}
|
||||
|
||||
// GetParticipantByNitroAddress implements the GetParticipantByNitroAddress query.
|
||||
func (qs queryServer) GetParticipantByNitroAddress(
|
||||
c context.Context,
|
||||
req *onboardingtypes.QueryGetParticipantByNitroAddressRequest,
|
||||
) (*onboardingtypes.QueryGetParticipantByNitroAddressResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
||||
if req.NitroAddress == "" {
|
||||
return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "nitro address is required")
|
||||
}
|
||||
|
||||
participant, err := qs.k.GetParticipantByNitroAddress(ctx, req.NitroAddress)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return &onboardingtypes.QueryGetParticipantByNitroAddressResponse{Participant: &participant}, nil
|
||||
}
|
||||
|
||||
@@ -18,6 +18,22 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
Short: "List participants",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{},
|
||||
},
|
||||
{
|
||||
RpcMethod: "GetParticipantByAddress",
|
||||
Use: "get-by-address [address]",
|
||||
Short: "Get participant by address",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "address"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "GetParticipantByNitroAddress",
|
||||
Use: "get-by-nitro-address [nitro_address]",
|
||||
Short: "Get participant by nitro address",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "nitro_address"},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
// TODO: Use JSON file for input
|
||||
@@ -26,11 +42,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
RpcCommandOptions: []*autocliv1.RpcCommandOptions{
|
||||
{
|
||||
RpcMethod: "OnboardParticipant",
|
||||
Use: "enroll",
|
||||
Use: "enroll [eth_payload] [eth_signature] [role] [kyc_id]",
|
||||
Short: "Enroll a testnet validator",
|
||||
PositionalArgs: []*autocliv1.PositionalArgDescriptor{
|
||||
{ProtoField: "eth_payload"},
|
||||
{ProtoField: "eth_signature"},
|
||||
{ProtoField: "role"},
|
||||
{ProtoField: "kyc_id"},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
+21
-1
@@ -1,11 +1,15 @@
|
||||
package onboarding
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
errorsmod "cosmossdk.io/errors"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
|
||||
)
|
||||
|
||||
var PERMITTED_ROLES = []string{"participant", "validator"}
|
||||
|
||||
var _ sdk.Msg = &MsgOnboardParticipant{}
|
||||
|
||||
func (msg MsgOnboardParticipant) ValidateBasic() error {
|
||||
@@ -18,7 +22,23 @@ func (msg MsgOnboardParticipant) ValidateBasic() error {
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
+133
-24
@@ -71,8 +71,14 @@ func (m *Params) GetOnboardingEnabled() bool {
|
||||
// Participant defines the data that will be stored for each enrolled
|
||||
// participant
|
||||
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"`
|
||||
NitroAddress string `protobuf:"bytes,2,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty" json:"nitro_address" yaml:"nitro_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"`
|
||||
// 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{} }
|
||||
@@ -122,6 +128,20 @@ func (m *Participant) GetNitroAddress() string {
|
||||
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
|
||||
type EthPayload struct {
|
||||
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{
|
||||
// 343 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xcf, 0x4a, 0xc3, 0x30,
|
||||
0x1c, 0xc7, 0x57, 0x85, 0xa9, 0xd1, 0x09, 0x06, 0x05, 0x15, 0x6c, 0x67, 0xbd, 0x4c, 0xc6, 0x5a,
|
||||
0xc6, 0x0e, 0x82, 0x9e, 0x2c, 0xec, 0x3e, 0x7a, 0xf0, 0xe0, 0x65, 0xa4, 0x7f, 0xac, 0x91, 0x36,
|
||||
0xbf, 0x91, 0x84, 0xe2, 0xde, 0xc2, 0xd7, 0xf1, 0x0d, 0x3c, 0xee, 0xe8, 0xa9, 0xc8, 0xf6, 0x06,
|
||||
0x7d, 0x02, 0x69, 0xb3, 0x6e, 0xeb, 0xf4, 0x96, 0xdf, 0xf7, 0xcf, 0xe7, 0x17, 0x48, 0xd0, 0x8d,
|
||||
0x1f, 0x72, 0xdf, 0x06, 0xe6, 0x01, 0xe1, 0x01, 0x65, 0x91, 0x9d, 0xf6, 0x37, 0x26, 0x6b, 0xc2,
|
||||
0x41, 0x02, 0xc6, 0x45, 0xc8, 0xda, 0x90, 0xd3, 0xfe, 0xe5, 0x69, 0x04, 0x11, 0x94, 0xb6, 0x5d,
|
||||
0x9c, 0x54, 0xd2, 0x9c, 0xa0, 0xe6, 0x88, 0x70, 0x92, 0x08, 0xfc, 0x82, 0xf0, 0xba, 0x30, 0x0e,
|
||||
0x19, 0xf1, 0xe2, 0x30, 0x38, 0xd7, 0xda, 0x5a, 0x67, 0xdf, 0xb9, 0xcb, 0x33, 0x63, 0xf0, 0x26,
|
||||
0x80, 0xdd, 0x9b, 0x7f, 0x33, 0x66, 0x7b, 0x4a, 0x92, 0xf8, 0x5f, 0xc7, 0x3d, 0x59, 0x8b, 0xc3,
|
||||
0xa5, 0xf6, 0xa9, 0xa1, 0xc3, 0x11, 0xe1, 0x92, 0xfa, 0x74, 0x42, 0x98, 0xc4, 0x4f, 0xe8, 0xd8,
|
||||
0x07, 0x91, 0x80, 0x18, 0x93, 0x20, 0xe0, 0xa1, 0x10, 0xe5, 0xce, 0x03, 0xc7, 0xce, 0x33, 0xa3,
|
||||
0xab, 0x76, 0xd6, 0xfd, 0x6a, 0xdf, 0x96, 0xea, 0xb6, 0x94, 0xf0, 0xa8, 0x66, 0xec, 0xa2, 0x16,
|
||||
0xa3, 0x92, 0xc3, 0x0a, 0xbb, 0x53, 0x62, 0x7b, 0x79, 0x66, 0xdc, 0x2a, 0x6c, 0xcd, 0xae, 0xa8,
|
||||
0x75, 0xd1, 0x3d, 0x2a, 0xe7, 0x25, 0xd3, 0x4c, 0x11, 0x1a, 0xca, 0xd7, 0x11, 0x99, 0xc6, 0x40,
|
||||
0x02, 0xfc, 0x80, 0xf6, 0xea, 0x57, 0xbe, 0xce, 0x33, 0xe3, 0x4a, 0xb1, 0xb7, 0xa8, 0x2b, 0x5e,
|
||||
0xd5, 0xc0, 0x5d, 0xb4, 0x9b, 0x88, 0x68, 0x79, 0xa9, 0x8b, 0x3c, 0x33, 0xce, 0x54, 0x31, 0x11,
|
||||
0x51, 0x55, 0x2a, 0x8e, 0x6e, 0x91, 0x72, 0x9c, 0xaf, 0xb9, 0xae, 0xcd, 0xe6, 0xba, 0xf6, 0x33,
|
||||
0xd7, 0xb5, 0x8f, 0x85, 0xde, 0x98, 0x2d, 0xf4, 0xc6, 0xf7, 0x42, 0x6f, 0x3c, 0x77, 0x22, 0x2a,
|
||||
0xad, 0x34, 0xf0, 0x2c, 0x09, 0x76, 0xf1, 0xe8, 0x3d, 0x0a, 0x76, 0x4c, 0x7c, 0x60, 0xd4, 0x0f,
|
||||
0xec, 0xf7, 0x8d, 0x9f, 0xe1, 0x35, 0xcb, 0x07, 0x1f, 0xfc, 0x06, 0x00, 0x00, 0xff, 0xff, 0x91,
|
||||
0x47, 0xeb, 0x34, 0x41, 0x02, 0x00, 0x00,
|
||||
// 399 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x92, 0xc1, 0xce, 0xd2, 0x40,
|
||||
0x14, 0x85, 0xe9, 0x0f, 0xa2, 0x8e, 0x62, 0xe2, 0x44, 0x23, 0x4a, 0xec, 0x60, 0xdd, 0x60, 0x08,
|
||||
0x9d, 0x10, 0x12, 0x4d, 0x74, 0x65, 0x13, 0x16, 0xee, 0x48, 0x17, 0x2e, 0xdc, 0x90, 0xe9, 0x4c,
|
||||
0xad, 0x23, 0x6d, 0x87, 0xcc, 0x34, 0x8d, 0x7d, 0x0b, 0x9f, 0xc1, 0xa7, 0x71, 0xc9, 0xd2, 0x55,
|
||||
0x63, 0xe0, 0x0d, 0xfa, 0x04, 0xa6, 0x33, 0x14, 0x28, 0xfe, 0xbb, 0x7b, 0xcf, 0x3d, 0xe7, 0xbb,
|
||||
0xd3, 0xe6, 0x82, 0xd7, 0x34, 0x94, 0x14, 0x8b, 0x34, 0x10, 0x44, 0x32, 0x9e, 0x46, 0x38, 0x9f,
|
||||
0x5f, 0x74, 0xee, 0x56, 0x8a, 0x4c, 0x40, 0x58, 0x9b, 0xdc, 0x0b, 0x39, 0x9f, 0xbf, 0x78, 0x12,
|
||||
0x89, 0x48, 0xe8, 0x31, 0xae, 0x2b, 0xe3, 0x74, 0xb6, 0xa0, 0xbf, 0x22, 0x92, 0x24, 0x0a, 0x7e,
|
||||
0x05, 0xf0, 0x1c, 0x58, 0x87, 0x29, 0x09, 0xe2, 0x90, 0x0d, 0xad, 0xb1, 0x35, 0xb9, 0xe7, 0xbd,
|
||||
0xab, 0x4a, 0xb4, 0xf8, 0xae, 0x44, 0xfa, 0xde, 0xf9, 0xdf, 0xe3, 0x8c, 0x0b, 0x92, 0xc4, 0xb7,
|
||||
0x4e, 0xfc, 0xc7, 0x67, 0x71, 0x79, 0xd4, 0x7e, 0xdd, 0x80, 0x07, 0x2b, 0x22, 0x33, 0x4e, 0xf9,
|
||||
0x96, 0xa4, 0x19, 0xfc, 0x0c, 0x1e, 0x51, 0xa1, 0x12, 0xa1, 0xd6, 0x84, 0x31, 0x19, 0x2a, 0xa5,
|
||||
0x77, 0xde, 0xf7, 0x70, 0x55, 0xa2, 0xa9, 0xd9, 0xd9, 0x9e, 0x37, 0xfb, 0xae, 0x54, 0x7f, 0x60,
|
||||
0x84, 0x8f, 0xa6, 0x87, 0x3e, 0x18, 0xa4, 0x3c, 0x93, 0xe2, 0x84, 0xbd, 0xd1, 0xd8, 0x59, 0x55,
|
||||
0xa2, 0x37, 0x06, 0xdb, 0x1a, 0x37, 0xd4, 0xb6, 0xe8, 0x3f, 0xd4, 0x7d, 0xc3, 0xc4, 0xa0, 0x27,
|
||||
0x45, 0x1c, 0x0e, 0xbb, 0x1a, 0x35, 0xaa, 0x4a, 0xf4, 0xcc, 0xa0, 0x6a, 0xb5, 0x21, 0xe8, 0xda,
|
||||
0xd7, 0x46, 0xf8, 0x16, 0xf4, 0x37, 0x05, 0x5d, 0x73, 0x36, 0xec, 0xe9, 0x08, 0xaa, 0x4a, 0x34,
|
||||
0x32, 0x11, 0xa3, 0x37, 0xa1, 0x63, 0xe7, 0xdf, 0xd9, 0x14, 0xf4, 0x13, 0x73, 0x72, 0x00, 0x96,
|
||||
0xd9, 0xb7, 0x15, 0x29, 0x62, 0x41, 0x18, 0xfc, 0x00, 0xee, 0xb6, 0xff, 0xcd, 0xab, 0xaa, 0x44,
|
||||
0x2f, 0x0d, 0xe6, 0xea, 0xf9, 0xa7, 0x87, 0x37, 0x09, 0x38, 0x05, 0xdd, 0x44, 0x45, 0xc7, 0xaf,
|
||||
0x7f, 0x5e, 0x95, 0xe8, 0xa9, 0x09, 0x26, 0x2a, 0x6a, 0x42, 0x75, 0xe9, 0xd7, 0x2e, 0xcf, 0xfb,
|
||||
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) {
|
||||
@@ -264,6 +287,20 @@ func (m *Participant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = 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 {
|
||||
i -= len(m.NitroAddress)
|
||||
copy(dAtA[i:], m.NitroAddress)
|
||||
@@ -355,6 +392,14 @@ func (m *Participant) Size() (n int) {
|
||||
if l > 0 {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -544,6 +589,70 @@ func (m *Participant) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.NitroAddress = string(dAtA[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:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipOnboarding(dAtA[iNdEx:])
|
||||
|
||||
+828
-26
@@ -76,7 +76,7 @@ func (m *QueryParticipantsRequest) GetPagination() *query.PageRequest {
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryParticipantsResponse is response type for get the participants
|
||||
// QueryParticipantsResponse is response type for querying the participants
|
||||
type QueryParticipantsResponse struct {
|
||||
Participants []*Participant `protobuf:"bytes,1,rep,name=participants,proto3" json:"participants,omitempty" json:"participants" yaml:"participants"`
|
||||
// pagination defines the pagination in the response.
|
||||
@@ -130,39 +130,247 @@ func (m *QueryParticipantsResponse) GetPagination() *query.PageResponse {
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryGetParticipantByAddressRequest queries participant by the laconic
|
||||
// address
|
||||
type QueryGetParticipantByAddressRequest struct {
|
||||
// Laconic address
|
||||
Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressRequest) Reset() { *m = QueryGetParticipantByAddressRequest{} }
|
||||
func (m *QueryGetParticipantByAddressRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetParticipantByAddressRequest) ProtoMessage() {}
|
||||
func (*QueryGetParticipantByAddressRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_80831d904221d27d, []int{2}
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetParticipantByAddressRequest.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 *QueryGetParticipantByAddressRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetParticipantByAddressRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetParticipantByAddressRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetParticipantByAddressRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryGetParticipantByAddressRequest) GetAddress() string {
|
||||
if m != nil {
|
||||
return m.Address
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// QueryGetParticipantByAddressResponse is response type for querying
|
||||
// participant by the laconic address
|
||||
type QueryGetParticipantByAddressResponse struct {
|
||||
// Participant details
|
||||
Participant *Participant `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressResponse) Reset() { *m = QueryGetParticipantByAddressResponse{} }
|
||||
func (m *QueryGetParticipantByAddressResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetParticipantByAddressResponse) ProtoMessage() {}
|
||||
func (*QueryGetParticipantByAddressResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_80831d904221d27d, []int{3}
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetParticipantByAddressResponse.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 *QueryGetParticipantByAddressResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetParticipantByAddressResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetParticipantByAddressResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetParticipantByAddressResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryGetParticipantByAddressResponse) GetParticipant() *Participant {
|
||||
if m != nil {
|
||||
return m.Participant
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryGetParticipantByNitroAddressRequest queries participant by the nitro
|
||||
// address
|
||||
type QueryGetParticipantByNitroAddressRequest struct {
|
||||
// Nitro address
|
||||
NitroAddress string `protobuf:"bytes,1,opt,name=nitro_address,json=nitroAddress,proto3" json:"nitro_address,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) Reset() {
|
||||
*m = QueryGetParticipantByNitroAddressRequest{}
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetParticipantByNitroAddressRequest) ProtoMessage() {}
|
||||
func (*QueryGetParticipantByNitroAddressRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_80831d904221d27d, []int{4}
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetParticipantByNitroAddressRequest.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 *QueryGetParticipantByNitroAddressRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetParticipantByNitroAddressRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetParticipantByNitroAddressRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetParticipantByNitroAddressRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) GetNitroAddress() string {
|
||||
if m != nil {
|
||||
return m.NitroAddress
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// QueryGetParticipantByNitroAddressResponse is response type for querying
|
||||
// participant by the nitro address
|
||||
type QueryGetParticipantByNitroAddressResponse struct {
|
||||
// Participant details
|
||||
Participant *Participant `protobuf:"bytes,1,opt,name=participant,proto3" json:"participant,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) Reset() {
|
||||
*m = QueryGetParticipantByNitroAddressResponse{}
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) String() string {
|
||||
return proto.CompactTextString(m)
|
||||
}
|
||||
func (*QueryGetParticipantByNitroAddressResponse) ProtoMessage() {}
|
||||
func (*QueryGetParticipantByNitroAddressResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_80831d904221d27d, []int{5}
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryGetParticipantByNitroAddressResponse.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 *QueryGetParticipantByNitroAddressResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryGetParticipantByNitroAddressResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryGetParticipantByNitroAddressResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryGetParticipantByNitroAddressResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) GetParticipant() *Participant {
|
||||
if m != nil {
|
||||
return m.Participant
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*QueryParticipantsRequest)(nil), "cerc.onboarding.v1.QueryParticipantsRequest")
|
||||
proto.RegisterType((*QueryParticipantsResponse)(nil), "cerc.onboarding.v1.QueryParticipantsResponse")
|
||||
proto.RegisterType((*QueryGetParticipantByAddressRequest)(nil), "cerc.onboarding.v1.QueryGetParticipantByAddressRequest")
|
||||
proto.RegisterType((*QueryGetParticipantByAddressResponse)(nil), "cerc.onboarding.v1.QueryGetParticipantByAddressResponse")
|
||||
proto.RegisterType((*QueryGetParticipantByNitroAddressRequest)(nil), "cerc.onboarding.v1.QueryGetParticipantByNitroAddressRequest")
|
||||
proto.RegisterType((*QueryGetParticipantByNitroAddressResponse)(nil), "cerc.onboarding.v1.QueryGetParticipantByNitroAddressResponse")
|
||||
}
|
||||
|
||||
func init() { proto.RegisterFile("cerc/onboarding/v1/query.proto", fileDescriptor_80831d904221d27d) }
|
||||
|
||||
var fileDescriptor_80831d904221d27d = []byte{
|
||||
// 380 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xbf, 0x6a, 0x1b, 0x31,
|
||||
0x1c, 0xc7, 0x2d, 0x97, 0x76, 0x90, 0x3d, 0x89, 0x0e, 0xae, 0x29, 0xe7, 0xe3, 0x0a, 0xf5, 0xd1,
|
||||
0xd6, 0x12, 0xe7, 0x6e, 0x1d, 0x3d, 0xb4, 0xab, 0xeb, 0xb1, 0x9b, 0xee, 0x2c, 0x84, 0x8a, 0xad,
|
||||
0xdf, 0xf9, 0x24, 0x1f, 0xf5, 0xda, 0x27, 0x28, 0x94, 0xce, 0x7d, 0x9d, 0x8c, 0x86, 0x40, 0xc8,
|
||||
0x14, 0x82, 0x9d, 0x27, 0xc8, 0x13, 0x84, 0x3b, 0x19, 0x2c, 0x27, 0x17, 0x92, 0x4d, 0xe8, 0xf7,
|
||||
0xfb, 0xfe, 0xf9, 0x08, 0xe1, 0x20, 0x13, 0x45, 0xc6, 0x40, 0xa7, 0xc0, 0x8b, 0xb9, 0xd2, 0x92,
|
||||
0x95, 0x09, 0x5b, 0xad, 0x45, 0xb1, 0xa1, 0x79, 0x01, 0x16, 0x08, 0xa9, 0xe6, 0xf4, 0x38, 0xa7,
|
||||
0x65, 0xd2, 0x7f, 0x2d, 0x41, 0x42, 0x3d, 0x66, 0xd5, 0xc9, 0x6d, 0xf6, 0x3f, 0x64, 0x60, 0x96,
|
||||
0x60, 0x58, 0xca, 0x8d, 0x70, 0x16, 0xac, 0x4c, 0x52, 0x61, 0x79, 0xc2, 0x72, 0x2e, 0x95, 0xe6,
|
||||
0x56, 0x81, 0x3e, 0xec, 0xbe, 0x6b, 0x48, 0xf5, 0x32, 0xdc, 0xd2, 0x5b, 0x09, 0x20, 0x17, 0x82,
|
||||
0xf1, 0x5c, 0x31, 0xae, 0x35, 0xd8, 0xda, 0xc1, 0xb8, 0x69, 0x94, 0xe2, 0xde, 0xf7, 0x2a, 0x64,
|
||||
0xca, 0x0b, 0xab, 0x32, 0x95, 0x73, 0x6d, 0xcd, 0x4c, 0xac, 0xd6, 0xc2, 0x58, 0xf2, 0x15, 0xe3,
|
||||
0x63, 0x64, 0x0f, 0x85, 0x28, 0xee, 0x8c, 0xdf, 0x53, 0xd7, 0x8f, 0x56, 0xfd, 0xa8, 0x43, 0x3c,
|
||||
0xf4, 0xa3, 0x53, 0x2e, 0xc5, 0x41, 0x3b, 0xf3, 0x94, 0xd1, 0x05, 0xc2, 0x6f, 0x1a, 0x42, 0x4c,
|
||||
0x0e, 0xda, 0x08, 0x92, 0xe3, 0x6e, 0xee, 0xdd, 0xf7, 0x50, 0xf8, 0x22, 0xee, 0x8c, 0x07, 0xf4,
|
||||
0xe1, 0x8b, 0x51, 0x4f, 0x3f, 0xf9, 0x78, 0x7b, 0x35, 0x18, 0xfe, 0x34, 0xa0, 0xbf, 0x44, 0xbe,
|
||||
0x3c, 0x0a, 0x37, 0x7c, 0xb9, 0xb8, 0x77, 0x37, 0x3b, 0x49, 0x20, 0xdf, 0x4e, 0xb8, 0xda, 0x35,
|
||||
0xd7, 0xf0, 0x49, 0x2e, 0x57, 0xd7, 0x07, 0x1b, 0xff, 0x47, 0xf8, 0x65, 0x0d, 0x46, 0xfe, 0x21,
|
||||
0xdc, 0xf5, 0xe9, 0xc8, 0xa7, 0xa6, 0xfe, 0x8f, 0xbd, 0x74, 0x7f, 0xf4, 0xcc, 0x6d, 0xd7, 0x21,
|
||||
0x8a, 0x7f, 0x9f, 0xdf, 0xfc, 0x6d, 0x47, 0x24, 0x64, 0x0d, 0x1f, 0xc0, 0x47, 0x9d, 0x4c, 0xce,
|
||||
0x76, 0x01, 0xda, 0xee, 0x02, 0x74, 0xbd, 0x0b, 0xd0, 0x9f, 0x7d, 0xd0, 0xda, 0xee, 0x83, 0xd6,
|
||||
0xe5, 0x3e, 0x68, 0xfd, 0x88, 0xa5, 0xb2, 0xb4, 0x9c, 0xa7, 0xd4, 0x42, 0xed, 0x32, 0x52, 0xc0,
|
||||
0x16, 0x3c, 0x03, 0xad, 0xb2, 0x39, 0xfb, 0xe5, 0x79, 0xa6, 0xaf, 0xea, 0x9f, 0xf2, 0xf9, 0x2e,
|
||||
0x00, 0x00, 0xff, 0xff, 0x3b, 0xb7, 0xca, 0x13, 0xe4, 0x02, 0x00, 0x00,
|
||||
// 535 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x6e, 0xd3, 0x40,
|
||||
0x10, 0xce, 0x96, 0x3f, 0xb1, 0x09, 0x97, 0x15, 0x12, 0x21, 0xaa, 0xdc, 0xc8, 0x41, 0xd4, 0x94,
|
||||
0x76, 0x97, 0x98, 0x03, 0x15, 0x02, 0xa1, 0xe6, 0x40, 0x6f, 0x50, 0x7c, 0xe4, 0x82, 0xd6, 0xf6,
|
||||
0xca, 0x5a, 0x94, 0xee, 0xba, 0xde, 0x6d, 0x44, 0x84, 0x7a, 0xe1, 0x09, 0x90, 0x10, 0x2f, 0xc3,
|
||||
0x89, 0x23, 0xc7, 0x4a, 0x08, 0xc4, 0x09, 0xa1, 0x84, 0x27, 0xe0, 0x09, 0x90, 0xd7, 0x86, 0xae,
|
||||
0x8b, 0xf3, 0x03, 0xe2, 0x66, 0xcf, 0xcc, 0x37, 0xdf, 0xf7, 0xcd, 0x8c, 0x0d, 0x9d, 0x88, 0x65,
|
||||
0x11, 0x91, 0x22, 0x94, 0x34, 0x8b, 0xb9, 0x48, 0xc8, 0xa8, 0x4f, 0x0e, 0x0e, 0x59, 0x36, 0xc6,
|
||||
0x69, 0x26, 0xb5, 0x44, 0x28, 0xcf, 0xe3, 0x93, 0x3c, 0x1e, 0xf5, 0x3b, 0x97, 0x13, 0x99, 0x48,
|
||||
0x93, 0x26, 0xf9, 0x53, 0x51, 0xd9, 0xd9, 0x88, 0xa4, 0xda, 0x97, 0x8a, 0x84, 0x54, 0xb1, 0xa2,
|
||||
0x05, 0x19, 0xf5, 0x43, 0xa6, 0x69, 0x9f, 0xa4, 0x34, 0xe1, 0x82, 0x6a, 0x2e, 0x45, 0x59, 0xdb,
|
||||
0xab, 0x61, 0xb5, 0x38, 0x8a, 0xa2, 0xd5, 0x44, 0xca, 0x64, 0xc8, 0x08, 0x4d, 0x39, 0xa1, 0x42,
|
||||
0x48, 0x6d, 0x3a, 0xa8, 0x22, 0xeb, 0x86, 0xb0, 0xfd, 0x24, 0x27, 0xd9, 0xa3, 0x99, 0xe6, 0x11,
|
||||
0x4f, 0xa9, 0xd0, 0x2a, 0x60, 0x07, 0x87, 0x4c, 0x69, 0xf4, 0x10, 0xc2, 0x13, 0xca, 0x36, 0xe8,
|
||||
0x02, 0xaf, 0xe9, 0x5f, 0xc7, 0x85, 0x3e, 0x9c, 0xeb, 0xc3, 0x85, 0xc5, 0x52, 0x1f, 0xde, 0xa3,
|
||||
0x09, 0x2b, 0xb1, 0x81, 0x85, 0x74, 0x3f, 0x03, 0x78, 0xb5, 0x86, 0x44, 0xa5, 0x52, 0x28, 0x86,
|
||||
0x52, 0xd8, 0x4a, 0xad, 0x78, 0x1b, 0x74, 0xcf, 0x78, 0x4d, 0x7f, 0x0d, 0xff, 0x39, 0x31, 0x6c,
|
||||
0xe1, 0x07, 0x37, 0x7f, 0x7c, 0x5d, 0x5b, 0x7f, 0xae, 0xa4, 0xb8, 0xeb, 0xda, 0x70, 0xb7, 0x3b,
|
||||
0xa6, 0xfb, 0xc3, 0x53, 0xb1, 0xa0, 0xc2, 0x80, 0x76, 0x2b, 0xbe, 0x56, 0x8c, 0xaf, 0xf5, 0x85,
|
||||
0xbe, 0x0a, 0xb9, 0x15, 0x63, 0x0f, 0x60, 0xcf, 0xf8, 0xda, 0x65, 0xda, 0x96, 0x36, 0xde, 0x89,
|
||||
0xe3, 0x8c, 0xa9, 0xdf, 0x73, 0x6c, 0xc3, 0x0b, 0xb4, 0x88, 0x98, 0x21, 0x5e, 0x0c, 0x7e, 0xbd,
|
||||
0xba, 0x1c, 0x5e, 0x9b, 0xdf, 0xa0, 0x9c, 0xd1, 0x0e, 0x6c, 0x5a, 0x0e, 0xca, 0x55, 0x2c, 0x1a,
|
||||
0x51, 0x60, 0x63, 0xdc, 0xc7, 0xd0, 0xab, 0xa5, 0x7a, 0xc4, 0x75, 0x26, 0x4f, 0x09, 0xee, 0xc1,
|
||||
0x4b, 0x22, 0x0f, 0x3f, 0xab, 0xca, 0x6e, 0x09, 0xab, 0xd6, 0x15, 0xf0, 0xc6, 0x12, 0x0d, 0xff,
|
||||
0x9b, 0x01, 0xff, 0xdd, 0x59, 0x78, 0xce, 0x10, 0xa2, 0xb7, 0x00, 0xb6, 0xec, 0x53, 0x42, 0x9b,
|
||||
0x75, 0x8d, 0x66, 0x9d, 0x75, 0x67, 0x6b, 0xc9, 0xea, 0x42, 0xba, 0xeb, 0xbd, 0xfa, 0xf8, 0xfd,
|
||||
0xcd, 0x8a, 0x8b, 0xba, 0xa4, 0xe6, 0x6b, 0xab, 0xdc, 0xd5, 0x7b, 0x00, 0xaf, 0xcc, 0xd8, 0x24,
|
||||
0xba, 0x33, 0x93, 0x74, 0xfe, 0xf1, 0x74, 0xb6, 0xff, 0x1e, 0x58, 0x0a, 0xf7, 0x8d, 0xf0, 0x4d,
|
||||
0xb4, 0xb1, 0x48, 0x38, 0x79, 0x59, 0xee, 0xf9, 0x08, 0x7d, 0x02, 0x70, 0x75, 0xde, 0x42, 0xd1,
|
||||
0xbd, 0xa5, 0xe5, 0xd4, 0x1c, 0x56, 0xe7, 0xfe, 0x3f, 0xa2, 0x4b, 0x47, 0xdb, 0xc6, 0x91, 0x8f,
|
||||
0x6e, 0x2d, 0x76, 0x54, 0xb9, 0xdf, 0xa3, 0xc1, 0xe0, 0xc3, 0xc4, 0x01, 0xc7, 0x13, 0x07, 0x7c,
|
||||
0x9b, 0x38, 0xe0, 0xf5, 0xd4, 0x69, 0x1c, 0x4f, 0x9d, 0xc6, 0x97, 0xa9, 0xd3, 0x78, 0xea, 0x25,
|
||||
0x5c, 0xe3, 0x51, 0x1c, 0x62, 0x2d, 0x4d, 0xd7, 0x2d, 0x2e, 0xc9, 0x90, 0x46, 0x52, 0xf0, 0x28,
|
||||
0x26, 0x2f, 0x2c, 0x8e, 0xf0, 0xbc, 0xf9, 0x63, 0xde, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x80,
|
||||
0xc2, 0x03, 0x70, 0xec, 0x05, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -179,6 +387,10 @@ const _ = grpc.SupportPackageIsVersion4
|
||||
type QueryClient interface {
|
||||
// Participants queries Participants list
|
||||
Participants(ctx context.Context, in *QueryParticipantsRequest, opts ...grpc.CallOption) (*QueryParticipantsResponse, error)
|
||||
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||
GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error)
|
||||
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||
GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@@ -198,10 +410,32 @@ func (c *queryClient) Participants(ctx context.Context, in *QueryParticipantsReq
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetParticipantByAddress(ctx context.Context, in *QueryGetParticipantByAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByAddressResponse, error) {
|
||||
out := new(QueryGetParticipantByAddressResponse)
|
||||
err := c.cc.Invoke(ctx, "/cerc.onboarding.v1.Query/GetParticipantByAddress", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) GetParticipantByNitroAddress(ctx context.Context, in *QueryGetParticipantByNitroAddressRequest, opts ...grpc.CallOption) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||
out := new(QueryGetParticipantByNitroAddressResponse)
|
||||
err := c.cc.Invoke(ctx, "/cerc.onboarding.v1.Query/GetParticipantByNitroAddress", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Participants queries Participants list
|
||||
Participants(context.Context, *QueryParticipantsRequest) (*QueryParticipantsResponse, error)
|
||||
// GetParticipantByAddress queries a participant by cosmos (laconic) address
|
||||
GetParticipantByAddress(context.Context, *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error)
|
||||
// GetParticipantByNitroAddress queries a participant by nitro address
|
||||
GetParticipantByNitroAddress(context.Context, *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||
@@ -211,6 +445,12 @@ type UnimplementedQueryServer struct {
|
||||
func (*UnimplementedQueryServer) Participants(ctx context.Context, req *QueryParticipantsRequest) (*QueryParticipantsResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Participants not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) GetParticipantByAddress(ctx context.Context, req *QueryGetParticipantByAddressRequest) (*QueryGetParticipantByAddressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByAddress not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) GetParticipantByNitroAddress(ctx context.Context, req *QueryGetParticipantByNitroAddressRequest) (*QueryGetParticipantByNitroAddressResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetParticipantByNitroAddress not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
@@ -234,6 +474,42 @@ func _Query_Participants_Handler(srv interface{}, ctx context.Context, dec func(
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetParticipantByAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetParticipantByAddressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetParticipantByAddress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cerc.onboarding.v1.Query/GetParticipantByAddress",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetParticipantByAddress(ctx, req.(*QueryGetParticipantByAddressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_GetParticipantByNitroAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryGetParticipantByNitroAddressRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cerc.onboarding.v1.Query/GetParticipantByNitroAddress",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).GetParticipantByNitroAddress(ctx, req.(*QueryGetParticipantByNitroAddressRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cerc.onboarding.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
@@ -242,6 +518,14 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "Participants",
|
||||
Handler: _Query_Participants_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetParticipantByAddress",
|
||||
Handler: _Query_GetParticipantByAddress_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "GetParticipantByNitroAddress",
|
||||
Handler: _Query_GetParticipantByNitroAddress_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cerc/onboarding/v1/query.proto",
|
||||
@@ -331,6 +615,136 @@ func (m *QueryParticipantsResponse) MarshalToSizedBuffer(dAtA []byte) (int, erro
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressRequest) 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 *QueryGetParticipantByAddressRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Address) > 0 {
|
||||
i -= len(m.Address)
|
||||
copy(dAtA[i:], m.Address)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Address)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressResponse) 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 *QueryGetParticipantByAddressResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Participant != nil {
|
||||
{
|
||||
size, err := m.Participant.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) 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 *QueryGetParticipantByNitroAddressRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.NitroAddress) > 0 {
|
||||
i -= len(m.NitroAddress)
|
||||
copy(dAtA[i:], m.NitroAddress)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.NitroAddress)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) 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 *QueryGetParticipantByNitroAddressResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Participant != nil {
|
||||
{
|
||||
size, err := m.Participant.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func encodeVarintQuery(dAtA []byte, offset int, v uint64) int {
|
||||
offset -= sovQuery(v)
|
||||
base := offset
|
||||
@@ -374,6 +788,58 @@ func (m *QueryParticipantsResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Address)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByAddressResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Participant != nil {
|
||||
l = m.Participant.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.NitroAddress)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if m.Participant != nil {
|
||||
l = m.Participant.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func sovQuery(x uint64) (n int) {
|
||||
return (math_bits.Len64(x|1) + 6) / 7
|
||||
}
|
||||
@@ -586,6 +1052,342 @@ func (m *QueryParticipantsResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByAddressRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Address = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryGetParticipantByAddressResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByAddressResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Participant", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Participant == nil {
|
||||
m.Participant = &Participant{}
|
||||
}
|
||||
if err := m.Participant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByNitroAddressRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByNitroAddressRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field NitroAddress", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.NitroAddress = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryGetParticipantByNitroAddressResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByNitroAddressResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryGetParticipantByNitroAddressResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Participant", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Participant == nil {
|
||||
m.Participant = &Participant{}
|
||||
}
|
||||
if err := m.Participant.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func skipQuery(dAtA []byte) (n int, err error) {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@@ -69,6 +69,114 @@ func local_request_Query_Participants_0(ctx context.Context, marshaler runtime.M
|
||||
|
||||
}
|
||||
|
||||
func request_Query_GetParticipantByAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryGetParticipantByAddressRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["address"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
|
||||
}
|
||||
|
||||
protoReq.Address, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetParticipantByAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_GetParticipantByAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryGetParticipantByAddressRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["address"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "address")
|
||||
}
|
||||
|
||||
protoReq.Address, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "address", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetParticipantByAddress(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func request_Query_GetParticipantByNitroAddress_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryGetParticipantByNitroAddressRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["nitro_address"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nitro_address")
|
||||
}
|
||||
|
||||
protoReq.NitroAddress, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nitro_address", err)
|
||||
}
|
||||
|
||||
msg, err := client.GetParticipantByNitroAddress(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_GetParticipantByNitroAddress_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryGetParticipantByNitroAddressRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
var (
|
||||
val string
|
||||
ok bool
|
||||
err error
|
||||
_ = err
|
||||
)
|
||||
|
||||
val, ok = pathParams["nitro_address"]
|
||||
if !ok {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "nitro_address")
|
||||
}
|
||||
|
||||
protoReq.NitroAddress, err = runtime.String(val)
|
||||
|
||||
if err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "nitro_address", err)
|
||||
}
|
||||
|
||||
msg, err := server.GetParticipantByNitroAddress(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
@@ -98,6 +206,52 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_GetParticipantByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetParticipantByAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_GetParticipantByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_GetParticipantByNitroAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_GetParticipantByNitroAddress_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_GetParticipantByNitroAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -159,13 +313,61 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_GetParticipantByAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Query_GetParticipantByAddress_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_GetParticipantByAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_GetParticipantByNitroAddress_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Query_GetParticipantByNitroAddress_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_GetParticipantByNitroAddress_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
var (
|
||||
pattern_Query_Participants_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "onboarding", "v1", "participants"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetParticipantByAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetParticipantByNitroAddress_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cerc", "onboarding", "v1", "participants", "nitro_address"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
forward_Query_Participants_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_GetParticipantByAddress_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_GetParticipantByNitroAddress_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
||||
+129
-25
@@ -36,6 +36,8 @@ type MsgOnboardParticipant struct {
|
||||
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"`
|
||||
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{} }
|
||||
@@ -92,6 +94,20 @@ func (m *MsgOnboardParticipant) GetEthSignature() string {
|
||||
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
|
||||
// type.
|
||||
type MsgOnboardParticipantResponse struct {
|
||||
@@ -138,31 +154,33 @@ func init() {
|
||||
func init() { proto.RegisterFile("cerc/onboarding/v1/tx.proto", fileDescriptor_6bfde34a550e231e) }
|
||||
|
||||
var fileDescriptor_6bfde34a550e231e = []byte{
|
||||
// 370 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x91, 0x41, 0x4b, 0x32, 0x41,
|
||||
0x18, 0xc7, 0x77, 0xf4, 0x7d, 0x5f, 0x78, 0xc7, 0x82, 0x58, 0x8a, 0x64, 0xab, 0x55, 0xd6, 0x43,
|
||||
0x2a, 0xb4, 0x83, 0x76, 0xeb, 0x28, 0x78, 0x94, 0xc4, 0x6e, 0x5d, 0x64, 0xdc, 0x1d, 0xc6, 0x01,
|
||||
0x9d, 0x67, 0xd9, 0x99, 0xc4, 0x6e, 0xe1, 0x27, 0x08, 0xfa, 0x08, 0x7d, 0x01, 0xe9, 0xd2, 0x57,
|
||||
0xf0, 0x28, 0x74, 0xe9, 0x14, 0xa1, 0x81, 0x5f, 0x23, 0x5c, 0x35, 0x17, 0xda, 0xa0, 0xdb, 0xcc,
|
||||
0xff, 0xf9, 0xf3, 0xff, 0x3d, 0x7f, 0x1e, 0x7c, 0xe4, 0xb1, 0xd0, 0x23, 0x20, 0x3b, 0x40, 0x43,
|
||||
0x5f, 0x48, 0x4e, 0x06, 0x15, 0xa2, 0x87, 0x6e, 0x10, 0x82, 0x06, 0xd3, 0x5c, 0x0e, 0xdd, 0xed,
|
||||
0xd0, 0x1d, 0x54, 0xac, 0x43, 0x0f, 0x54, 0x1f, 0x14, 0xe9, 0xab, 0xc8, 0xdb, 0x57, 0x7c, 0x65,
|
||||
0xb6, 0x8e, 0x39, 0x00, 0xef, 0x31, 0x42, 0x03, 0x41, 0xa8, 0x94, 0xa0, 0xa9, 0x16, 0x20, 0xd5,
|
||||
0x7a, 0xba, 0xcf, 0x81, 0x43, 0xf4, 0x24, 0xcb, 0xd7, 0x5a, 0x2d, 0x24, 0xd0, 0x63, 0xb8, 0xc8,
|
||||
0xe4, 0x3c, 0x23, 0x7c, 0xd0, 0x50, 0xfc, 0x72, 0xa5, 0x37, 0x69, 0xa8, 0x85, 0x27, 0x02, 0x2a,
|
||||
0xb5, 0x99, 0xc7, 0x99, 0x60, 0xfb, 0xcd, 0xa2, 0x3c, 0x2a, 0xfe, 0x6f, 0xc5, 0x25, 0xb3, 0x8e,
|
||||
0x33, 0x4c, 0x77, 0xdb, 0x01, 0xbd, 0xed, 0x01, 0xf5, 0xb3, 0xa9, 0x3c, 0x2a, 0x66, 0xaa, 0xb6,
|
||||
0xfb, 0xbd, 0x97, 0x5b, 0xd7, 0xdd, 0xe6, 0xca, 0x55, 0xfb, 0x33, 0x79, 0xcb, 0x19, 0x2d, 0xcc,
|
||||
0xbe, 0x14, 0xb3, 0x80, 0x77, 0x97, 0x31, 0x4a, 0x70, 0x49, 0xf5, 0x4d, 0xc8, 0xb2, 0xe9, 0x08,
|
||||
0xb5, 0xc3, 0x74, 0xf7, 0x6a, 0xa3, 0x5d, 0xec, 0x8d, 0x16, 0xe3, 0x72, 0x9c, 0xee, 0xe4, 0xf0,
|
||||
0x49, 0xe2, 0xe2, 0x2d, 0xa6, 0x02, 0x90, 0x8a, 0x55, 0x9f, 0x10, 0x4e, 0x37, 0x14, 0x37, 0x1f,
|
||||
0x11, 0x36, 0x13, 0xfa, 0x95, 0x92, 0x16, 0x4d, 0x4c, 0xb4, 0x2a, 0xbf, 0xb6, 0x6e, 0xe0, 0x0e,
|
||||
0x19, 0xbd, 0x7c, 0x3c, 0xa4, 0x4a, 0xce, 0x29, 0xf9, 0xf9, 0x0a, 0xed, 0x58, 0x1d, 0xeb, 0xef,
|
||||
0xdd, 0x62, 0x5c, 0x46, 0xb5, 0xda, 0x64, 0x66, 0xa3, 0xe9, 0xcc, 0x46, 0xef, 0x33, 0x1b, 0xdd,
|
||||
0xcf, 0x6d, 0x63, 0x3a, 0xb7, 0x8d, 0xd7, 0xb9, 0x6d, 0x5c, 0x17, 0xb9, 0xd0, 0xee, 0xc0, 0xef,
|
||||
0xb8, 0x1a, 0xa2, 0xcc, 0x33, 0x01, 0xa4, 0x47, 0x3d, 0x90, 0xc2, 0xf3, 0xc9, 0x30, 0x46, 0xe8,
|
||||
0xfc, 0x8b, 0x4e, 0x7b, 0xfe, 0x19, 0x00, 0x00, 0xff, 0xff, 0x28, 0x7c, 0x8d, 0x55, 0x7f, 0x02,
|
||||
0x00, 0x00,
|
||||
// 401 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0xc1, 0x8a, 0x13, 0x31,
|
||||
0x1c, 0xc6, 0x27, 0xbb, 0xed, 0x82, 0xa9, 0x82, 0x04, 0x17, 0x87, 0x51, 0x67, 0xcb, 0xec, 0xc1,
|
||||
0xee, 0x82, 0x13, 0xba, 0xde, 0x3c, 0x16, 0xf6, 0xe0, 0x61, 0xb1, 0xd4, 0x9b, 0x97, 0x92, 0x66,
|
||||
0x42, 0x1a, 0x3a, 0xcd, 0x7f, 0x98, 0xc4, 0xd2, 0xde, 0xa4, 0x4f, 0x20, 0xf8, 0x08, 0xbe, 0x40,
|
||||
0xf1, 0x29, 0x7a, 0x2c, 0x78, 0xf1, 0x24, 0x32, 0x15, 0xfa, 0x1a, 0xd2, 0xb4, 0xb5, 0x03, 0x8e,
|
||||
0xb0, 0xb7, 0xff, 0xfc, 0xbe, 0x8f, 0xff, 0x37, 0x5f, 0x12, 0xfc, 0x8c, 0x8b, 0x9c, 0x53, 0xd0,
|
||||
0x03, 0x60, 0x79, 0xa2, 0xb4, 0xa4, 0x93, 0x36, 0xb5, 0xd3, 0x38, 0xcb, 0xc1, 0x02, 0x21, 0x5b,
|
||||
0x31, 0x3e, 0x8a, 0xf1, 0xa4, 0x1d, 0x3c, 0xe5, 0x60, 0xc6, 0x60, 0xe8, 0xd8, 0x38, 0xef, 0xd8,
|
||||
0xc8, 0x9d, 0x39, 0x78, 0x2e, 0x01, 0x64, 0x2a, 0x28, 0xcb, 0x14, 0x65, 0x5a, 0x83, 0x65, 0x56,
|
||||
0x81, 0x36, 0x7b, 0xf5, 0x89, 0x04, 0x09, 0x6e, 0xa4, 0xdb, 0x69, 0x4f, 0x2f, 0x2b, 0xd2, 0x4b,
|
||||
0x71, 0xce, 0x14, 0x15, 0x08, 0x9f, 0xdf, 0x19, 0xf9, 0x6e, 0xc7, 0xbb, 0x2c, 0xb7, 0x8a, 0xab,
|
||||
0x8c, 0x69, 0x4b, 0x9a, 0xb8, 0x91, 0x1d, 0x3f, 0x7d, 0xd4, 0x44, 0xad, 0x07, 0xbd, 0x32, 0x22,
|
||||
0xb7, 0xb8, 0x21, 0xec, 0xb0, 0x9f, 0xb1, 0x59, 0x0a, 0x2c, 0xf1, 0x4f, 0x9a, 0xa8, 0xd5, 0xb8,
|
||||
0x09, 0xe3, 0x7f, 0x7b, 0xc5, 0xb7, 0x76, 0xd8, 0xdd, 0xb9, 0x3a, 0xb5, 0xe5, 0xcf, 0x0b, 0xaf,
|
||||
0x87, 0xc5, 0x5f, 0x42, 0x2e, 0xf1, 0xa3, 0xed, 0x1a, 0xa3, 0xa4, 0x66, 0xf6, 0x63, 0x2e, 0xfc,
|
||||
0x53, 0x17, 0xf5, 0x50, 0xd8, 0xe1, 0xfb, 0x03, 0x23, 0x04, 0xd7, 0x72, 0x48, 0x85, 0x5f, 0x73,
|
||||
0x9a, 0x9b, 0xc9, 0x39, 0x3e, 0x1b, 0xcd, 0x78, 0x5f, 0x25, 0x7e, 0xdd, 0xd1, 0xfa, 0x68, 0xc6,
|
||||
0xdf, 0x26, 0x6f, 0x1e, 0xcf, 0x37, 0x8b, 0xeb, 0xf2, 0x8f, 0x46, 0x17, 0xf8, 0x45, 0x65, 0xc7,
|
||||
0x9e, 0x30, 0x19, 0x68, 0x23, 0x6e, 0xbe, 0x21, 0x7c, 0x7a, 0x67, 0x24, 0xf9, 0x8a, 0x30, 0xa9,
|
||||
0x38, 0x8a, 0xab, 0xaa, 0x4e, 0x95, 0x1b, 0x83, 0xf6, 0xbd, 0xad, 0x87, 0xf0, 0x88, 0xce, 0xbf,
|
||||
0xff, 0xfe, 0x72, 0x72, 0x15, 0xbd, 0xa4, 0xff, 0xbf, 0xb0, 0x7e, 0xa9, 0x4e, 0x50, 0xff, 0xb4,
|
||||
0x59, 0x5c, 0xa3, 0x4e, 0x67, 0x59, 0x84, 0x68, 0x55, 0x84, 0xe8, 0x57, 0x11, 0xa2, 0xcf, 0xeb,
|
||||
0xd0, 0x5b, 0xad, 0x43, 0xef, 0xc7, 0x3a, 0xf4, 0x3e, 0xb4, 0xa4, 0xb2, 0xf1, 0x24, 0x19, 0xc4,
|
||||
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.
|
||||
@@ -267,6 +285,20 @@ func (m *MsgOnboardParticipant) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
_ = i
|
||||
var l int
|
||||
_ = 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 {
|
||||
i -= len(m.EthSignature)
|
||||
copy(dAtA[i:], m.EthSignature)
|
||||
@@ -344,6 +376,14 @@ func (m *MsgOnboardParticipant) Size() (n int) {
|
||||
if l > 0 {
|
||||
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
|
||||
}
|
||||
|
||||
@@ -488,6 +528,70 @@ func (m *MsgOnboardParticipant) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
m.EthSignature = string(dAtA[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:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipTx(dAtA[iNdEx:])
|
||||
|
||||
@@ -67,20 +67,11 @@ func (k *Keeper) ExportGenesis(ctx sdk.Context) (*registry.GenesisState, error)
|
||||
return nil, err
|
||||
}
|
||||
|
||||
authorities, err := k.ListNameAuthorityRecords(ctx)
|
||||
authorityEntries, err := k.ListNameAuthorityRecords(ctx, "")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
authorityEntries := []registry.AuthorityEntry{}
|
||||
// #nosec G705
|
||||
for name, record := range authorities {
|
||||
authorityEntries = append(authorityEntries, registry.AuthorityEntry{
|
||||
Name: name,
|
||||
Entry: &record, //nolint: all
|
||||
}) // #nosec G601
|
||||
}
|
||||
|
||||
names, err := k.ListNameRecords(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -41,19 +41,30 @@ func (k Keeper) GetNameAuthority(ctx sdk.Context, name string) (registrytypes.Na
|
||||
return authority, nil
|
||||
}
|
||||
|
||||
// ListNameAuthorityRecords - get all name authority records.
|
||||
func (k Keeper) ListNameAuthorityRecords(ctx sdk.Context) (map[string]registrytypes.NameAuthority, error) {
|
||||
nameAuthorityRecords := make(map[string]registrytypes.NameAuthority)
|
||||
// ListNameAuthorityRecords - get all name authority records for given owner
|
||||
// Returns all authorities if owner set to ""
|
||||
func (k Keeper) ListNameAuthorityRecords(ctx sdk.Context, owner string) ([]registrytypes.AuthorityEntry, error) {
|
||||
authorityEntries := []registrytypes.AuthorityEntry{}
|
||||
|
||||
err := k.Authorities.Walk(ctx, nil, func(key string, value registrytypes.NameAuthority) (bool, error) {
|
||||
nameAuthorityRecords[key] = value
|
||||
// If owner is not empty, skip if authority is not owned by owner
|
||||
if owner != "" && owner != value.OwnerAddress {
|
||||
return false, nil
|
||||
}
|
||||
|
||||
authorityEntries = append(authorityEntries, registrytypes.AuthorityEntry{
|
||||
Name: key,
|
||||
Entry: &value,
|
||||
})
|
||||
|
||||
// Continue the walk
|
||||
return false, nil
|
||||
})
|
||||
if err != nil {
|
||||
return map[string]registrytypes.NameAuthority{}, err
|
||||
return []registrytypes.AuthorityEntry{}, err
|
||||
}
|
||||
|
||||
return nameAuthorityRecords, nil
|
||||
return authorityEntries, nil
|
||||
}
|
||||
|
||||
// HasNameRecord - checks if a name record exists.
|
||||
|
||||
@@ -112,10 +112,10 @@ func (qs queryServer) NameRecords(c context.Context, _ *registrytypes.QueryNameR
|
||||
return ®istrytypes.QueryNameRecordsResponse{Names: nameRecords}, nil
|
||||
}
|
||||
|
||||
func (qs queryServer) Whois(c context.Context, request *registrytypes.QueryWhoisRequest) (*registrytypes.QueryWhoisResponse, error) {
|
||||
func (qs queryServer) Whois(c context.Context, req *registrytypes.QueryWhoisRequest) (*registrytypes.QueryWhoisResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
||||
nameAuthority, err := qs.k.GetNameAuthority(ctx, request.GetName())
|
||||
nameAuthority, err := qs.k.GetNameAuthority(ctx, req.GetName())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -123,6 +123,17 @@ func (qs queryServer) Whois(c context.Context, request *registrytypes.QueryWhois
|
||||
return ®istrytypes.QueryWhoisResponse{NameAuthority: nameAuthority}, nil
|
||||
}
|
||||
|
||||
func (qs queryServer) Authorities(c context.Context, req *registrytypes.QueryAuthoritiesRequest) (*registrytypes.QueryAuthoritiesResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
|
||||
authorityEntries, err := qs.k.ListNameAuthorityRecords(ctx, req.GetOwner())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return ®istrytypes.QueryAuthoritiesResponse{Authorities: authorityEntries}, nil
|
||||
}
|
||||
|
||||
func (qs queryServer) LookupLrn(c context.Context, req *registrytypes.QueryLookupLrnRequest) (*registrytypes.QueryLookupLrnResponse, error) {
|
||||
ctx := sdk.UnwrapSDKContext(c)
|
||||
lrn := req.GetLrn()
|
||||
|
||||
@@ -51,6 +51,18 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions {
|
||||
{ProtoField: "name"},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "Authorities",
|
||||
Use: "list-authorities",
|
||||
Short: "List authorities (optionally by owner)",
|
||||
FlagOptions: map[string]*autocliv1.FlagOptions{
|
||||
"owner": {
|
||||
Name: "owner",
|
||||
Usage: "Owner to get the authorities for",
|
||||
DefaultValue: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
RpcMethod: "NameRecords",
|
||||
Use: "names",
|
||||
|
||||
@@ -11,21 +11,21 @@ import (
|
||||
// Default parameter values.
|
||||
var (
|
||||
// DefaultRecordRent is the default record rent for 1 time period (see expiry time).
|
||||
DefaultRecordRent = sdkmath.NewInt(1000000)
|
||||
DefaultRecordRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
|
||||
// DefaultRecordExpiryTime is the default record expiry time (1 year).
|
||||
DefaultRecordExpiryTime = time.Hour * 24 * 365
|
||||
|
||||
DefaultAuthorityRent = sdkmath.NewInt(1000000)
|
||||
DefaultAuthorityRent = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
DefaultAuthorityExpiryTime = time.Hour * 24 * 365
|
||||
DefaultAuthorityGracePeriod = time.Hour * 24 * 2
|
||||
|
||||
DefaultAuthorityAuctionEnabled = false
|
||||
DefaultCommitsDuration = time.Hour * 24
|
||||
DefaultRevealsDuration = time.Hour * 24
|
||||
DefaultCommitFee = sdkmath.NewInt(1000000)
|
||||
DefaultRevealFee = sdkmath.NewInt(1000000)
|
||||
DefaultMinimumBid = sdkmath.NewInt(5000000)
|
||||
DefaultCommitFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
DefaultRevealFee = sdkmath.NewInt(1000000) // 10^6 alnt
|
||||
DefaultMinimumBid = sdkmath.NewInt(5000000) // 5 * 10^6 alnt
|
||||
)
|
||||
|
||||
// NewParams creates a new Params instance
|
||||
|
||||
+546
-89
@@ -915,6 +915,105 @@ func (m *QueryWhoisResponse) GetNameAuthority() NameAuthority {
|
||||
return NameAuthority{}
|
||||
}
|
||||
|
||||
// QueryAuthoritiesRequest is request type to get all authorities
|
||||
type QueryAuthoritiesRequest struct {
|
||||
Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesRequest) Reset() { *m = QueryAuthoritiesRequest{} }
|
||||
func (m *QueryAuthoritiesRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAuthoritiesRequest) ProtoMessage() {}
|
||||
func (*QueryAuthoritiesRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{12}
|
||||
}
|
||||
func (m *QueryAuthoritiesRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryAuthoritiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryAuthoritiesRequest.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 *QueryAuthoritiesRequest) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryAuthoritiesRequest.Merge(m, src)
|
||||
}
|
||||
func (m *QueryAuthoritiesRequest) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryAuthoritiesRequest) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryAuthoritiesRequest.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryAuthoritiesRequest proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryAuthoritiesRequest) GetOwner() string {
|
||||
if m != nil {
|
||||
return m.Owner
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
// QueryAuthoritiesResponse is response type for authorities request
|
||||
type QueryAuthoritiesResponse struct {
|
||||
Authorities []AuthorityEntry `protobuf:"bytes,1,rep,name=authorities,proto3" json:"authorities"`
|
||||
// pagination defines the pagination in the response.
|
||||
Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"`
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesResponse) Reset() { *m = QueryAuthoritiesResponse{} }
|
||||
func (m *QueryAuthoritiesResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryAuthoritiesResponse) ProtoMessage() {}
|
||||
func (*QueryAuthoritiesResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{13}
|
||||
}
|
||||
func (m *QueryAuthoritiesResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
}
|
||||
func (m *QueryAuthoritiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||
if deterministic {
|
||||
return xxx_messageInfo_QueryAuthoritiesResponse.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 *QueryAuthoritiesResponse) XXX_Merge(src proto.Message) {
|
||||
xxx_messageInfo_QueryAuthoritiesResponse.Merge(m, src)
|
||||
}
|
||||
func (m *QueryAuthoritiesResponse) XXX_Size() int {
|
||||
return m.Size()
|
||||
}
|
||||
func (m *QueryAuthoritiesResponse) XXX_DiscardUnknown() {
|
||||
xxx_messageInfo_QueryAuthoritiesResponse.DiscardUnknown(m)
|
||||
}
|
||||
|
||||
var xxx_messageInfo_QueryAuthoritiesResponse proto.InternalMessageInfo
|
||||
|
||||
func (m *QueryAuthoritiesResponse) GetAuthorities() []AuthorityEntry {
|
||||
if m != nil {
|
||||
return m.Authorities
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesResponse) GetPagination() *query.PageResponse {
|
||||
if m != nil {
|
||||
return m.Pagination
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// QueryLookupLrnRequest is request type for LookupLrn
|
||||
type QueryLookupLrnRequest struct {
|
||||
Lrn string `protobuf:"bytes,1,opt,name=lrn,proto3" json:"lrn,omitempty"`
|
||||
@@ -924,7 +1023,7 @@ func (m *QueryLookupLrnRequest) Reset() { *m = QueryLookupLrnRequest{} }
|
||||
func (m *QueryLookupLrnRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryLookupLrnRequest) ProtoMessage() {}
|
||||
func (*QueryLookupLrnRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{12}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{14}
|
||||
}
|
||||
func (m *QueryLookupLrnRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -969,7 +1068,7 @@ func (m *QueryLookupLrnResponse) Reset() { *m = QueryLookupLrnResponse{}
|
||||
func (m *QueryLookupLrnResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryLookupLrnResponse) ProtoMessage() {}
|
||||
func (*QueryLookupLrnResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{13}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{15}
|
||||
}
|
||||
func (m *QueryLookupLrnResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1014,7 +1113,7 @@ func (m *QueryResolveLrnRequest) Reset() { *m = QueryResolveLrnRequest{}
|
||||
func (m *QueryResolveLrnRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryResolveLrnRequest) ProtoMessage() {}
|
||||
func (*QueryResolveLrnRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{14}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{16}
|
||||
}
|
||||
func (m *QueryResolveLrnRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1059,7 +1158,7 @@ func (m *QueryResolveLrnResponse) Reset() { *m = QueryResolveLrnResponse
|
||||
func (m *QueryResolveLrnResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryResolveLrnResponse) ProtoMessage() {}
|
||||
func (*QueryResolveLrnResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{15}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{17}
|
||||
}
|
||||
func (m *QueryResolveLrnResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1104,7 +1203,7 @@ func (m *QueryGetRegistryModuleBalanceRequest) Reset() { *m = QueryGetRe
|
||||
func (m *QueryGetRegistryModuleBalanceRequest) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetRegistryModuleBalanceRequest) ProtoMessage() {}
|
||||
func (*QueryGetRegistryModuleBalanceRequest) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{16}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{18}
|
||||
}
|
||||
func (m *QueryGetRegistryModuleBalanceRequest) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1143,7 +1242,7 @@ func (m *QueryGetRegistryModuleBalanceResponse) Reset() { *m = QueryGetR
|
||||
func (m *QueryGetRegistryModuleBalanceResponse) String() string { return proto.CompactTextString(m) }
|
||||
func (*QueryGetRegistryModuleBalanceResponse) ProtoMessage() {}
|
||||
func (*QueryGetRegistryModuleBalanceResponse) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{17}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{19}
|
||||
}
|
||||
func (m *QueryGetRegistryModuleBalanceResponse) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1189,7 +1288,7 @@ func (m *AccountBalance) Reset() { *m = AccountBalance{} }
|
||||
func (m *AccountBalance) String() string { return proto.CompactTextString(m) }
|
||||
func (*AccountBalance) ProtoMessage() {}
|
||||
func (*AccountBalance) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptor_c642b96b6da07a30, []int{18}
|
||||
return fileDescriptor_c642b96b6da07a30, []int{20}
|
||||
}
|
||||
func (m *AccountBalance) XXX_Unmarshal(b []byte) error {
|
||||
return m.Unmarshal(b)
|
||||
@@ -1250,6 +1349,8 @@ func init() {
|
||||
proto.RegisterType((*QueryNameRecordsResponse)(nil), "cerc.registry.v1.QueryNameRecordsResponse")
|
||||
proto.RegisterType((*QueryWhoisRequest)(nil), "cerc.registry.v1.QueryWhoisRequest")
|
||||
proto.RegisterType((*QueryWhoisResponse)(nil), "cerc.registry.v1.QueryWhoisResponse")
|
||||
proto.RegisterType((*QueryAuthoritiesRequest)(nil), "cerc.registry.v1.QueryAuthoritiesRequest")
|
||||
proto.RegisterType((*QueryAuthoritiesResponse)(nil), "cerc.registry.v1.QueryAuthoritiesResponse")
|
||||
proto.RegisterType((*QueryLookupLrnRequest)(nil), "cerc.registry.v1.QueryLookupLrnRequest")
|
||||
proto.RegisterType((*QueryLookupLrnResponse)(nil), "cerc.registry.v1.QueryLookupLrnResponse")
|
||||
proto.RegisterType((*QueryResolveLrnRequest)(nil), "cerc.registry.v1.QueryResolveLrnRequest")
|
||||
@@ -1262,88 +1363,93 @@ func init() {
|
||||
func init() { proto.RegisterFile("cerc/registry/v1/query.proto", fileDescriptor_c642b96b6da07a30) }
|
||||
|
||||
var fileDescriptor_c642b96b6da07a30 = []byte{
|
||||
// 1293 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x57, 0xcd, 0x6f, 0x1b, 0xc5,
|
||||
0x1b, 0xf6, 0xda, 0xb1, 0xdd, 0xbc, 0xfe, 0xb5, 0xea, 0x6f, 0x08, 0xed, 0x76, 0x1b, 0x6c, 0xb3,
|
||||
0xe4, 0xc3, 0x49, 0x94, 0xdd, 0x38, 0x91, 0xda, 0x2a, 0xe2, 0x40, 0x8c, 0x68, 0x5c, 0xfa, 0xa1,
|
||||
0x74, 0x91, 0x8a, 0xc4, 0xa5, 0x1a, 0xdb, 0x8b, 0xb3, 0x64, 0x3d, 0xe3, 0xee, 0xae, 0xdd, 0x9a,
|
||||
0xa8, 0x12, 0x42, 0xd0, 0x33, 0x88, 0x13, 0x82, 0x23, 0x27, 0x84, 0xf8, 0x3b, 0x2a, 0x71, 0xa9,
|
||||
0xc4, 0x85, 0x53, 0x40, 0x09, 0x17, 0xae, 0x85, 0x3f, 0x00, 0xed, 0xcc, 0xac, 0xbd, 0x6b, 0x67,
|
||||
0x63, 0x27, 0x02, 0x89, 0x93, 0x77, 0x67, 0x9f, 0xf7, 0x7d, 0x9e, 0x79, 0xbf, 0x66, 0x0c, 0xb3,
|
||||
0x75, 0xd3, 0xa9, 0xeb, 0x8e, 0xd9, 0xb4, 0x5c, 0xcf, 0xe9, 0xe9, 0xdd, 0xb2, 0xfe, 0xa8, 0x63,
|
||||
0x3a, 0x3d, 0xad, 0xed, 0x50, 0x8f, 0xa2, 0x8b, 0xfe, 0x57, 0x2d, 0xf8, 0xaa, 0x75, 0xcb, 0xca,
|
||||
0x6c, 0x93, 0xd2, 0xa6, 0x6d, 0xea, 0xb8, 0x6d, 0xe9, 0x98, 0x10, 0xea, 0x61, 0xcf, 0xa2, 0xc4,
|
||||
0xe5, 0x78, 0x65, 0xb9, 0x4e, 0xdd, 0x16, 0x75, 0xf5, 0x1a, 0x76, 0x4d, 0xee, 0x48, 0xef, 0x96,
|
||||
0x6b, 0xa6, 0x87, 0xcb, 0x7a, 0x1b, 0x37, 0x2d, 0xc2, 0xc0, 0x02, 0x3b, 0xd3, 0xa4, 0x4d, 0xca,
|
||||
0x1e, 0x75, 0xff, 0x49, 0xac, 0xe6, 0xc3, 0x1e, 0x02, 0xdb, 0x3a, 0xb5, 0x02, 0xab, 0xc2, 0x88,
|
||||
0xde, 0xbe, 0x3a, 0x06, 0x50, 0x67, 0x00, 0xdd, 0xf7, 0x89, 0x77, 0xb0, 0x83, 0x5b, 0xae, 0x61,
|
||||
0x3e, 0xea, 0x98, 0xae, 0xa7, 0x6e, 0xc3, 0x2b, 0x91, 0x55, 0xb7, 0x4d, 0x89, 0x6b, 0xa2, 0x35,
|
||||
0xc8, 0xb4, 0xd9, 0x8a, 0x2c, 0x15, 0xa5, 0x52, 0x6e, 0x5d, 0xd6, 0x86, 0x37, 0xac, 0x09, 0x0b,
|
||||
0x81, 0x53, 0xff, 0xcc, 0x08, 0x4f, 0x86, 0x59, 0xa7, 0x4e, 0x23, 0x20, 0x40, 0xef, 0x01, 0x60,
|
||||
0xcf, 0x73, 0xac, 0x5a, 0xc7, 0x33, 0x7d, 0x6f, 0xa9, 0x52, 0x6e, 0x7d, 0x63, 0xd4, 0xdb, 0x31,
|
||||
0xa6, 0xda, 0x6d, 0xb3, 0xf7, 0x00, 0xdb, 0x1d, 0xf3, 0x16, 0x69, 0x77, 0x3c, 0x23, 0xe4, 0x06,
|
||||
0x5d, 0x84, 0x14, 0xb6, 0x6d, 0x39, 0x59, 0x94, 0x4a, 0xe7, 0x0c, 0xff, 0x11, 0xdd, 0x04, 0x18,
|
||||
0x04, 0x52, 0x4e, 0x31, 0xd1, 0x0b, 0x1a, 0x8f, 0x99, 0xe6, 0xc7, 0x4c, 0xe3, 0xe9, 0x13, 0x91,
|
||||
0xd3, 0x76, 0x70, 0xd3, 0x14, 0x3c, 0x46, 0xc8, 0x52, 0x79, 0x00, 0xb0, 0xe5, 0x38, 0xb8, 0xc7,
|
||||
0x38, 0x51, 0x15, 0x32, 0x5d, 0x5f, 0x41, 0x20, 0x7c, 0x6d, 0x32, 0xe1, 0x21, 0xd5, 0xc2, 0x5e,
|
||||
0xf9, 0x49, 0x82, 0x73, 0x77, 0x71, 0x9b, 0xbb, 0x35, 0x86, 0xdc, 0x6e, 0x4e, 0xe6, 0x36, 0xb0,
|
||||
0xe7, 0xfe, 0xdd, 0x77, 0x88, 0xe7, 0xf4, 0xfa, 0x04, 0x7b, 0x90, 0x0b, 0x2d, 0xfb, 0x11, 0xda,
|
||||
0x33, 0x7b, 0x2c, 0x7b, 0xd3, 0x86, 0xff, 0x88, 0x6e, 0x42, 0x9a, 0x41, 0x59, 0xd4, 0xce, 0xb2,
|
||||
0x15, 0x6e, 0xbe, 0x99, 0xbc, 0x21, 0x29, 0xdf, 0x24, 0x01, 0x06, 0x5f, 0x90, 0x0c, 0x19, 0xd7,
|
||||
0x73, 0x2c, 0xd2, 0xe4, 0x7c, 0xd5, 0x84, 0x21, 0xde, 0x11, 0x82, 0x94, 0x45, 0x3c, 0x46, 0x99,
|
||||
0xaa, 0x26, 0x0c, 0xff, 0x05, 0x5d, 0x82, 0xf4, 0x87, 0x36, 0xc5, 0x1e, 0xcb, 0x92, 0x54, 0x4d,
|
||||
0x18, 0xfc, 0x15, 0x29, 0x90, 0xad, 0x51, 0x6a, 0x9b, 0x98, 0xc8, 0x53, 0x7e, 0x62, 0xab, 0x09,
|
||||
0x23, 0x58, 0x40, 0x33, 0x30, 0x65, 0x5b, 0x64, 0x4f, 0x4e, 0x0b, 0xff, 0xec, 0x0d, 0x55, 0x21,
|
||||
0x8d, 0xfd, 0x64, 0xc9, 0x99, 0xd3, 0x6c, 0x69, 0x90, 0x5f, 0x9f, 0x9b, 0x39, 0x40, 0x15, 0x48,
|
||||
0xb5, 0x70, 0x5b, 0xce, 0x32, 0x3f, 0xda, 0xe9, 0xd2, 0xe1, 0xef, 0xab, 0x85, 0xdb, 0x95, 0xac,
|
||||
0x08, 0xb0, 0x62, 0xc1, 0xf9, 0x48, 0xe9, 0xfe, 0x7b, 0xc9, 0x50, 0xbf, 0x96, 0x60, 0x26, 0x8a,
|
||||
0x14, 0x0d, 0x7c, 0x03, 0xb2, 0x0e, 0x5f, 0x12, 0x35, 0x76, 0x4c, 0x07, 0x73, 0x9b, 0xca, 0xd4,
|
||||
0xf3, 0x83, 0x42, 0xc2, 0x08, 0xe0, 0x68, 0x3b, 0xd2, 0x49, 0x5c, 0xdf, 0xe2, 0xd8, 0x4e, 0xe2,
|
||||
0xb4, 0xe1, 0x56, 0x52, 0x17, 0xe1, 0x55, 0x26, 0x6d, 0xdb, 0xf4, 0x38, 0x53, 0x30, 0x12, 0x2e,
|
||||
0x40, 0xd2, 0x6a, 0x88, 0x68, 0x24, 0xad, 0x86, 0xba, 0x03, 0x97, 0x86, 0x81, 0x62, 0x17, 0xd7,
|
||||
0x20, 0xc3, 0x65, 0xc5, 0x8f, 0xa1, 0xc8, 0x26, 0x04, 0x5a, 0x7d, 0x02, 0xf9, 0xa8, 0x47, 0xb7,
|
||||
0xd2, 0xab, 0x50, 0xd2, 0xb8, 0x15, 0xa7, 0x61, 0x68, 0x7e, 0x24, 0xcf, 0x3a, 0x3f, 0xd4, 0xef,
|
||||
0x24, 0x28, 0xc4, 0x52, 0xff, 0x77, 0x72, 0x83, 0xe1, 0x32, 0x53, 0x79, 0x0f, 0xb7, 0xcc, 0xa1,
|
||||
0x81, 0x1d, 0x8d, 0x84, 0x74, 0xe6, 0x48, 0x7c, 0x2b, 0x81, 0x3c, 0xca, 0x21, 0x42, 0x70, 0x1d,
|
||||
0xd2, 0x04, 0xb7, 0xfa, 0x03, 0xf0, 0xea, 0x68, 0x00, 0x7c, 0x2b, 0x36, 0xca, 0x44, 0x0c, 0x38,
|
||||
0xfe, 0x9f, 0xac, 0xce, 0xff, 0x33, 0x75, 0xef, 0xef, 0x52, 0xab, 0xbf, 0x77, 0x04, 0x53, 0x3e,
|
||||
0x8d, 0xa8, 0x0b, 0xf6, 0xac, 0x7e, 0x29, 0x89, 0x83, 0x53, 0x20, 0xc5, 0x0e, 0xf6, 0xe1, 0x82,
|
||||
0xff, 0xf9, 0x21, 0xee, 0x78, 0xbb, 0xd4, 0xb1, 0xbc, 0x9e, 0x08, 0x55, 0xe1, 0xf8, 0xad, 0x6c,
|
||||
0x05, 0xb0, 0xca, 0x86, 0xbf, 0x9d, 0x97, 0x07, 0x85, 0x95, 0x8f, 0x5c, 0x4a, 0x36, 0xd5, 0xa8,
|
||||
0x13, 0xb5, 0xd8, 0xc3, 0x2d, 0x7b, 0x64, 0xd5, 0x38, 0x4f, 0xc2, 0x3e, 0xd4, 0x25, 0xd1, 0x5a,
|
||||
0x77, 0x28, 0xdd, 0xeb, 0xb4, 0xef, 0x38, 0x24, 0xd8, 0xc0, 0x45, 0x48, 0xd9, 0x0e, 0x09, 0x26,
|
||||
0x8d, 0xed, 0x10, 0xf5, 0x5d, 0xd1, 0x5c, 0x21, 0x68, 0xff, 0x8c, 0x1f, 0x6c, 0x36, 0xb7, 0x3e,
|
||||
0x7b, 0xbc, 0x6e, 0xd1, 0x90, 0x3c, 0x14, 0xcb, 0xc2, 0x97, 0x61, 0xba, 0xd4, 0xee, 0x9a, 0x27,
|
||||
0xf2, 0xde, 0x16, 0x15, 0x16, 0xc6, 0x0e, 0x2e, 0x17, 0x93, 0x75, 0x75, 0xbf, 0x9f, 0x17, 0x60,
|
||||
0x6e, 0xd0, 0x54, 0x1c, 0x75, 0x97, 0x36, 0x3a, 0xb6, 0x59, 0xc1, 0x36, 0x26, 0xf5, 0xa0, 0xfe,
|
||||
0x54, 0x13, 0xe6, 0xc7, 0xe0, 0x84, 0x84, 0x37, 0xe1, 0x5c, 0x8d, 0x2f, 0x05, 0x25, 0x58, 0x1c,
|
||||
0x15, 0xb1, 0x55, 0xaf, 0xd3, 0x0e, 0xf1, 0x02, 0xdb, 0xbe, 0x85, 0xfa, 0x87, 0x04, 0x17, 0xa2,
|
||||
0x1f, 0xd1, 0x3d, 0xf8, 0x1f, 0xe6, 0x2b, 0x0f, 0x07, 0x15, 0x54, 0x59, 0x79, 0x79, 0x50, 0x58,
|
||||
0xe4, 0x79, 0x0e, 0x7f, 0x0d, 0xb2, 0x1c, 0x59, 0x33, 0x72, 0xe2, 0xd5, 0x0f, 0x3b, 0x7a, 0x26,
|
||||
0x41, 0x56, 0xf0, 0xc9, 0x29, 0x26, 0xf0, 0x4a, 0xa4, 0xca, 0x83, 0xfa, 0x7e, 0x9b, 0x5a, 0xa4,
|
||||
0x72, 0x5f, 0x94, 0xd4, 0x6b, 0x9c, 0x4a, 0xd8, 0x05, 0x2c, 0xc1, 0xeb, 0xf7, 0xbf, 0x16, 0x4a,
|
||||
0x4d, 0xcb, 0xdb, 0xed, 0xd4, 0xb4, 0x3a, 0x6d, 0xe9, 0xe2, 0x3e, 0xc9, 0x7f, 0x56, 0xdd, 0xc6,
|
||||
0x9e, 0xee, 0xf5, 0xda, 0xa6, 0xcb, 0x3c, 0xba, 0x46, 0x40, 0xbe, 0xfe, 0xd7, 0x34, 0xa4, 0x59,
|
||||
0x4c, 0xd1, 0x63, 0xc8, 0xf0, 0x3b, 0x1f, 0x9a, 0x8b, 0x39, 0xae, 0x22, 0x57, 0x4b, 0x65, 0x7e,
|
||||
0x0c, 0x8a, 0xa7, 0x42, 0x2d, 0x7e, 0xfa, 0xf3, 0xef, 0x5f, 0x25, 0x15, 0x24, 0xeb, 0x23, 0x37,
|
||||
0x58, 0x7e, 0xb5, 0x44, 0xfb, 0x90, 0x15, 0xf3, 0x03, 0xcd, 0x4f, 0x74, 0x50, 0x2a, 0x0b, 0xe3,
|
||||
0x60, 0x82, 0xfb, 0x75, 0xc6, 0x7d, 0x15, 0x5d, 0xd1, 0x8f, 0xb9, 0x3d, 0x73, 0xc6, 0x67, 0x12,
|
||||
0x4c, 0xf7, 0x67, 0x39, 0x5a, 0x8c, 0x71, 0x3c, 0x7c, 0xc6, 0x29, 0xa5, 0xf1, 0x40, 0xa1, 0x61,
|
||||
0x81, 0x69, 0x28, 0xa2, 0x7c, 0xac, 0x06, 0x7d, 0xdf, 0x6a, 0x3c, 0x45, 0x3f, 0x48, 0x80, 0x46,
|
||||
0x0f, 0x15, 0xb4, 0x36, 0x8e, 0x68, 0xf8, 0xe8, 0x53, 0xca, 0xa7, 0xb0, 0x10, 0x1a, 0xcb, 0x4c,
|
||||
0xe3, 0x0a, 0x5a, 0x8a, 0xd5, 0xb8, 0x5a, 0xeb, 0xad, 0xd6, 0x28, 0x69, 0xac, 0x5a, 0x0d, 0x2e,
|
||||
0xf7, 0x73, 0x09, 0x72, 0xa1, 0xc9, 0x8f, 0x96, 0x62, 0x58, 0x47, 0x4f, 0x20, 0x65, 0x79, 0x12,
|
||||
0xa8, 0x50, 0x56, 0x60, 0xca, 0xae, 0xa0, 0xcb, 0xa3, 0xca, 0xf8, 0x81, 0xf1, 0x31, 0xa4, 0xd9,
|
||||
0xe0, 0x46, 0x6f, 0xc4, 0x78, 0x0d, 0x1f, 0x00, 0xca, 0xdc, 0xc9, 0xa0, 0xf1, 0x29, 0x7b, 0xec,
|
||||
0x03, 0xf5, 0x7d, 0x9f, 0xfb, 0x29, 0xfa, 0x44, 0x82, 0xe9, 0xfe, 0xdc, 0x8d, 0xad, 0x9d, 0xe1,
|
||||
0x21, 0x1e, 0x5b, 0x3b, 0x23, 0x23, 0xfc, 0xa4, 0xde, 0xb1, 0x19, 0x18, 0x7d, 0x26, 0x01, 0x0c,
|
||||
0x46, 0x30, 0x2a, 0xc5, 0x36, 0xc6, 0xd0, 0x44, 0x57, 0x96, 0x26, 0x40, 0x4e, 0xd2, 0x45, 0x0c,
|
||||
0x8d, 0x7e, 0x94, 0x40, 0x8e, 0x1b, 0xca, 0xe8, 0xda, 0x49, 0x05, 0x19, 0x3f, 0xed, 0x95, 0xeb,
|
||||
0xa7, 0xb6, 0x1b, 0x2f, 0x58, 0x8c, 0xbd, 0xca, 0x5b, 0xcf, 0x0f, 0xf3, 0xd2, 0x8b, 0xc3, 0xbc,
|
||||
0xf4, 0xdb, 0x61, 0x5e, 0xfa, 0xe2, 0x28, 0x9f, 0x78, 0x71, 0x94, 0x4f, 0xfc, 0x72, 0x94, 0x4f,
|
||||
0x7c, 0xb0, 0xd0, 0xb4, 0x3c, 0xad, 0xdb, 0xa8, 0x69, 0x1e, 0x65, 0xe6, 0xab, 0x16, 0xd5, 0x6d,
|
||||
0x5c, 0xa7, 0xc4, 0xaa, 0x37, 0xf4, 0x27, 0x7d, 0x67, 0xb5, 0x0c, 0xfb, 0xdb, 0xbd, 0xf1, 0x77,
|
||||
0x00, 0x00, 0x00, 0xff, 0xff, 0xd9, 0x85, 0x36, 0x9d, 0x49, 0x10, 0x00, 0x00,
|
||||
// 1366 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x8f, 0xd3, 0xc6,
|
||||
0x17, 0x8f, 0x93, 0x4d, 0x16, 0x5e, 0xbe, 0x20, 0xbe, 0xd3, 0x2d, 0x18, 0x03, 0xc9, 0xd6, 0x65,
|
||||
0x77, 0xb3, 0xa0, 0xb5, 0xc9, 0x22, 0x01, 0x42, 0x3d, 0x94, 0x54, 0x85, 0x50, 0x7e, 0x08, 0x5c,
|
||||
0x89, 0x4a, 0xbd, 0xa0, 0x49, 0x32, 0x0d, 0xee, 0x3a, 0x33, 0xc1, 0x76, 0x02, 0xe9, 0x0a, 0xa9,
|
||||
0x42, 0x2d, 0x97, 0x5e, 0x5a, 0xf5, 0x54, 0xb5, 0xc7, 0x9e, 0xaa, 0xb6, 0x7f, 0x07, 0x52, 0x2f,
|
||||
0x48, 0xbd, 0xf4, 0x44, 0x2b, 0xe8, 0xa5, 0x57, 0xfa, 0x0f, 0x54, 0x9e, 0x19, 0x3b, 0x76, 0x1c,
|
||||
0x6f, 0xb2, 0x88, 0x4a, 0x3d, 0xad, 0x3d, 0xfe, 0xbc, 0xf7, 0xf9, 0xbc, 0x1f, 0xf3, 0x66, 0x36,
|
||||
0x70, 0xb4, 0x4d, 0xdc, 0xb6, 0xe9, 0x92, 0xae, 0xed, 0xf9, 0xee, 0xc8, 0x1c, 0xd6, 0xcd, 0xbb,
|
||||
0x03, 0xe2, 0x8e, 0x8c, 0xbe, 0xcb, 0x7c, 0x86, 0x0e, 0x04, 0x5f, 0x8d, 0xf0, 0xab, 0x31, 0xac,
|
||||
0x6b, 0x47, 0xbb, 0x8c, 0x75, 0x1d, 0x62, 0xe2, 0xbe, 0x6d, 0x62, 0x4a, 0x99, 0x8f, 0x7d, 0x9b,
|
||||
0x51, 0x4f, 0xe0, 0xb5, 0x13, 0x6d, 0xe6, 0xf5, 0x98, 0x67, 0xb6, 0xb0, 0x47, 0x84, 0x23, 0x73,
|
||||
0x58, 0x6f, 0x11, 0x1f, 0xd7, 0xcd, 0x3e, 0xee, 0xda, 0x94, 0x83, 0x25, 0x76, 0xa9, 0xcb, 0xba,
|
||||
0x8c, 0x3f, 0x9a, 0xc1, 0x93, 0x5c, 0xad, 0xc4, 0x3d, 0x84, 0xb6, 0x6d, 0x66, 0x87, 0x56, 0xd5,
|
||||
0x94, 0xde, 0x48, 0x1d, 0x07, 0xe8, 0x4b, 0x80, 0x6e, 0x06, 0xc4, 0x37, 0xb0, 0x8b, 0x7b, 0x9e,
|
||||
0x45, 0xee, 0x0e, 0x88, 0xe7, 0xeb, 0x97, 0xe0, 0xb5, 0xc4, 0xaa, 0xd7, 0x67, 0xd4, 0x23, 0xe8,
|
||||
0x14, 0x94, 0xfa, 0x7c, 0x45, 0x55, 0x96, 0x95, 0x5a, 0x79, 0x53, 0x35, 0x26, 0x03, 0x36, 0xa4,
|
||||
0x85, 0xc4, 0xe9, 0x7f, 0x97, 0xa4, 0x27, 0x8b, 0xb4, 0x99, 0xdb, 0x09, 0x09, 0xd0, 0xfb, 0x00,
|
||||
0xd8, 0xf7, 0x5d, 0xbb, 0x35, 0xf0, 0x49, 0xe0, 0xad, 0x50, 0x2b, 0x6f, 0x9e, 0x4e, 0x7b, 0x9b,
|
||||
0x62, 0x6a, 0x5c, 0x21, 0xa3, 0x5b, 0xd8, 0x19, 0x90, 0xcb, 0xb4, 0x3f, 0xf0, 0xad, 0x98, 0x1b,
|
||||
0x74, 0x00, 0x0a, 0xd8, 0x71, 0xd4, 0xfc, 0xb2, 0x52, 0xdb, 0x63, 0x05, 0x8f, 0xe8, 0x22, 0xc0,
|
||||
0x38, 0x91, 0x6a, 0x81, 0x8b, 0x5e, 0x35, 0x44, 0xce, 0x8c, 0x20, 0x67, 0x86, 0x28, 0x9f, 0xcc,
|
||||
0x9c, 0x71, 0x03, 0x77, 0x89, 0xe4, 0xb1, 0x62, 0x96, 0xda, 0x2d, 0x80, 0x0b, 0xae, 0x8b, 0x47,
|
||||
0x9c, 0x13, 0x35, 0xa1, 0x34, 0x0c, 0x14, 0x84, 0xc2, 0x4f, 0xcd, 0x27, 0x3c, 0xa6, 0x5a, 0xda,
|
||||
0x6b, 0xbf, 0x28, 0xb0, 0xe7, 0x1a, 0xee, 0x0b, 0xb7, 0xd6, 0x84, 0xdb, 0xf3, 0xf3, 0xb9, 0x0d,
|
||||
0xed, 0x85, 0x7f, 0xef, 0x5d, 0xea, 0xbb, 0xa3, 0x88, 0x60, 0x0b, 0xca, 0xb1, 0xe5, 0x20, 0x43,
|
||||
0x5b, 0x64, 0xc4, 0xab, 0xb7, 0xd7, 0x0a, 0x1e, 0xd1, 0x45, 0x28, 0x72, 0x28, 0xcf, 0xda, 0xcb,
|
||||
0x84, 0x22, 0xcc, 0xcf, 0xe7, 0xcf, 0x29, 0xda, 0xb7, 0x79, 0x80, 0xf1, 0x17, 0xa4, 0x42, 0xc9,
|
||||
0xf3, 0x5d, 0x9b, 0x76, 0x05, 0x5f, 0x33, 0x67, 0xc9, 0x77, 0x84, 0xa0, 0x60, 0x53, 0x9f, 0x53,
|
||||
0x16, 0x9a, 0x39, 0x2b, 0x78, 0x41, 0x07, 0xa1, 0xf8, 0x91, 0xc3, 0xb0, 0xcf, 0xab, 0xa4, 0x34,
|
||||
0x73, 0x96, 0x78, 0x45, 0x1a, 0x2c, 0xb6, 0x18, 0x73, 0x08, 0xa6, 0xea, 0x42, 0x50, 0xd8, 0x66,
|
||||
0xce, 0x0a, 0x17, 0xd0, 0x12, 0x2c, 0x38, 0x36, 0xdd, 0x52, 0x8b, 0xd2, 0x3f, 0x7f, 0x43, 0x4d,
|
||||
0x28, 0xe2, 0xa0, 0x58, 0x6a, 0x69, 0x37, 0x21, 0x8d, 0xeb, 0x1b, 0x70, 0x73, 0x07, 0xa8, 0x01,
|
||||
0x85, 0x1e, 0xee, 0xab, 0x8b, 0xdc, 0x8f, 0xb1, 0xbb, 0x72, 0x04, 0x71, 0xf5, 0x70, 0xbf, 0xb1,
|
||||
0x28, 0x13, 0xac, 0xd9, 0xb0, 0x2f, 0xd1, 0xba, 0xff, 0x5e, 0x31, 0xf4, 0x6f, 0x14, 0x58, 0x4a,
|
||||
0x22, 0xe5, 0x06, 0x3e, 0x07, 0x8b, 0xae, 0x58, 0x92, 0x3d, 0x36, 0x65, 0x07, 0x0b, 0x9b, 0xc6,
|
||||
0xc2, 0xe3, 0xa7, 0xd5, 0x9c, 0x15, 0xc2, 0xd1, 0xa5, 0xc4, 0x4e, 0x12, 0xfa, 0xd6, 0x66, 0xee,
|
||||
0x24, 0x41, 0x1b, 0xdf, 0x4a, 0xfa, 0x1a, 0xbc, 0xce, 0xa5, 0x5d, 0x22, 0xbe, 0x60, 0x0a, 0x47,
|
||||
0xc2, 0x7e, 0xc8, 0xdb, 0x1d, 0x99, 0x8d, 0xbc, 0xdd, 0xd1, 0x6f, 0xc0, 0xc1, 0x49, 0xa0, 0x8c,
|
||||
0xe2, 0x0c, 0x94, 0x84, 0xac, 0xec, 0x31, 0x94, 0x08, 0x42, 0xa2, 0xf5, 0xfb, 0x50, 0x49, 0x7a,
|
||||
0xf4, 0x1a, 0xa3, 0x06, 0xa3, 0x9d, 0xcb, 0x59, 0x1a, 0x26, 0xe6, 0x47, 0xfe, 0x65, 0xe7, 0x87,
|
||||
0xfe, 0xbd, 0x02, 0xd5, 0x4c, 0xea, 0xff, 0x4e, 0x6d, 0x30, 0x1c, 0xe2, 0x2a, 0xaf, 0xe3, 0x1e,
|
||||
0x99, 0x18, 0xd8, 0xc9, 0x4c, 0x28, 0x2f, 0x9d, 0x89, 0xef, 0x14, 0x50, 0xd3, 0x1c, 0x32, 0x05,
|
||||
0x67, 0xa1, 0x48, 0x71, 0x2f, 0x1a, 0x80, 0x47, 0xd2, 0x09, 0x08, 0xac, 0xf8, 0x28, 0x93, 0x39,
|
||||
0x10, 0xf8, 0x57, 0xd9, 0x9d, 0xff, 0xe7, 0xea, 0x3e, 0xb8, 0xc3, 0xec, 0x28, 0x76, 0x04, 0x0b,
|
||||
0x01, 0x8d, 0xec, 0x0b, 0xfe, 0xac, 0x7f, 0xa5, 0xc8, 0x83, 0x53, 0x22, 0x65, 0x04, 0xdb, 0xb0,
|
||||
0x3f, 0xf8, 0x7c, 0x1b, 0x0f, 0xfc, 0x3b, 0xcc, 0xb5, 0xfd, 0x91, 0x4c, 0x55, 0x75, 0x7a, 0x28,
|
||||
0x17, 0x42, 0x58, 0xe3, 0x74, 0x10, 0xce, 0x8b, 0xa7, 0xd5, 0x93, 0x1f, 0x7b, 0x8c, 0x9e, 0xd7,
|
||||
0x93, 0x4e, 0xf4, 0xe5, 0x11, 0xee, 0x39, 0xa9, 0x55, 0x6b, 0x1f, 0x8d, 0xfb, 0xd0, 0x4d, 0x59,
|
||||
0xbe, 0x70, 0xc5, 0x26, 0x51, 0x08, 0x4b, 0x50, 0x64, 0xf7, 0x28, 0x71, 0x65, 0x0c, 0xe2, 0x45,
|
||||
0xff, 0x29, 0x2c, 0x46, 0xc2, 0x42, 0x86, 0xd2, 0x84, 0x32, 0x1e, 0x2f, 0xcb, 0x92, 0x2c, 0xa7,
|
||||
0xe3, 0x88, 0xf8, 0xe3, 0x75, 0x89, 0x9b, 0xbe, 0xba, 0xea, 0xac, 0xcb, 0xd9, 0x71, 0x95, 0xb1,
|
||||
0xad, 0x41, 0xff, 0xaa, 0x4b, 0xc3, 0xf0, 0x0e, 0x40, 0xc1, 0x71, 0x69, 0x38, 0x4a, 0x1d, 0x97,
|
||||
0xea, 0xef, 0xc9, 0xe9, 0x11, 0x83, 0x46, 0x97, 0x98, 0x71, 0x35, 0xcb, 0x9b, 0x47, 0xa7, 0x17,
|
||||
0x46, 0x4e, 0x1c, 0x51, 0xeb, 0x13, 0xd2, 0x97, 0x45, 0x3c, 0xe6, 0x0c, 0xc9, 0x8e, 0xbc, 0x57,
|
||||
0x64, 0x0d, 0xe2, 0xd8, 0xf1, 0xed, 0x69, 0xbe, 0xb1, 0x15, 0x0d, 0xac, 0x55, 0x38, 0x3e, 0x9e,
|
||||
0x1a, 0x02, 0x75, 0x8d, 0x75, 0x06, 0x0e, 0x69, 0x60, 0x07, 0xd3, 0x76, 0xb8, 0xc1, 0x74, 0x02,
|
||||
0x2b, 0x33, 0x70, 0x52, 0xc2, 0x5b, 0xb0, 0xa7, 0x25, 0x96, 0x76, 0x2a, 0x68, 0xbb, 0xcd, 0x06,
|
||||
0xd4, 0x0f, 0x6d, 0x23, 0x0b, 0xfd, 0x2f, 0x05, 0xf6, 0x27, 0x3f, 0xa2, 0xeb, 0xf0, 0x3f, 0x2c,
|
||||
0x56, 0x6e, 0x8f, 0xb7, 0x48, 0xe3, 0xe4, 0x8b, 0xa7, 0xd5, 0x35, 0xd1, 0xc8, 0xf1, 0xaf, 0x61,
|
||||
0x1b, 0x27, 0xd6, 0xac, 0xb2, 0x7c, 0x0d, 0xd2, 0x8e, 0x1e, 0x29, 0xb0, 0x28, 0xf9, 0xd4, 0x02,
|
||||
0x17, 0x78, 0x38, 0xd1, 0x28, 0x61, 0x8b, 0xbc, 0xc3, 0x6c, 0xda, 0xb8, 0x29, 0xf7, 0xcc, 0x31,
|
||||
0x41, 0x25, 0xed, 0x42, 0x96, 0xf0, 0xf5, 0x87, 0xdf, 0xab, 0xb5, 0xae, 0xed, 0xdf, 0x19, 0xb4,
|
||||
0x8c, 0x36, 0xeb, 0x99, 0xf2, 0xc2, 0x2c, 0xfe, 0x6c, 0x78, 0x9d, 0x2d, 0xd3, 0x1f, 0xf5, 0x89,
|
||||
0xc7, 0x3d, 0x7a, 0x56, 0x48, 0xbe, 0xf9, 0xb0, 0x0c, 0x45, 0x9e, 0x53, 0x74, 0x0f, 0x4a, 0xe2,
|
||||
0x52, 0x8b, 0x8e, 0x67, 0x9c, 0xc7, 0x89, 0xbb, 0xb3, 0xb6, 0x32, 0x03, 0x25, 0x4a, 0xa1, 0x2f,
|
||||
0x3f, 0xfc, 0xf5, 0xcf, 0xaf, 0xf3, 0x1a, 0x52, 0xcd, 0xd4, 0x15, 0x5d, 0xdc, 0x9d, 0xd1, 0x36,
|
||||
0x2c, 0xca, 0x01, 0x89, 0x56, 0xe6, 0xba, 0x09, 0x68, 0xab, 0xb3, 0x60, 0x92, 0xfb, 0x0d, 0xce,
|
||||
0x7d, 0x04, 0x1d, 0x36, 0xa7, 0xfc, 0x7b, 0x20, 0x18, 0x1f, 0x29, 0xb0, 0x37, 0x3a, 0xac, 0xd0,
|
||||
0x5a, 0x86, 0xe3, 0xc9, 0x43, 0x5c, 0xab, 0xcd, 0x06, 0x4a, 0x0d, 0xab, 0x5c, 0xc3, 0x32, 0xaa,
|
||||
0x64, 0x6a, 0x30, 0xb7, 0xed, 0xce, 0x03, 0xf4, 0xa3, 0x02, 0x28, 0x7d, 0x6a, 0xa2, 0x53, 0xb3,
|
||||
0x88, 0x26, 0xcf, 0x76, 0xad, 0xbe, 0x0b, 0x0b, 0xa9, 0xb1, 0xce, 0x35, 0x9e, 0x44, 0xeb, 0x99,
|
||||
0x1a, 0x37, 0x5a, 0xa3, 0x8d, 0x16, 0xa3, 0x9d, 0x0d, 0xbb, 0x23, 0xe4, 0x7e, 0xae, 0x40, 0x39,
|
||||
0x76, 0xb4, 0xa1, 0xf5, 0x0c, 0xd6, 0xf4, 0x11, 0xab, 0x9d, 0x98, 0x07, 0x2a, 0x95, 0x55, 0xb9,
|
||||
0xb2, 0xc3, 0xe8, 0x50, 0x5a, 0x99, 0x38, 0x11, 0x3f, 0x81, 0x22, 0x3f, 0x99, 0xd0, 0x9b, 0x19,
|
||||
0x5e, 0xe3, 0x27, 0x9c, 0x76, 0x7c, 0x67, 0xd0, 0xec, 0x92, 0xdd, 0x0b, 0x80, 0xe6, 0x76, 0xc0,
|
||||
0xfd, 0x00, 0x7d, 0xaa, 0xc0, 0xde, 0x68, 0xee, 0x66, 0xf6, 0xce, 0xe4, 0x10, 0xcf, 0xec, 0x9d,
|
||||
0xd4, 0x08, 0xdf, 0x69, 0xef, 0x38, 0x1c, 0x8c, 0x3e, 0x53, 0x00, 0xc6, 0x23, 0x18, 0xd5, 0x32,
|
||||
0x37, 0xc6, 0xc4, 0x44, 0xd7, 0xd6, 0xe7, 0x40, 0xce, 0xb3, 0x8b, 0x38, 0x1a, 0xfd, 0xac, 0x80,
|
||||
0x9a, 0x35, 0x94, 0xd1, 0x99, 0x9d, 0x1a, 0x32, 0x7b, 0xda, 0x6b, 0x67, 0x77, 0x6d, 0x37, 0x5b,
|
||||
0xb0, 0x1c, 0x7b, 0xe8, 0x0b, 0x05, 0xca, 0xb1, 0xcb, 0x40, 0x66, 0xfb, 0xa6, 0xaf, 0x18, 0x99,
|
||||
0xed, 0x3b, 0xe5, 0x6e, 0xa1, 0xaf, 0x70, 0x25, 0x55, 0x74, 0x2c, 0xad, 0x24, 0x76, 0x71, 0x68,
|
||||
0xbc, 0xfd, 0xf8, 0x59, 0x45, 0x79, 0xf2, 0xac, 0xa2, 0xfc, 0xf1, 0xac, 0xa2, 0x7c, 0xf9, 0xbc,
|
||||
0x92, 0x7b, 0xf2, 0xbc, 0x92, 0xfb, 0xed, 0x79, 0x25, 0xf7, 0xe1, 0x6a, 0xd7, 0xf6, 0x8d, 0x61,
|
||||
0xa7, 0x65, 0xf8, 0x8c, 0xbb, 0xd8, 0xb0, 0x99, 0xe9, 0xe0, 0x36, 0xa3, 0x76, 0xbb, 0x63, 0xde,
|
||||
0x8f, 0x1c, 0xb6, 0x4a, 0xfc, 0x57, 0x8e, 0xd3, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x4e, 0x7a,
|
||||
0x2b, 0x91, 0xb8, 0x11, 0x00, 0x00,
|
||||
}
|
||||
|
||||
// Reference imports to suppress errors if they are not otherwise used.
|
||||
@@ -1376,6 +1482,8 @@ type QueryClient interface {
|
||||
ResolveLrn(ctx context.Context, in *QueryResolveLrnRequest, opts ...grpc.CallOption) (*QueryResolveLrnResponse, error)
|
||||
// Get registry module balance
|
||||
GetRegistryModuleBalance(ctx context.Context, in *QueryGetRegistryModuleBalanceRequest, opts ...grpc.CallOption) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||
// Authorities queries all authorities
|
||||
Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error)
|
||||
}
|
||||
|
||||
type queryClient struct {
|
||||
@@ -1467,6 +1575,15 @@ func (c *queryClient) GetRegistryModuleBalance(ctx context.Context, in *QueryGet
|
||||
return out, nil
|
||||
}
|
||||
|
||||
func (c *queryClient) Authorities(ctx context.Context, in *QueryAuthoritiesRequest, opts ...grpc.CallOption) (*QueryAuthoritiesResponse, error) {
|
||||
out := new(QueryAuthoritiesResponse)
|
||||
err := c.cc.Invoke(ctx, "/cerc.registry.v1.Query/Authorities", in, out, opts...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return out, nil
|
||||
}
|
||||
|
||||
// QueryServer is the server API for Query service.
|
||||
type QueryServer interface {
|
||||
// Params queries the registry module params.
|
||||
@@ -1487,6 +1604,8 @@ type QueryServer interface {
|
||||
ResolveLrn(context.Context, *QueryResolveLrnRequest) (*QueryResolveLrnResponse, error)
|
||||
// Get registry module balance
|
||||
GetRegistryModuleBalance(context.Context, *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error)
|
||||
// Authorities queries all authorities
|
||||
Authorities(context.Context, *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error)
|
||||
}
|
||||
|
||||
// UnimplementedQueryServer can be embedded to have forward compatible implementations.
|
||||
@@ -1520,6 +1639,9 @@ func (*UnimplementedQueryServer) ResolveLrn(ctx context.Context, req *QueryResol
|
||||
func (*UnimplementedQueryServer) GetRegistryModuleBalance(ctx context.Context, req *QueryGetRegistryModuleBalanceRequest) (*QueryGetRegistryModuleBalanceResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method GetRegistryModuleBalance not implemented")
|
||||
}
|
||||
func (*UnimplementedQueryServer) Authorities(ctx context.Context, req *QueryAuthoritiesRequest) (*QueryAuthoritiesResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "method Authorities not implemented")
|
||||
}
|
||||
|
||||
func RegisterQueryServer(s grpc1.Server, srv QueryServer) {
|
||||
s.RegisterService(&_Query_serviceDesc, srv)
|
||||
@@ -1687,6 +1809,24 @@ func _Query_GetRegistryModuleBalance_Handler(srv interface{}, ctx context.Contex
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
func _Query_Authorities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||
in := new(QueryAuthoritiesRequest)
|
||||
if err := dec(in); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if interceptor == nil {
|
||||
return srv.(QueryServer).Authorities(ctx, in)
|
||||
}
|
||||
info := &grpc.UnaryServerInfo{
|
||||
Server: srv,
|
||||
FullMethod: "/cerc.registry.v1.Query/Authorities",
|
||||
}
|
||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||
return srv.(QueryServer).Authorities(ctx, req.(*QueryAuthoritiesRequest))
|
||||
}
|
||||
return interceptor(ctx, in, info, handler)
|
||||
}
|
||||
|
||||
var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "cerc.registry.v1.Query",
|
||||
HandlerType: (*QueryServer)(nil),
|
||||
@@ -1727,6 +1867,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{
|
||||
MethodName: "GetRegistryModuleBalance",
|
||||
Handler: _Query_GetRegistryModuleBalance_Handler,
|
||||
},
|
||||
{
|
||||
MethodName: "Authorities",
|
||||
Handler: _Query_Authorities_Handler,
|
||||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "cerc/registry/v1/query.proto",
|
||||
@@ -2471,6 +2615,85 @@ func (m *QueryWhoisResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesRequest) 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 *QueryAuthoritiesRequest) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Owner) > 0 {
|
||||
i -= len(m.Owner)
|
||||
copy(dAtA[i:], m.Owner)
|
||||
i = encodeVarintQuery(dAtA, i, uint64(len(m.Owner)))
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesResponse) 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 *QueryAuthoritiesResponse) MarshalTo(dAtA []byte) (int, error) {
|
||||
size := m.Size()
|
||||
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||
i := len(dAtA)
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if m.Pagination != nil {
|
||||
{
|
||||
size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0x12
|
||||
}
|
||||
if len(m.Authorities) > 0 {
|
||||
for iNdEx := len(m.Authorities) - 1; iNdEx >= 0; iNdEx-- {
|
||||
{
|
||||
size, err := m.Authorities[iNdEx].MarshalToSizedBuffer(dAtA[:i])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i -= size
|
||||
i = encodeVarintQuery(dAtA, i, uint64(size))
|
||||
}
|
||||
i--
|
||||
dAtA[i] = 0xa
|
||||
}
|
||||
}
|
||||
return len(dAtA) - i, nil
|
||||
}
|
||||
|
||||
func (m *QueryLookupLrnRequest) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
@@ -3032,6 +3255,38 @@ func (m *QueryWhoisResponse) Size() (n int) {
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Owner)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryAuthoritiesResponse) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
}
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Authorities) > 0 {
|
||||
for _, e := range m.Authorities {
|
||||
l = e.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
}
|
||||
if m.Pagination != nil {
|
||||
l = m.Pagination.Size()
|
||||
n += 1 + l + sovQuery(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *QueryLookupLrnRequest) Size() (n int) {
|
||||
if m == nil {
|
||||
return 0
|
||||
@@ -4920,6 +5175,208 @@ func (m *QueryWhoisResponse) Unmarshal(dAtA []byte) error {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryAuthoritiesRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryAuthoritiesRequest: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryAuthoritiesRequest: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
stringLen |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
intStringLen := int(stringLen)
|
||||
if intStringLen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Owner = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryAuthoritiesResponse) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= uint64(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: QueryAuthoritiesResponse: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: QueryAuthoritiesResponse: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Authorities", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Authorities = append(m.Authorities, AuthorityEntry{})
|
||||
if err := m.Authorities[len(m.Authorities)-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 Pagination", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowQuery
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= int(b&0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.Pagination == nil {
|
||||
m.Pagination = &query.PageResponse{}
|
||||
}
|
||||
if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipQuery(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||
return ErrInvalidLengthQuery
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *QueryLookupLrnRequest) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
||||
@@ -393,6 +393,42 @@ func local_request_Query_GetRegistryModuleBalance_0(ctx context.Context, marshal
|
||||
|
||||
}
|
||||
|
||||
var (
|
||||
filter_Query_Authorities_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)}
|
||||
)
|
||||
|
||||
func request_Query_Authorities_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAuthoritiesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Authorities_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := client.Authorities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
func local_request_Query_Authorities_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||
var protoReq QueryAuthoritiesRequest
|
||||
var metadata runtime.ServerMetadata
|
||||
|
||||
if err := req.ParseForm(); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Authorities_0); err != nil {
|
||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||
}
|
||||
|
||||
msg, err := server.Authorities(ctx, &protoReq)
|
||||
return msg, metadata, err
|
||||
|
||||
}
|
||||
|
||||
// RegisterQueryHandlerServer registers the http handlers for service Query to "mux".
|
||||
// UnaryRPC :call QueryServer directly.
|
||||
// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
|
||||
@@ -606,6 +642,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Authorities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
var stream runtime.ServerTransportStream
|
||||
ctx = grpc.NewContextWithServerTransportStream(ctx, &stream)
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := local_request_Query_Authorities_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_Authorities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -827,6 +886,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
||||
|
||||
})
|
||||
|
||||
mux.Handle("GET", pattern_Query_Authorities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||
ctx, cancel := context.WithCancel(req.Context())
|
||||
defer cancel()
|
||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||
rctx, err := runtime.AnnotateContext(ctx, mux, req)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
resp, md, err := request_Query_Authorities_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||
if err != nil {
|
||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||
return
|
||||
}
|
||||
|
||||
forward_Query_Authorities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||
|
||||
})
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -848,6 +927,8 @@ var (
|
||||
pattern_Query_ResolveLrn_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "resolve"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_GetRegistryModuleBalance_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "balance"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
|
||||
pattern_Query_Authorities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cerc", "registry", "v1", "authorities"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -868,4 +949,6 @@ var (
|
||||
forward_Query_ResolveLrn_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_GetRegistryModuleBalance_0 = runtime.ForwardResponseMessage
|
||||
|
||||
forward_Query_Authorities_0 = runtime.ForwardResponseMessage
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user