refactor: simplify verification method structure

This commit is contained in:
Prad Nukala
2024-09-14 14:59:10 -04:00
parent 8f234dc561
commit 954f334e3c
23 changed files with 2431 additions and 29841 deletions
-70
View File
@@ -1,70 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package didv1
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
)
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: did/v1/accounts.proto
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
var File_did_v1_accounts_proto protoreflect.FileDescriptor
var file_did_v1_accounts_proto_rawDesc = []byte{
0x0a, 0x15, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42,
0x7d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41,
0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76,
0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06,
0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2,
0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var file_did_v1_accounts_proto_goTypes = []interface{}{}
var file_did_v1_accounts_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_did_v1_accounts_proto_init() }
func file_did_v1_accounts_proto_init() {
if File_did_v1_accounts_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_did_v1_accounts_proto_rawDesc,
NumEnums: 0,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_did_v1_accounts_proto_goTypes,
DependencyIndexes: file_did_v1_accounts_proto_depIdxs,
}.Build()
File_did_v1_accounts_proto = out.File
file_did_v1_accounts_proto_rawDesc = nil
file_did_v1_accounts_proto_goTypes = nil
file_did_v1_accounts_proto_depIdxs = nil
}
-209
View File
@@ -1,209 +0,0 @@
// Code generated by protoc-gen-go-pulsar. DO NOT EDIT.
package didv1
import (
_ "cosmossdk.io/api/amino"
_ "github.com/cosmos/gogoproto/gogoproto"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.27.0
// protoc (unknown)
// source: did/v1/enums.proto
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
// PermissionScope define the Capabilities Controllers can grant for Services
type PermissionScope int32
const (
PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0
PermissionScope_PERMISSION_SCOPE_PROFILE_NAME PermissionScope = 1
PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL PermissionScope = 2
PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE PermissionScope = 3
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5
PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6
PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7
PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8
PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10
PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11
PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12
PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13
)
// Enum value maps for PermissionScope.
var (
PermissionScope_name = map[int32]string{
0: "PERMISSION_SCOPE_UNSPECIFIED",
1: "PERMISSION_SCOPE_PROFILE_NAME",
2: "PERMISSION_SCOPE_IDENTIFIERS_EMAIL",
3: "PERMISSION_SCOPE_IDENTIFIERS_PHONE",
4: "PERMISSION_SCOPE_TRANSACTIONS_READ",
5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE",
6: "PERMISSION_SCOPE_WALLETS_READ",
7: "PERMISSION_SCOPE_WALLETS_CREATE",
8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE",
9: "PERMISSION_SCOPE_WALLETS_UPDATE",
10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY",
11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST",
12: "PERMISSION_SCOPE_ADMIN_USER",
13: "PERMISSION_SCOPE_ADMIN_VALIDATOR",
}
PermissionScope_value = map[string]int32{
"PERMISSION_SCOPE_UNSPECIFIED": 0,
"PERMISSION_SCOPE_PROFILE_NAME": 1,
"PERMISSION_SCOPE_IDENTIFIERS_EMAIL": 2,
"PERMISSION_SCOPE_IDENTIFIERS_PHONE": 3,
"PERMISSION_SCOPE_TRANSACTIONS_READ": 4,
"PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5,
"PERMISSION_SCOPE_WALLETS_READ": 6,
"PERMISSION_SCOPE_WALLETS_CREATE": 7,
"PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8,
"PERMISSION_SCOPE_WALLETS_UPDATE": 9,
"PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10,
"PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11,
"PERMISSION_SCOPE_ADMIN_USER": 12,
"PERMISSION_SCOPE_ADMIN_VALIDATOR": 13,
}
)
func (x PermissionScope) Enum() *PermissionScope {
p := new(PermissionScope)
*p = x
return p
}
func (x PermissionScope) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (PermissionScope) Descriptor() protoreflect.EnumDescriptor {
return file_did_v1_enums_proto_enumTypes[0].Descriptor()
}
func (PermissionScope) Type() protoreflect.EnumType {
return &file_did_v1_enums_proto_enumTypes[0]
}
func (x PermissionScope) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use PermissionScope.Descriptor instead.
func (PermissionScope) EnumDescriptor() ([]byte, []int) {
return file_did_v1_enums_proto_rawDescGZIP(), []int{0}
}
var File_did_v1_enums_proto protoreflect.FileDescriptor
var file_did_v1_enums_proto_rawDesc = []byte{
0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70,
0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f,
0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f,
0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2a, 0xaa, 0x04, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52,
0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e,
0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x50,
0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f,
0x50, 0x52, 0x4f, 0x46, 0x49, 0x4c, 0x45, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x26,
0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f,
0x50, 0x45, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x49, 0x46, 0x49, 0x45, 0x52, 0x53, 0x5f, 0x45,
0x4d, 0x41, 0x49, 0x4c, 0x10, 0x02, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53,
0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x49, 0x44, 0x45, 0x4e, 0x54,
0x49, 0x46, 0x49, 0x45, 0x52, 0x53, 0x5f, 0x50, 0x48, 0x4f, 0x4e, 0x45, 0x10, 0x03, 0x12, 0x26,
0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f,
0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f,
0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53,
0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53,
0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12,
0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43,
0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44,
0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e,
0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x43,
0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49,
0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c,
0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x08, 0x12,
0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43,
0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41,
0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49,
0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43,
0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, 0x12, 0x2b,
0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f,
0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f,
0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x50,
0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f,
0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20,
0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45,
0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52,
0x10, 0x0d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31,
0x42, 0x0a, 0x45, 0x6e, 0x75, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27,
0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e,
0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76,
0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06,
0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2,
0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06,
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
}
var (
file_did_v1_enums_proto_rawDescOnce sync.Once
file_did_v1_enums_proto_rawDescData = file_did_v1_enums_proto_rawDesc
)
func file_did_v1_enums_proto_rawDescGZIP() []byte {
file_did_v1_enums_proto_rawDescOnce.Do(func() {
file_did_v1_enums_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_enums_proto_rawDescData)
})
return file_did_v1_enums_proto_rawDescData
}
var file_did_v1_enums_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
var file_did_v1_enums_proto_goTypes = []interface{}{
(PermissionScope)(0), // 0: did.v1.PermissionScope
}
var file_did_v1_enums_proto_depIdxs = []int32{
0, // [0:0] is the sub-list for method output_type
0, // [0:0] is the sub-list for method input_type
0, // [0:0] is the sub-list for extension type_name
0, // [0:0] is the sub-list for extension extendee
0, // [0:0] is the sub-list for field type_name
}
func init() { file_did_v1_enums_proto_init() }
func file_did_v1_enums_proto_init() {
if File_did_v1_enums_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_did_v1_enums_proto_rawDesc,
NumEnums: 1,
NumMessages: 0,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_did_v1_enums_proto_goTypes,
DependencyIndexes: file_did_v1_enums_proto_depIdxs,
EnumInfos: file_did_v1_enums_proto_enumTypes,
}.Build()
File_did_v1_enums_proto = out.File
file_did_v1_enums_proto_rawDesc = nil
file_did_v1_enums_proto_goTypes = nil
file_did_v1_enums_proto_depIdxs = nil
}
File diff suppressed because it is too large Load Diff
+954 -1144
View File
File diff suppressed because it is too large Load Diff
+37 -76
View File
@@ -19,14 +19,13 @@ import (
const _ = grpc.SupportPackageIsVersion7
const (
Query_Params_FullMethodName = "/did.v1.Query/Params"
Query_ParamsAssets_FullMethodName = "/did.v1.Query/ParamsAssets"
Query_ParamsByAsset_FullMethodName = "/did.v1.Query/ParamsByAsset"
Query_ParamsKeys_FullMethodName = "/did.v1.Query/ParamsKeys"
Query_ParamsByKey_FullMethodName = "/did.v1.Query/ParamsByKey"
Query_RegistrationOptionsByKey_FullMethodName = "/did.v1.Query/RegistrationOptionsByKey"
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
Query_Service_FullMethodName = "/did.v1.Query/Service"
Query_Params_FullMethodName = "/did.v1.Query/Params"
Query_ParamsAssets_FullMethodName = "/did.v1.Query/ParamsAssets"
Query_ParamsByAsset_FullMethodName = "/did.v1.Query/ParamsByAsset"
Query_ParamsKeys_FullMethodName = "/did.v1.Query/ParamsKeys"
Query_ParamsByKey_FullMethodName = "/did.v1.Query/ParamsByKey"
Query_Resolve_FullMethodName = "/did.v1.Query/Resolve"
Query_Service_FullMethodName = "/did.v1.Query/Service"
)
// QueryClient is the client API for Query service.
@@ -36,21 +35,19 @@ type QueryClient interface {
// Params queries all parameters of the module.
Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error)
// ParamsAssets queries all parameters of the module.
ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsAssetsResponse, error)
// Params queries all parameters of the module.
ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByAssetResponse, error)
// ParamsKeys queries all parameters of the module.
ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsKeysResponse, error)
// Params queries all parameters of the module.
ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
// Params queries all parameters of the module.
RegistrationOptionsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByKeyResponse, error)
// Resolve queries the DID document by its id.
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error)
// Service returns associated ServiceInfo for a given Origin
// if the servie is not found, a fingerprint is generated to be used
// as a TXT record in DNS. v=sonr, o=origin, p=protocol
Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error)
Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error)
}
type queryClient struct {
@@ -70,8 +67,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc
return out, nil
}
func (c *queryClient) ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
func (c *queryClient) ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsAssetsResponse, error) {
out := new(QueryParamsAssetsResponse)
err := c.cc.Invoke(ctx, Query_ParamsAssets_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -79,8 +76,8 @@ func (c *queryClient) ParamsAssets(ctx context.Context, in *QueryRequest, opts .
return out, nil
}
func (c *queryClient) ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
func (c *queryClient) ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByAssetResponse, error) {
out := new(QueryParamsByAssetResponse)
err := c.cc.Invoke(ctx, Query_ParamsByAsset_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -88,8 +85,8 @@ func (c *queryClient) ParamsByAsset(ctx context.Context, in *QueryRequest, opts
return out, nil
}
func (c *queryClient) ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
func (c *queryClient) ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsKeysResponse, error) {
out := new(QueryParamsKeysResponse)
err := c.cc.Invoke(ctx, Query_ParamsKeys_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -97,8 +94,8 @@ func (c *queryClient) ParamsKeys(ctx context.Context, in *QueryRequest, opts ...
return out, nil
}
func (c *queryClient) ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
func (c *queryClient) ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByKeyResponse, error) {
out := new(QueryParamsByKeyResponse)
err := c.cc.Invoke(ctx, Query_ParamsByKey_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -106,17 +103,8 @@ func (c *queryClient) ParamsByKey(ctx context.Context, in *QueryRequest, opts ..
return out, nil
}
func (c *queryClient) RegistrationOptionsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
err := c.cc.Invoke(ctx, Query_RegistrationOptionsByKey_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) {
out := new(QueryResolveResponse)
err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -124,8 +112,8 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grp
return out, nil
}
func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResponse, error) {
out := new(QueryResponse)
func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) {
out := new(QueryServiceResponse)
err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
@@ -140,21 +128,19 @@ type QueryServer interface {
// Params queries all parameters of the module.
Params(context.Context, *QueryRequest) (*QueryParamsResponse, error)
// ParamsAssets queries all parameters of the module.
ParamsAssets(context.Context, *QueryRequest) (*QueryResponse, error)
ParamsAssets(context.Context, *QueryRequest) (*QueryParamsAssetsResponse, error)
// Params queries all parameters of the module.
ParamsByAsset(context.Context, *QueryRequest) (*QueryResponse, error)
ParamsByAsset(context.Context, *QueryRequest) (*QueryParamsByAssetResponse, error)
// ParamsKeys queries all parameters of the module.
ParamsKeys(context.Context, *QueryRequest) (*QueryResponse, error)
ParamsKeys(context.Context, *QueryRequest) (*QueryParamsKeysResponse, error)
// Params queries all parameters of the module.
ParamsByKey(context.Context, *QueryRequest) (*QueryResponse, error)
// Params queries all parameters of the module.
RegistrationOptionsByKey(context.Context, *QueryRequest) (*QueryResponse, error)
ParamsByKey(context.Context, *QueryRequest) (*QueryParamsByKeyResponse, error)
// Resolve queries the DID document by its id.
Resolve(context.Context, *QueryRequest) (*QueryResponse, error)
Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error)
// Service returns associated ServiceInfo for a given Origin
// if the servie is not found, a fingerprint is generated to be used
// as a TXT record in DNS. v=sonr, o=origin, p=protocol
Service(context.Context, *QueryRequest) (*QueryResponse, error)
Service(context.Context, *QueryRequest) (*QueryServiceResponse, error)
mustEmbedUnimplementedQueryServer()
}
@@ -165,25 +151,22 @@ type UnimplementedQueryServer struct {
func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Params not implemented")
}
func (UnimplementedQueryServer) ParamsAssets(context.Context, *QueryRequest) (*QueryResponse, error) {
func (UnimplementedQueryServer) ParamsAssets(context.Context, *QueryRequest) (*QueryParamsAssetsResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ParamsAssets not implemented")
}
func (UnimplementedQueryServer) ParamsByAsset(context.Context, *QueryRequest) (*QueryResponse, error) {
func (UnimplementedQueryServer) ParamsByAsset(context.Context, *QueryRequest) (*QueryParamsByAssetResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ParamsByAsset not implemented")
}
func (UnimplementedQueryServer) ParamsKeys(context.Context, *QueryRequest) (*QueryResponse, error) {
func (UnimplementedQueryServer) ParamsKeys(context.Context, *QueryRequest) (*QueryParamsKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ParamsKeys not implemented")
}
func (UnimplementedQueryServer) ParamsByKey(context.Context, *QueryRequest) (*QueryResponse, error) {
func (UnimplementedQueryServer) ParamsByKey(context.Context, *QueryRequest) (*QueryParamsByKeyResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ParamsByKey not implemented")
}
func (UnimplementedQueryServer) RegistrationOptionsByKey(context.Context, *QueryRequest) (*QueryResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegistrationOptionsByKey not implemented")
}
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResponse, error) {
func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented")
}
func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryResponse, error) {
func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Service not implemented")
}
func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {}
@@ -289,24 +272,6 @@ func _Query_ParamsByKey_Handler(srv interface{}, ctx context.Context, dec func(i
return interceptor(ctx, in, info, handler)
}
func _Query_RegistrationOptionsByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(QueryServer).RegistrationOptionsByKey(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Query_RegistrationOptionsByKey_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(QueryServer).RegistrationOptionsByKey(ctx, req.(*QueryRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(QueryRequest)
if err := dec(in); err != nil {
@@ -370,10 +335,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{
MethodName: "ParamsByKey",
Handler: _Query_ParamsByKey_Handler,
},
{
MethodName: "RegistrationOptionsByKey",
Handler: _Query_RegistrationOptionsByKey_Handler,
},
{
MethodName: "Resolve",
Handler: _Query_Resolve_Handler,
+43 -28
View File
@@ -26,18 +26,13 @@ type AccountTable interface {
HasByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (found bool, err error)
// GetByControllerChainCodeIndex returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByControllerChainCodeIndex(ctx context.Context, controller string, chain_code uint32, index uint32) (*Account, error)
HasByNamespaceAddress(ctx context.Context, namespace string, address string) (found bool, err error)
// GetByNamespaceAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetByNamespaceAddress(ctx context.Context, namespace string, address string) (*Account, error)
List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
ListRange(ctx context.Context, from, to AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error)
DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error
DeleteRange(ctx context.Context, from, to AccountIndexKey) error
Get(ctx context.Context, id string) (*Aliases, error)
HasBySubject(ctx context.Context, subject string) (found bool, err error)
// GetBySubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found.
GetBySubject(ctx context.Context, subject string) (*Aliases, error)
List(ctx context.Context, prefixKey AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error)
ListRange(ctx context.Context, from, to AliasesIndexKey, opts ...ormlist.Option) (AliasesIterator, error)
DeleteBy(ctx context.Context, prefixKey AliasesIndexKey) error
DeleteRange(ctx context.Context, from, to AliasesIndexKey) error
doNotImplement()
}
@@ -84,16 +79,6 @@ func (x AccountControllerLabelIndexKey) accountIndexKey() {}
func (this AccountControllerLabelIndexKey) WithController(controller string) AccountControllerLabelIndexKey {
this.vs = []interface{}{controller}
type AliasesSubjectIndexKey struct {
vs []interface{}
}
func (x AliasesSubjectIndexKey) id() uint32 { return 1 }
func (x AliasesSubjectIndexKey) values() []interface{} { return x.vs }
func (x AliasesSubjectIndexKey) aliasesIndexKey() {}
func (this AliasesSubjectIndexKey) WithSubject(subject string) AliasesSubjectIndexKey {
this.vs = []interface{}{subject}
return this
}
@@ -143,6 +128,24 @@ func (this AccountControllerChainCodeIndexIndexKey) WithControllerChainCodeIndex
return this
}
type AccountNamespaceAddressIndexKey struct {
vs []interface{}
}
func (x AccountNamespaceAddressIndexKey) id() uint32 { return 4 }
func (x AccountNamespaceAddressIndexKey) values() []interface{} { return x.vs }
func (x AccountNamespaceAddressIndexKey) accountIndexKey() {}
func (this AccountNamespaceAddressIndexKey) WithNamespace(namespace string) AccountNamespaceAddressIndexKey {
this.vs = []interface{}{namespace}
return this
}
func (this AccountNamespaceAddressIndexKey) WithNamespaceAddress(namespace string, address string) AccountNamespaceAddressIndexKey {
this.vs = []interface{}{namespace, address}
return this
}
type accountTable struct {
table ormtable.Table
}
@@ -191,16 +194,6 @@ func (this accountTable) GetByControllerLabel(ctx context.Context, controller st
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
controller,
label,
func (this aliasesTable) HasBySubject(ctx context.Context, subject string) (found bool, err error) {
return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx,
subject,
)
}
func (this aliasesTable) GetBySubject(ctx context.Context, subject string) (*Aliases, error) {
var aliases Aliases
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &aliases,
subject,
)
if err != nil {
return nil, err
@@ -257,6 +250,28 @@ func (this accountTable) GetByControllerChainCodeIndex(ctx context.Context, cont
return &account, nil
}
func (this accountTable) HasByNamespaceAddress(ctx context.Context, namespace string, address string) (found bool, err error) {
return this.table.GetIndexByID(4).(ormtable.UniqueIndex).Has(ctx,
namespace,
address,
)
}
func (this accountTable) GetByNamespaceAddress(ctx context.Context, namespace string, address string) (*Account, error) {
var account Account
found, err := this.table.GetIndexByID(4).(ormtable.UniqueIndex).Get(ctx, &account,
namespace,
address,
)
if err != nil {
return nil, err
}
if !found {
return nil, ormerrors.NotFound
}
return &account, nil
}
func (this accountTable) List(ctx context.Context, prefixKey AccountIndexKey, opts ...ormlist.Option) (AccountIterator, error) {
it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...)
return AccountIterator{it}, err
+123 -1177
View File
File diff suppressed because it is too large Load Diff
+444 -6765
View File
File diff suppressed because it is too large Load Diff
-72
View File
@@ -23,9 +23,6 @@ const (
Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService"
Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault"
Msg_SyncController_FullMethodName = "/did.v1.Msg/SyncController"
Msg_Authenticate_FullMethodName = "/did.v1.Msg/Authenticate"
Msg_ProveWitness_FullMethodName = "/did.v1.Msg/ProveWitness"
Msg_SyncVault_FullMethodName = "/did.v1.Msg/SyncVault"
Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController"
Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService"
)
@@ -45,12 +42,6 @@ type MsgClient interface {
AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error)
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error)
// Authenticate asserts the given controller is the owner of the given address.
Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error)
// ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators.
ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error)
// SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet.
SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error)
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error)
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
@@ -77,9 +68,6 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) {
out := new(MsgAuthorizeServiceResponse)
err := c.cc.Invoke(ctx, Msg_AuthorizeService_FullMethodName, in, out, opts...)
func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) {
out := new(MsgAuthenticateResponse)
err := c.cc.Invoke(ctx, Msg_Authenticate_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -89,9 +77,6 @@ func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
out := new(MsgAllocateVaultResponse)
err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...)
func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) {
out := new(MsgProveWitnessResponse)
err := c.cc.Invoke(ctx, Msg_ProveWitness_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -101,9 +86,6 @@ func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts
func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) {
out := new(MsgSyncControllerResponse)
err := c.cc.Invoke(ctx, Msg_SyncController_FullMethodName, in, out, opts...)
func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) {
out := new(MsgSyncVaultResponse)
err := c.cc.Invoke(ctx, Msg_SyncVault_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
@@ -143,12 +125,6 @@ type MsgServer interface {
AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error)
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error)
// Authenticate asserts the given controller is the owner of the given address.
Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error)
// ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators.
ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error)
// SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet.
SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error)
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
@@ -171,14 +147,6 @@ func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault)
}
func (UnimplementedMsgServer) SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented")
func (UnimplementedMsgServer) Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
}
func (UnimplementedMsgServer) ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented")
}
func (UnimplementedMsgServer) SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented")
}
func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
@@ -219,8 +187,6 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in
func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAuthorizeService)
func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAuthenticate)
if err := dec(in); err != nil {
return nil, err
}
@@ -233,22 +199,12 @@ func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(in
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgAuthorizeService))
return srv.(MsgServer).Authenticate(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_Authenticate_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgAllocateVault)
func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgProveWitness)
if err := dec(in); err != nil {
return nil, err
}
@@ -261,22 +217,12 @@ func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(in
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
return srv.(MsgServer).ProveWitness(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_ProveWitness_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness))
}
return interceptor(ctx, in, info, handler)
}
func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgSyncController)
func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(MsgSyncVault)
if err := dec(in); err != nil {
return nil, err
}
@@ -289,14 +235,6 @@ func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(inter
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController))
return srv.(MsgServer).SyncVault(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: Msg_SyncVault_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(MsgServer).SyncVault(ctx, req.(*MsgSyncVault))
}
return interceptor(ctx, in, info, handler)
}
@@ -359,16 +297,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
{
MethodName: "SyncController",
Handler: _Msg_SyncController_Handler,
MethodName: "Authenticate",
Handler: _Msg_Authenticate_Handler,
},
{
MethodName: "ProveWitness",
Handler: _Msg_ProveWitness_Handler,
},
{
MethodName: "SyncVault",
Handler: _Msg_SyncVault_Handler,
},
{
MethodName: "RegisterController",
File diff suppressed because it is too large Load Diff