mirror of
https://github.com/onsonr/sonr.git
synced 2025-03-10 13:07:09 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
001000da14
@ -84,6 +84,10 @@ COPY scripts/test_node.sh /usr/bin/test_node.sh
|
|||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
|
||||||
# rest server, tendermint p2p, tendermint rpc
|
# rest server, tendermint p2p, tendermint rpc
|
||||||
EXPOSE 1317 26656 26657
|
EXPOSE 1317 26656 26657 6060
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
CMD ["test_node.sh"]
|
CMD ["test_node.sh"]
|
||||||
|
=======
|
||||||
|
ENTRYPOINT ["/usr/bin/sonrd"]
|
||||||
|
>>>>>>> master
|
||||||
|
70
api/did/v1/accounts.pulsar.go
Normal file
70
api/did/v1/accounts.pulsar.go
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
// 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
api/did/v1/enums.pulsar.go
Normal file
209
api/did/v1/enums.pulsar.go
Normal file
@ -0,0 +1,209 @@
|
|||||||
|
// 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
|
||||||
|
}
|
@ -3,7 +3,6 @@ package didv1
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
_ "cosmossdk.io/api/amino"
|
_ "cosmossdk.io/api/amino"
|
||||||
binary "encoding/binary"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
runtime "github.com/cosmos/cosmos-proto/runtime"
|
runtime "github.com/cosmos/cosmos-proto/runtime"
|
||||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
@ -11,9 +10,7 @@ import (
|
|||||||
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
protoiface "google.golang.org/protobuf/runtime/protoiface"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
io "io"
|
io "io"
|
||||||
math "math"
|
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
sort "sort"
|
|
||||||
sync "sync"
|
sync "sync"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -8142,6 +8139,7 @@ func file_did_v1_genesis_proto_init() {
|
|||||||
if File_did_v1_genesis_proto != nil {
|
if File_did_v1_genesis_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
file_did_v1_types_proto_init()
|
||||||
if !protoimpl.UnsafeEnabled {
|
if !protoimpl.UnsafeEnabled {
|
||||||
file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
|
||||||
switch v := v.(*GenesisState); i {
|
switch v := v.(*GenesisState); i {
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -30,6 +30,14 @@ type AccountTable interface {
|
|||||||
ListRange(ctx context.Context, from, to 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
|
DeleteBy(ctx context.Context, prefixKey AccountIndexKey) error
|
||||||
DeleteRange(ctx context.Context, from, to 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()
|
doNotImplement()
|
||||||
}
|
}
|
||||||
@ -76,6 +84,16 @@ func (x AccountControllerLabelIndexKey) accountIndexKey() {}
|
|||||||
|
|
||||||
func (this AccountControllerLabelIndexKey) WithController(controller string) AccountControllerLabelIndexKey {
|
func (this AccountControllerLabelIndexKey) WithController(controller string) AccountControllerLabelIndexKey {
|
||||||
this.vs = []interface{}{controller}
|
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
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,6 +191,16 @@ func (this accountTable) GetByControllerLabel(ctx context.Context, controller st
|
|||||||
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
|
found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &account,
|
||||||
controller,
|
controller,
|
||||||
label,
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -23,6 +23,9 @@ const (
|
|||||||
Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService"
|
Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService"
|
||||||
Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault"
|
Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault"
|
||||||
Msg_SyncController_FullMethodName = "/did.v1.Msg/SyncController"
|
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_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController"
|
||||||
Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService"
|
Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService"
|
||||||
)
|
)
|
||||||
@ -42,6 +45,12 @@ type MsgClient interface {
|
|||||||
AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error)
|
AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error)
|
||||||
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
|
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
|
||||||
SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error)
|
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 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)
|
RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error)
|
||||||
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
||||||
@ -68,6 +77,9 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts
|
|||||||
func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) {
|
func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeService, opts ...grpc.CallOption) (*MsgAuthorizeServiceResponse, error) {
|
||||||
out := new(MsgAuthorizeServiceResponse)
|
out := new(MsgAuthorizeServiceResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_AuthorizeService_FullMethodName, in, out, opts...)
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -77,6 +89,9 @@ func (c *msgClient) AuthorizeService(ctx context.Context, in *MsgAuthorizeServic
|
|||||||
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
|
func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) {
|
||||||
out := new(MsgAllocateVaultResponse)
|
out := new(MsgAllocateVaultResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...)
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -86,6 +101,9 @@ func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opt
|
|||||||
func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) {
|
func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) {
|
||||||
out := new(MsgSyncControllerResponse)
|
out := new(MsgSyncControllerResponse)
|
||||||
err := c.cc.Invoke(ctx, Msg_SyncController_FullMethodName, in, out, opts...)
|
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 {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -125,6 +143,12 @@ type MsgServer interface {
|
|||||||
AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error)
|
AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error)
|
||||||
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
|
// SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet.
|
||||||
SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error)
|
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 initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
|
||||||
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
|
RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error)
|
||||||
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
||||||
@ -147,6 +171,14 @@ func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault)
|
|||||||
}
|
}
|
||||||
func (UnimplementedMsgServer) SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) {
|
func (UnimplementedMsgServer) SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented")
|
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) {
|
func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) {
|
||||||
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
|
return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented")
|
||||||
@ -187,6 +219,8 @@ 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) {
|
func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(MsgAuthorizeService)
|
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 {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -199,12 +233,22 @@ func _Msg_AuthorizeService_Handler(srv interface{}, ctx context.Context, dec fun
|
|||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(MsgServer).AuthorizeService(ctx, req.(*MsgAuthorizeService))
|
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)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(MsgAllocateVault)
|
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 {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -217,12 +261,22 @@ func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(i
|
|||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault))
|
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)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
in := new(MsgSyncController)
|
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 {
|
if err := dec(in); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@ -235,6 +289,14 @@ func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(
|
|||||||
}
|
}
|
||||||
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController))
|
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)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
@ -297,6 +359,16 @@ var Msg_ServiceDesc = grpc.ServiceDesc{
|
|||||||
{
|
{
|
||||||
MethodName: "SyncController",
|
MethodName: "SyncController",
|
||||||
Handler: _Msg_SyncController_Handler,
|
Handler: _Msg_SyncController_Handler,
|
||||||
|
MethodName: "Authenticate",
|
||||||
|
Handler: _Msg_Authenticate_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "ProveWitness",
|
||||||
|
Handler: _Msg_ProveWitness_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SyncVault",
|
||||||
|
Handler: _Msg_SyncVault_Handler,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
MethodName: "RegisterController",
|
MethodName: "RegisterController",
|
||||||
|
9390
api/did/v1/types.pulsar.go
Normal file
9390
api/did/v1/types.pulsar.go
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,6 +9,7 @@
|
|||||||
"ipfs-cluster@latest",
|
"ipfs-cluster@latest",
|
||||||
"air@latest"
|
"air@latest"
|
||||||
],
|
],
|
||||||
|
"packages": ["go@1.21"],
|
||||||
"env": {
|
"env": {
|
||||||
"GOPATH": "$HOME/go",
|
"GOPATH": "$HOME/go",
|
||||||
"PATH": "$HOME/go/bin:$PATH",
|
"PATH": "$HOME/go/bin:$PATH",
|
||||||
@ -48,6 +49,13 @@
|
|||||||
"testnet": [
|
"testnet": [
|
||||||
"devbox services up"
|
"devbox services up"
|
||||||
]
|
]
|
||||||
|
"install": ["make install"],
|
||||||
|
"gen": ["make proto-gen"],
|
||||||
|
"build": [
|
||||||
|
"make local-image",
|
||||||
|
"docker tag sonr:local ghcr.io/onsonr/sonrd:latest"
|
||||||
|
],
|
||||||
|
"push": ["docker push ghcr.io/onsonr/sonrd:latest"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
4
proto/did/v1/accounts.proto
Normal file
4
proto/did/v1/accounts.proto
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package did.v1;
|
||||||
|
|
||||||
|
option go_package = "github.com/onsonr/hway/x/did/types";
|
24
proto/did/v1/enums.proto
Normal file
24
proto/did/v1/enums.proto
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
package did.v1;
|
||||||
|
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "amino/amino.proto";
|
||||||
|
option go_package = "github.com/onsonr/hway/x/did/types";
|
||||||
|
|
||||||
|
// PermissionScope define the Capabilities Controllers can grant for Services
|
||||||
|
enum PermissionScope {
|
||||||
|
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;
|
||||||
|
}
|
@ -5,6 +5,9 @@ import "amino/amino.proto";
|
|||||||
import "gogoproto/gogo.proto";
|
import "gogoproto/gogo.proto";
|
||||||
|
|
||||||
option go_package = "github.com/onsonr/sonr/x/did/types";
|
option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||||
|
import "did/v1/types.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/onsonr/hway/x/did/types";
|
||||||
|
|
||||||
// GenesisState defines the module genesis state
|
// GenesisState defines the module genesis state
|
||||||
message GenesisState {
|
message GenesisState {
|
||||||
@ -223,3 +226,4 @@ enum PermissionScope {
|
|||||||
PERMISSION_SCOPE_ADMIN_USER = 12;
|
PERMISSION_SCOPE_ADMIN_USER = 12;
|
||||||
PERMISSION_SCOPE_ADMIN_VALIDATOR = 13;
|
PERMISSION_SCOPE_ADMIN_VALIDATOR = 13;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ package did.v1;
|
|||||||
import "did/v1/genesis.proto";
|
import "did/v1/genesis.proto";
|
||||||
import "did/v1/models.proto";
|
import "did/v1/models.proto";
|
||||||
import "google/api/annotations.proto";
|
import "google/api/annotations.proto";
|
||||||
|
import "did/v1/types.proto";
|
||||||
|
|
||||||
option go_package = "github.com/onsonr/sonr/x/did/types";
|
option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||||
|
|
||||||
@ -76,6 +77,93 @@ message QueryParamsResponse {
|
|||||||
|
|
||||||
message QueryParamsAssetsResponse {
|
message QueryParamsAssetsResponse {
|
||||||
repeated AssetInfo assets = 1;
|
repeated AssetInfo assets = 1;
|
||||||
|
// Accounts returns associated wallet accounts with the DID.
|
||||||
|
rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) {
|
||||||
|
option (google.api.http).get = "/did/{did}/accounts";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Credentials returns associated credentials with the DID and Service Origin.
|
||||||
|
rpc Credentials(QueryCredentialsRequest) returns (QueryCredentialsResponse) {
|
||||||
|
option (google.api.http).get = "/did/{did}/{origin}/credentials";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identities returns associated identity with the DID.
|
||||||
|
rpc Identities(QueryIdentitiesRequest) returns (QueryIdentitiesResponse) {
|
||||||
|
option (google.api.http).get = "/did/{did}/identities";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolve queries the DID document by its id.
|
||||||
|
rpc Resolve(QueryResolveRequest) returns (QueryResolveResponse) {
|
||||||
|
option (google.api.http).get = "/did/resolve/{did}";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Service returns associated ServiceInfo for a given Origin
|
||||||
|
rpc Service(QueryServiceRequest) returns (QueryServiceResponse) {
|
||||||
|
option (google.api.http).get = "/did/service/{origin}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryParamsRequest is the request type for the Query/Params RPC method.
|
||||||
|
message QueryParamsRequest {}
|
||||||
|
|
||||||
|
// QueryParamsResponse is the response type for the Query/Params RPC method.
|
||||||
|
message QueryParamsResponse {
|
||||||
|
// params defines the parameters of the module.
|
||||||
|
Params params = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryAccountsRequest is the request type for the Query/Exists RPC method.
|
||||||
|
message QueryAccountsRequest {
|
||||||
|
string did = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryAccountsResponse is the response type for the Query/Exists RPC method.
|
||||||
|
message QueryAccountsResponse {
|
||||||
|
bool exists = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryCredentialsRequest is the request type for the Query/Exists RPC method.
|
||||||
|
message QueryCredentialsRequest {
|
||||||
|
string did = 1;
|
||||||
|
string origin = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryCredentialsResponse is the response type for the Query/Exists RPC method.
|
||||||
|
message QueryCredentialsResponse {
|
||||||
|
map<string, bytes> credentials = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryIdentitiesRequest is the request type for the Query/Exists RPC method.
|
||||||
|
message QueryIdentitiesRequest {
|
||||||
|
string did = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryIdentitiesResponse is the response type for the Query/Exists RPC method.
|
||||||
|
message QueryIdentitiesResponse {
|
||||||
|
bool exists = 1;
|
||||||
|
repeated VerificationMethod verificationMethod = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryResolveRequest is the request type for the Query/Resolve RPC method.
|
||||||
|
message QueryResolveRequest {
|
||||||
|
string did = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryResolveResponse is the response type for the Query/Resolve RPC method.
|
||||||
|
message QueryResolveResponse {
|
||||||
|
// document is the DID document
|
||||||
|
Document document = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryServiceRequest is the request type for the Query/LoginOptions RPC method.
|
||||||
|
message QueryServiceRequest {
|
||||||
|
string origin = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method.
|
||||||
|
message QueryServiceResponse {
|
||||||
|
// options is the PublicKeyCredentialAttestationOptions
|
||||||
|
string options = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message QueryParamsKeysResponse {
|
message QueryParamsKeysResponse {
|
||||||
|
@ -5,6 +5,7 @@ package did.v1;
|
|||||||
import "cosmos/orm/v1/orm.proto";
|
import "cosmos/orm/v1/orm.proto";
|
||||||
import "did/v1/genesis.proto";
|
import "did/v1/genesis.proto";
|
||||||
import "did/v1/models.proto";
|
import "did/v1/models.proto";
|
||||||
|
import "did/v1/enums.proto";
|
||||||
|
|
||||||
option go_package = "github.com/onsonr/sonr/x/did/types";
|
option go_package = "github.com/onsonr/sonr/x/did/types";
|
||||||
|
|
||||||
@ -28,6 +29,30 @@ message Account {
|
|||||||
fields: "controller,chain_code,index"
|
fields: "controller,chain_code,index"
|
||||||
unique: true
|
unique: true
|
||||||
}
|
}
|
||||||
|
index: { id: 1, fields: "subject", unique: true }
|
||||||
|
};
|
||||||
|
|
||||||
|
// The unique identifier of the alias
|
||||||
|
string id = 1;
|
||||||
|
|
||||||
|
// Origin is the Alias provider
|
||||||
|
string origin = 2;
|
||||||
|
|
||||||
|
// Subject is the user defined alias
|
||||||
|
string subject = 3;
|
||||||
|
|
||||||
|
// Controller of the alias
|
||||||
|
string controller = 4;
|
||||||
|
|
||||||
|
// Expiration of the alias
|
||||||
|
uint64 expiration = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave)
|
||||||
|
message Assertion {
|
||||||
|
option (cosmos.orm.v1.table) = {
|
||||||
|
id: 2
|
||||||
|
primary_key: {fields: "id"}
|
||||||
};
|
};
|
||||||
|
|
||||||
// The unique identifier of the account
|
// The unique identifier of the account
|
||||||
@ -190,4 +215,15 @@ message VerificationMethod {
|
|||||||
|
|
||||||
// The public key of the verification
|
// The public key of the verification
|
||||||
PubKey public_key = 6;
|
PubKey public_key = 6;
|
||||||
|
// The controller DID of the service
|
||||||
|
string controller_did = 3;
|
||||||
|
|
||||||
|
// The domain name of the service
|
||||||
|
string origin_uri = 4;
|
||||||
|
|
||||||
|
// The service endpoint
|
||||||
|
map<string, string> service_endpoints = 5;
|
||||||
|
|
||||||
|
// Scopes is the Authorization Grants of the service
|
||||||
|
repeated PermissionScope scopes = 6;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,9 @@ syntax = "proto3";
|
|||||||
package did.v1;
|
package did.v1;
|
||||||
|
|
||||||
import "cosmos/msg/v1/msg.proto";
|
import "cosmos/msg/v1/msg.proto";
|
||||||
|
import "did/v1/enums.proto";
|
||||||
|
import "did/v1/genesis.proto";
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
import "cosmos_proto/cosmos.proto";
|
import "cosmos_proto/cosmos.proto";
|
||||||
import "did/v1/genesis.proto";
|
import "did/v1/genesis.proto";
|
||||||
import "did/v1/models.proto";
|
import "did/v1/models.proto";
|
||||||
@ -33,6 +36,20 @@ service Msg {
|
|||||||
|
|
||||||
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
||||||
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
|
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
|
||||||
|
// Authenticate asserts the given controller is the owner of the given address.
|
||||||
|
rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse);
|
||||||
|
|
||||||
|
// ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators.
|
||||||
|
rpc ProveWitness(MsgProveWitness) returns (MsgProveWitnessResponse);
|
||||||
|
|
||||||
|
// SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet.
|
||||||
|
rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse);
|
||||||
|
|
||||||
|
// RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias.
|
||||||
|
rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse);
|
||||||
|
|
||||||
|
// RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key.
|
||||||
|
rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgUpdateParams is the Msg/UpdateParams request type.
|
// MsgUpdateParams is the Msg/UpdateParams request type.
|
||||||
@ -89,6 +106,9 @@ message MsgAllocateVaultResponse {
|
|||||||
// MsgProveWitness is the message type for the ProveWitness RPC.
|
// MsgProveWitness is the message type for the ProveWitness RPC.
|
||||||
message MsgProveWitness {
|
message MsgProveWitness {
|
||||||
option (cosmos.msg.v1.signer) = "authority";
|
option (cosmos.msg.v1.signer) = "authority";
|
||||||
|
// MsgAuthenticate is the message type for the Authenticate RPC.
|
||||||
|
message MsgAuthenticate {
|
||||||
|
option (cosmos.msg.v1.signer) = "authority";
|
||||||
|
|
||||||
// authority is the address of the governance account.
|
// authority is the address of the governance account.
|
||||||
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||||
@ -127,6 +147,11 @@ message MsgSyncControllerResponse {
|
|||||||
|
|
||||||
// MsgRegisterController is the message type for the InitializeController RPC.
|
// MsgRegisterController is the message type for the InitializeController RPC.
|
||||||
message MsgRegisterController {
|
message MsgRegisterController {
|
||||||
|
// MsgAuthenticateResponse is the response type for the Authenticate RPC.
|
||||||
|
message MsgAuthenticateResponse {}
|
||||||
|
|
||||||
|
// MsgProveWitness is the message type for the ProveWitness RPC.
|
||||||
|
message MsgProveWitness {
|
||||||
option (cosmos.msg.v1.signer) = "authority";
|
option (cosmos.msg.v1.signer) = "authority";
|
||||||
|
|
||||||
// authority is the address of the governance account.
|
// authority is the address of the governance account.
|
||||||
@ -140,6 +165,53 @@ message MsgRegisterController {
|
|||||||
|
|
||||||
// Credential is the list of keyshares to initialize the controller with.
|
// Credential is the list of keyshares to initialize the controller with.
|
||||||
string credential_creation_response = 4;
|
string credential_creation_response = 4;
|
||||||
|
// property is key to prove.
|
||||||
|
string property = 2;
|
||||||
|
|
||||||
|
// Witness Value is the bytes of the witness.
|
||||||
|
bytes witness = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgProveWitnessResponse is the response type for the ProveWitness RPC.
|
||||||
|
message MsgProveWitnessResponse {
|
||||||
|
bool success = 1;
|
||||||
|
string property = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgSyncVault is the message type for the SyncVault RPC.
|
||||||
|
message MsgSyncVault {
|
||||||
|
option (cosmos.msg.v1.signer) = "controller";
|
||||||
|
|
||||||
|
// controller is the address of the controller to sync.
|
||||||
|
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||||
|
|
||||||
|
// cid is the IPFS content identifier.
|
||||||
|
string cid = 2;
|
||||||
|
|
||||||
|
// Macroon is the public token to authenticate the operation.
|
||||||
|
bytes macron = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgSyncVaultResponse is the response type for the SyncVault RPC.
|
||||||
|
message MsgSyncVaultResponse {
|
||||||
|
bool success = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// MsgRegisterController is the message type for the InitializeController RPC.
|
||||||
|
message MsgRegisterController {
|
||||||
|
option (cosmos.msg.v1.signer) = "authority";
|
||||||
|
|
||||||
|
// authority is the address of the governance account.
|
||||||
|
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||||
|
|
||||||
|
// Assertions is the list of assertions to initialize the controller with.
|
||||||
|
repeated bytes assertions = 2;
|
||||||
|
|
||||||
|
// Keyshares is the list of keyshares to initialize the controller with.
|
||||||
|
repeated bytes keyshares = 3;
|
||||||
|
|
||||||
|
// Verifications is the list of verifications to initialize the controller with.
|
||||||
|
repeated bytes verifications = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
|
// MsgRegisterControllerResponse is the response type for the InitializeController RPC.
|
||||||
@ -175,6 +247,11 @@ message MsgAuthorizeService {
|
|||||||
message MsgAuthorizeServiceResponse {
|
message MsgAuthorizeServiceResponse {
|
||||||
bool success = 1;
|
bool success = 1;
|
||||||
string token = 2;
|
string token = 2;
|
||||||
|
// Controller is the address of the initialized controller.
|
||||||
|
string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||||
|
|
||||||
|
// Accounts are a Address Map and Supported coin Denoms for the controller
|
||||||
|
map<string, string> accounts = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgRegisterService is the message type for the RegisterService RPC.
|
// MsgRegisterService is the message type for the RegisterService RPC.
|
||||||
@ -189,6 +266,16 @@ message MsgRegisterService {
|
|||||||
|
|
||||||
// token is the macron token to authenticate the operation.
|
// token is the macron token to authenticate the operation.
|
||||||
string token = 3;
|
string token = 3;
|
||||||
|
option (cosmos.msg.v1.signer) = "authority";
|
||||||
|
|
||||||
|
// authority is the address of the governance account.
|
||||||
|
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
|
||||||
|
|
||||||
|
// origin is the origin of the request in wildcard form.
|
||||||
|
string origin_uri = 2;
|
||||||
|
|
||||||
|
// PermissionScope is the scope of the service.
|
||||||
|
repeated PermissionScope scopes = 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.
|
// MsgRegisterServiceResponse is the response type for the RegisterService RPC.
|
||||||
|
114
proto/did/v1/types.proto
Normal file
114
proto/did/v1/types.proto
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
syntax = "proto3";
|
||||||
|
|
||||||
|
package did.v1;
|
||||||
|
|
||||||
|
import "cosmos/msg/v1/msg.proto";
|
||||||
|
import "gogoproto/gogo.proto";
|
||||||
|
import "cosmos_proto/cosmos.proto";
|
||||||
|
|
||||||
|
option go_package = "github.com/onsonr/hway/x/did/types";
|
||||||
|
|
||||||
|
// AssetInfo defines the asset info
|
||||||
|
message AssetInfo {
|
||||||
|
string id = 1;
|
||||||
|
string denom = 2;
|
||||||
|
string symbol = 3;
|
||||||
|
string asset_type = 4;
|
||||||
|
string origin_chain = 5;
|
||||||
|
string origin_denom = 6;
|
||||||
|
int32 decimals = 7;
|
||||||
|
string description = 8;
|
||||||
|
string image_url = 9;
|
||||||
|
string coingecko_id = 10;
|
||||||
|
bool is_enabled = 11;
|
||||||
|
string ibc_path = 12;
|
||||||
|
string ibc_channel = 13;
|
||||||
|
string ibc_port = 14;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ChainInfo defines the chain info
|
||||||
|
message ChainInfo {
|
||||||
|
string id = 1;
|
||||||
|
string chain_id = 2;
|
||||||
|
string name = 3;
|
||||||
|
string symbol = 4;
|
||||||
|
string bech32_prefix = 5;
|
||||||
|
string genesis_time = 6;
|
||||||
|
repeated Endpoint grpc_endpoints = 7;
|
||||||
|
repeated Endpoint rest_endpoints = 8;
|
||||||
|
ExplorerInfo explorer = 9;
|
||||||
|
FeeInfo fee_info = 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Credential defines a WebAuthn credential
|
||||||
|
message Credential {
|
||||||
|
string id = 1;
|
||||||
|
string credential_type = 2;
|
||||||
|
bytes credential_id = 3;
|
||||||
|
repeated string transport = 4;
|
||||||
|
string attestation_type = 5;
|
||||||
|
string display_name = 6;
|
||||||
|
string controller = 7;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Document defines a DID document
|
||||||
|
message Document {
|
||||||
|
string id = 1;
|
||||||
|
repeated VerificationMethod verification_methods = 2;
|
||||||
|
repeated string authentication = 4;
|
||||||
|
repeated string assertion_method = 5;
|
||||||
|
repeated string capability_delegation = 7;
|
||||||
|
repeated string capability_invocation = 8;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Endpoint defines an endpoint
|
||||||
|
message Endpoint {
|
||||||
|
string url = 1;
|
||||||
|
bool is_primary = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ExplorerInfo defines the explorer info
|
||||||
|
message ExplorerInfo {
|
||||||
|
string name = 1;
|
||||||
|
string url = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
// FeeInfo defines a fee info
|
||||||
|
message FeeInfo {
|
||||||
|
string base_denom = 1;
|
||||||
|
repeated string fee_rates = 2;
|
||||||
|
int32 init_gas_limit = 3;
|
||||||
|
bool is_simulable = 4;
|
||||||
|
double gas_multiply = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identity defines an associated profile for a did subject
|
||||||
|
message Identity {
|
||||||
|
string id = 1;
|
||||||
|
string subject = 2;
|
||||||
|
string controller = 3;
|
||||||
|
repeated Credential credentials = 4;
|
||||||
|
repeated VerificationMethod verification_methods = 5;
|
||||||
|
}
|
||||||
|
|
||||||
|
// PubKey defines a public key for a did
|
||||||
|
message PubKey {
|
||||||
|
string id = 1;
|
||||||
|
bytes key = 2;
|
||||||
|
string key_type = 3;
|
||||||
|
string controller = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
// VerificationMethod defines a verification method
|
||||||
|
message VerificationMethod {
|
||||||
|
string id = 1;
|
||||||
|
string controller = 2;
|
||||||
|
|
||||||
|
// The delegation proof or verification method
|
||||||
|
string public_key_multibase = 3;
|
||||||
|
|
||||||
|
// Public Key JWKS is a map of the associated public keys
|
||||||
|
map<string, string> public_key_jwks = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -76,4 +76,32 @@ func (k Querier) RegistrationOptionsByKey(goCtx context.Context, req *types.Quer
|
|||||||
// ctx := sdk.UnwrapSDKContext(goCtx)
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
panic("RegistrationOptionsByKey is unimplemented")
|
panic("RegistrationOptionsByKey is unimplemented")
|
||||||
return &types.QueryResponse{}, nil
|
return &types.QueryResponse{}, nil
|
||||||
|
// Accounts implements types.QueryServer.
|
||||||
|
func (k Querier) Accounts(goCtx context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.QueryAccountsResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Credentials implements types.QueryServer.
|
||||||
|
func (k Querier) Credentials(goCtx context.Context, req *types.QueryCredentialsRequest) (*types.QueryCredentialsResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.QueryCredentialsResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Identities implements types.QueryServer.
|
||||||
|
func (k Querier) Identities(goCtx context.Context, req *types.QueryIdentitiesRequest) (*types.QueryIdentitiesResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.QueryIdentitiesResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Resolve implements types.QueryServer.
|
||||||
|
func (k Querier) Resolve(goCtx context.Context, req *types.QueryResolveRequest) (*types.QueryResolveResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.QueryResolveResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Service implements types.QueryServer.
|
||||||
|
func (k Querier) Service(goCtx context.Context, req *types.QueryServiceRequest) (*types.QueryServiceResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.QueryServiceResponse{}, nil
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,13 @@ import (
|
|||||||
|
|
||||||
"github.com/onsonr/sonr/x/did/builder"
|
"github.com/onsonr/sonr/x/did/builder"
|
||||||
"github.com/onsonr/sonr/x/did/types"
|
"github.com/onsonr/sonr/x/did/types"
|
||||||
|
|
||||||
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
|
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
|
||||||
|
|
||||||
|
"cosmossdk.io/errors"
|
||||||
|
didv1 "github.com/onsonr/hway/api/did/v1"
|
||||||
|
"github.com/onsonr/hway/x/did/types"
|
||||||
)
|
)
|
||||||
|
|
||||||
type msgServer struct {
|
type msgServer struct {
|
||||||
@ -126,3 +133,49 @@ func (ms msgServer) UpdateParams(
|
|||||||
}
|
}
|
||||||
return nil, ms.k.Params.Set(ctx, msg.Params)
|
return nil, ms.k.Params.Set(ctx, msg.Params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Authenticate implements types.MsgServer.
|
||||||
|
func (ms msgServer) Authenticate(ctx context.Context, msg *types.MsgAuthenticate) (*types.MsgAuthenticateResponse, error) {
|
||||||
|
if ms.k.authority != msg.Authority {
|
||||||
|
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority)
|
||||||
|
}
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.MsgAuthenticateResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterController implements types.MsgServer.
|
||||||
|
func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegisterController) (*types.MsgRegisterControllerResponse, error) {
|
||||||
|
if ms.k.authority != msg.Authority {
|
||||||
|
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority)
|
||||||
|
}
|
||||||
|
return &types.MsgRegisterControllerResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// RegisterService implements types.MsgServer.
|
||||||
|
func (ms msgServer) RegisterService(goCtx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) {
|
||||||
|
if ms.k.authority != msg.Authority {
|
||||||
|
return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority)
|
||||||
|
}
|
||||||
|
|
||||||
|
ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
svc := didv1.Service{
|
||||||
|
ControllerDid: msg.Authority,
|
||||||
|
}
|
||||||
|
err := ms.k.OrmDB.ServiceTable().Insert(ctx, &svc)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return &types.MsgRegisterServiceResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// ProveWitness implements types.MsgServer.
|
||||||
|
func (ms msgServer) ProveWitness(ctx context.Context, msg *types.MsgProveWitness) (*types.MsgProveWitnessResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.MsgProveWitnessResponse{}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// SyncVault implements types.MsgServer.
|
||||||
|
func (ms msgServer) SyncVault(ctx context.Context, msg *types.MsgSyncVault) (*types.MsgSyncVaultResponse, error) {
|
||||||
|
// ctx := sdk.UnwrapSDKContext(goCtx)
|
||||||
|
return &types.MsgSyncVaultResponse{}, nil
|
||||||
|
}
|
||||||
|
@ -21,4 +21,17 @@ func (k Keeper) insertService(
|
|||||||
Success: true,
|
Success: true,
|
||||||
Did: record.Id,
|
Did: record.Id,
|
||||||
}, nil
|
}, nil
|
||||||
|
func (k Keeper) insertAliasFromDisplayName() {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) insertAssertionFromIdentity() {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) insertAuthenticationFromCredential() {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) insertControllerFromMotrVault() {
|
||||||
|
}
|
||||||
|
|
||||||
|
func (k Keeper) insertDelegationFromAccount() {
|
||||||
}
|
}
|
||||||
|
@ -9,6 +9,7 @@ import (
|
|||||||
io "io"
|
io "io"
|
||||||
math "math"
|
math "math"
|
||||||
math_bits "math/bits"
|
math_bits "math/bits"
|
||||||
|
math "math"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -618,3 +619,16 @@ var (
|
|||||||
ErrIntOverflowAccounts = fmt.Errorf("proto: integer overflow")
|
ErrIntOverflowAccounts = fmt.Errorf("proto: integer overflow")
|
||||||
ErrUnexpectedEndOfGroupAccounts = fmt.Errorf("proto: unexpected end of group")
|
ErrUnexpectedEndOfGroupAccounts = fmt.Errorf("proto: unexpected end of group")
|
||||||
)
|
)
|
||||||
|
func init() { proto.RegisterFile("did/v1/accounts.proto", fileDescriptor_2125a09fb14c3bc3) }
|
||||||
|
|
||||||
|
var fileDescriptor_2125a09fb14c3bc3 = []byte{
|
||||||
|
// 122 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xc9, 0x4c, 0xd1,
|
||||||
|
0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f,
|
||||||
|
0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x74, 0xb2, 0x39, 0xf1, 0x48, 0x8e, 0xf1,
|
||||||
|
0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e,
|
||||||
|
0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xa5, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc,
|
||||||
|
0x5c, 0xfd, 0xfc, 0xbc, 0xe2, 0xfc, 0xbc, 0x22, 0xfd, 0x8c, 0xf2, 0xc4, 0x4a, 0xfd, 0x0a, 0x7d,
|
||||||
|
0x90, 0x89, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0xc3, 0x8c, 0x01, 0x01, 0x00, 0x00,
|
||||||
|
0xff, 0xff, 0x28, 0xd1, 0x54, 0x54, 0x65, 0x00, 0x00, 0x00,
|
||||||
|
}
|
||||||
|
120
x/did/types/enums.pb.go
Normal file
120
x/did/types/enums.pb.go
Normal file
@ -0,0 +1,120 @@
|
|||||||
|
// Code generated by protoc-gen-gogo. DO NOT EDIT.
|
||||||
|
// source: did/v1/enums.proto
|
||||||
|
|
||||||
|
package types
|
||||||
|
|
||||||
|
import (
|
||||||
|
fmt "fmt"
|
||||||
|
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
|
||||||
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
|
proto "github.com/cosmos/gogoproto/proto"
|
||||||
|
math "math"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
|
var _ = proto.Marshal
|
||||||
|
var _ = fmt.Errorf
|
||||||
|
var _ = math.Inf
|
||||||
|
|
||||||
|
// This is a compile-time assertion to ensure that this generated file
|
||||||
|
// is compatible with the proto package it is being compiled against.
|
||||||
|
// A compilation error at this line likely means your copy of the
|
||||||
|
// proto package needs to be updated.
|
||||||
|
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
|
||||||
|
|
||||||
|
// 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
|
||||||
|
)
|
||||||
|
|
||||||
|
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",
|
||||||
|
}
|
||||||
|
|
||||||
|
var 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) String() string {
|
||||||
|
return proto.EnumName(PermissionScope_name, int32(x))
|
||||||
|
}
|
||||||
|
|
||||||
|
func (PermissionScope) EnumDescriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_001c58538597e328, []int{0}
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value)
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() { proto.RegisterFile("did/v1/enums.proto", fileDescriptor_001c58538597e328) }
|
||||||
|
|
||||||
|
var fileDescriptor_001c58538597e328 = []byte{
|
||||||
|
// 388 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd2, 0xc1, 0x6e, 0xd3, 0x30,
|
||||||
|
0x18, 0x07, 0xf0, 0x04, 0x46, 0x01, 0x03, 0xc2, 0x58, 0x9c, 0x06, 0x64, 0x63, 0x9b, 0x18, 0x02,
|
||||||
|
0xa9, 0xd6, 0xc4, 0x95, 0x8b, 0x93, 0x7c, 0x15, 0x96, 0x12, 0x27, 0xb2, 0x9d, 0x4d, 0x70, 0x89,
|
||||||
|
0xd6, 0x26, 0x6a, 0x73, 0x48, 0x5c, 0x35, 0x6d, 0xa1, 0x6f, 0xc1, 0x73, 0xf0, 0x24, 0x1c, 0x7b,
|
||||||
|
0xe4, 0x88, 0xda, 0x17, 0x41, 0x69, 0xe1, 0xd4, 0x36, 0x5c, 0x2c, 0xeb, 0xf3, 0x4f, 0x7f, 0x7d,
|
||||||
|
0x96, 0xfe, 0x88, 0x64, 0x45, 0x46, 0xe7, 0x57, 0x34, 0xaf, 0x66, 0x65, 0xdd, 0x1d, 0x4f, 0xcc,
|
||||||
|
0xd4, 0x90, 0x4e, 0x56, 0x64, 0xdd, 0xf9, 0xd5, 0xf1, 0xf3, 0xa1, 0x19, 0x9a, 0xcd, 0x88, 0x36,
|
||||||
|
0xb7, 0xed, 0xeb, 0xf1, 0xb3, 0xdb, 0xb2, 0xa8, 0x0c, 0xdd, 0x9c, 0xdb, 0xd1, 0xbb, 0x1f, 0x47,
|
||||||
|
0xe8, 0x69, 0x9c, 0x4f, 0xca, 0xa2, 0xae, 0x0b, 0x53, 0xa9, 0x81, 0x19, 0xe7, 0xe4, 0x14, 0xbd,
|
||||||
|
0x8c, 0x41, 0x86, 0x5c, 0x29, 0x1e, 0x89, 0x54, 0x79, 0x51, 0x0c, 0x69, 0x22, 0x54, 0x0c, 0x1e,
|
||||||
|
0xef, 0x71, 0xf0, 0xb1, 0x45, 0x5e, 0xa3, 0x57, 0x3b, 0x22, 0x96, 0x51, 0x8f, 0x07, 0x90, 0x0a,
|
||||||
|
0x16, 0x02, 0xb6, 0xc9, 0x1b, 0x74, 0xb6, 0x43, 0xb8, 0x0f, 0x42, 0x37, 0x19, 0x52, 0xa5, 0x10,
|
||||||
|
0x32, 0x1e, 0xe0, 0x3b, 0xff, 0x75, 0xf1, 0xa7, 0x48, 0x00, 0xbe, 0xbb, 0xd7, 0x69, 0xc9, 0x84,
|
||||||
|
0x62, 0x9e, 0xe6, 0x91, 0x50, 0xa9, 0x04, 0xe6, 0xe3, 0x23, 0x72, 0x89, 0xce, 0xdb, 0xdd, 0x8d,
|
||||||
|
0xe4, 0x1a, 0xf0, 0xbd, 0xbd, 0x7f, 0xb8, 0x61, 0x41, 0x00, 0xfa, 0x6f, 0x56, 0x87, 0x9c, 0xa3,
|
||||||
|
0x93, 0x83, 0xc4, 0x93, 0xc0, 0x34, 0xe0, 0xfb, 0x7b, 0x17, 0xfb, 0x87, 0x54, 0xe2, 0x2a, 0x4f,
|
||||||
|
0x72, 0x17, 0xf0, 0x83, 0xd6, 0xb0, 0x24, 0xf6, 0x9b, 0xb0, 0x87, 0xe4, 0x2d, 0xba, 0x68, 0xdf,
|
||||||
|
0xfe, 0x1a, 0x24, 0xef, 0x7d, 0xc6, 0x88, 0xbc, 0x47, 0x97, 0xed, 0xd2, 0x95, 0x11, 0xf3, 0x3d,
|
||||||
|
0xa6, 0x34, 0x7e, 0x44, 0x4e, 0xd0, 0x8b, 0x1d, 0xcc, 0xfc, 0x90, 0x8b, 0x34, 0x51, 0x20, 0xf1,
|
||||||
|
0x63, 0x72, 0x81, 0x4e, 0x0f, 0x80, 0x6b, 0x16, 0x70, 0x9f, 0xe9, 0x48, 0xe2, 0x27, 0xee, 0xc7,
|
||||||
|
0x9f, 0x2b, 0xc7, 0x5e, 0xae, 0x1c, 0xfb, 0xf7, 0xca, 0xb1, 0xbf, 0xaf, 0x1d, 0x6b, 0xb9, 0x76,
|
||||||
|
0xac, 0x5f, 0x6b, 0xc7, 0xfa, 0x72, 0x36, 0x2c, 0xa6, 0xa3, 0x59, 0xbf, 0x3b, 0x30, 0x25, 0x35,
|
||||||
|
0x55, 0x6d, 0xaa, 0x09, 0x1d, 0x7d, 0xbd, 0x5d, 0xd0, 0x6f, 0xb4, 0x29, 0xe9, 0x74, 0x31, 0xce,
|
||||||
|
0xeb, 0x7e, 0x67, 0xd3, 0xb8, 0x0f, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x1a, 0xa8, 0xd9,
|
||||||
|
0xb8, 0x02, 0x00, 0x00,
|
||||||
|
}
|
@ -4,7 +4,6 @@
|
|||||||
package types
|
package types
|
||||||
|
|
||||||
import (
|
import (
|
||||||
encoding_binary "encoding/binary"
|
|
||||||
fmt "fmt"
|
fmt "fmt"
|
||||||
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
|
_ "github.com/cosmos/cosmos-sdk/types/tx/amino"
|
||||||
_ "github.com/cosmos/gogoproto/gogoproto"
|
_ "github.com/cosmos/gogoproto/gogoproto"
|
||||||
@ -1261,6 +1260,26 @@ var fileDescriptor_fda181cae44f7c00 = []byte{
|
|||||||
0x7d, 0x3b, 0xbc, 0xbc, 0xea, 0xee, 0x59, 0xde, 0x60, 0xdf, 0x73, 0x03, 0xcf, 0xf5, 0xf7, 0xc5,
|
0x7d, 0x3b, 0xbc, 0xbc, 0xea, 0xee, 0x59, 0xde, 0x60, 0xdf, 0x73, 0x03, 0xcf, 0xf5, 0xf7, 0xc5,
|
||||||
0x9f, 0xf7, 0xfb, 0xfc, 0x27, 0x08, 0xff, 0x77, 0x37, 0xe8, 0x16, 0xc4, 0x6f, 0xed, 0x97, 0xff,
|
0x9f, 0xf7, 0xfb, 0xfc, 0x27, 0x08, 0xff, 0x77, 0x37, 0xe8, 0x16, 0xc4, 0x6f, 0xed, 0x97, 0xff,
|
||||||
0x0b, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xef, 0xb3, 0x35, 0xb4, 0x0f, 0x00, 0x00,
|
0x0b, 0x00, 0x00, 0xff, 0xff, 0xaa, 0xef, 0xb3, 0x35, 0xb4, 0x0f, 0x00, 0x00,
|
||||||
|
// 289 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x49, 0xc9, 0x4c, 0xd1,
|
||||||
|
0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9,
|
||||||
|
0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x0b,
|
||||||
|
0xe9, 0x83, 0x58, 0x10, 0x59, 0x29, 0xc1, 0xc4, 0xdc, 0xcc, 0xbc, 0x7c, 0x7d, 0x30, 0x09, 0x15,
|
||||||
|
0x12, 0x82, 0x1a, 0x53, 0x52, 0x59, 0x90, 0x0a, 0x35, 0x44, 0xc9, 0x86, 0x8b, 0xc7, 0x1d, 0x62,
|
||||||
|
0x6a, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x0e, 0x17, 0x5b, 0x41, 0x62, 0x51, 0x62, 0x6e, 0xb1,
|
||||||
|
0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x11, 0x9f, 0x1e, 0xc4, 0x16, 0xbd, 0x00, 0xb0, 0xa8, 0x13,
|
||||||
|
0xcb, 0x89, 0x7b, 0xf2, 0x0c, 0x41, 0x50, 0x35, 0x4a, 0x4b, 0x19, 0xb9, 0xd8, 0x20, 0x12, 0x42,
|
||||||
|
0x0e, 0x5c, 0x42, 0xe5, 0x19, 0x99, 0x25, 0xa9, 0x39, 0x99, 0xc5, 0x25, 0xa9, 0x29, 0xf1, 0x89,
|
||||||
|
0xc5, 0xc5, 0xa9, 0x25, 0x20, 0x43, 0x98, 0x35, 0xb8, 0x8d, 0x04, 0x61, 0x86, 0x38, 0x82, 0x44,
|
||||||
|
0x3d, 0xf3, 0xd2, 0xf2, 0x83, 0x04, 0x91, 0x14, 0x83, 0x45, 0x31, 0x4c, 0x48, 0xce, 0x48, 0xcc,
|
||||||
|
0xcc, 0x2b, 0x96, 0x60, 0x42, 0x35, 0xc1, 0x19, 0x24, 0x8a, 0x61, 0x02, 0x58, 0xb4, 0xd8, 0x4a,
|
||||||
|
0x7c, 0xc6, 0x02, 0x79, 0x86, 0x17, 0x0b, 0xe4, 0x19, 0xbb, 0x9e, 0x6f, 0xd0, 0xe2, 0x02, 0xf9,
|
||||||
|
0x16, 0xe2, 0x4e, 0x27, 0x9b, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48,
|
||||||
|
0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52,
|
||||||
|
0x4a, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf,
|
||||||
|
0x2b, 0xd2, 0xcf, 0x28, 0x4f, 0xac, 0xd4, 0xaf, 0xd0, 0x07, 0x69, 0x07, 0x87, 0x54, 0x12, 0x1b,
|
||||||
|
0x38, 0xa8, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x77, 0x5b, 0x51, 0x23, 0x87, 0x01, 0x00,
|
||||||
|
0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (this *Params) Equal(that interface{}) bool {
|
func (this *Params) Equal(that interface{}) bool {
|
||||||
@ -2048,6 +2067,8 @@ func (m *ValidatorInfo) Size() (n int) {
|
|||||||
}
|
}
|
||||||
if len(m.GrpcEndpoints) > 0 {
|
if len(m.GrpcEndpoints) > 0 {
|
||||||
for _, e := range m.GrpcEndpoints {
|
for _, e := range m.GrpcEndpoints {
|
||||||
|
if len(m.WhitelistedChains) > 0 {
|
||||||
|
for _, e := range m.WhitelistedChains {
|
||||||
l = e.Size()
|
l = e.Size()
|
||||||
n += 1 + l + sovGenesis(uint64(l))
|
n += 1 + l + sovGenesis(uint64(l))
|
||||||
}
|
}
|
||||||
@ -3355,6 +3376,8 @@ func (m *ValidatorInfo) Unmarshal(dAtA []byte) error {
|
|||||||
m.IbcChannel = &ValidatorInfo_IBCChannel{}
|
m.IbcChannel = &ValidatorInfo_IBCChannel{}
|
||||||
}
|
}
|
||||||
if err := m.IbcChannel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
if err := m.IbcChannel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
|
m.WhitelistedChains = append(m.WhitelistedChains, &ChainInfo{})
|
||||||
|
if err := m.WhitelistedChains[len(m.WhitelistedChains)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
@ -92,6 +92,14 @@ func NewMsgAllocateVault(
|
|||||||
sender sdk.Address,
|
sender sdk.Address,
|
||||||
) (*MsgAllocateVault, error) {
|
) (*MsgAllocateVault, error) {
|
||||||
return &MsgAllocateVault{
|
return &MsgAllocateVault{
|
||||||
|
// [RegisterController]
|
||||||
|
//
|
||||||
|
|
||||||
|
// NewMsgRegisterController creates a new instance of MsgRegisterController
|
||||||
|
func NewMsgRegisterController(
|
||||||
|
sender sdk.Address,
|
||||||
|
) (*MsgRegisterController, error) {
|
||||||
|
return &MsgRegisterController{
|
||||||
Authority: sender.String(),
|
Authority: sender.String(),
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
@ -104,6 +112,13 @@ func (msg MsgAllocateVault) Type() string { return "allocate_vault" }
|
|||||||
|
|
||||||
// GetSignBytes implements the LegacyMsg interface.
|
// GetSignBytes implements the LegacyMsg interface.
|
||||||
func (msg MsgAllocateVault) GetSignBytes() []byte {
|
func (msg MsgAllocateVault) GetSignBytes() []byte {
|
||||||
|
func (msg MsgRegisterController) Route() string { return ModuleName }
|
||||||
|
|
||||||
|
// Type returns the the action
|
||||||
|
func (msg MsgRegisterController) Type() string { return "initialize_controller" }
|
||||||
|
|
||||||
|
// GetSignBytes implements the LegacyMsg interface.
|
||||||
|
func (msg MsgRegisterController) GetSignBytes() []byte {
|
||||||
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
|
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,3 +167,38 @@ func (msg *MsgRegisterController) GetSigners() []sdk.AccAddress {
|
|||||||
func (msg *MsgRegisterController) Validate() error {
|
func (msg *MsgRegisterController) Validate() error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// [RegisterService]
|
||||||
|
//
|
||||||
|
|
||||||
|
// NewMsgRegisterController creates a new instance of MsgRegisterController
|
||||||
|
func NewMsgRegisterService(
|
||||||
|
sender sdk.Address,
|
||||||
|
) (*MsgRegisterService, error) {
|
||||||
|
return &MsgRegisterService{
|
||||||
|
Authority: sender.String(),
|
||||||
|
}, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Route returns the name of the module
|
||||||
|
func (msg MsgRegisterService) Route() string { return ModuleName }
|
||||||
|
|
||||||
|
// Type returns the the action
|
||||||
|
func (msg MsgRegisterService) Type() string { return "initialize_controller" }
|
||||||
|
|
||||||
|
// GetSignBytes implements the LegacyMsg interface.
|
||||||
|
func (msg MsgRegisterService) GetSignBytes() []byte {
|
||||||
|
return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg))
|
||||||
|
}
|
||||||
|
|
||||||
|
// GetSigners returns the expected signers for a MsgUpdateParams message.
|
||||||
|
func (msg *MsgRegisterService) GetSigners() []sdk.AccAddress {
|
||||||
|
addr, _ := sdk.AccAddressFromBech32(msg.Authority)
|
||||||
|
return []sdk.AccAddress{addr}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ValidateBasic does a sanity check on the provided data.
|
||||||
|
func (msg *MsgRegisterService) Validate() error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
36
x/did/types/perms.go
Normal file
36
x/did/types/perms.go
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
var (
|
||||||
|
PermissionScopeStrings = [...]string{
|
||||||
|
"profile.name",
|
||||||
|
"identifiers.email",
|
||||||
|
"identifiers.phone",
|
||||||
|
"transactions.read",
|
||||||
|
"transactions.write",
|
||||||
|
"wallets.read",
|
||||||
|
"wallets.create",
|
||||||
|
"wallets.subscribe",
|
||||||
|
"wallets.update",
|
||||||
|
"transactions.verify",
|
||||||
|
"transactions.broadcast",
|
||||||
|
"admin.user",
|
||||||
|
"admin.validator",
|
||||||
|
}
|
||||||
|
|
||||||
|
StringToPermissionScope = map[string]PermissionScope{
|
||||||
|
"PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED,
|
||||||
|
"PERMISSION_SCOPE_PROFILE_NAME": PermissionScope_PERMISSION_SCOPE_PROFILE_NAME,
|
||||||
|
"PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL,
|
||||||
|
"PERMISSION_SCOPE_IDENTIFIERS_PHONE": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE,
|
||||||
|
"PERMISSION_SCOPE_TRANSACTIONS_READ": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ,
|
||||||
|
"PERMISSION_SCOPE_TRANSACTIONS_WRITE": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE,
|
||||||
|
"PERMISSION_SCOPE_WALLETS_READ": PermissionScope_PERMISSION_SCOPE_WALLETS_READ,
|
||||||
|
"PERMISSION_SCOPE_WALLETS_CREATE": PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE,
|
||||||
|
"PERMISSION_SCOPE_WALLETS_SUBSCRIBE": PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE,
|
||||||
|
"PERMISSION_SCOPE_WALLETS_UPDATE": PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE,
|
||||||
|
"PERMISSION_SCOPE_TRANSACTIONS_VERIFY": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY,
|
||||||
|
"PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST,
|
||||||
|
"PERMISSION_SCOPE_ADMIN_USER": PermissionScope_PERMISSION_SCOPE_ADMIN_USER,
|
||||||
|
"PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR,
|
||||||
|
}
|
||||||
|
)
|
File diff suppressed because it is too large
Load Diff
@ -85,6 +85,213 @@ func request_Query_ParamsAssets_0(ctx context.Context, marshaler runtime.Marshal
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg, err := client.ParamsAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
msg, err := client.ParamsAssets(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryAccountsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryAccountsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Accounts(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryCredentialsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["origin"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Origin, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Credentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryCredentialsRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["origin"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Origin, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Credentials(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryIdentitiesRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Identities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func local_request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryIdentitiesRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Identities(ctx, &protoReq)
|
||||||
|
return msg, metadata, err
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryResolveRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Resolve(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
return msg, metadata, err
|
return msg, metadata, err
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -101,6 +308,29 @@ func local_request_Query_ParamsAssets_0(ctx context.Context, marshaler runtime.M
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg, err := server.ParamsAssets(ctx, &protoReq)
|
msg, err := server.ParamsAssets(ctx, &protoReq)
|
||||||
|
func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryResolveRequest
|
||||||
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
|
var (
|
||||||
|
val string
|
||||||
|
ok bool
|
||||||
|
err error
|
||||||
|
_ = err
|
||||||
|
)
|
||||||
|
|
||||||
|
val, ok = pathParams["did"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Did, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := server.Resolve(ctx, &protoReq)
|
||||||
return msg, metadata, err
|
return msg, metadata, err
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -111,6 +341,8 @@ var (
|
|||||||
|
|
||||||
func request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq QueryRequest
|
var protoReq QueryRequest
|
||||||
|
func request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryServiceRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -139,12 +371,26 @@ func request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marsha
|
|||||||
}
|
}
|
||||||
|
|
||||||
msg, err := client.ParamsByAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
msg, err := client.ParamsByAsset(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
|
val, ok = pathParams["origin"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Origin, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
msg, err := client.Service(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD))
|
||||||
return msg, metadata, err
|
return msg, metadata, err
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func local_request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
func local_request_Query_ParamsByAsset_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
var protoReq QueryRequest
|
var protoReq QueryRequest
|
||||||
|
func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) {
|
||||||
|
var protoReq QueryServiceRequest
|
||||||
var metadata runtime.ServerMetadata
|
var metadata runtime.ServerMetadata
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -496,6 +742,17 @@ func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marsha
|
|||||||
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val, ok = pathParams["origin"]
|
||||||
|
if !ok {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin")
|
||||||
|
}
|
||||||
|
|
||||||
|
protoReq.Origin, err = runtime.String(val)
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err)
|
||||||
|
}
|
||||||
|
|
||||||
msg, err := server.Service(ctx, &protoReq)
|
msg, err := server.Service(ctx, &protoReq)
|
||||||
return msg, metadata, err
|
return msg, metadata, err
|
||||||
|
|
||||||
@ -531,6 +788,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("GET", pattern_Query_ParamsAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("GET", pattern_Query_ParamsAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
var stream runtime.ServerTransportStream
|
var stream runtime.ServerTransportStream
|
||||||
@ -542,6 +800,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, md, err := local_request_Query_ParamsAssets_0(rctx, inboundMarshaler, server, req, pathParams)
|
resp, md, err := local_request_Query_ParamsAssets_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
resp, md, err := local_request_Query_Accounts_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -554,6 +813,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("GET", pattern_Query_ParamsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("GET", pattern_Query_ParamsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
var stream runtime.ServerTransportStream
|
var stream runtime.ServerTransportStream
|
||||||
@ -565,6 +829,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, md, err := local_request_Query_ParamsByAsset_0(rctx, inboundMarshaler, server, req, pathParams)
|
resp, md, err := local_request_Query_ParamsByAsset_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
resp, md, err := local_request_Query_Credentials_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -577,6 +842,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("GET", pattern_Query_ParamsKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("GET", pattern_Query_ParamsKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
forward_Query_Credentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
var stream runtime.ServerTransportStream
|
var stream runtime.ServerTransportStream
|
||||||
@ -588,6 +858,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, md, err := local_request_Query_ParamsKeys_0(rctx, inboundMarshaler, server, req, pathParams)
|
resp, md, err := local_request_Query_ParamsKeys_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
|
resp, md, err := local_request_Query_Identities_0(rctx, inboundMarshaler, server, req, pathParams)
|
||||||
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer())
|
||||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@ -642,6 +913,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv
|
|||||||
}
|
}
|
||||||
|
|
||||||
forward_Query_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
forward_Query_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -753,6 +1025,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("GET", pattern_Query_ParamsAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("GET", pattern_Query_ParamsAssets_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
mux.Handle("GET", pattern_Query_Accounts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
@ -762,6 +1035,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, md, err := request_Query_ParamsAssets_0(rctx, inboundMarshaler, client, req, pathParams)
|
resp, md, err := request_Query_ParamsAssets_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
@ -773,6 +1047,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("GET", pattern_Query_ParamsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("GET", pattern_Query_ParamsByAsset_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
@ -782,6 +1061,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, md, err := request_Query_ParamsByAsset_0(rctx, inboundMarshaler, client, req, pathParams)
|
resp, md, err := request_Query_ParamsByAsset_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
resp, md, err := request_Query_Credentials_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
@ -793,6 +1073,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
})
|
})
|
||||||
|
|
||||||
mux.Handle("GET", pattern_Query_ParamsKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
mux.Handle("GET", pattern_Query_ParamsKeys_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
|
forward_Query_Credentials_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) {
|
||||||
ctx, cancel := context.WithCancel(req.Context())
|
ctx, cancel := context.WithCancel(req.Context())
|
||||||
defer cancel()
|
defer cancel()
|
||||||
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req)
|
||||||
@ -802,6 +1087,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
resp, md, err := request_Query_ParamsKeys_0(rctx, inboundMarshaler, client, req, pathParams)
|
resp, md, err := request_Query_ParamsKeys_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
|
resp, md, err := request_Query_Identities_0(rctx, inboundMarshaler, client, req, pathParams)
|
||||||
ctx = runtime.NewServerMetadataContext(ctx, md)
|
ctx = runtime.NewServerMetadataContext(ctx, md)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err)
|
||||||
@ -849,6 +1135,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie
|
|||||||
}
|
}
|
||||||
|
|
||||||
forward_Query_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
forward_Query_RegistrationOptionsByKey_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...)
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
@ -911,6 +1198,15 @@ var (
|
|||||||
pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"service", "origin"}, "", runtime.AssumeColonVerbOpt(false)))
|
pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"service", "origin"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "accounts"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_Credentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"did", "origin", "credentials"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_Identities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "identities"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0}, []string{"did", "resolve"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
|
|
||||||
|
pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "service", "origin"}, "", runtime.AssumeColonVerbOpt(false)))
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
@ -925,6 +1221,11 @@ var (
|
|||||||
forward_Query_ParamsByKey_0 = runtime.ForwardResponseMessage
|
forward_Query_ParamsByKey_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Query_RegistrationOptionsByKey_0 = runtime.ForwardResponseMessage
|
forward_Query_RegistrationOptionsByKey_0 = runtime.ForwardResponseMessage
|
||||||
|
forward_Query_Accounts_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Query_Credentials_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
forward_Query_Identities_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
forward_Query_Resolve_0 = runtime.ForwardResponseMessage
|
forward_Query_Resolve_0 = runtime.ForwardResponseMessage
|
||||||
|
|
||||||
|
@ -41,6 +41,14 @@ type Account struct {
|
|||||||
Index uint32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"`
|
Index uint32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"`
|
||||||
// The supported chains of the account
|
// The supported chains of the account
|
||||||
Chains []string `protobuf:"bytes,8,rep,name=chains,proto3" json:"chains,omitempty"`
|
Chains []string `protobuf:"bytes,8,rep,name=chains,proto3" json:"chains,omitempty"`
|
||||||
|
// Origin is the Alias provider
|
||||||
|
Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"`
|
||||||
|
// Subject is the user defined alias
|
||||||
|
Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"`
|
||||||
|
// Controller of the alias
|
||||||
|
Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"`
|
||||||
|
// Expiration of the alias
|
||||||
|
Expiration uint64 `protobuf:"varint,5,opt,name=expiration,proto3" json:"expiration,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Account) Reset() { *m = Account{} }
|
func (m *Account) Reset() { *m = Account{} }
|
||||||
@ -84,6 +92,21 @@ func (m *Account) GetId() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *Account) GetController() string {
|
func (m *Account) GetController() string {
|
||||||
|
func (m *Aliases) GetOrigin() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Origin
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Aliases) GetSubject() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Subject
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Aliases) GetController() string {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Controller
|
return m.Controller
|
||||||
}
|
}
|
||||||
@ -330,6 +353,14 @@ type ServiceRecord struct {
|
|||||||
ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
// Scopes is the Authorization Grants of the service
|
// Scopes is the Authorization Grants of the service
|
||||||
Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"`
|
||||||
|
// The controller DID of the service
|
||||||
|
ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"`
|
||||||
|
// The domain name of the service
|
||||||
|
OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"`
|
||||||
|
// The service endpoint
|
||||||
|
ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
|
||||||
|
// Scopes is the Authorization Grants of the service
|
||||||
|
Scopes []PermissionScope `protobuf:"varint,6,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ServiceRecord) Reset() { *m = ServiceRecord{} }
|
func (m *ServiceRecord) Reset() { *m = ServiceRecord{} }
|
||||||
@ -387,6 +418,7 @@ func (m *ServiceRecord) GetAuthority() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (m *ServiceRecord) GetOrigin() string {
|
func (m *ServiceRecord) GetOrigin() string {
|
||||||
|
func (m *Service) GetControllerDid() string {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Origin
|
return m.Origin
|
||||||
}
|
}
|
||||||
@ -396,11 +428,15 @@ func (m *ServiceRecord) GetOrigin() string {
|
|||||||
func (m *ServiceRecord) GetDescription() string {
|
func (m *ServiceRecord) GetDescription() string {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.Description
|
return m.Description
|
||||||
|
func (m *Service) GetOriginUri() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OriginUri
|
||||||
}
|
}
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ServiceRecord) GetServiceEndpoints() map[string]string {
|
func (m *ServiceRecord) GetServiceEndpoints() map[string]string {
|
||||||
|
func (m *Service) GetServiceEndpoints() map[string]string {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.ServiceEndpoints
|
return m.ServiceEndpoints
|
||||||
}
|
}
|
||||||
@ -501,6 +537,9 @@ func (m *VerificationMethod) GetSubject() string {
|
|||||||
func (m *VerificationMethod) GetPublicKey() *PubKey {
|
func (m *VerificationMethod) GetPublicKey() *PubKey {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.PublicKey
|
return m.PublicKey
|
||||||
|
func (m *Service) GetScopes() []PermissionScope {
|
||||||
|
if m != nil {
|
||||||
|
return m.Scopes
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
@ -512,6 +551,10 @@ func init() {
|
|||||||
proto.RegisterType((*ServiceRecord)(nil), "did.v1.ServiceRecord")
|
proto.RegisterType((*ServiceRecord)(nil), "did.v1.ServiceRecord")
|
||||||
proto.RegisterMapType((map[string]string)(nil), "did.v1.ServiceRecord.ServiceEndpointsEntry")
|
proto.RegisterMapType((map[string]string)(nil), "did.v1.ServiceRecord.ServiceEndpointsEntry")
|
||||||
proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod")
|
proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod")
|
||||||
|
proto.RegisterType((*Delegation)(nil), "did.v1.Delegation")
|
||||||
|
proto.RegisterMapType((map[string]string)(nil), "did.v1.Delegation.PublicKeyJwksEntry")
|
||||||
|
proto.RegisterType((*Service)(nil), "did.v1.Service")
|
||||||
|
proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry")
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
|
func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) }
|
||||||
@ -570,6 +613,55 @@ var fileDescriptor_f44bb702879c34b4 = []byte{
|
|||||||
0xef, 0xdb, 0xf1, 0x05, 0xd7, 0x97, 0xe5, 0x6a, 0x46, 0x44, 0x36, 0x17, 0xb9, 0x12, 0xb9, 0x9c,
|
0xef, 0xdb, 0xf1, 0x05, 0xd7, 0x97, 0xe5, 0x6a, 0x46, 0x44, 0x36, 0x17, 0xb9, 0x12, 0xb9, 0x9c,
|
||||||
0xdb, 0x9f, 0xa7, 0x73, 0xf3, 0xe5, 0x30, 0x0e, 0x56, 0xab, 0xd0, 0x7e, 0x36, 0xde, 0xff, 0x2f,
|
0xdb, 0x9f, 0xa7, 0x73, 0xf3, 0xe5, 0x30, 0x0e, 0x56, 0xab, 0xd0, 0x7e, 0x36, 0xde, 0xff, 0x2f,
|
||||||
0x00, 0x00, 0xff, 0xff, 0x31, 0x1c, 0x51, 0xe6, 0x98, 0x06, 0x00, 0x00,
|
0x00, 0x00, 0xff, 0xff, 0x31, 0x1c, 0x51, 0xe6, 0x98, 0x06, 0x00, 0x00,
|
||||||
|
// 760 bytes of a gzipped FileDescriptorProto
|
||||||
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x95, 0xbd, 0x6e, 0x2b, 0x45,
|
||||||
|
0x14, 0xc7, 0xb3, 0x5e, 0x7f, 0x1e, 0x7f, 0x60, 0x46, 0x81, 0x2c, 0x46, 0x31, 0xc6, 0xe8, 0x4a,
|
||||||
|
0xae, 0xbc, 0xdc, 0x4b, 0x83, 0x72, 0x29, 0x30, 0x49, 0x0a, 0x40, 0x91, 0x22, 0x07, 0x1a, 0x1a,
|
||||||
|
0x6b, 0xbd, 0x33, 0x71, 0x26, 0xde, 0x9d, 0x59, 0xcd, 0xcc, 0x3a, 0xd9, 0x8e, 0x1e, 0x09, 0x51,
|
||||||
|
0x50, 0xf3, 0x00, 0x34, 0xbc, 0x06, 0x65, 0x24, 0x1a, 0x0a, 0x0a, 0x94, 0xbc, 0x01, 0x4f, 0x80,
|
||||||
|
0x76, 0x67, 0xd6, 0xde, 0xd8, 0x01, 0x84, 0x52, 0xd9, 0xf3, 0x3f, 0x67, 0xe6, 0xfc, 0xce, 0x7f,
|
||||||
|
0x8e, 0x3d, 0x80, 0x30, 0xc5, 0xee, 0xea, 0xa5, 0x2b, 0x95, 0xa7, 0xc8, 0x38, 0x12, 0x5c, 0x71,
|
||||||
|
0x54, 0xc5, 0x14, 0x8f, 0x57, 0x2f, 0x7b, 0x07, 0x3e, 0x97, 0x21, 0x97, 0x2e, 0x17, 0x61, 0x9a,
|
||||||
|
0xc2, 0x45, 0xa8, 0x13, 0x7a, 0xfb, 0x66, 0xd3, 0x82, 0x30, 0x22, 0xa9, 0x34, 0x6a, 0x7e, 0x14,
|
||||||
|
0x61, 0x71, 0x68, 0xb4, 0xe1, 0xcf, 0x16, 0xd4, 0x26, 0x01, 0xf5, 0x24, 0x91, 0xa8, 0x03, 0x25,
|
||||||
|
0x8a, 0x1d, 0x6b, 0x60, 0x8d, 0x1a, 0xd3, 0x12, 0xc5, 0xe8, 0x6d, 0xa8, 0x72, 0x41, 0x17, 0x94,
|
||||||
|
0x39, 0xa5, 0x4c, 0x33, 0x2b, 0xe4, 0x40, 0x4d, 0xc6, 0xf3, 0x6b, 0xe2, 0x2b, 0xc7, 0xce, 0x02,
|
||||||
|
0xf9, 0x12, 0xf5, 0x01, 0x7c, 0xce, 0x94, 0xe0, 0x41, 0x40, 0x84, 0x53, 0xce, 0x82, 0x05, 0x25,
|
||||||
|
0x8d, 0x93, 0xdb, 0x88, 0x0a, 0x4f, 0x51, 0xce, 0x9c, 0xca, 0xc0, 0x1a, 0x95, 0xa7, 0x05, 0xe5,
|
||||||
|
0xe8, 0xf0, 0xaf, 0x9f, 0x7e, 0xfb, 0xde, 0x3e, 0x80, 0x72, 0x4a, 0x82, 0xda, 0xeb, 0x3a, 0x5d,
|
||||||
|
0xcb, 0xb1, 0x1c, 0x6b, 0xf8, 0x6d, 0x09, 0x1a, 0x13, 0x29, 0x89, 0x48, 0x93, 0x77, 0x70, 0xdf,
|
||||||
|
0x81, 0xfa, 0x92, 0x24, 0x33, 0x95, 0x44, 0xc4, 0x00, 0xd7, 0x96, 0x24, 0xf9, 0x2a, 0x89, 0x48,
|
||||||
|
0xc6, 0x25, 0x08, 0x26, 0x4c, 0x51, 0x2f, 0xc8, 0xa0, 0x5b, 0xd3, 0x82, 0x82, 0x5e, 0x43, 0x3d,
|
||||||
|
0x24, 0xca, 0xc3, 0x9e, 0xf2, 0x9c, 0xf2, 0xc0, 0x1e, 0x35, 0x5f, 0xbd, 0x37, 0xd6, 0x1e, 0x8f,
|
||||||
|
0xd7, 0xf5, 0xc6, 0x67, 0x26, 0xe3, 0x94, 0x29, 0x91, 0x4c, 0xd7, 0x1b, 0xb6, 0x9a, 0xae, 0x6c,
|
||||||
|
0x37, 0xdd, 0x7b, 0x0d, 0xed, 0x47, 0x5b, 0x51, 0x17, 0xec, 0x25, 0x49, 0x0c, 0x79, 0xfa, 0x15,
|
||||||
|
0xed, 0x43, 0x65, 0xe5, 0x05, 0x71, 0xce, 0xad, 0x17, 0x47, 0xa5, 0x8f, 0xad, 0xa3, 0x4e, 0xe6,
|
||||||
|
0x48, 0x5d, 0x3b, 0xe2, 0x94, 0x86, 0x3f, 0x5a, 0xd0, 0x9c, 0x28, 0x45, 0xd2, 0x71, 0xf8, 0x9f,
|
||||||
|
0x26, 0xac, 0x8b, 0xd8, 0x85, 0x22, 0xa9, 0x1a, 0x09, 0xce, 0x2f, 0xcd, 0x6d, 0xe9, 0xc5, 0x7f,
|
||||||
|
0xf5, 0xb4, 0x85, 0x65, 0x0f, 0x7f, 0xb1, 0x00, 0x8e, 0x37, 0xf7, 0xbc, 0x4d, 0xd5, 0x05, 0x1b,
|
||||||
|
0xa7, 0xf8, 0xba, 0x63, 0x4c, 0x31, 0xfa, 0x10, 0xf6, 0xa3, 0x78, 0x1e, 0x50, 0x7f, 0x96, 0xe2,
|
||||||
|
0x86, 0x71, 0xa0, 0xe8, 0xdc, 0x93, 0x39, 0x1b, 0xd2, 0xb1, 0x2f, 0x49, 0x72, 0x96, 0x47, 0xd0,
|
||||||
|
0xbb, 0xd0, 0x58, 0x79, 0x71, 0xa0, 0x66, 0x3e, 0xc5, 0x06, 0xb6, 0x9e, 0x09, 0xc7, 0x14, 0xa3,
|
||||||
|
0x01, 0x34, 0x2f, 0x29, 0x5b, 0x10, 0x11, 0x09, 0xca, 0x54, 0x06, 0xdc, 0x9a, 0x16, 0xa5, 0x2d,
|
||||||
|
0xe2, 0xf2, 0xf0, 0x3b, 0x1b, 0xe0, 0x84, 0x04, 0x64, 0xf1, 0xb4, 0x8f, 0xbb, 0xc4, 0x87, 0x00,
|
||||||
|
0xfe, 0x95, 0x47, 0x99, 0xf6, 0x56, 0x73, 0x36, 0x32, 0x25, 0x73, 0xf7, 0x03, 0x68, 0xeb, 0xb0,
|
||||||
|
0x87, 0xb1, 0x20, 0x52, 0x1a, 0xc4, 0x56, 0x26, 0x4e, 0xb4, 0x86, 0x5e, 0x40, 0x67, 0x63, 0xe2,
|
||||||
|
0x2c, 0x2d, 0xa0, 0xad, 0x6d, 0x6f, 0xd4, 0x93, 0x7f, 0x31, 0xa7, 0xfa, 0x8f, 0xe6, 0x9c, 0xc1,
|
||||||
|
0x1b, 0x85, 0x1d, 0xd7, 0x37, 0x4b, 0xe9, 0xd4, 0xb2, 0x39, 0x7e, 0x91, 0xcf, 0xf1, 0xa6, 0xd7,
|
||||||
|
0xf1, 0x79, 0xbe, 0xff, 0x8b, 0x9b, 0xa5, 0xd4, 0xd3, 0xdc, 0x8e, 0x8a, 0x9a, 0xe9, 0x95, 0x31,
|
||||||
|
0x12, 0xcc, 0x28, 0x76, 0xea, 0xd9, 0xef, 0xb4, 0x61, 0x94, 0xcf, 0x71, 0xef, 0x53, 0x40, 0xbb,
|
||||||
|
0x67, 0x3c, 0x63, 0xac, 0x2b, 0xc3, 0x3f, 0x4a, 0x50, 0xbb, 0x20, 0x62, 0x45, 0x7d, 0xb2, 0x73,
|
||||||
|
0x15, 0xef, 0x43, 0x4b, 0xea, 0x50, 0x71, 0xac, 0x9b, 0x46, 0xcb, 0xcc, 0xdf, 0xf5, 0xd5, 0x7e,
|
||||||
|
0xca, 0xd7, 0x43, 0x00, 0xfd, 0x17, 0x36, 0x8b, 0x05, 0x35, 0x17, 0xd4, 0xd0, 0xca, 0xd7, 0x82,
|
||||||
|
0xa2, 0x29, 0xbc, 0x99, 0x17, 0x22, 0x0c, 0x47, 0x9c, 0x32, 0x25, 0x9d, 0xca, 0x63, 0x1b, 0x0d,
|
||||||
|
0x64, 0xfe, 0x79, 0x9a, 0xe7, 0x69, 0x1b, 0xbb, 0x72, 0x4b, 0x46, 0x2e, 0x54, 0xa5, 0xcf, 0x23,
|
||||||
|
0x22, 0x9d, 0xea, 0xc0, 0x1e, 0x75, 0x5e, 0x1d, 0xe4, 0x07, 0x9d, 0x13, 0x11, 0x52, 0x29, 0x29,
|
||||||
|
0x67, 0x17, 0x69, 0x7c, 0x6a, 0xd2, 0x7a, 0xc7, 0xf0, 0xd6, 0x93, 0x67, 0x3f, 0xc3, 0xde, 0xea,
|
||||||
|
0x67, 0x9f, 0xfc, 0x7a, 0xdf, 0xb7, 0xee, 0xee, 0xfb, 0xd6, 0x9f, 0xf7, 0x7d, 0xeb, 0x87, 0x87,
|
||||||
|
0xfe, 0xde, 0xdd, 0x43, 0x7f, 0xef, 0xf7, 0x87, 0xfe, 0xde, 0x37, 0xc3, 0x05, 0x55, 0x57, 0xf1,
|
||||||
|
0x7c, 0xec, 0xf3, 0xd0, 0xe5, 0x4c, 0x72, 0x26, 0xdc, 0xab, 0x1b, 0x2f, 0x71, 0x6f, 0xdd, 0xf4,
|
||||||
|
0xb1, 0x48, 0xfd, 0x96, 0xf3, 0x6a, 0xf6, 0x54, 0x7c, 0xf4, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff,
|
||||||
|
0x54, 0xb1, 0xb7, 0x51, 0x8b, 0x06, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *Account) Marshal() (dAtA []byte, err error) {
|
func (m *Account) Marshal() (dAtA []byte, err error) {
|
||||||
@ -597,6 +689,76 @@ func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
i -= len(m.Chains[iNdEx])
|
i -= len(m.Chains[iNdEx])
|
||||||
copy(dAtA[i:], m.Chains[iNdEx])
|
copy(dAtA[i:], m.Chains[iNdEx])
|
||||||
i = encodeVarintState(dAtA, i, uint64(len(m.Chains[iNdEx])))
|
i = encodeVarintState(dAtA, i, uint64(len(m.Chains[iNdEx])))
|
||||||
|
if m.Expiration != 0 {
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(m.Expiration))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x28
|
||||||
|
}
|
||||||
|
if len(m.Controller) > 0 {
|
||||||
|
i -= len(m.Controller)
|
||||||
|
copy(dAtA[i:], m.Controller)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(m.Subject) > 0 {
|
||||||
|
i -= len(m.Subject)
|
||||||
|
copy(dAtA[i:], m.Subject)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.Subject)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
|
}
|
||||||
|
if len(m.Origin) > 0 {
|
||||||
|
i -= len(m.Origin)
|
||||||
|
copy(dAtA[i:], m.Origin)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.Origin)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
}
|
||||||
|
if len(m.Id) > 0 {
|
||||||
|
i -= len(m.Id)
|
||||||
|
copy(dAtA[i:], m.Id)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.Id)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
}
|
||||||
|
return len(dAtA) - i, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Assertion) 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 *Assertion) MarshalTo(dAtA []byte) (int, error) {
|
||||||
|
size := m.Size()
|
||||||
|
return m.MarshalToSizedBuffer(dAtA[:size])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
||||||
|
i := len(dAtA)
|
||||||
|
_ = i
|
||||||
|
var l int
|
||||||
|
_ = l
|
||||||
|
if len(m.Controller) > 0 {
|
||||||
|
i -= len(m.Controller)
|
||||||
|
copy(dAtA[i:], m.Controller)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.Controller)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x2a
|
||||||
|
}
|
||||||
|
if len(m.Metadata) > 0 {
|
||||||
|
for k := range m.Metadata {
|
||||||
|
v := m.Metadata[k]
|
||||||
|
baseI := i
|
||||||
|
i -= len(v)
|
||||||
|
copy(dAtA[i:], v)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(v)))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x42
|
dAtA[i] = 0x42
|
||||||
}
|
}
|
||||||
@ -942,6 +1104,56 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) {
|
|||||||
i = encodeVarintState(dAtA, i, uint64(m.Method))
|
i = encodeVarintState(dAtA, i, uint64(m.Method))
|
||||||
i--
|
i--
|
||||||
dAtA[i] = 0x18
|
dAtA[i] = 0x18
|
||||||
|
if len(m.Scopes) > 0 {
|
||||||
|
dAtA2 := make([]byte, len(m.Scopes)*10)
|
||||||
|
var j1 int
|
||||||
|
for _, num := range m.Scopes {
|
||||||
|
for num >= 1<<7 {
|
||||||
|
dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80)
|
||||||
|
num >>= 7
|
||||||
|
j1++
|
||||||
|
}
|
||||||
|
dAtA2[j1] = uint8(num)
|
||||||
|
j1++
|
||||||
|
}
|
||||||
|
i -= j1
|
||||||
|
copy(dAtA[i:], dAtA2[:j1])
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(j1))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x32
|
||||||
|
}
|
||||||
|
if len(m.ServiceEndpoints) > 0 {
|
||||||
|
for k := range m.ServiceEndpoints {
|
||||||
|
v := m.ServiceEndpoints[k]
|
||||||
|
baseI := i
|
||||||
|
i -= len(v)
|
||||||
|
copy(dAtA[i:], v)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(v)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x12
|
||||||
|
i -= len(k)
|
||||||
|
copy(dAtA[i:], k)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(k)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0xa
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(baseI-i))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x2a
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if len(m.OriginUri) > 0 {
|
||||||
|
i -= len(m.OriginUri)
|
||||||
|
copy(dAtA[i:], m.OriginUri)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.OriginUri)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x22
|
||||||
|
}
|
||||||
|
if len(m.ControllerDid) > 0 {
|
||||||
|
i -= len(m.ControllerDid)
|
||||||
|
copy(dAtA[i:], m.ControllerDid)
|
||||||
|
i = encodeVarintState(dAtA, i, uint64(len(m.ControllerDid)))
|
||||||
|
i--
|
||||||
|
dAtA[i] = 0x1a
|
||||||
}
|
}
|
||||||
if len(m.Controller) > 0 {
|
if len(m.Controller) > 0 {
|
||||||
i -= len(m.Controller)
|
i -= len(m.Controller)
|
||||||
@ -981,6 +1193,14 @@ func (m *Account) Size() (n int) {
|
|||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovState(uint64(l))
|
n += 1 + l + sovState(uint64(l))
|
||||||
}
|
}
|
||||||
|
l = len(m.Origin)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovState(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.Subject)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovState(uint64(l))
|
||||||
|
}
|
||||||
l = len(m.Controller)
|
l = len(m.Controller)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovState(uint64(l))
|
n += 1 + l + sovState(uint64(l))
|
||||||
@ -1105,6 +1325,11 @@ func (m *ServiceRecord) Size() (n int) {
|
|||||||
n += 1 + l + sovState(uint64(l))
|
n += 1 + l + sovState(uint64(l))
|
||||||
}
|
}
|
||||||
l = len(m.Description)
|
l = len(m.Description)
|
||||||
|
l = len(m.ControllerDid)
|
||||||
|
if l > 0 {
|
||||||
|
n += 1 + l + sovState(uint64(l))
|
||||||
|
}
|
||||||
|
l = len(m.OriginUri)
|
||||||
if l > 0 {
|
if l > 0 {
|
||||||
n += 1 + l + sovState(uint64(l))
|
n += 1 + l + sovState(uint64(l))
|
||||||
}
|
}
|
||||||
@ -1151,6 +1376,12 @@ func (m *VerificationMethod) Size() (n int) {
|
|||||||
if m.PublicKey != nil {
|
if m.PublicKey != nil {
|
||||||
l = m.PublicKey.Size()
|
l = m.PublicKey.Size()
|
||||||
n += 1 + l + sovState(uint64(l))
|
n += 1 + l + sovState(uint64(l))
|
||||||
|
if len(m.Scopes) > 0 {
|
||||||
|
l = 0
|
||||||
|
for _, e := range m.Scopes {
|
||||||
|
l += sovState(uint64(e))
|
||||||
|
}
|
||||||
|
n += 1 + sovState(uint64(l)) + l
|
||||||
}
|
}
|
||||||
return n
|
return n
|
||||||
}
|
}
|
||||||
@ -1223,6 +1454,70 @@ func (m *Account) Unmarshal(dAtA []byte) error {
|
|||||||
m.Id = string(dAtA[iNdEx:postIndex])
|
m.Id = string(dAtA[iNdEx:postIndex])
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
case 2:
|
case 2:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Origin = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 3:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.Subject = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType)
|
||||||
}
|
}
|
||||||
@ -2429,6 +2724,8 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
|||||||
case 4:
|
case 4:
|
||||||
if wireType != 2 {
|
if wireType != 2 {
|
||||||
return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType)
|
return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType)
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType)
|
||||||
}
|
}
|
||||||
var stringLen uint64
|
var stringLen uint64
|
||||||
for shift := uint(0); ; shift += 7 {
|
for shift := uint(0); ; shift += 7 {
|
||||||
@ -2526,6 +2823,234 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
iNdEx = postIndex
|
iNdEx = postIndex
|
||||||
|
case 4:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType)
|
||||||
|
}
|
||||||
|
var stringLen uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
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 ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + intStringLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
m.OriginUri = string(dAtA[iNdEx:postIndex])
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 5:
|
||||||
|
if wireType != 2 {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType)
|
||||||
|
}
|
||||||
|
var msglen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
msglen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if msglen < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + msglen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
if m.ServiceEndpoints == nil {
|
||||||
|
m.ServiceEndpoints = make(map[string]string)
|
||||||
|
}
|
||||||
|
var mapkey string
|
||||||
|
var mapvalue string
|
||||||
|
for iNdEx < postIndex {
|
||||||
|
entryPreIndex := iNdEx
|
||||||
|
var wire uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
wire |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fieldNum := int32(wire >> 3)
|
||||||
|
if fieldNum == 1 {
|
||||||
|
var stringLenmapkey uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLenmapkey |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLenmapkey := int(stringLenmapkey)
|
||||||
|
if intStringLenmapkey < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postStringIndexmapkey := iNdEx + intStringLenmapkey
|
||||||
|
if postStringIndexmapkey < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postStringIndexmapkey > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
mapkey = string(dAtA[iNdEx:postStringIndexmapkey])
|
||||||
|
iNdEx = postStringIndexmapkey
|
||||||
|
} else if fieldNum == 2 {
|
||||||
|
var stringLenmapvalue uint64
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
stringLenmapvalue |= uint64(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
intStringLenmapvalue := int(stringLenmapvalue)
|
||||||
|
if intStringLenmapvalue < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postStringIndexmapvalue := iNdEx + intStringLenmapvalue
|
||||||
|
if postStringIndexmapvalue < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postStringIndexmapvalue > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue])
|
||||||
|
iNdEx = postStringIndexmapvalue
|
||||||
|
} else {
|
||||||
|
iNdEx = entryPreIndex
|
||||||
|
skippy, err := skipState(dAtA[iNdEx:])
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
if (skippy < 0) || (iNdEx+skippy) < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if (iNdEx + skippy) > postIndex {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
iNdEx += skippy
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.ServiceEndpoints[mapkey] = mapvalue
|
||||||
|
iNdEx = postIndex
|
||||||
|
case 6:
|
||||||
|
if wireType == 0 {
|
||||||
|
var v PermissionScope
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
v |= PermissionScope(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.Scopes = append(m.Scopes, v)
|
||||||
|
} else if wireType == 2 {
|
||||||
|
var packedLen int
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
packedLen |= int(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if packedLen < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
postIndex := iNdEx + packedLen
|
||||||
|
if postIndex < 0 {
|
||||||
|
return ErrInvalidLengthState
|
||||||
|
}
|
||||||
|
if postIndex > l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
var elementCount int
|
||||||
|
if elementCount != 0 && len(m.Scopes) == 0 {
|
||||||
|
m.Scopes = make([]PermissionScope, 0, elementCount)
|
||||||
|
}
|
||||||
|
for iNdEx < postIndex {
|
||||||
|
var v PermissionScope
|
||||||
|
for shift := uint(0); ; shift += 7 {
|
||||||
|
if shift >= 64 {
|
||||||
|
return ErrIntOverflowState
|
||||||
|
}
|
||||||
|
if iNdEx >= l {
|
||||||
|
return io.ErrUnexpectedEOF
|
||||||
|
}
|
||||||
|
b := dAtA[iNdEx]
|
||||||
|
iNdEx++
|
||||||
|
v |= PermissionScope(b&0x7F) << shift
|
||||||
|
if b < 0x80 {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
m.Scopes = append(m.Scopes, v)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType)
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
iNdEx = preIndex
|
iNdEx = preIndex
|
||||||
skippy, err := skipState(dAtA[iNdEx:])
|
skippy, err := skipState(dAtA[iNdEx:])
|
||||||
|
2028
x/did/types/tx.pb.go
2028
x/did/types/tx.pb.go
File diff suppressed because it is too large
Load Diff
15
x/did/types/types.go
Normal file
15
x/did/types/types.go
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
package types
|
||||||
|
|
||||||
|
func (a *AssetInfo) Equal(b *AssetInfo) bool {
|
||||||
|
if a == nil && b == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *ChainInfo) Equal(b *ChainInfo) bool {
|
||||||
|
if c == nil && b == nil {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
return false
|
||||||
|
}
|
4548
x/did/types/types.pb.go
Normal file
4548
x/did/types/types.pb.go
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user