From 1810ee1c7f3361fd940dc89f4466f6e2296e4e34 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Sat, 10 Aug 2024 18:27:11 -0400 Subject: [PATCH 1/6] feat: add enums.pulsar.go file for PermissionScope enum (#4) * feat: add enums.pulsar.go file for PermissionScope enum * refactor: remove PERMISSION_SCOPE_IDENTIFIERS_ENS enum value * feat: Add MsgRegisterService to handle service registration The commit message for these changes would be: feat: Add MsgRegisterService to handle service registration This commit adds a new message type `MsgRegisterService` to the DID module's transaction proto file. This message allows users to register a new service with a given permission scope and origin URI. The domain must have a valid TXT record containing the public key. The changes include: - Adding the `MsgRegisterService` message type with fields for authority, origin URI, and scopes - Adding the `MsgRegisterServiceResponse` message type to handle the response - Updating the Msg service to include a new `RegisterService` RPC method - Implementing the `RegisterService` method in the keeper This feature allows users to register new services on the DID chain, which is an important part of the overall DID functionality. * (no commit message provided) * fix: Add ProveWitness and SyncVault RPCs The commit message should be: feat: Add ProveWitness and SyncVault RPCs This change adds two new RPCs to the DID module: 1. ProveWitness: An operation to prove the controller has a valid property using ZK Accumulators. 2. SyncVault: Synchronizes the controller with the Vault Motr DWN WASM Wallet. These new RPCs allow for more advanced DID management functionality. * fix: Remove unused `Meta` message from `genesis.proto` * refactor: Simplify the types and properties to keep a consistent structure for the blockchain * (no commit message provided) * {} * feat: add Equal methods for AssetInfo and ChainInfo types --- Taskfile.yml | 17 - api/did/v1/accounts.pulsar.go | 70 + api/did/v1/enums.pulsar.go | 209 + api/did/v1/genesis.pulsar.go | 4057 +--------------- api/did/v1/query.pulsar.go | 3404 ++++++++++--- api/did/v1/query_grpc.pb.go | 181 +- api/did/v1/state.cosmos_orm.go | 26 +- api/did/v1/state.pulsar.go | 932 +++- api/did/v1/tx.pulsar.go | 6974 +++++++++++++++++++++------ api/did/v1/tx_grpc.pb.go | 169 +- api/did/v1/types.pulsar.go | 8221 ++++++++++++++++++++++++++++++-- client/go.mod | 3 + devbox.json | 15 +- go.mod | 3 + go.sum | 30 + process-compose.yml | 8 - proto/did/v1/accounts.proto | 4 + proto/did/v1/enums.proto | 24 + proto/did/v1/genesis.proto | 49 +- proto/did/v1/query.proto | 73 +- proto/did/v1/state.proto | 21 +- proto/did/v1/tx.proto | 130 +- proto/did/v1/types.proto | 85 +- x/did/keeper/querier.go | 31 +- x/did/keeper/server.go | 47 +- x/did/keeper/state.go | 15 + x/did/types/accounts.pb.go | 35 + x/did/types/codec.go | 3 +- x/did/types/enums.pb.go | 120 + x/did/types/genesis.pb.go | 2188 +-------- x/did/types/msgs.go | 61 +- x/did/types/perms.go | 53 + x/did/types/query.pb.go | 1495 +++++- x/did/types/query.pb.gw.go | 409 +- x/did/types/state.pb.go | 488 +- x/did/types/tx.pb.go | 2752 +++++++++-- x/did/types/types.go | 15 + x/did/types/types.pb.go | 3623 +++++++++++++- 38 files changed, 25776 insertions(+), 10264 deletions(-) delete mode 100644 Taskfile.yml create mode 100644 api/did/v1/accounts.pulsar.go create mode 100644 api/did/v1/enums.pulsar.go create mode 100644 client/go.mod delete mode 100644 process-compose.yml create mode 100644 proto/did/v1/accounts.proto create mode 100644 proto/did/v1/enums.proto create mode 100644 x/did/types/accounts.pb.go create mode 100644 x/did/types/enums.pb.go create mode 100644 x/did/types/perms.go create mode 100644 x/did/types/types.go diff --git a/Taskfile.yml b/Taskfile.yml deleted file mode 100644 index c06c1c7a1..000000000 --- a/Taskfile.yml +++ /dev/null @@ -1,17 +0,0 @@ -version: "3" - -tasks: - dev: - cmd: air - - install: - cmd: make install - - testnet: - cmd: make sh-testnet - - proto: - cmd: devbox -q run proto - - build:sonrd: - cmd: go build -o ./bin/sonrd ./cmd/sonrd diff --git a/api/did/v1/accounts.pulsar.go b/api/did/v1/accounts.pulsar.go new file mode 100644 index 000000000..b808919bb --- /dev/null +++ b/api/did/v1/accounts.pulsar.go @@ -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 +} diff --git a/api/did/v1/enums.pulsar.go b/api/did/v1/enums.pulsar.go new file mode 100644 index 000000000..2d54b74b4 --- /dev/null +++ b/api/did/v1/enums.pulsar.go @@ -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 +} diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index eedcc5aa4..42017748b 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -3,7 +3,6 @@ package didv1 import ( _ "cosmossdk.io/api/amino" - binary "encoding/binary" fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" _ "github.com/cosmos/gogoproto/gogoproto" @@ -11,9 +10,7 @@ import ( protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" - math "math" reflect "reflect" - sort "sort" sync "sync" ) @@ -1084,3535 +1081,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_Meta_1_map)(nil) - -type _Meta_1_map struct { - m *map[string]string -} - -func (x *_Meta_1_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_Meta_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfString(v) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_Meta_1_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok -} - -func (x *_Meta_1_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_Meta_1_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfString(v) -} - -func (x *_Meta_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_Meta_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_Meta_1_map) NewValue() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Meta_1_map) IsValid() bool { - return x.m != nil -} - -var ( - md_Meta protoreflect.MessageDescriptor - fd_Meta_data protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_genesis_proto_init() - md_Meta = File_did_v1_genesis_proto.Messages().ByName("Meta") - fd_Meta_data = md_Meta.Fields().ByName("data") -} - -var _ protoreflect.Message = (*fastReflection_Meta)(nil) - -type fastReflection_Meta Meta - -func (x *Meta) ProtoReflect() protoreflect.Message { - return (*fastReflection_Meta)(x) -} - -func (x *Meta) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Meta_messageType fastReflection_Meta_messageType -var _ protoreflect.MessageType = fastReflection_Meta_messageType{} - -type fastReflection_Meta_messageType struct{} - -func (x fastReflection_Meta_messageType) Zero() protoreflect.Message { - return (*fastReflection_Meta)(nil) -} -func (x fastReflection_Meta_messageType) New() protoreflect.Message { - return new(fastReflection_Meta) -} -func (x fastReflection_Meta_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Meta -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Meta) Descriptor() protoreflect.MessageDescriptor { - return md_Meta -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Meta) Type() protoreflect.MessageType { - return _fastReflection_Meta_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Meta) New() protoreflect.Message { - return new(fastReflection_Meta) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Meta) Interface() protoreflect.ProtoMessage { - return (*Meta)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Meta) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Data) != 0 { - value := protoreflect.ValueOfMap(&_Meta_1_map{m: &x.Data}) - if !f(fd_Meta_data, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Meta) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.Meta.data": - return len(x.Data) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) - } - panic(fmt.Errorf("message did.v1.Meta does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Meta) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.Meta.data": - x.Data = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) - } - panic(fmt.Errorf("message did.v1.Meta does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Meta) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.Meta.data": - if len(x.Data) == 0 { - return protoreflect.ValueOfMap(&_Meta_1_map{}) - } - mapValue := &_Meta_1_map{m: &x.Data} - return protoreflect.ValueOfMap(mapValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) - } - panic(fmt.Errorf("message did.v1.Meta does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Meta) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.Meta.data": - mv := value.Map() - cmv := mv.(*_Meta_1_map) - x.Data = *cmv.m - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) - } - panic(fmt.Errorf("message did.v1.Meta does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Meta) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Meta.data": - if x.Data == nil { - x.Data = make(map[string]string) - } - value := &_Meta_1_map{m: &x.Data} - return protoreflect.ValueOfMap(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) - } - panic(fmt.Errorf("message did.v1.Meta does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Meta) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.Meta.data": - m := make(map[string]string) - return protoreflect.ValueOfMap(&_Meta_1_map{m: &m}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Meta")) - } - panic(fmt.Errorf("message did.v1.Meta does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Meta) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Meta", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Meta) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Meta) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Meta) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Meta) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Meta) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Data) > 0 { - SiZeMaP := func(k string, v string) { - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.Data)) - for k := range x.Data { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Data[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Data { - SiZeMaP(k, v) - } - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Meta) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Data) > 0 { - MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - return protoiface.MarshalOutput{}, nil - } - if options.Deterministic { - keysForData := make([]string, 0, len(x.Data)) - for k := range x.Data { - keysForData = append(keysForData, string(k)) - } - sort.Slice(keysForData, func(i, j int) bool { - return keysForData[i] < keysForData[j] - }) - for iNdEx := len(keysForData) - 1; iNdEx >= 0; iNdEx-- { - v := x.Data[string(keysForData[iNdEx])] - out, err := MaRsHaLmAp(keysForData[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Data { - v := x.Data[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Meta) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Meta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Meta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Data == nil { - x.Data = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapvalue > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Data[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_AssetInfo protoreflect.MessageDescriptor - fd_AssetInfo_denom protoreflect.FieldDescriptor - fd_AssetInfo_asset_type protoreflect.FieldDescriptor - fd_AssetInfo_origin_chain protoreflect.FieldDescriptor - fd_AssetInfo_origin_denom protoreflect.FieldDescriptor - fd_AssetInfo_origin_type protoreflect.FieldDescriptor - fd_AssetInfo_symbol protoreflect.FieldDescriptor - fd_AssetInfo_decimals protoreflect.FieldDescriptor - fd_AssetInfo_description protoreflect.FieldDescriptor - fd_AssetInfo_image protoreflect.FieldDescriptor - fd_AssetInfo_coinGeckoId protoreflect.FieldDescriptor - fd_AssetInfo_enable protoreflect.FieldDescriptor - fd_AssetInfo_path protoreflect.FieldDescriptor - fd_AssetInfo_channel protoreflect.FieldDescriptor - fd_AssetInfo_port protoreflect.FieldDescriptor - fd_AssetInfo_counter_party protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_genesis_proto_init() - md_AssetInfo = File_did_v1_genesis_proto.Messages().ByName("AssetInfo") - fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") - fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") - fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") - fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") - fd_AssetInfo_origin_type = md_AssetInfo.Fields().ByName("origin_type") - fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") - fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") - fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") - fd_AssetInfo_image = md_AssetInfo.Fields().ByName("image") - fd_AssetInfo_coinGeckoId = md_AssetInfo.Fields().ByName("coinGeckoId") - fd_AssetInfo_enable = md_AssetInfo.Fields().ByName("enable") - fd_AssetInfo_path = md_AssetInfo.Fields().ByName("path") - fd_AssetInfo_channel = md_AssetInfo.Fields().ByName("channel") - fd_AssetInfo_port = md_AssetInfo.Fields().ByName("port") - fd_AssetInfo_counter_party = md_AssetInfo.Fields().ByName("counter_party") -} - -var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) - -type fastReflection_AssetInfo AssetInfo - -func (x *AssetInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_AssetInfo)(x) -} - -func (x *AssetInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_AssetInfo_messageType fastReflection_AssetInfo_messageType -var _ protoreflect.MessageType = fastReflection_AssetInfo_messageType{} - -type fastReflection_AssetInfo_messageType struct{} - -func (x fastReflection_AssetInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_AssetInfo)(nil) -} -func (x fastReflection_AssetInfo_messageType) New() protoreflect.Message { - return new(fastReflection_AssetInfo) -} -func (x fastReflection_AssetInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_AssetInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_AssetInfo) Descriptor() protoreflect.MessageDescriptor { - return md_AssetInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_AssetInfo) Type() protoreflect.MessageType { - return _fastReflection_AssetInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_AssetInfo) New() protoreflect.Message { - return new(fastReflection_AssetInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { - return (*AssetInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_AssetInfo_denom, value) { - return - } - } - if x.AssetType != "" { - value := protoreflect.ValueOfString(x.AssetType) - if !f(fd_AssetInfo_asset_type, value) { - return - } - } - if x.OriginChain != "" { - value := protoreflect.ValueOfString(x.OriginChain) - if !f(fd_AssetInfo_origin_chain, value) { - return - } - } - if x.OriginDenom != "" { - value := protoreflect.ValueOfString(x.OriginDenom) - if !f(fd_AssetInfo_origin_denom, value) { - return - } - } - if x.OriginType != "" { - value := protoreflect.ValueOfString(x.OriginType) - if !f(fd_AssetInfo_origin_type, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_AssetInfo_symbol, value) { - return - } - } - if x.Decimals != int32(0) { - value := protoreflect.ValueOfInt32(x.Decimals) - if !f(fd_AssetInfo_decimals, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_AssetInfo_description, value) { - return - } - } - if x.Image != "" { - value := protoreflect.ValueOfString(x.Image) - if !f(fd_AssetInfo_image, value) { - return - } - } - if x.CoinGeckoId != "" { - value := protoreflect.ValueOfString(x.CoinGeckoId) - if !f(fd_AssetInfo_coinGeckoId, value) { - return - } - } - if x.Enable != false { - value := protoreflect.ValueOfBool(x.Enable) - if !f(fd_AssetInfo_enable, value) { - return - } - } - if x.Path != "" { - value := protoreflect.ValueOfString(x.Path) - if !f(fd_AssetInfo_path, value) { - return - } - } - if x.Channel != "" { - value := protoreflect.ValueOfString(x.Channel) - if !f(fd_AssetInfo_channel, value) { - return - } - } - if x.Port != "" { - value := protoreflect.ValueOfString(x.Port) - if !f(fd_AssetInfo_port, value) { - return - } - } - if x.CounterParty != nil { - value := protoreflect.ValueOfMessage(x.CounterParty.ProtoReflect()) - if !f(fd_AssetInfo_counter_party, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.AssetInfo.denom": - return x.Denom != "" - case "did.v1.AssetInfo.asset_type": - return x.AssetType != "" - case "did.v1.AssetInfo.origin_chain": - return x.OriginChain != "" - case "did.v1.AssetInfo.origin_denom": - return x.OriginDenom != "" - case "did.v1.AssetInfo.origin_type": - return x.OriginType != "" - case "did.v1.AssetInfo.symbol": - return x.Symbol != "" - case "did.v1.AssetInfo.decimals": - return x.Decimals != int32(0) - case "did.v1.AssetInfo.description": - return x.Description != "" - case "did.v1.AssetInfo.image": - return x.Image != "" - case "did.v1.AssetInfo.coinGeckoId": - return x.CoinGeckoId != "" - case "did.v1.AssetInfo.enable": - return x.Enable != false - case "did.v1.AssetInfo.path": - return x.Path != "" - case "did.v1.AssetInfo.channel": - return x.Channel != "" - case "did.v1.AssetInfo.port": - return x.Port != "" - case "did.v1.AssetInfo.counter_party": - return x.CounterParty != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.AssetInfo.denom": - x.Denom = "" - case "did.v1.AssetInfo.asset_type": - x.AssetType = "" - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = "" - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = "" - case "did.v1.AssetInfo.origin_type": - x.OriginType = "" - case "did.v1.AssetInfo.symbol": - x.Symbol = "" - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(0) - case "did.v1.AssetInfo.description": - x.Description = "" - case "did.v1.AssetInfo.image": - x.Image = "" - case "did.v1.AssetInfo.coinGeckoId": - x.CoinGeckoId = "" - case "did.v1.AssetInfo.enable": - x.Enable = false - case "did.v1.AssetInfo.path": - x.Path = "" - case "did.v1.AssetInfo.channel": - x.Channel = "" - case "did.v1.AssetInfo.port": - x.Port = "" - case "did.v1.AssetInfo.counter_party": - x.CounterParty = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.AssetInfo.denom": - value := x.Denom - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.asset_type": - value := x.AssetType - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_chain": - value := x.OriginChain - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_denom": - value := x.OriginDenom - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_type": - value := x.OriginType - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.decimals": - value := x.Decimals - return protoreflect.ValueOfInt32(value) - case "did.v1.AssetInfo.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.image": - value := x.Image - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.coinGeckoId": - value := x.CoinGeckoId - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.enable": - value := x.Enable - return protoreflect.ValueOfBool(value) - case "did.v1.AssetInfo.path": - value := x.Path - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.channel": - value := x.Channel - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.port": - value := x.Port - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.counter_party": - value := x.CounterParty - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.AssetInfo.denom": - x.Denom = value.Interface().(string) - case "did.v1.AssetInfo.asset_type": - x.AssetType = value.Interface().(string) - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = value.Interface().(string) - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = value.Interface().(string) - case "did.v1.AssetInfo.origin_type": - x.OriginType = value.Interface().(string) - case "did.v1.AssetInfo.symbol": - x.Symbol = value.Interface().(string) - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(value.Int()) - case "did.v1.AssetInfo.description": - x.Description = value.Interface().(string) - case "did.v1.AssetInfo.image": - x.Image = value.Interface().(string) - case "did.v1.AssetInfo.coinGeckoId": - x.CoinGeckoId = value.Interface().(string) - case "did.v1.AssetInfo.enable": - x.Enable = value.Bool() - case "did.v1.AssetInfo.path": - x.Path = value.Interface().(string) - case "did.v1.AssetInfo.channel": - x.Channel = value.Interface().(string) - case "did.v1.AssetInfo.port": - x.Port = value.Interface().(string) - case "did.v1.AssetInfo.counter_party": - x.CounterParty = value.Message().Interface().(*Meta) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.AssetInfo.counter_party": - if x.CounterParty == nil { - x.CounterParty = new(Meta) - } - return protoreflect.ValueOfMessage(x.CounterParty.ProtoReflect()) - case "did.v1.AssetInfo.denom": - panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.asset_type": - panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_chain": - panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_denom": - panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_type": - panic(fmt.Errorf("field origin_type of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.symbol": - panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.decimals": - panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.description": - panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.image": - panic(fmt.Errorf("field image of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.coinGeckoId": - panic(fmt.Errorf("field coinGeckoId of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.enable": - panic(fmt.Errorf("field enable of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.path": - panic(fmt.Errorf("field path of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.channel": - panic(fmt.Errorf("field channel of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.port": - panic(fmt.Errorf("field port of message did.v1.AssetInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.AssetInfo.denom": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.asset_type": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_chain": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_denom": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_type": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.symbol": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.decimals": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.AssetInfo.description": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.image": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.coinGeckoId": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.enable": - return protoreflect.ValueOfBool(false) - case "did.v1.AssetInfo.path": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.channel": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.port": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.counter_party": - m := new(Meta) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) - } - panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.AssetInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_AssetInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_AssetInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_AssetInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*AssetInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Denom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.AssetType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginChain) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginType) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Decimals != 0 { - n += 1 + runtime.Sov(uint64(x.Decimals)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Image) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CoinGeckoId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Enable { - n += 2 - } - l = len(x.Path) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Channel) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Port) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.CounterParty != nil { - l = options.Size(x.CounterParty) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*AssetInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.CounterParty != nil { - encoded, err := options.Marshal(x.CounterParty) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x7a - } - if len(x.Port) > 0 { - i -= len(x.Port) - copy(dAtA[i:], x.Port) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Port))) - i-- - dAtA[i] = 0x72 - } - if len(x.Channel) > 0 { - i -= len(x.Channel) - copy(dAtA[i:], x.Channel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Channel))) - i-- - dAtA[i] = 0x6a - } - if len(x.Path) > 0 { - i -= len(x.Path) - copy(dAtA[i:], x.Path) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Path))) - i-- - dAtA[i] = 0x62 - } - if x.Enable { - i-- - if x.Enable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(x.CoinGeckoId) > 0 { - i -= len(x.CoinGeckoId) - copy(dAtA[i:], x.CoinGeckoId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoinGeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(x.Image) > 0 { - i -= len(x.Image) - copy(dAtA[i:], x.Image) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Image))) - i-- - dAtA[i] = 0x4a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x42 - } - if x.Decimals != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x32 - } - if len(x.OriginType) > 0 { - i -= len(x.OriginType) - copy(dAtA[i:], x.OriginType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginType))) - i-- - dAtA[i] = 0x2a - } - if len(x.OriginDenom) > 0 { - i -= len(x.OriginDenom) - copy(dAtA[i:], x.OriginDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) - i-- - dAtA[i] = 0x22 - } - if len(x.OriginChain) > 0 { - i -= len(x.OriginChain) - copy(dAtA[i:], x.OriginChain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) - i-- - dAtA[i] = 0x1a - } - if len(x.AssetType) > 0 { - i -= len(x.AssetType) - copy(dAtA[i:], x.AssetType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) - i-- - dAtA[i] = 0x12 - } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*AssetInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - x.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Image = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoinGeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CoinGeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Enable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Enable = bool(v != 0) - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Channel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Port = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CounterParty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.CounterParty == nil { - x.CounterParty = &Meta{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.CounterParty); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_ChainInfo_7_list)(nil) - -type _ChainInfo_7_list struct { - list *[]*Meta -} - -func (x *_ChainInfo_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Meta) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Meta) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { - v := new(Meta) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { - v := new(Meta) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ChainInfo_8_list)(nil) - -type _ChainInfo_8_list struct { - list *[]*Meta -} - -func (x *_ChainInfo_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Meta) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Meta) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { - v := new(Meta) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { - v := new(Meta) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ChainInfo_9_list)(nil) - -type _ChainInfo_9_list struct { - list *[]*Meta -} - -func (x *_ChainInfo_9_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_9_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_9_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Meta) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_9_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Meta) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_9_list) AppendMutable() protoreflect.Value { - v := new(Meta) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_9_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_9_list) NewElement() protoreflect.Value { - v := new(Meta) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_9_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ChainInfo_12_list)(nil) - -type _ChainInfo_12_list struct { - list *[]string -} - -func (x *_ChainInfo_12_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_12_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_ChainInfo_12_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_12_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_12_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ChainInfo at list field FeeRate as it is not of Message kind")) -} - -func (x *_ChainInfo_12_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_12_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_ChainInfo_12_list) IsValid() bool { - return x.list != nil -} - -var ( - md_ChainInfo protoreflect.MessageDescriptor - fd_ChainInfo_chain_id_cosmos protoreflect.FieldDescriptor - fd_ChainInfo_chain_name protoreflect.FieldDescriptor - fd_ChainInfo_symbol protoreflect.FieldDescriptor - fd_ChainInfo_bechAccountPrefix protoreflect.FieldDescriptor - fd_ChainInfo_bechValidatorPrefix protoreflect.FieldDescriptor - fd_ChainInfo_origin_genesis_time protoreflect.FieldDescriptor - fd_ChainInfo_accountType protoreflect.FieldDescriptor - fd_ChainInfo_grpc_endpoint protoreflect.FieldDescriptor - fd_ChainInfo_lcd_endpoint protoreflect.FieldDescriptor - fd_ChainInfo_explorer protoreflect.FieldDescriptor - fd_ChainInfo_fee_base protoreflect.FieldDescriptor - fd_ChainInfo_fee_rate protoreflect.FieldDescriptor - fd_ChainInfo_fee_init_gas_limit protoreflect.FieldDescriptor - fd_ChainInfo_fee_isSimulable protoreflect.FieldDescriptor - fd_ChainInfo_simul_gas_multiply protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_genesis_proto_init() - md_ChainInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo") - fd_ChainInfo_chain_id_cosmos = md_ChainInfo.Fields().ByName("chain_id_cosmos") - fd_ChainInfo_chain_name = md_ChainInfo.Fields().ByName("chain_name") - fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") - fd_ChainInfo_bechAccountPrefix = md_ChainInfo.Fields().ByName("bechAccountPrefix") - fd_ChainInfo_bechValidatorPrefix = md_ChainInfo.Fields().ByName("bechValidatorPrefix") - fd_ChainInfo_origin_genesis_time = md_ChainInfo.Fields().ByName("origin_genesis_time") - fd_ChainInfo_accountType = md_ChainInfo.Fields().ByName("accountType") - fd_ChainInfo_grpc_endpoint = md_ChainInfo.Fields().ByName("grpc_endpoint") - fd_ChainInfo_lcd_endpoint = md_ChainInfo.Fields().ByName("lcd_endpoint") - fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") - fd_ChainInfo_fee_base = md_ChainInfo.Fields().ByName("fee_base") - fd_ChainInfo_fee_rate = md_ChainInfo.Fields().ByName("fee_rate") - fd_ChainInfo_fee_init_gas_limit = md_ChainInfo.Fields().ByName("fee_init_gas_limit") - fd_ChainInfo_fee_isSimulable = md_ChainInfo.Fields().ByName("fee_isSimulable") - fd_ChainInfo_simul_gas_multiply = md_ChainInfo.Fields().ByName("simul_gas_multiply") -} - -var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) - -type fastReflection_ChainInfo ChainInfo - -func (x *ChainInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainInfo)(x) -} - -func (x *ChainInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_ChainInfo_messageType fastReflection_ChainInfo_messageType -var _ protoreflect.MessageType = fastReflection_ChainInfo_messageType{} - -type fastReflection_ChainInfo_messageType struct{} - -func (x fastReflection_ChainInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainInfo)(nil) -} -func (x fastReflection_ChainInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ChainInfo) -} -func (x fastReflection_ChainInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_ChainInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_ChainInfo) Type() protoreflect.MessageType { - return _fastReflection_ChainInfo_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainInfo) New() protoreflect.Message { - return new(fastReflection_ChainInfo) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainInfo) Interface() protoreflect.ProtoMessage { - return (*ChainInfo)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_ChainInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.ChainIdCosmos != "" { - value := protoreflect.ValueOfString(x.ChainIdCosmos) - if !f(fd_ChainInfo_chain_id_cosmos, value) { - return - } - } - if x.ChainName != "" { - value := protoreflect.ValueOfString(x.ChainName) - if !f(fd_ChainInfo_chain_name, value) { - return - } - } - if x.Symbol != "" { - value := protoreflect.ValueOfString(x.Symbol) - if !f(fd_ChainInfo_symbol, value) { - return - } - } - if x.BechAccountPrefix != "" { - value := protoreflect.ValueOfString(x.BechAccountPrefix) - if !f(fd_ChainInfo_bechAccountPrefix, value) { - return - } - } - if x.BechValidatorPrefix != "" { - value := protoreflect.ValueOfString(x.BechValidatorPrefix) - if !f(fd_ChainInfo_bechValidatorPrefix, value) { - return - } - } - if x.OriginGenesisTime != "" { - value := protoreflect.ValueOfString(x.OriginGenesisTime) - if !f(fd_ChainInfo_origin_genesis_time, value) { - return - } - } - if len(x.AccountType) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.AccountType}) - if !f(fd_ChainInfo_accountType, value) { - return - } - } - if len(x.GrpcEndpoint) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.GrpcEndpoint}) - if !f(fd_ChainInfo_grpc_endpoint, value) { - return - } - } - if len(x.LcdEndpoint) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_9_list{list: &x.LcdEndpoint}) - if !f(fd_ChainInfo_lcd_endpoint, value) { - return - } - } - if x.Explorer != nil { - value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - if !f(fd_ChainInfo_explorer, value) { - return - } - } - if x.FeeBase != "" { - value := protoreflect.ValueOfString(x.FeeBase) - if !f(fd_ChainInfo_fee_base, value) { - return - } - } - if len(x.FeeRate) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_12_list{list: &x.FeeRate}) - if !f(fd_ChainInfo_fee_rate, value) { - return - } - } - if x.FeeInitGasLimit != int32(0) { - value := protoreflect.ValueOfInt32(x.FeeInitGasLimit) - if !f(fd_ChainInfo_fee_init_gas_limit, value) { - return - } - } - if x.FeeIsSimulable != false { - value := protoreflect.ValueOfBool(x.FeeIsSimulable) - if !f(fd_ChainInfo_fee_isSimulable, value) { - return - } - } - if x.SimulGasMultiply != float64(0) || math.Signbit(x.SimulGasMultiply) { - value := protoreflect.ValueOfFloat64(x.SimulGasMultiply) - if !f(fd_ChainInfo_simul_gas_multiply, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.ChainInfo.chain_id_cosmos": - return x.ChainIdCosmos != "" - case "did.v1.ChainInfo.chain_name": - return x.ChainName != "" - case "did.v1.ChainInfo.symbol": - return x.Symbol != "" - case "did.v1.ChainInfo.bechAccountPrefix": - return x.BechAccountPrefix != "" - case "did.v1.ChainInfo.bechValidatorPrefix": - return x.BechValidatorPrefix != "" - case "did.v1.ChainInfo.origin_genesis_time": - return x.OriginGenesisTime != "" - case "did.v1.ChainInfo.accountType": - return len(x.AccountType) != 0 - case "did.v1.ChainInfo.grpc_endpoint": - return len(x.GrpcEndpoint) != 0 - case "did.v1.ChainInfo.lcd_endpoint": - return len(x.LcdEndpoint) != 0 - case "did.v1.ChainInfo.explorer": - return x.Explorer != nil - case "did.v1.ChainInfo.fee_base": - return x.FeeBase != "" - case "did.v1.ChainInfo.fee_rate": - return len(x.FeeRate) != 0 - case "did.v1.ChainInfo.fee_init_gas_limit": - return x.FeeInitGasLimit != int32(0) - case "did.v1.ChainInfo.fee_isSimulable": - return x.FeeIsSimulable != false - case "did.v1.ChainInfo.simul_gas_multiply": - return x.SimulGasMultiply != float64(0) || math.Signbit(x.SimulGasMultiply) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.ChainInfo.chain_id_cosmos": - x.ChainIdCosmos = "" - case "did.v1.ChainInfo.chain_name": - x.ChainName = "" - case "did.v1.ChainInfo.symbol": - x.Symbol = "" - case "did.v1.ChainInfo.bechAccountPrefix": - x.BechAccountPrefix = "" - case "did.v1.ChainInfo.bechValidatorPrefix": - x.BechValidatorPrefix = "" - case "did.v1.ChainInfo.origin_genesis_time": - x.OriginGenesisTime = "" - case "did.v1.ChainInfo.accountType": - x.AccountType = nil - case "did.v1.ChainInfo.grpc_endpoint": - x.GrpcEndpoint = nil - case "did.v1.ChainInfo.lcd_endpoint": - x.LcdEndpoint = nil - case "did.v1.ChainInfo.explorer": - x.Explorer = nil - case "did.v1.ChainInfo.fee_base": - x.FeeBase = "" - case "did.v1.ChainInfo.fee_rate": - x.FeeRate = nil - case "did.v1.ChainInfo.fee_init_gas_limit": - x.FeeInitGasLimit = int32(0) - case "did.v1.ChainInfo.fee_isSimulable": - x.FeeIsSimulable = false - case "did.v1.ChainInfo.simul_gas_multiply": - x.SimulGasMultiply = float64(0) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.ChainInfo.chain_id_cosmos": - value := x.ChainIdCosmos - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.chain_name": - value := x.ChainName - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.symbol": - value := x.Symbol - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.bechAccountPrefix": - value := x.BechAccountPrefix - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.bechValidatorPrefix": - value := x.BechValidatorPrefix - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.origin_genesis_time": - value := x.OriginGenesisTime - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.accountType": - if len(x.AccountType) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_7_list{}) - } - listValue := &_ChainInfo_7_list{list: &x.AccountType} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.grpc_endpoint": - if len(x.GrpcEndpoint) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_8_list{}) - } - listValue := &_ChainInfo_8_list{list: &x.GrpcEndpoint} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.lcd_endpoint": - if len(x.LcdEndpoint) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_9_list{}) - } - listValue := &_ChainInfo_9_list{list: &x.LcdEndpoint} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.explorer": - value := x.Explorer - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.ChainInfo.fee_base": - value := x.FeeBase - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.fee_rate": - if len(x.FeeRate) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_12_list{}) - } - listValue := &_ChainInfo_12_list{list: &x.FeeRate} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.fee_init_gas_limit": - value := x.FeeInitGasLimit - return protoreflect.ValueOfInt32(value) - case "did.v1.ChainInfo.fee_isSimulable": - value := x.FeeIsSimulable - return protoreflect.ValueOfBool(value) - case "did.v1.ChainInfo.simul_gas_multiply": - value := x.SimulGasMultiply - return protoreflect.ValueOfFloat64(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.ChainInfo.chain_id_cosmos": - x.ChainIdCosmos = value.Interface().(string) - case "did.v1.ChainInfo.chain_name": - x.ChainName = value.Interface().(string) - case "did.v1.ChainInfo.symbol": - x.Symbol = value.Interface().(string) - case "did.v1.ChainInfo.bechAccountPrefix": - x.BechAccountPrefix = value.Interface().(string) - case "did.v1.ChainInfo.bechValidatorPrefix": - x.BechValidatorPrefix = value.Interface().(string) - case "did.v1.ChainInfo.origin_genesis_time": - x.OriginGenesisTime = value.Interface().(string) - case "did.v1.ChainInfo.accountType": - lv := value.List() - clv := lv.(*_ChainInfo_7_list) - x.AccountType = *clv.list - case "did.v1.ChainInfo.grpc_endpoint": - lv := value.List() - clv := lv.(*_ChainInfo_8_list) - x.GrpcEndpoint = *clv.list - case "did.v1.ChainInfo.lcd_endpoint": - lv := value.List() - clv := lv.(*_ChainInfo_9_list) - x.LcdEndpoint = *clv.list - case "did.v1.ChainInfo.explorer": - x.Explorer = value.Message().Interface().(*Meta) - case "did.v1.ChainInfo.fee_base": - x.FeeBase = value.Interface().(string) - case "did.v1.ChainInfo.fee_rate": - lv := value.List() - clv := lv.(*_ChainInfo_12_list) - x.FeeRate = *clv.list - case "did.v1.ChainInfo.fee_init_gas_limit": - x.FeeInitGasLimit = int32(value.Int()) - case "did.v1.ChainInfo.fee_isSimulable": - x.FeeIsSimulable = value.Bool() - case "did.v1.ChainInfo.simul_gas_multiply": - x.SimulGasMultiply = value.Float() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ChainInfo.accountType": - if x.AccountType == nil { - x.AccountType = []*Meta{} - } - value := &_ChainInfo_7_list{list: &x.AccountType} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.grpc_endpoint": - if x.GrpcEndpoint == nil { - x.GrpcEndpoint = []*Meta{} - } - value := &_ChainInfo_8_list{list: &x.GrpcEndpoint} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.lcd_endpoint": - if x.LcdEndpoint == nil { - x.LcdEndpoint = []*Meta{} - } - value := &_ChainInfo_9_list{list: &x.LcdEndpoint} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.explorer": - if x.Explorer == nil { - x.Explorer = new(Meta) - } - return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - case "did.v1.ChainInfo.fee_rate": - if x.FeeRate == nil { - x.FeeRate = []string{} - } - value := &_ChainInfo_12_list{list: &x.FeeRate} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.chain_id_cosmos": - panic(fmt.Errorf("field chain_id_cosmos of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.chain_name": - panic(fmt.Errorf("field chain_name of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.symbol": - panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.bechAccountPrefix": - panic(fmt.Errorf("field bechAccountPrefix of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.bechValidatorPrefix": - panic(fmt.Errorf("field bechValidatorPrefix of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.origin_genesis_time": - panic(fmt.Errorf("field origin_genesis_time of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.fee_base": - panic(fmt.Errorf("field fee_base of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.fee_init_gas_limit": - panic(fmt.Errorf("field fee_init_gas_limit of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.fee_isSimulable": - panic(fmt.Errorf("field fee_isSimulable of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.simul_gas_multiply": - panic(fmt.Errorf("field simul_gas_multiply of message did.v1.ChainInfo is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ChainInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.ChainInfo.chain_id_cosmos": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.chain_name": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.symbol": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.bechAccountPrefix": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.bechValidatorPrefix": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.origin_genesis_time": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.accountType": - list := []*Meta{} - return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) - case "did.v1.ChainInfo.grpc_endpoint": - list := []*Meta{} - return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) - case "did.v1.ChainInfo.lcd_endpoint": - list := []*Meta{} - return protoreflect.ValueOfList(&_ChainInfo_9_list{list: &list}) - case "did.v1.ChainInfo.explorer": - m := new(Meta) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.ChainInfo.fee_base": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.fee_rate": - list := []string{} - return protoreflect.ValueOfList(&_ChainInfo_12_list{list: &list}) - case "did.v1.ChainInfo.fee_init_gas_limit": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.ChainInfo.fee_isSimulable": - return protoreflect.ValueOfBool(false) - case "did.v1.ChainInfo.simul_gas_multiply": - return protoreflect.ValueOfFloat64(float64(0)) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) - } - panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ChainInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ChainInfo) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_ChainInfo) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.ChainIdCosmos) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ChainName) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Symbol) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BechAccountPrefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.BechValidatorPrefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.OriginGenesisTime) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AccountType) > 0 { - for _, e := range x.AccountType { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.GrpcEndpoint) > 0 { - for _, e := range x.GrpcEndpoint { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.LcdEndpoint) > 0 { - for _, e := range x.LcdEndpoint { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Explorer != nil { - l = options.Size(x.Explorer) - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.FeeBase) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.FeeRate) > 0 { - for _, s := range x.FeeRate { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.FeeInitGasLimit != 0 { - n += 1 + runtime.Sov(uint64(x.FeeInitGasLimit)) - } - if x.FeeIsSimulable { - n += 2 - } - if x.SimulGasMultiply != 0 || math.Signbit(x.SimulGasMultiply) { - n += 9 - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.SimulGasMultiply != 0 || math.Signbit(x.SimulGasMultiply) { - i -= 8 - binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.SimulGasMultiply)))) - i-- - dAtA[i] = 0x79 - } - if x.FeeIsSimulable { - i-- - if x.FeeIsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x70 - } - if x.FeeInitGasLimit != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.FeeInitGasLimit)) - i-- - dAtA[i] = 0x68 - } - if len(x.FeeRate) > 0 { - for iNdEx := len(x.FeeRate) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.FeeRate[iNdEx]) - copy(dAtA[i:], x.FeeRate[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRate[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if len(x.FeeBase) > 0 { - i -= len(x.FeeBase) - copy(dAtA[i:], x.FeeBase) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeBase))) - i-- - dAtA[i] = 0x5a - } - if x.Explorer != nil { - encoded, err := options.Marshal(x.Explorer) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x52 - } - if len(x.LcdEndpoint) > 0 { - for iNdEx := len(x.LcdEndpoint) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LcdEndpoint[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - } - if len(x.GrpcEndpoint) > 0 { - for iNdEx := len(x.GrpcEndpoint) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GrpcEndpoint[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x42 - } - } - if len(x.AccountType) > 0 { - for iNdEx := len(x.AccountType) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.AccountType[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.OriginGenesisTime) > 0 { - i -= len(x.OriginGenesisTime) - copy(dAtA[i:], x.OriginGenesisTime) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginGenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(x.BechValidatorPrefix) > 0 { - i -= len(x.BechValidatorPrefix) - copy(dAtA[i:], x.BechValidatorPrefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BechValidatorPrefix))) - i-- - dAtA[i] = 0x2a - } - if len(x.BechAccountPrefix) > 0 { - i -= len(x.BechAccountPrefix) - copy(dAtA[i:], x.BechAccountPrefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BechAccountPrefix))) - i-- - dAtA[i] = 0x22 - } - if len(x.Symbol) > 0 { - i -= len(x.Symbol) - copy(dAtA[i:], x.Symbol) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(x.ChainName) > 0 { - i -= len(x.ChainName) - copy(dAtA[i:], x.ChainName) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainName))) - i-- - dAtA[i] = 0x12 - } - if len(x.ChainIdCosmos) > 0 { - i -= len(x.ChainIdCosmos) - copy(dAtA[i:], x.ChainIdCosmos) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainIdCosmos))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainIdCosmos", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainIdCosmos = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ChainName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BechAccountPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BechAccountPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BechValidatorPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.BechValidatorPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginGenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginGenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AccountType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AccountType = append(x.AccountType, &Meta{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AccountType[len(x.AccountType)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GrpcEndpoint = append(x.GrpcEndpoint, &Meta{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoint[len(x.GrpcEndpoint)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LcdEndpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LcdEndpoint = append(x.LcdEndpoint, &Meta{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LcdEndpoint[len(x.LcdEndpoint)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Explorer == nil { - x.Explorer = &Meta{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeBase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FeeBase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.FeeRate = append(x.FeeRate, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInitGasLimit", wireType) - } - x.FeeInitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.FeeInitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeIsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.FeeIsSimulable = bool(v != 0) - case 15: - if wireType != 1 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SimulGasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - x.SimulGasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -4632,7 +1100,7 @@ type GenesisState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` } @@ -4709,337 +1177,6 @@ func (x *Params) GetWhitelistedChains() []*ChainInfo { return nil } -// Meta represents -type Meta struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Key value data for the Property - Data map[string]string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *Meta) Reset() { - *x = Meta{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Meta) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Meta) ProtoMessage() {} - -// Deprecated: Use Meta.ProtoReflect.Descriptor instead. -func (*Meta) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} -} - -func (x *Meta) GetData() map[string]string { - if x != nil { - return x.Data - } - return nil -} - -type AssetInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,3,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,4,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - OriginType string `protobuf:"bytes,5,opt,name=origin_type,json=originType,proto3" json:"origin_type,omitempty"` - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` - CoinGeckoId string `protobuf:"bytes,10,opt,name=coinGeckoId,proto3" json:"coinGeckoId,omitempty"` - Enable bool `protobuf:"varint,11,opt,name=enable,proto3" json:"enable,omitempty"` - Path string `protobuf:"bytes,12,opt,name=path,proto3" json:"path,omitempty"` - Channel string `protobuf:"bytes,13,opt,name=channel,proto3" json:"channel,omitempty"` - Port string `protobuf:"bytes,14,opt,name=port,proto3" json:"port,omitempty"` - CounterParty *Meta `protobuf:"bytes,15,opt,name=counter_party,json=counterParty,proto3" json:"counter_party,omitempty"` -} - -func (x *AssetInfo) Reset() { - *x = AssetInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AssetInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AssetInfo) ProtoMessage() {} - -// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead. -func (*AssetInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{3} -} - -func (x *AssetInfo) GetDenom() string { - if x != nil { - return x.Denom - } - return "" -} - -func (x *AssetInfo) GetAssetType() string { - if x != nil { - return x.AssetType - } - return "" -} - -func (x *AssetInfo) GetOriginChain() string { - if x != nil { - return x.OriginChain - } - return "" -} - -func (x *AssetInfo) GetOriginDenom() string { - if x != nil { - return x.OriginDenom - } - return "" -} - -func (x *AssetInfo) GetOriginType() string { - if x != nil { - return x.OriginType - } - return "" -} - -func (x *AssetInfo) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *AssetInfo) GetDecimals() int32 { - if x != nil { - return x.Decimals - } - return 0 -} - -func (x *AssetInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *AssetInfo) GetImage() string { - if x != nil { - return x.Image - } - return "" -} - -func (x *AssetInfo) GetCoinGeckoId() string { - if x != nil { - return x.CoinGeckoId - } - return "" -} - -func (x *AssetInfo) GetEnable() bool { - if x != nil { - return x.Enable - } - return false -} - -func (x *AssetInfo) GetPath() string { - if x != nil { - return x.Path - } - return "" -} - -func (x *AssetInfo) GetChannel() string { - if x != nil { - return x.Channel - } - return "" -} - -func (x *AssetInfo) GetPort() string { - if x != nil { - return x.Port - } - return "" -} - -func (x *AssetInfo) GetCounterParty() *Meta { - if x != nil { - return x.CounterParty - } - return nil -} - -type ChainInfo struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChainIdCosmos string `protobuf:"bytes,1,opt,name=chain_id_cosmos,json=chainIdCosmos,proto3" json:"chain_id_cosmos,omitempty"` - ChainName string `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - BechAccountPrefix string `protobuf:"bytes,4,opt,name=bechAccountPrefix,proto3" json:"bechAccountPrefix,omitempty"` - BechValidatorPrefix string `protobuf:"bytes,5,opt,name=bechValidatorPrefix,proto3" json:"bechValidatorPrefix,omitempty"` - OriginGenesisTime string `protobuf:"bytes,6,opt,name=origin_genesis_time,json=originGenesisTime,proto3" json:"origin_genesis_time,omitempty"` - AccountType []*Meta `protobuf:"bytes,7,rep,name=accountType,proto3" json:"accountType,omitempty"` - GrpcEndpoint []*Meta `protobuf:"bytes,8,rep,name=grpc_endpoint,json=grpcEndpoint,proto3" json:"grpc_endpoint,omitempty"` - LcdEndpoint []*Meta `protobuf:"bytes,9,rep,name=lcd_endpoint,json=lcdEndpoint,proto3" json:"lcd_endpoint,omitempty"` - Explorer *Meta `protobuf:"bytes,10,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeBase string `protobuf:"bytes,11,opt,name=fee_base,json=feeBase,proto3" json:"fee_base,omitempty"` - FeeRate []string `protobuf:"bytes,12,rep,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` - FeeInitGasLimit int32 `protobuf:"varint,13,opt,name=fee_init_gas_limit,json=feeInitGasLimit,proto3" json:"fee_init_gas_limit,omitempty"` - FeeIsSimulable bool `protobuf:"varint,14,opt,name=fee_isSimulable,json=feeIsSimulable,proto3" json:"fee_isSimulable,omitempty"` - SimulGasMultiply float64 `protobuf:"fixed64,15,opt,name=simul_gas_multiply,json=simulGasMultiply,proto3" json:"simul_gas_multiply,omitempty"` -} - -func (x *ChainInfo) Reset() { - *x = ChainInfo{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ChainInfo) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ChainInfo) ProtoMessage() {} - -// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. -func (*ChainInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{4} -} - -func (x *ChainInfo) GetChainIdCosmos() string { - if x != nil { - return x.ChainIdCosmos - } - return "" -} - -func (x *ChainInfo) GetChainName() string { - if x != nil { - return x.ChainName - } - return "" -} - -func (x *ChainInfo) GetSymbol() string { - if x != nil { - return x.Symbol - } - return "" -} - -func (x *ChainInfo) GetBechAccountPrefix() string { - if x != nil { - return x.BechAccountPrefix - } - return "" -} - -func (x *ChainInfo) GetBechValidatorPrefix() string { - if x != nil { - return x.BechValidatorPrefix - } - return "" -} - -func (x *ChainInfo) GetOriginGenesisTime() string { - if x != nil { - return x.OriginGenesisTime - } - return "" -} - -func (x *ChainInfo) GetAccountType() []*Meta { - if x != nil { - return x.AccountType - } - return nil -} - -func (x *ChainInfo) GetGrpcEndpoint() []*Meta { - if x != nil { - return x.GrpcEndpoint - } - return nil -} - -func (x *ChainInfo) GetLcdEndpoint() []*Meta { - if x != nil { - return x.LcdEndpoint - } - return nil -} - -func (x *ChainInfo) GetExplorer() *Meta { - if x != nil { - return x.Explorer - } - return nil -} - -func (x *ChainInfo) GetFeeBase() string { - if x != nil { - return x.FeeBase - } - return "" -} - -func (x *ChainInfo) GetFeeRate() []string { - if x != nil { - return x.FeeRate - } - return nil -} - -func (x *ChainInfo) GetFeeInitGasLimit() int32 { - if x != nil { - return x.FeeInitGasLimit - } - return 0 -} - -func (x *ChainInfo) GetFeeIsSimulable() bool { - if x != nil { - return x.FeeIsSimulable - } - return false -} - -func (x *ChainInfo) GetSimulGasMultiply() float64 { - if x != nil { - return x.SimulGasMultiply - } - return 0 -} - var File_did_v1_genesis_proto protoreflect.FileDescriptor var file_did_v1_genesis_proto_rawDesc = []byte{ @@ -5047,106 +1184,31 @@ var file_did_v1_genesis_proto_rawDesc = []byte{ 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, 0x22, 0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, - 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x82, 0x01, - 0x0a, 0x04, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2a, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x1a, 0x37, 0x0a, 0x09, 0x44, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x15, 0x98, 0xa0, 0x1f, - 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x08, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x65, - 0x74, 0x61, 0x22, 0xc2, 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, - 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, - 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, - 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, - 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, - 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x63, 0x6f, 0x69, 0x6e, - 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6f, 0x69, 0x6e, 0x47, 0x65, 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x6e, - 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x6e, 0x61, 0x62, - 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, - 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, - 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x31, 0x0a, 0x0d, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x65, 0x72, 0x5f, - 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0c, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x79, 0x22, 0xf2, 0x04, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, - 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x26, 0x0a, 0x0f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, - 0x64, 0x5f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x12, 0x1d, 0x0a, - 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, - 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x2c, 0x0a, 0x11, 0x62, 0x65, 0x63, 0x68, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x11, 0x62, 0x65, 0x63, 0x68, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x66, - 0x69, 0x78, 0x12, 0x30, 0x0a, 0x13, 0x62, 0x65, 0x63, 0x68, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, - 0x74, 0x6f, 0x72, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x13, 0x62, 0x65, 0x63, 0x68, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x72, - 0x65, 0x66, 0x69, 0x78, 0x12, 0x2e, 0x0a, 0x13, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x67, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x11, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x54, - 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0c, 0x67, 0x72, 0x70, 0x63, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2f, 0x0a, 0x0c, 0x6c, 0x63, 0x64, 0x5f, 0x65, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x0b, 0x6c, 0x63, 0x64, - 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x28, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6c, - 0x6f, 0x72, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, - 0x65, 0x72, 0x12, 0x19, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x18, 0x0b, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x65, 0x65, 0x42, 0x61, 0x73, 0x65, 0x12, 0x19, 0x0a, - 0x08, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x18, 0x0c, 0x20, 0x03, 0x28, 0x09, 0x52, - 0x07, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x12, 0x2b, 0x0a, 0x12, 0x66, 0x65, 0x65, 0x5f, - 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x0d, - 0x20, 0x01, 0x28, 0x05, 0x52, 0x0f, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, - 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x73, 0x53, - 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, - 0x66, 0x65, 0x65, 0x49, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2c, - 0x0a, 0x12, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x70, 0x6c, 0x79, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x01, 0x52, 0x10, 0x73, 0x69, 0x6d, 0x75, - 0x6c, 0x47, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x42, 0x7c, 0x0a, 0x0a, - 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, - 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, - 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, - 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, - 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, + 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, + 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa5, 0x01, 0x0a, 0x06, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, + 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, + 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, + 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, + 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, + 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, + 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, + 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, + 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, + 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5161,30 +1223,22 @@ func file_did_v1_genesis_proto_rawDescGZIP() []byte { return file_did_v1_genesis_proto_rawDescData } -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_did_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: did.v1.GenesisState (*Params)(nil), // 1: did.v1.Params - (*Meta)(nil), // 2: did.v1.Meta - (*AssetInfo)(nil), // 3: did.v1.AssetInfo - (*ChainInfo)(nil), // 4: did.v1.ChainInfo - nil, // 5: did.v1.Meta.DataEntry + (*AssetInfo)(nil), // 2: did.v1.AssetInfo + (*ChainInfo)(nil), // 3: did.v1.ChainInfo } var file_did_v1_genesis_proto_depIdxs = []int32{ 1, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params - 3, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo - 4, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo - 5, // 3: did.v1.Meta.data:type_name -> did.v1.Meta.DataEntry - 2, // 4: did.v1.AssetInfo.counter_party:type_name -> did.v1.Meta - 2, // 5: did.v1.ChainInfo.accountType:type_name -> did.v1.Meta - 2, // 6: did.v1.ChainInfo.grpc_endpoint:type_name -> did.v1.Meta - 2, // 7: did.v1.ChainInfo.lcd_endpoint:type_name -> did.v1.Meta - 2, // 8: did.v1.ChainInfo.explorer:type_name -> did.v1.Meta - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 2, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo + 3, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_did_v1_genesis_proto_init() } @@ -5192,6 +1246,7 @@ func file_did_v1_genesis_proto_init() { if File_did_v1_genesis_proto != nil { return } + file_did_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -5217,42 +1272,6 @@ func file_did_v1_genesis_proto_init() { return nil } } - file_did_v1_genesis_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Meta); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_genesis_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AssetInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_genesis_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainInfo); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5260,7 +1279,7 @@ func file_did_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 2, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index badb81c64..39deb96a2 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -10,6 +10,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) @@ -805,27 +806,25 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryExistsRequest protoreflect.MessageDescriptor - fd_QueryExistsRequest_kind protoreflect.FieldDescriptor - fd_QueryExistsRequest_value protoreflect.FieldDescriptor + md_QueryAccountsRequest protoreflect.MessageDescriptor + fd_QueryAccountsRequest_did protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryExistsRequest = File_did_v1_query_proto.Messages().ByName("QueryExistsRequest") - fd_QueryExistsRequest_kind = md_QueryExistsRequest.Fields().ByName("kind") - fd_QueryExistsRequest_value = md_QueryExistsRequest.Fields().ByName("value") + md_QueryAccountsRequest = File_did_v1_query_proto.Messages().ByName("QueryAccountsRequest") + fd_QueryAccountsRequest_did = md_QueryAccountsRequest.Fields().ByName("did") } -var _ protoreflect.Message = (*fastReflection_QueryExistsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAccountsRequest)(nil) -type fastReflection_QueryExistsRequest QueryExistsRequest +type fastReflection_QueryAccountsRequest QueryAccountsRequest -func (x *QueryExistsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryExistsRequest)(x) +func (x *QueryAccountsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountsRequest)(x) } -func (x *QueryExistsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryAccountsRequest) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -837,43 +836,43 @@ func (x *QueryExistsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryExistsRequest_messageType fastReflection_QueryExistsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryExistsRequest_messageType{} +var _fastReflection_QueryAccountsRequest_messageType fastReflection_QueryAccountsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountsRequest_messageType{} -type fastReflection_QueryExistsRequest_messageType struct{} +type fastReflection_QueryAccountsRequest_messageType struct{} -func (x fastReflection_QueryExistsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryExistsRequest)(nil) +func (x fastReflection_QueryAccountsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountsRequest)(nil) } -func (x fastReflection_QueryExistsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryExistsRequest) +func (x fastReflection_QueryAccountsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountsRequest) } -func (x fastReflection_QueryExistsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryExistsRequest +func (x fastReflection_QueryAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryExistsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryExistsRequest +func (x *fastReflection_QueryAccountsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryExistsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryExistsRequest_messageType +func (x *fastReflection_QueryAccountsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountsRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryExistsRequest) New() protoreflect.Message { - return new(fastReflection_QueryExistsRequest) +func (x *fastReflection_QueryAccountsRequest) New() protoreflect.Message { + return new(fastReflection_QueryAccountsRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryExistsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryExistsRequest)(x) +func (x *fastReflection_QueryAccountsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryAccountsRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -881,16 +880,10 @@ func (x *fastReflection_QueryExistsRequest) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryExistsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Kind != "" { - value := protoreflect.ValueOfString(x.Kind) - if !f(fd_QueryExistsRequest_kind, value) { - return - } - } - if x.Value != "" { - value := protoreflect.ValueOfString(x.Value) - if !f(fd_QueryExistsRequest_value, value) { +func (x *fastReflection_QueryAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QueryAccountsRequest_did, value) { return } } @@ -907,17 +900,15 @@ func (x *fastReflection_QueryExistsRequest) Range(f func(protoreflect.FieldDescr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryExistsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryExistsRequest.kind": - return x.Kind != "" - case "did.v1.QueryExistsRequest.value": - return x.Value != "" + case "did.v1.QueryAccountsRequest.did": + return x.Did != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) } - panic(fmt.Errorf("message did.v1.QueryExistsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) } } @@ -927,17 +918,15 @@ func (x *fastReflection_QueryExistsRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryExistsRequest.kind": - x.Kind = "" - case "did.v1.QueryExistsRequest.value": - x.Value = "" + case "did.v1.QueryAccountsRequest.did": + x.Did = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) } - panic(fmt.Errorf("message did.v1.QueryExistsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) } } @@ -947,19 +936,16 @@ func (x *fastReflection_QueryExistsRequest) Clear(fd protoreflect.FieldDescripto // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryExistsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryExistsRequest.kind": - value := x.Kind - return protoreflect.ValueOfString(value) - case "did.v1.QueryExistsRequest.value": - value := x.Value + case "did.v1.QueryAccountsRequest.did": + value := x.Did return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) } - panic(fmt.Errorf("message did.v1.QueryExistsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", descriptor.FullName())) } } @@ -973,17 +959,15 @@ func (x *fastReflection_QueryExistsRequest) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryExistsRequest.kind": - x.Kind = value.Interface().(string) - case "did.v1.QueryExistsRequest.value": - x.Value = value.Interface().(string) + case "did.v1.QueryAccountsRequest.did": + x.Did = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) } - panic(fmt.Errorf("message did.v1.QueryExistsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) } } @@ -997,44 +981,40 @@ func (x *fastReflection_QueryExistsRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryExistsRequest.kind": - panic(fmt.Errorf("field kind of message did.v1.QueryExistsRequest is not mutable")) - case "did.v1.QueryExistsRequest.value": - panic(fmt.Errorf("field value of message did.v1.QueryExistsRequest is not mutable")) + case "did.v1.QueryAccountsRequest.did": + panic(fmt.Errorf("field did of message did.v1.QueryAccountsRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) } - panic(fmt.Errorf("message did.v1.QueryExistsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryExistsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryExistsRequest.kind": - return protoreflect.ValueOfString("") - case "did.v1.QueryExistsRequest.value": + case "did.v1.QueryAccountsRequest.did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) } - panic(fmt.Errorf("message did.v1.QueryExistsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryExistsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryExistsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryAccountsRequest", d.FullName())) } panic("unreachable") } @@ -1042,7 +1022,7 @@ func (x *fastReflection_QueryExistsRequest) WhichOneof(d protoreflect.OneofDescr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryExistsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAccountsRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1053,7 +1033,7 @@ func (x *fastReflection_QueryExistsRequest) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAccountsRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1065,7 +1045,7 @@ func (x *fastReflection_QueryExistsRequest) SetUnknown(fields protoreflect.RawFi // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryExistsRequest) IsValid() bool { +func (x *fastReflection_QueryAccountsRequest) IsValid() bool { return x != nil } @@ -1075,9 +1055,9 @@ func (x *fastReflection_QueryExistsRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAccountsRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryExistsRequest) + x := input.Message.Interface().(*QueryAccountsRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1089,11 +1069,7 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Kind) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Value) + l = len(x.Did) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1107,7 +1083,7 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryExistsRequest) + x := input.Message.Interface().(*QueryAccountsRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1126,17 +1102,10 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Value) > 0 { - i -= len(x.Value) - copy(dAtA[i:], x.Value) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Value))) - i-- - dAtA[i] = 0x12 - } - if len(x.Kind) > 0 { - i -= len(x.Kind) - copy(dAtA[i:], x.Kind) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Kind))) + if len(x.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) i-- dAtA[i] = 0xa } @@ -1151,7 +1120,7 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryExistsRequest) + x := input.Message.Interface().(*QueryAccountsRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1183,15 +1152,15 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExistsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExistsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1219,39 +1188,7 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Value = string(dAtA[iNdEx:postIndex]) + x.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1289,25 +1226,25 @@ func (x *fastReflection_QueryExistsRequest) ProtoMethods() *protoiface.Methods { } var ( - md_QueryExistsResponse protoreflect.MessageDescriptor - fd_QueryExistsResponse_exists protoreflect.FieldDescriptor + md_QueryAccountsResponse protoreflect.MessageDescriptor + fd_QueryAccountsResponse_exists protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryExistsResponse = File_did_v1_query_proto.Messages().ByName("QueryExistsResponse") - fd_QueryExistsResponse_exists = md_QueryExistsResponse.Fields().ByName("exists") + md_QueryAccountsResponse = File_did_v1_query_proto.Messages().ByName("QueryAccountsResponse") + fd_QueryAccountsResponse_exists = md_QueryAccountsResponse.Fields().ByName("exists") } -var _ protoreflect.Message = (*fastReflection_QueryExistsResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryAccountsResponse)(nil) -type fastReflection_QueryExistsResponse QueryExistsResponse +type fastReflection_QueryAccountsResponse QueryAccountsResponse -func (x *QueryExistsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryExistsResponse)(x) +func (x *QueryAccountsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryAccountsResponse)(x) } -func (x *QueryExistsResponse) slowProtoReflect() protoreflect.Message { +func (x *QueryAccountsResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1319,43 +1256,43 @@ func (x *QueryExistsResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryExistsResponse_messageType fastReflection_QueryExistsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryExistsResponse_messageType{} +var _fastReflection_QueryAccountsResponse_messageType fastReflection_QueryAccountsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryAccountsResponse_messageType{} -type fastReflection_QueryExistsResponse_messageType struct{} +type fastReflection_QueryAccountsResponse_messageType struct{} -func (x fastReflection_QueryExistsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryExistsResponse)(nil) +func (x fastReflection_QueryAccountsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryAccountsResponse)(nil) } -func (x fastReflection_QueryExistsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryExistsResponse) +func (x fastReflection_QueryAccountsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryAccountsResponse) } -func (x fastReflection_QueryExistsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryExistsResponse +func (x fastReflection_QueryAccountsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryExistsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryExistsResponse +func (x *fastReflection_QueryAccountsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryAccountsResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryExistsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryExistsResponse_messageType +func (x *fastReflection_QueryAccountsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryAccountsResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryExistsResponse) New() protoreflect.Message { - return new(fastReflection_QueryExistsResponse) +func (x *fastReflection_QueryAccountsResponse) New() protoreflect.Message { + return new(fastReflection_QueryAccountsResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryExistsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryExistsResponse)(x) +func (x *fastReflection_QueryAccountsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryAccountsResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1363,10 +1300,10 @@ func (x *fastReflection_QueryExistsResponse) Interface() protoreflect.ProtoMessa // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryExistsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryAccountsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Exists != false { value := protoreflect.ValueOfBool(x.Exists) - if !f(fd_QueryExistsResponse_exists, value) { + if !f(fd_QueryAccountsResponse_exists, value) { return } } @@ -1383,15 +1320,15 @@ func (x *fastReflection_QueryExistsResponse) Range(f func(protoreflect.FieldDesc // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryExistsResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryAccountsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryExistsResponse.exists": + case "did.v1.QueryAccountsResponse.exists": return x.Exists != false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsResponse")) } - panic(fmt.Errorf("message did.v1.QueryExistsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsResponse does not contain field %s", fd.FullName())) } } @@ -1401,15 +1338,15 @@ func (x *fastReflection_QueryExistsResponse) Has(fd protoreflect.FieldDescriptor // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryAccountsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryExistsResponse.exists": + case "did.v1.QueryAccountsResponse.exists": x.Exists = false default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsResponse")) } - panic(fmt.Errorf("message did.v1.QueryExistsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsResponse does not contain field %s", fd.FullName())) } } @@ -1419,16 +1356,16 @@ func (x *fastReflection_QueryExistsResponse) Clear(fd protoreflect.FieldDescript // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryExistsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryExistsResponse.exists": + case "did.v1.QueryAccountsResponse.exists": value := x.Exists return protoreflect.ValueOfBool(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsResponse")) } - panic(fmt.Errorf("message did.v1.QueryExistsResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsResponse does not contain field %s", descriptor.FullName())) } } @@ -1442,15 +1379,15 @@ func (x *fastReflection_QueryExistsResponse) Get(descriptor protoreflect.FieldDe // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryAccountsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryExistsResponse.exists": + case "did.v1.QueryAccountsResponse.exists": x.Exists = value.Bool() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsResponse")) } - panic(fmt.Errorf("message did.v1.QueryExistsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsResponse does not contain field %s", fd.FullName())) } } @@ -1464,40 +1401,40 @@ func (x *fastReflection_QueryExistsResponse) Set(fd protoreflect.FieldDescriptor // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryExistsResponse.exists": - panic(fmt.Errorf("field exists of message did.v1.QueryExistsResponse is not mutable")) + case "did.v1.QueryAccountsResponse.exists": + panic(fmt.Errorf("field exists of message did.v1.QueryAccountsResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsResponse")) } - panic(fmt.Errorf("message did.v1.QueryExistsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryExistsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryAccountsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryExistsResponse.exists": + case "did.v1.QueryAccountsResponse.exists": return protoreflect.ValueOfBool(false) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryExistsResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsResponse")) } - panic(fmt.Errorf("message did.v1.QueryExistsResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryAccountsResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryExistsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryAccountsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryExistsResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryAccountsResponse", d.FullName())) } panic("unreachable") } @@ -1505,7 +1442,7 @@ func (x *fastReflection_QueryExistsResponse) WhichOneof(d protoreflect.OneofDesc // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryExistsResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryAccountsResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1516,7 +1453,7 @@ func (x *fastReflection_QueryExistsResponse) GetUnknown() protoreflect.RawFields // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryExistsResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryAccountsResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1528,7 +1465,7 @@ func (x *fastReflection_QueryExistsResponse) SetUnknown(fields protoreflect.RawF // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryExistsResponse) IsValid() bool { +func (x *fastReflection_QueryAccountsResponse) IsValid() bool { return x != nil } @@ -1538,9 +1475,9 @@ func (x *fastReflection_QueryExistsResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryExistsResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryAccountsResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryExistsResponse) + x := input.Message.Interface().(*QueryAccountsResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1565,7 +1502,7 @@ func (x *fastReflection_QueryExistsResponse) ProtoMethods() *protoiface.Methods } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryExistsResponse) + x := input.Message.Interface().(*QueryAccountsResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1605,7 +1542,7 @@ func (x *fastReflection_QueryExistsResponse) ProtoMethods() *protoiface.Methods }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryExistsResponse) + x := input.Message.Interface().(*QueryAccountsResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1637,10 +1574,10 @@ func (x *fastReflection_QueryExistsResponse) ProtoMethods() *protoiface.Methods fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExistsResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryExistsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1699,14 +1636,2128 @@ func (x *fastReflection_QueryExistsResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryResolveRequest protoreflect.MessageDescriptor - fd_QueryResolveRequest_id protoreflect.FieldDescriptor + md_QueryCredentialsRequest protoreflect.MessageDescriptor + fd_QueryCredentialsRequest_did protoreflect.FieldDescriptor + fd_QueryCredentialsRequest_origin protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryCredentialsRequest = File_did_v1_query_proto.Messages().ByName("QueryCredentialsRequest") + fd_QueryCredentialsRequest_did = md_QueryCredentialsRequest.Fields().ByName("did") + fd_QueryCredentialsRequest_origin = md_QueryCredentialsRequest.Fields().ByName("origin") +} + +var _ protoreflect.Message = (*fastReflection_QueryCredentialsRequest)(nil) + +type fastReflection_QueryCredentialsRequest QueryCredentialsRequest + +func (x *QueryCredentialsRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCredentialsRequest)(x) +} + +func (x *QueryCredentialsRequest) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCredentialsRequest_messageType fastReflection_QueryCredentialsRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryCredentialsRequest_messageType{} + +type fastReflection_QueryCredentialsRequest_messageType struct{} + +func (x fastReflection_QueryCredentialsRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCredentialsRequest)(nil) +} +func (x fastReflection_QueryCredentialsRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCredentialsRequest) +} +func (x fastReflection_QueryCredentialsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCredentialsRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCredentialsRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCredentialsRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCredentialsRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryCredentialsRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCredentialsRequest) New() protoreflect.Message { + return new(fastReflection_QueryCredentialsRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCredentialsRequest) Interface() protoreflect.ProtoMessage { + return (*QueryCredentialsRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCredentialsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QueryCredentialsRequest_did, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_QueryCredentialsRequest_origin, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCredentialsRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryCredentialsRequest.did": + return x.Did != "" + case "did.v1.QueryCredentialsRequest.origin": + return x.Origin != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryCredentialsRequest.did": + x.Did = "" + case "did.v1.QueryCredentialsRequest.origin": + x.Origin = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCredentialsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryCredentialsRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + case "did.v1.QueryCredentialsRequest.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryCredentialsRequest.did": + x.Did = value.Interface().(string) + case "did.v1.QueryCredentialsRequest.origin": + x.Origin = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryCredentialsRequest.did": + panic(fmt.Errorf("field did of message did.v1.QueryCredentialsRequest is not mutable")) + case "did.v1.QueryCredentialsRequest.origin": + panic(fmt.Errorf("field origin of message did.v1.QueryCredentialsRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCredentialsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryCredentialsRequest.did": + return protoreflect.ValueOfString("") + case "did.v1.QueryCredentialsRequest.origin": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCredentialsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryCredentialsRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCredentialsRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCredentialsRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCredentialsRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCredentialsRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Did) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCredentialsRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(x.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCredentialsRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCredentialsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCredentialsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.Map = (*_QueryCredentialsResponse_1_map)(nil) + +type _QueryCredentialsResponse_1_map struct { + m *map[string][]byte +} + +func (x *_QueryCredentialsResponse_1_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_QueryCredentialsResponse_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfBytes(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_QueryCredentialsResponse_1_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_QueryCredentialsResponse_1_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_QueryCredentialsResponse_1_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfBytes(v) +} + +func (x *_QueryCredentialsResponse_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_QueryCredentialsResponse_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_QueryCredentialsResponse_1_map) NewValue() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_QueryCredentialsResponse_1_map) IsValid() bool { + return x.m != nil +} + +var ( + md_QueryCredentialsResponse protoreflect.MessageDescriptor + fd_QueryCredentialsResponse_credentials protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryCredentialsResponse = File_did_v1_query_proto.Messages().ByName("QueryCredentialsResponse") + fd_QueryCredentialsResponse_credentials = md_QueryCredentialsResponse.Fields().ByName("credentials") +} + +var _ protoreflect.Message = (*fastReflection_QueryCredentialsResponse)(nil) + +type fastReflection_QueryCredentialsResponse QueryCredentialsResponse + +func (x *QueryCredentialsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryCredentialsResponse)(x) +} + +func (x *QueryCredentialsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryCredentialsResponse_messageType fastReflection_QueryCredentialsResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryCredentialsResponse_messageType{} + +type fastReflection_QueryCredentialsResponse_messageType struct{} + +func (x fastReflection_QueryCredentialsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryCredentialsResponse)(nil) +} +func (x fastReflection_QueryCredentialsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryCredentialsResponse) +} +func (x fastReflection_QueryCredentialsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCredentialsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryCredentialsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryCredentialsResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryCredentialsResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryCredentialsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryCredentialsResponse) New() protoreflect.Message { + return new(fastReflection_QueryCredentialsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryCredentialsResponse) Interface() protoreflect.ProtoMessage { + return (*QueryCredentialsResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryCredentialsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Credentials) != 0 { + value := protoreflect.ValueOfMap(&_QueryCredentialsResponse_1_map{m: &x.Credentials}) + if !f(fd_QueryCredentialsResponse_credentials, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryCredentialsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.credentials": + return len(x.Credentials) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.credentials": + x.Credentials = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryCredentialsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryCredentialsResponse.credentials": + if len(x.Credentials) == 0 { + return protoreflect.ValueOfMap(&_QueryCredentialsResponse_1_map{}) + } + mapValue := &_QueryCredentialsResponse_1_map{m: &x.Credentials} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.credentials": + mv := value.Map() + cmv := mv.(*_QueryCredentialsResponse_1_map) + x.Credentials = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.credentials": + if x.Credentials == nil { + x.Credentials = make(map[string][]byte) + } + value := &_QueryCredentialsResponse_1_map{m: &x.Credentials} + return protoreflect.ValueOfMap(value) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryCredentialsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.credentials": + m := make(map[string][]byte) + return protoreflect.ValueOfMap(&_QueryCredentialsResponse_1_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) + } + panic(fmt.Errorf("message did.v1.QueryCredentialsResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryCredentialsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryCredentialsResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryCredentialsResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryCredentialsResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryCredentialsResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryCredentialsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryCredentialsResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if len(x.Credentials) > 0 { + SiZeMaP := func(k string, v []byte) { + l = 1 + len(v) + runtime.Sov(uint64(len(v))) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Credentials)) + for k := range x.Credentials { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Credentials[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Credentials { + SiZeMaP(k, v) + } + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryCredentialsResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Credentials) > 0 { + MaRsHaLmAp := func(k string, v []byte) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForCredentials := make([]string, 0, len(x.Credentials)) + for k := range x.Credentials { + keysForCredentials = append(keysForCredentials, string(k)) + } + sort.Slice(keysForCredentials, func(i, j int) bool { + return keysForCredentials[i] < keysForCredentials[j] + }) + for iNdEx := len(keysForCredentials) - 1; iNdEx >= 0; iNdEx-- { + v := x.Credentials[string(keysForCredentials[iNdEx])] + out, err := MaRsHaLmAp(keysForCredentials[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Credentials { + v := x.Credentials[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryCredentialsResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCredentialsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCredentialsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Credentials == nil { + x.Credentials = make(map[string][]byte) + } + var mapkey string + var mapvalue []byte + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postbytesIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Credentials[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryIdentitiesRequest protoreflect.MessageDescriptor + fd_QueryIdentitiesRequest_did protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryIdentitiesRequest = File_did_v1_query_proto.Messages().ByName("QueryIdentitiesRequest") + fd_QueryIdentitiesRequest_did = md_QueryIdentitiesRequest.Fields().ByName("did") +} + +var _ protoreflect.Message = (*fastReflection_QueryIdentitiesRequest)(nil) + +type fastReflection_QueryIdentitiesRequest QueryIdentitiesRequest + +func (x *QueryIdentitiesRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryIdentitiesRequest)(x) +} + +func (x *QueryIdentitiesRequest) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryIdentitiesRequest_messageType fastReflection_QueryIdentitiesRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryIdentitiesRequest_messageType{} + +type fastReflection_QueryIdentitiesRequest_messageType struct{} + +func (x fastReflection_QueryIdentitiesRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryIdentitiesRequest)(nil) +} +func (x fastReflection_QueryIdentitiesRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryIdentitiesRequest) +} +func (x fastReflection_QueryIdentitiesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryIdentitiesRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryIdentitiesRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryIdentitiesRequest +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryIdentitiesRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryIdentitiesRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryIdentitiesRequest) New() protoreflect.Message { + return new(fastReflection_QueryIdentitiesRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryIdentitiesRequest) Interface() protoreflect.ProtoMessage { + return (*QueryIdentitiesRequest)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryIdentitiesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QueryIdentitiesRequest_did, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryIdentitiesRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryIdentitiesRequest.did": + return x.Did != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryIdentitiesRequest.did": + x.Did = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryIdentitiesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryIdentitiesRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryIdentitiesRequest.did": + x.Did = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryIdentitiesRequest.did": + panic(fmt.Errorf("field did of message did.v1.QueryIdentitiesRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryIdentitiesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryIdentitiesRequest.did": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryIdentitiesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryIdentitiesRequest", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryIdentitiesRequest) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesRequest) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryIdentitiesRequest) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryIdentitiesRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryIdentitiesRequest) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Did) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryIdentitiesRequest) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryIdentitiesRequest) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_QueryIdentitiesResponse_2_list)(nil) + +type _QueryIdentitiesResponse_2_list struct { + list *[]*VerificationMethod +} + +func (x *_QueryIdentitiesResponse_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryIdentitiesResponse_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryIdentitiesResponse_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + (*x.list)[i] = concreteValue +} + +func (x *_QueryIdentitiesResponse_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryIdentitiesResponse_2_list) AppendMutable() protoreflect.Value { + v := new(VerificationMethod) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryIdentitiesResponse_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryIdentitiesResponse_2_list) NewElement() protoreflect.Value { + v := new(VerificationMethod) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryIdentitiesResponse_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_QueryIdentitiesResponse protoreflect.MessageDescriptor + fd_QueryIdentitiesResponse_exists protoreflect.FieldDescriptor + fd_QueryIdentitiesResponse_verificationMethod protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryIdentitiesResponse = File_did_v1_query_proto.Messages().ByName("QueryIdentitiesResponse") + fd_QueryIdentitiesResponse_exists = md_QueryIdentitiesResponse.Fields().ByName("exists") + fd_QueryIdentitiesResponse_verificationMethod = md_QueryIdentitiesResponse.Fields().ByName("verificationMethod") +} + +var _ protoreflect.Message = (*fastReflection_QueryIdentitiesResponse)(nil) + +type fastReflection_QueryIdentitiesResponse QueryIdentitiesResponse + +func (x *QueryIdentitiesResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryIdentitiesResponse)(x) +} + +func (x *QueryIdentitiesResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryIdentitiesResponse_messageType fastReflection_QueryIdentitiesResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryIdentitiesResponse_messageType{} + +type fastReflection_QueryIdentitiesResponse_messageType struct{} + +func (x fastReflection_QueryIdentitiesResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryIdentitiesResponse)(nil) +} +func (x fastReflection_QueryIdentitiesResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryIdentitiesResponse) +} +func (x fastReflection_QueryIdentitiesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryIdentitiesResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryIdentitiesResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryIdentitiesResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_QueryIdentitiesResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryIdentitiesResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryIdentitiesResponse) New() protoreflect.Message { + return new(fastReflection_QueryIdentitiesResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryIdentitiesResponse) Interface() protoreflect.ProtoMessage { + return (*QueryIdentitiesResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_QueryIdentitiesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Exists != false { + value := protoreflect.ValueOfBool(x.Exists) + if !f(fd_QueryIdentitiesResponse_exists, value) { + return + } + } + if len(x.VerificationMethod) != 0 { + value := protoreflect.ValueOfList(&_QueryIdentitiesResponse_2_list{list: &x.VerificationMethod}) + if !f(fd_QueryIdentitiesResponse_verificationMethod, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_QueryIdentitiesResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryIdentitiesResponse.exists": + return x.Exists != false + case "did.v1.QueryIdentitiesResponse.verificationMethod": + return len(x.VerificationMethod) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryIdentitiesResponse.exists": + x.Exists = false + case "did.v1.QueryIdentitiesResponse.verificationMethod": + x.VerificationMethod = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_QueryIdentitiesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryIdentitiesResponse.exists": + value := x.Exists + return protoreflect.ValueOfBool(value) + case "did.v1.QueryIdentitiesResponse.verificationMethod": + if len(x.VerificationMethod) == 0 { + return protoreflect.ValueOfList(&_QueryIdentitiesResponse_2_list{}) + } + listValue := &_QueryIdentitiesResponse_2_list{list: &x.VerificationMethod} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryIdentitiesResponse.exists": + x.Exists = value.Bool() + case "did.v1.QueryIdentitiesResponse.verificationMethod": + lv := value.List() + clv := lv.(*_QueryIdentitiesResponse_2_list) + x.VerificationMethod = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryIdentitiesResponse.verificationMethod": + if x.VerificationMethod == nil { + x.VerificationMethod = []*VerificationMethod{} + } + value := &_QueryIdentitiesResponse_2_list{list: &x.VerificationMethod} + return protoreflect.ValueOfList(value) + case "did.v1.QueryIdentitiesResponse.exists": + panic(fmt.Errorf("field exists of message did.v1.QueryIdentitiesResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_QueryIdentitiesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryIdentitiesResponse.exists": + return protoreflect.ValueOfBool(false) + case "did.v1.QueryIdentitiesResponse.verificationMethod": + list := []*VerificationMethod{} + return protoreflect.ValueOfList(&_QueryIdentitiesResponse_2_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) + } + panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_QueryIdentitiesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryIdentitiesResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_QueryIdentitiesResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_QueryIdentitiesResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_QueryIdentitiesResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_QueryIdentitiesResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryIdentitiesResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Exists { + n += 2 + } + if len(x.VerificationMethod) > 0 { + for _, e := range x.VerificationMethod { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*QueryIdentitiesResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.VerificationMethod) > 0 { + for iNdEx := len(x.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.VerificationMethod[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if x.Exists { + i-- + if x.Exists { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*QueryIdentitiesResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Exists = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.VerificationMethod = append(x.VerificationMethod, &VerificationMethod{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethod[len(x.VerificationMethod)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_QueryResolveRequest protoreflect.MessageDescriptor + fd_QueryResolveRequest_did protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() md_QueryResolveRequest = File_did_v1_query_proto.Messages().ByName("QueryResolveRequest") - fd_QueryResolveRequest_id = md_QueryResolveRequest.Fields().ByName("id") + fd_QueryResolveRequest_did = md_QueryResolveRequest.Fields().ByName("did") } var _ protoreflect.Message = (*fastReflection_QueryResolveRequest)(nil) @@ -1718,7 +3769,7 @@ func (x *QueryResolveRequest) ProtoReflect() protoreflect.Message { } func (x *QueryResolveRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[4] + mi := &file_did_v1_query_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1774,9 +3825,9 @@ func (x *fastReflection_QueryResolveRequest) Interface() protoreflect.ProtoMessa // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryResolveRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_QueryResolveRequest_id, value) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QueryResolveRequest_did, value) { return } } @@ -1795,8 +3846,8 @@ func (x *fastReflection_QueryResolveRequest) Range(f func(protoreflect.FieldDesc // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryResolveRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryResolveRequest.id": - return x.Id != "" + case "did.v1.QueryResolveRequest.did": + return x.Did != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) @@ -1813,8 +3864,8 @@ func (x *fastReflection_QueryResolveRequest) Has(fd protoreflect.FieldDescriptor // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryResolveRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryResolveRequest.id": - x.Id = "" + case "did.v1.QueryResolveRequest.did": + x.Did = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) @@ -1831,8 +3882,8 @@ func (x *fastReflection_QueryResolveRequest) Clear(fd protoreflect.FieldDescript // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryResolveRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryResolveRequest.id": - value := x.Id + case "did.v1.QueryResolveRequest.did": + value := x.Did return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { @@ -1854,8 +3905,8 @@ func (x *fastReflection_QueryResolveRequest) Get(descriptor protoreflect.FieldDe // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryResolveRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryResolveRequest.id": - x.Id = value.Interface().(string) + case "did.v1.QueryResolveRequest.did": + x.Did = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) @@ -1876,8 +3927,8 @@ func (x *fastReflection_QueryResolveRequest) Set(fd protoreflect.FieldDescriptor // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryResolveRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryResolveRequest.id": - panic(fmt.Errorf("field id of message did.v1.QueryResolveRequest is not mutable")) + case "did.v1.QueryResolveRequest.did": + panic(fmt.Errorf("field did of message did.v1.QueryResolveRequest is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) @@ -1891,7 +3942,7 @@ func (x *fastReflection_QueryResolveRequest) Mutable(fd protoreflect.FieldDescri // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryResolveRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryResolveRequest.id": + case "did.v1.QueryResolveRequest.did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { @@ -1962,7 +4013,7 @@ func (x *fastReflection_QueryResolveRequest) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Id) + l = len(x.Did) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1995,10 +4046,10 @@ func (x *fastReflection_QueryResolveRequest) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + if len(x.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) i-- dAtA[i] = 0xa } @@ -2053,7 +4104,7 @@ func (x *fastReflection_QueryResolveRequest) ProtoMethods() *protoiface.Methods switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2081,7 +4132,7 @@ func (x *fastReflection_QueryResolveRequest) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Id = string(dAtA[iNdEx:postIndex]) + x.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2138,7 +4189,7 @@ func (x *QueryResolveResponse) ProtoReflect() protoreflect.Message { } func (x *QueryResolveResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[5] + mi := &file_did_v1_query_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2194,8 +4245,8 @@ func (x *fastReflection_QueryResolveResponse) Interface() protoreflect.ProtoMess // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryResolveResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Document != "" { - value := protoreflect.ValueOfString(x.Document) + if x.Document != nil { + value := protoreflect.ValueOfMessage(x.Document.ProtoReflect()) if !f(fd_QueryResolveResponse_document, value) { return } @@ -2216,7 +4267,7 @@ func (x *fastReflection_QueryResolveResponse) Range(f func(protoreflect.FieldDes func (x *fastReflection_QueryResolveResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { case "did.v1.QueryResolveResponse.document": - return x.Document != "" + return x.Document != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) @@ -2234,7 +4285,7 @@ func (x *fastReflection_QueryResolveResponse) Has(fd protoreflect.FieldDescripto func (x *fastReflection_QueryResolveResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.QueryResolveResponse.document": - x.Document = "" + x.Document = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) @@ -2253,7 +4304,7 @@ func (x *fastReflection_QueryResolveResponse) Get(descriptor protoreflect.FieldD switch descriptor.FullName() { case "did.v1.QueryResolveResponse.document": value := x.Document - return protoreflect.ValueOfString(value) + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) @@ -2275,7 +4326,7 @@ func (x *fastReflection_QueryResolveResponse) Get(descriptor protoreflect.FieldD func (x *fastReflection_QueryResolveResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { case "did.v1.QueryResolveResponse.document": - x.Document = value.Interface().(string) + x.Document = value.Message().Interface().(*Document) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) @@ -2297,7 +4348,10 @@ func (x *fastReflection_QueryResolveResponse) Set(fd protoreflect.FieldDescripto func (x *fastReflection_QueryResolveResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "did.v1.QueryResolveResponse.document": - panic(fmt.Errorf("field document of message did.v1.QueryResolveResponse is not mutable")) + if x.Document == nil { + x.Document = new(Document) + } + return protoreflect.ValueOfMessage(x.Document.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) @@ -2312,7 +4366,8 @@ func (x *fastReflection_QueryResolveResponse) Mutable(fd protoreflect.FieldDescr func (x *fastReflection_QueryResolveResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "did.v1.QueryResolveResponse.document": - return protoreflect.ValueOfString("") + m := new(Document) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveResponse")) @@ -2382,8 +4437,8 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Document) - if l > 0 { + if x.Document != nil { + l = options.Size(x.Document) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -2415,10 +4470,17 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Document) > 0 { - i -= len(x.Document) - copy(dAtA[i:], x.Document) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Document))) + if x.Document != nil { + encoded, err := options.Marshal(x.Document) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0xa } @@ -2475,7 +4537,7 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2485,23 +4547,27 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Document = string(dAtA[iNdEx:postIndex]) + if x.Document == nil { + x.Document = &Document{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Document); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2539,26 +4605,26 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods } var ( - md_QueryWitnessCredentialRequest protoreflect.MessageDescriptor - fd_QueryWitnessCredentialRequest_id protoreflect.FieldDescriptor + md_QueryServiceRequest protoreflect.MessageDescriptor + fd_QueryServiceRequest_origin protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryWitnessCredentialRequest = File_did_v1_query_proto.Messages().ByName("QueryWitnessCredentialRequest") - fd_QueryWitnessCredentialRequest_id = md_QueryWitnessCredentialRequest.Fields().ByName("id") + md_QueryServiceRequest = File_did_v1_query_proto.Messages().ByName("QueryServiceRequest") + fd_QueryServiceRequest_origin = md_QueryServiceRequest.Fields().ByName("origin") } -var _ protoreflect.Message = (*fastReflection_QueryWitnessCredentialRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryServiceRequest)(nil) -type fastReflection_QueryWitnessCredentialRequest QueryWitnessCredentialRequest +type fastReflection_QueryServiceRequest QueryServiceRequest -func (x *QueryWitnessCredentialRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryWitnessCredentialRequest)(x) +func (x *QueryServiceRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryServiceRequest)(x) } -func (x *QueryWitnessCredentialRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[6] +func (x *QueryServiceRequest) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2569,43 +4635,43 @@ func (x *QueryWitnessCredentialRequest) slowProtoReflect() protoreflect.Message return mi.MessageOf(x) } -var _fastReflection_QueryWitnessCredentialRequest_messageType fastReflection_QueryWitnessCredentialRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryWitnessCredentialRequest_messageType{} +var _fastReflection_QueryServiceRequest_messageType fastReflection_QueryServiceRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryServiceRequest_messageType{} -type fastReflection_QueryWitnessCredentialRequest_messageType struct{} +type fastReflection_QueryServiceRequest_messageType struct{} -func (x fastReflection_QueryWitnessCredentialRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryWitnessCredentialRequest)(nil) +func (x fastReflection_QueryServiceRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryServiceRequest)(nil) } -func (x fastReflection_QueryWitnessCredentialRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryWitnessCredentialRequest) +func (x fastReflection_QueryServiceRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryServiceRequest) } -func (x fastReflection_QueryWitnessCredentialRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryWitnessCredentialRequest +func (x fastReflection_QueryServiceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryServiceRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryWitnessCredentialRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryWitnessCredentialRequest +func (x *fastReflection_QueryServiceRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryServiceRequest } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryWitnessCredentialRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryWitnessCredentialRequest_messageType +func (x *fastReflection_QueryServiceRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryServiceRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryWitnessCredentialRequest) New() protoreflect.Message { - return new(fastReflection_QueryWitnessCredentialRequest) +func (x *fastReflection_QueryServiceRequest) New() protoreflect.Message { + return new(fastReflection_QueryServiceRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryWitnessCredentialRequest) Interface() protoreflect.ProtoMessage { - return (*QueryWitnessCredentialRequest)(x) +func (x *fastReflection_QueryServiceRequest) Interface() protoreflect.ProtoMessage { + return (*QueryServiceRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -2613,10 +4679,10 @@ func (x *fastReflection_QueryWitnessCredentialRequest) Interface() protoreflect. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryWitnessCredentialRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_QueryWitnessCredentialRequest_id, value) { +func (x *fastReflection_QueryServiceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_QueryServiceRequest_origin, value) { return } } @@ -2633,15 +4699,15 @@ func (x *fastReflection_QueryWitnessCredentialRequest) Range(f func(protoreflect // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryWitnessCredentialRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryServiceRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialRequest.id": - return x.Id != "" + case "did.v1.QueryServiceRequest.origin": + return x.Origin != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) } } @@ -2651,15 +4717,15 @@ func (x *fastReflection_QueryWitnessCredentialRequest) Has(fd protoreflect.Field // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryServiceRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialRequest.id": - x.Id = "" + case "did.v1.QueryServiceRequest.origin": + x.Origin = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) } } @@ -2669,16 +4735,16 @@ func (x *fastReflection_QueryWitnessCredentialRequest) Clear(fd protoreflect.Fie // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryWitnessCredentialRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryServiceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryWitnessCredentialRequest.id": - value := x.Id + case "did.v1.QueryServiceRequest.origin": + value := x.Origin return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", descriptor.FullName())) } } @@ -2692,15 +4758,15 @@ func (x *fastReflection_QueryWitnessCredentialRequest) Get(descriptor protorefle // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryServiceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialRequest.id": - x.Id = value.Interface().(string) + case "did.v1.QueryServiceRequest.origin": + x.Origin = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) } } @@ -2714,40 +4780,40 @@ func (x *fastReflection_QueryWitnessCredentialRequest) Set(fd protoreflect.Field // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryServiceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialRequest.id": - panic(fmt.Errorf("field id of message did.v1.QueryWitnessCredentialRequest is not mutable")) + case "did.v1.QueryServiceRequest.origin": + panic(fmt.Errorf("field origin of message did.v1.QueryServiceRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryWitnessCredentialRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryServiceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialRequest.id": + case "did.v1.QueryServiceRequest.origin": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryWitnessCredentialRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryServiceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryWitnessCredentialRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryServiceRequest", d.FullName())) } panic("unreachable") } @@ -2755,7 +4821,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) WhichOneof(d protoreflect // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryWitnessCredentialRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryServiceRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2766,7 +4832,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) GetUnknown() protoreflect // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryServiceRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2778,7 +4844,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) SetUnknown(fields protore // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryWitnessCredentialRequest) IsValid() bool { +func (x *fastReflection_QueryServiceRequest) IsValid() bool { return x != nil } @@ -2788,9 +4854,9 @@ func (x *fastReflection_QueryWitnessCredentialRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryServiceRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryWitnessCredentialRequest) + x := input.Message.Interface().(*QueryServiceRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2802,7 +4868,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac var n int var l int _ = l - l = len(x.Id) + l = len(x.Origin) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2816,7 +4882,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryWitnessCredentialRequest) + x := input.Message.Interface().(*QueryServiceRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2835,10 +4901,10 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + if len(x.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) i-- dAtA[i] = 0xa } @@ -2853,7 +4919,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryWitnessCredentialRequest) + x := input.Message.Interface().(*QueryServiceRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2885,15 +4951,15 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2921,7 +4987,7 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Id = string(dAtA[iNdEx:postIndex]) + x.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2959,26 +5025,26 @@ func (x *fastReflection_QueryWitnessCredentialRequest) ProtoMethods() *protoifac } var ( - md_QueryWitnessCredentialResponse protoreflect.MessageDescriptor - fd_QueryWitnessCredentialResponse_options protoreflect.FieldDescriptor + md_QueryServiceResponse protoreflect.MessageDescriptor + fd_QueryServiceResponse_options protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryWitnessCredentialResponse = File_did_v1_query_proto.Messages().ByName("QueryWitnessCredentialResponse") - fd_QueryWitnessCredentialResponse_options = md_QueryWitnessCredentialResponse.Fields().ByName("options") + md_QueryServiceResponse = File_did_v1_query_proto.Messages().ByName("QueryServiceResponse") + fd_QueryServiceResponse_options = md_QueryServiceResponse.Fields().ByName("options") } -var _ protoreflect.Message = (*fastReflection_QueryWitnessCredentialResponse)(nil) +var _ protoreflect.Message = (*fastReflection_QueryServiceResponse)(nil) -type fastReflection_QueryWitnessCredentialResponse QueryWitnessCredentialResponse +type fastReflection_QueryServiceResponse QueryServiceResponse -func (x *QueryWitnessCredentialResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryWitnessCredentialResponse)(x) +func (x *QueryServiceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryServiceResponse)(x) } -func (x *QueryWitnessCredentialResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[7] +func (x *QueryServiceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2989,43 +5055,43 @@ func (x *QueryWitnessCredentialResponse) slowProtoReflect() protoreflect.Message return mi.MessageOf(x) } -var _fastReflection_QueryWitnessCredentialResponse_messageType fastReflection_QueryWitnessCredentialResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryWitnessCredentialResponse_messageType{} +var _fastReflection_QueryServiceResponse_messageType fastReflection_QueryServiceResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryServiceResponse_messageType{} -type fastReflection_QueryWitnessCredentialResponse_messageType struct{} +type fastReflection_QueryServiceResponse_messageType struct{} -func (x fastReflection_QueryWitnessCredentialResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryWitnessCredentialResponse)(nil) +func (x fastReflection_QueryServiceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryServiceResponse)(nil) } -func (x fastReflection_QueryWitnessCredentialResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryWitnessCredentialResponse) +func (x fastReflection_QueryServiceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryServiceResponse) } -func (x fastReflection_QueryWitnessCredentialResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryWitnessCredentialResponse +func (x fastReflection_QueryServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryServiceResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryWitnessCredentialResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryWitnessCredentialResponse +func (x *fastReflection_QueryServiceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryServiceResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryWitnessCredentialResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryWitnessCredentialResponse_messageType +func (x *fastReflection_QueryServiceResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryServiceResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryWitnessCredentialResponse) New() protoreflect.Message { - return new(fastReflection_QueryWitnessCredentialResponse) +func (x *fastReflection_QueryServiceResponse) New() protoreflect.Message { + return new(fastReflection_QueryServiceResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryWitnessCredentialResponse) Interface() protoreflect.ProtoMessage { - return (*QueryWitnessCredentialResponse)(x) +func (x *fastReflection_QueryServiceResponse) Interface() protoreflect.ProtoMessage { + return (*QueryServiceResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -3033,10 +5099,10 @@ func (x *fastReflection_QueryWitnessCredentialResponse) Interface() protoreflect // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryWitnessCredentialResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Options != "" { value := protoreflect.ValueOfString(x.Options) - if !f(fd_QueryWitnessCredentialResponse_options, value) { + if !f(fd_QueryServiceResponse_options, value) { return } } @@ -3053,15 +5119,15 @@ func (x *fastReflection_QueryWitnessCredentialResponse) Range(f func(protoreflec // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryWitnessCredentialResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialResponse.options": + case "did.v1.QueryServiceResponse.options": return x.Options != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) } } @@ -3071,15 +5137,15 @@ func (x *fastReflection_QueryWitnessCredentialResponse) Has(fd protoreflect.Fiel // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryServiceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialResponse.options": + case "did.v1.QueryServiceResponse.options": x.Options = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) } } @@ -3089,16 +5155,16 @@ func (x *fastReflection_QueryWitnessCredentialResponse) Clear(fd protoreflect.Fi // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryWitnessCredentialResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryWitnessCredentialResponse.options": + case "did.v1.QueryServiceResponse.options": value := x.Options return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", descriptor.FullName())) } } @@ -3112,15 +5178,15 @@ func (x *fastReflection_QueryWitnessCredentialResponse) Get(descriptor protorefl // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialResponse.options": + case "did.v1.QueryServiceResponse.options": x.Options = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) } } @@ -3134,40 +5200,40 @@ func (x *fastReflection_QueryWitnessCredentialResponse) Set(fd protoreflect.Fiel // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialResponse.options": - panic(fmt.Errorf("field options of message did.v1.QueryWitnessCredentialResponse is not mutable")) + case "did.v1.QueryServiceResponse.options": + panic(fmt.Errorf("field options of message did.v1.QueryServiceResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryWitnessCredentialResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryWitnessCredentialResponse.options": + case "did.v1.QueryServiceResponse.options": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryWitnessCredentialResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) } - panic(fmt.Errorf("message did.v1.QueryWitnessCredentialResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryServiceResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryWitnessCredentialResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryWitnessCredentialResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryServiceResponse", d.FullName())) } panic("unreachable") } @@ -3175,7 +5241,7 @@ func (x *fastReflection_QueryWitnessCredentialResponse) WhichOneof(d protoreflec // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryWitnessCredentialResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryServiceResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3186,7 +5252,7 @@ func (x *fastReflection_QueryWitnessCredentialResponse) GetUnknown() protoreflec // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryWitnessCredentialResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryServiceResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3198,7 +5264,7 @@ func (x *fastReflection_QueryWitnessCredentialResponse) SetUnknown(fields protor // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryWitnessCredentialResponse) IsValid() bool { +func (x *fastReflection_QueryServiceResponse) IsValid() bool { return x != nil } @@ -3208,9 +5274,9 @@ func (x *fastReflection_QueryWitnessCredentialResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_QueryWitnessCredentialResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryWitnessCredentialResponse) + x := input.Message.Interface().(*QueryServiceResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3236,7 +5302,7 @@ func (x *fastReflection_QueryWitnessCredentialResponse) ProtoMethods() *protoifa } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryWitnessCredentialResponse) + x := input.Message.Interface().(*QueryServiceResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3273,7 +5339,7 @@ func (x *fastReflection_QueryWitnessCredentialResponse) ProtoMethods() *protoifa }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryWitnessCredentialResponse) + x := input.Message.Interface().(*QueryServiceResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3305,10 +5371,10 @@ func (x *fastReflection_QueryWitnessCredentialResponse) ProtoMethods() *protoifa fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryWitnessCredentialResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3455,18 +5521,17 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } -// QueryExistsRequest is the request type for the Query/Exists RPC method. -type QueryExistsRequest struct { +// QueryAccountsRequest is the request type for the Query/Exists RPC method. +type QueryAccountsRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (x *QueryExistsRequest) Reset() { - *x = QueryExistsRequest{} +func (x *QueryAccountsRequest) Reset() { + *x = QueryAccountsRequest{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3474,33 +5539,26 @@ func (x *QueryExistsRequest) Reset() { } } -func (x *QueryExistsRequest) String() string { +func (x *QueryAccountsRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryExistsRequest) ProtoMessage() {} +func (*QueryAccountsRequest) ProtoMessage() {} -// Deprecated: Use QueryExistsRequest.ProtoReflect.Descriptor instead. -func (*QueryExistsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAccountsRequest.ProtoReflect.Descriptor instead. +func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{2} } -func (x *QueryExistsRequest) GetKind() string { +func (x *QueryAccountsRequest) GetDid() string { if x != nil { - return x.Kind + return x.Did } return "" } -func (x *QueryExistsRequest) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -// QueryExistsResponse is the response type for the Query/Exists RPC method. -type QueryExistsResponse struct { +// QueryAccountsResponse is the response type for the Query/Exists RPC method. +type QueryAccountsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3508,8 +5566,8 @@ type QueryExistsResponse struct { Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` } -func (x *QueryExistsResponse) Reset() { - *x = QueryExistsResponse{} +func (x *QueryAccountsResponse) Reset() { + *x = QueryAccountsResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3517,37 +5575,197 @@ func (x *QueryExistsResponse) Reset() { } } -func (x *QueryExistsResponse) String() string { +func (x *QueryAccountsResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryExistsResponse) ProtoMessage() {} +func (*QueryAccountsResponse) ProtoMessage() {} -// Deprecated: Use QueryExistsResponse.ProtoReflect.Descriptor instead. -func (*QueryExistsResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryAccountsResponse.ProtoReflect.Descriptor instead. +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{3} } -func (x *QueryExistsResponse) GetExists() bool { +func (x *QueryAccountsResponse) GetExists() bool { if x != nil { return x.Exists } return false } +// QueryCredentialsRequest is the request type for the Query/Exists RPC method. +type QueryCredentialsRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` +} + +func (x *QueryCredentialsRequest) Reset() { + *x = QueryCredentialsRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCredentialsRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCredentialsRequest) ProtoMessage() {} + +// Deprecated: Use QueryCredentialsRequest.ProtoReflect.Descriptor instead. +func (*QueryCredentialsRequest) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{4} +} + +func (x *QueryCredentialsRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +func (x *QueryCredentialsRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +// QueryCredentialsResponse is the response type for the Query/Exists RPC method. +type QueryCredentialsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Credentials map[string][]byte `protobuf:"bytes,1,rep,name=credentials,proto3" json:"credentials,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *QueryCredentialsResponse) Reset() { + *x = QueryCredentialsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryCredentialsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryCredentialsResponse) ProtoMessage() {} + +// Deprecated: Use QueryCredentialsResponse.ProtoReflect.Descriptor instead. +func (*QueryCredentialsResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *QueryCredentialsResponse) GetCredentials() map[string][]byte { + if x != nil { + return x.Credentials + } + return nil +} + +// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. +type QueryIdentitiesRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` +} + +func (x *QueryIdentitiesRequest) Reset() { + *x = QueryIdentitiesRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryIdentitiesRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryIdentitiesRequest) ProtoMessage() {} + +// Deprecated: Use QueryIdentitiesRequest.ProtoReflect.Descriptor instead. +func (*QueryIdentitiesRequest) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryIdentitiesRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. +type QueryIdentitiesResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` + VerificationMethod []*VerificationMethod `protobuf:"bytes,2,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"` +} + +func (x *QueryIdentitiesResponse) Reset() { + *x = QueryIdentitiesResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryIdentitiesResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryIdentitiesResponse) ProtoMessage() {} + +// Deprecated: Use QueryIdentitiesResponse.ProtoReflect.Descriptor instead. +func (*QueryIdentitiesResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *QueryIdentitiesResponse) GetExists() bool { + if x != nil { + return x.Exists + } + return false +} + +func (x *QueryIdentitiesResponse) GetVerificationMethod() []*VerificationMethod { + if x != nil { + return x.VerificationMethod + } + return nil +} + // QueryResolveRequest is the request type for the Query/Resolve RPC method. type QueryResolveRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } func (x *QueryResolveRequest) Reset() { *x = QueryResolveRequest{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[4] + mi := &file_did_v1_query_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3561,12 +5779,12 @@ func (*QueryResolveRequest) ProtoMessage() {} // Deprecated: Use QueryResolveRequest.ProtoReflect.Descriptor instead. func (*QueryResolveRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{4} + return file_did_v1_query_proto_rawDescGZIP(), []int{8} } -func (x *QueryResolveRequest) GetId() string { +func (x *QueryResolveRequest) GetDid() string { if x != nil { - return x.Id + return x.Did } return "" } @@ -3578,13 +5796,13 @@ type QueryResolveResponse struct { unknownFields protoimpl.UnknownFields // document is the DID document - Document string `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` + Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` } func (x *QueryResolveResponse) Reset() { *x = QueryResolveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[5] + mi := &file_did_v1_query_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3598,54 +5816,54 @@ func (*QueryResolveResponse) ProtoMessage() {} // Deprecated: Use QueryResolveResponse.ProtoReflect.Descriptor instead. func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{5} + return file_did_v1_query_proto_rawDescGZIP(), []int{9} } -func (x *QueryResolveResponse) GetDocument() string { +func (x *QueryResolveResponse) GetDocument() *Document { if x != nil { return x.Document } - return "" + return nil } -// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. -type QueryWitnessCredentialRequest struct { +// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. +type QueryServiceRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` } -func (x *QueryWitnessCredentialRequest) Reset() { - *x = QueryWitnessCredentialRequest{} +func (x *QueryServiceRequest) Reset() { + *x = QueryServiceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[6] + mi := &file_did_v1_query_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryWitnessCredentialRequest) String() string { +func (x *QueryServiceRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryWitnessCredentialRequest) ProtoMessage() {} +func (*QueryServiceRequest) ProtoMessage() {} -// Deprecated: Use QueryWitnessCredentialRequest.ProtoReflect.Descriptor instead. -func (*QueryWitnessCredentialRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{6} +// Deprecated: Use QueryServiceRequest.ProtoReflect.Descriptor instead. +func (*QueryServiceRequest) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{10} } -func (x *QueryWitnessCredentialRequest) GetId() string { +func (x *QueryServiceRequest) GetOrigin() string { if x != nil { - return x.Id + return x.Origin } return "" } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryWitnessCredentialResponse struct { +type QueryServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3654,27 +5872,27 @@ type QueryWitnessCredentialResponse struct { Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` } -func (x *QueryWitnessCredentialResponse) Reset() { - *x = QueryWitnessCredentialResponse{} +func (x *QueryServiceResponse) Reset() { + *x = QueryServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[7] + mi := &file_did_v1_query_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *QueryWitnessCredentialResponse) String() string { +func (x *QueryServiceResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryWitnessCredentialResponse) ProtoMessage() {} +func (*QueryServiceResponse) ProtoMessage() {} -// Deprecated: Use QueryWitnessCredentialResponse.ProtoReflect.Descriptor instead. -func (*QueryWitnessCredentialResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{7} +// Deprecated: Use QueryServiceResponse.ProtoReflect.Descriptor instead. +func (*QueryServiceResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{11} } -func (x *QueryWitnessCredentialResponse) GetOptions() string { +func (x *QueryServiceResponse) GetOptions() string { if x != nil { return x.Options } @@ -3689,61 +5907,106 @@ var file_did_v1_query_proto_rawDesc = []byte{ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, - 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3e, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6b, - 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, - 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, - 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x2d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x45, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x1a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x28, 0x0a, 0x14, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, + 0x64, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, - 0x69, 0x73, 0x74, 0x73, 0x22, 0x25, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x32, 0x0a, 0x14, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, - 0x2f, 0x0a, 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x22, 0x3a, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xd4, 0x02, 0x0a, - 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x0d, 0x12, 0x0b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x69, - 0x0a, 0x11, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x12, 0x87, 0x01, 0x0a, 0x11, 0x57, 0x69, - 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, - 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, - 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x43, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x23, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x12, 0x1b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x7b, 0x69, 0x64, 0x7d, 0x2f, 0x77, 0x69, 0x74, 0x6e, - 0x65, 0x73, 0x73, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, - 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, - 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, - 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, - 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, - 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x73, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, + 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x18, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, + 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, 0x43, + 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x16, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x12, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, + 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, + 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, + 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, + 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x22, 0x30, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6f, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xf5, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x64, 0x69, 0x64, 0x2f, + 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x79, + 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1f, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, + 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x6c, 0x0a, 0x0a, 0x49, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, + 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x69, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, 0x6f, + 0x6c, 0x76, 0x65, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x63, 0x0a, 0x07, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, + 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x73, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, 0x7a, + 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, + 0x65, 0x72, 0x79, 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 ( @@ -3758,31 +6021,47 @@ func file_did_v1_query_proto_rawDescGZIP() []byte { return file_did_v1_query_proto_rawDescData } -var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: did.v1.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse - (*QueryExistsRequest)(nil), // 2: did.v1.QueryExistsRequest - (*QueryExistsResponse)(nil), // 3: did.v1.QueryExistsResponse - (*QueryResolveRequest)(nil), // 4: did.v1.QueryResolveRequest - (*QueryResolveResponse)(nil), // 5: did.v1.QueryResolveResponse - (*QueryWitnessCredentialRequest)(nil), // 6: did.v1.QueryWitnessCredentialRequest - (*QueryWitnessCredentialResponse)(nil), // 7: did.v1.QueryWitnessCredentialResponse - (*Params)(nil), // 8: did.v1.Params + (*QueryParamsRequest)(nil), // 0: did.v1.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse + (*QueryAccountsRequest)(nil), // 2: did.v1.QueryAccountsRequest + (*QueryAccountsResponse)(nil), // 3: did.v1.QueryAccountsResponse + (*QueryCredentialsRequest)(nil), // 4: did.v1.QueryCredentialsRequest + (*QueryCredentialsResponse)(nil), // 5: did.v1.QueryCredentialsResponse + (*QueryIdentitiesRequest)(nil), // 6: did.v1.QueryIdentitiesRequest + (*QueryIdentitiesResponse)(nil), // 7: did.v1.QueryIdentitiesResponse + (*QueryResolveRequest)(nil), // 8: did.v1.QueryResolveRequest + (*QueryResolveResponse)(nil), // 9: did.v1.QueryResolveResponse + (*QueryServiceRequest)(nil), // 10: did.v1.QueryServiceRequest + (*QueryServiceResponse)(nil), // 11: did.v1.QueryServiceResponse + nil, // 12: did.v1.QueryCredentialsResponse.CredentialsEntry + (*Params)(nil), // 13: did.v1.Params + (*VerificationMethod)(nil), // 14: did.v1.VerificationMethod + (*Document)(nil), // 15: did.v1.Document } var file_did_v1_query_proto_depIdxs = []int32{ - 8, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 0, // 1: did.v1.Query.Params:input_type -> did.v1.QueryParamsRequest - 4, // 2: did.v1.Query.ResolveIdentifier:input_type -> did.v1.QueryResolveRequest - 6, // 3: did.v1.Query.WitnessCredential:input_type -> did.v1.QueryWitnessCredentialRequest - 1, // 4: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 5, // 5: did.v1.Query.ResolveIdentifier:output_type -> did.v1.QueryResolveResponse - 7, // 6: did.v1.Query.WitnessCredential:output_type -> did.v1.QueryWitnessCredentialResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 13, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params + 12, // 1: did.v1.QueryCredentialsResponse.credentials:type_name -> did.v1.QueryCredentialsResponse.CredentialsEntry + 14, // 2: did.v1.QueryIdentitiesResponse.verificationMethod:type_name -> did.v1.VerificationMethod + 15, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document + 0, // 4: did.v1.Query.Params:input_type -> did.v1.QueryParamsRequest + 2, // 5: did.v1.Query.Accounts:input_type -> did.v1.QueryAccountsRequest + 4, // 6: did.v1.Query.Credentials:input_type -> did.v1.QueryCredentialsRequest + 6, // 7: did.v1.Query.Identities:input_type -> did.v1.QueryIdentitiesRequest + 8, // 8: did.v1.Query.Resolve:input_type -> did.v1.QueryResolveRequest + 10, // 9: did.v1.Query.Service:input_type -> did.v1.QueryServiceRequest + 1, // 10: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse + 3, // 11: did.v1.Query.Accounts:output_type -> did.v1.QueryAccountsResponse + 5, // 12: did.v1.Query.Credentials:output_type -> did.v1.QueryCredentialsResponse + 7, // 13: did.v1.Query.Identities:output_type -> did.v1.QueryIdentitiesResponse + 9, // 14: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse + 11, // 15: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse + 10, // [10:16] is the sub-list for method output_type + 4, // [4:10] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_did_v1_query_proto_init() } @@ -3791,6 +6070,7 @@ func file_did_v1_query_proto_init() { return } file_did_v1_genesis_proto_init() + file_did_v1_types_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { @@ -3817,7 +6097,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExistsRequest); i { + switch v := v.(*QueryAccountsRequest); i { case 0: return &v.state case 1: @@ -3829,7 +6109,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryExistsResponse); i { + switch v := v.(*QueryAccountsResponse); i { case 0: return &v.state case 1: @@ -3841,7 +6121,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResolveRequest); i { + switch v := v.(*QueryCredentialsRequest); i { case 0: return &v.state case 1: @@ -3853,7 +6133,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResolveResponse); i { + switch v := v.(*QueryCredentialsResponse); i { case 0: return &v.state case 1: @@ -3865,7 +6145,7 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryWitnessCredentialRequest); i { + switch v := v.(*QueryIdentitiesRequest); i { case 0: return &v.state case 1: @@ -3877,7 +6157,55 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryWitnessCredentialResponse); i { + switch v := v.(*QueryIdentitiesResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolveRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryResolveResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryServiceRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryServiceResponse); i { case 0: return &v.state case 1: @@ -3895,7 +6223,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/query_grpc.pb.go b/api/did/v1/query_grpc.pb.go index 0428e9076..d51ed3c02 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -19,9 +19,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/did.v1.Query/Params" - Query_ResolveIdentifier_FullMethodName = "/did.v1.Query/ResolveIdentifier" - Query_WitnessCredential_FullMethodName = "/did.v1.Query/WitnessCredential" + Query_Params_FullMethodName = "/did.v1.Query/Params" + Query_Accounts_FullMethodName = "/did.v1.Query/Accounts" + Query_Credentials_FullMethodName = "/did.v1.Query/Credentials" + Query_Identities_FullMethodName = "/did.v1.Query/Identities" + Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" + Query_Service_FullMethodName = "/did.v1.Query/Service" ) // QueryClient is the client API for Query service. @@ -30,10 +33,16 @@ const ( type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Accounts returns associated wallet accounts with the DID. + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // Credentials returns associated credentials with the DID and Service Origin. + Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) + // Identities returns associated identity with the DID. + Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) // Resolve queries the DID document by its id. - ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) - // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) + Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + // Service returns associated ServiceInfo for a given Origin + Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) } type queryClient struct { @@ -53,18 +62,45 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { - out := new(QueryResolveResponse) - err := c.cc.Invoke(ctx, Query_ResolveIdentifier_FullMethodName, in, out, opts...) +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, Query_Accounts_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) { - out := new(QueryWitnessCredentialResponse) - err := c.cc.Invoke(ctx, Query_WitnessCredential_FullMethodName, in, out, opts...) +func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { + out := new(QueryCredentialsResponse) + err := c.cc.Invoke(ctx, Query_Credentials_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) { + out := new(QueryIdentitiesResponse) + err := c.cc.Invoke(ctx, Query_Identities_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { + out := new(QueryResolveResponse) + err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { + out := new(QueryServiceResponse) + err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -77,10 +113,16 @@ func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCre type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Accounts returns associated wallet accounts with the DID. + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // Credentials returns associated credentials with the DID and Service Origin. + Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) + // Identities returns associated identity with the DID. + Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) // Resolve queries the DID document by its id. - ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) - // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) + Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) + // Service returns associated ServiceInfo for a given Origin + Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) mustEmbedUnimplementedQueryServer() } @@ -91,11 +133,20 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") +func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") } -func (UnimplementedQueryServer) WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented") +func (UnimplementedQueryServer) Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Credentials not implemented") +} +func (UnimplementedQueryServer) Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Identities not implemented") +} +func (UnimplementedQueryServer) Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") +} +func (UnimplementedQueryServer) Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -128,38 +179,92 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Accounts_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Credentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Credentials_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Credentials(ctx, req.(*QueryCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Identities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIdentitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Identities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Identities_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Identities(ctx, req.(*QueryIdentitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryResolveRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ResolveIdentifier(ctx, in) + return srv.(QueryServer).Resolve(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_ResolveIdentifier_FullMethodName, + FullMethod: Query_Resolve_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ResolveIdentifier(ctx, req.(*QueryResolveRequest)) + return srv.(QueryServer).Resolve(ctx, req.(*QueryResolveRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryWitnessCredentialRequest) +func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryServiceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).WitnessCredential(ctx, in) + return srv.(QueryServer).Service(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_WitnessCredential_FullMethodName, + FullMethod: Query_Service_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest)) + return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest)) } return interceptor(ctx, in, info, handler) } @@ -176,12 +281,24 @@ var Query_ServiceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "ResolveIdentifier", - Handler: _Query_ResolveIdentifier_Handler, + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, }, { - MethodName: "WitnessCredential", - Handler: _Query_WitnessCredential_Handler, + MethodName: "Credentials", + Handler: _Query_Credentials_Handler, + }, + { + MethodName: "Identities", + Handler: _Query_Identities_Handler, + }, + { + MethodName: "Resolve", + Handler: _Query_Resolve_Handler, + }, + { + MethodName: "Service", + Handler: _Query_Service_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index a8d8a1386..5a7d36468 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -17,9 +17,9 @@ type AliasesTable interface { Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id string) (*Aliases, error) - HasByHandle(ctx context.Context, handle string) (found bool, err error) - // GetByHandle returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - GetByHandle(ctx context.Context, handle string) (*Aliases, error) + 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 @@ -60,16 +60,16 @@ func (this AliasesIdIndexKey) WithId(id string) AliasesIdIndexKey { return this } -type AliasesHandleIndexKey struct { +type AliasesSubjectIndexKey struct { vs []interface{} } -func (x AliasesHandleIndexKey) id() uint32 { return 1 } -func (x AliasesHandleIndexKey) values() []interface{} { return x.vs } -func (x AliasesHandleIndexKey) aliasesIndexKey() {} +func (x AliasesSubjectIndexKey) id() uint32 { return 1 } +func (x AliasesSubjectIndexKey) values() []interface{} { return x.vs } +func (x AliasesSubjectIndexKey) aliasesIndexKey() {} -func (this AliasesHandleIndexKey) WithHandle(handle string) AliasesHandleIndexKey { - this.vs = []interface{}{handle} +func (this AliasesSubjectIndexKey) WithSubject(subject string) AliasesSubjectIndexKey { + this.vs = []interface{}{subject} return this } @@ -109,16 +109,16 @@ func (this aliasesTable) Get(ctx context.Context, id string) (*Aliases, error) { return &aliases, nil } -func (this aliasesTable) HasByHandle(ctx context.Context, handle string) (found bool, err error) { +func (this aliasesTable) HasBySubject(ctx context.Context, subject string) (found bool, err error) { return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, - handle, + subject, ) } -func (this aliasesTable) GetByHandle(ctx context.Context, handle string) (*Aliases, error) { +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, - handle, + subject, ) if err != nil { return nil, err diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 026d2fde6..1029d7a66 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -18,7 +18,7 @@ var ( md_Aliases protoreflect.MessageDescriptor fd_Aliases_id protoreflect.FieldDescriptor fd_Aliases_origin protoreflect.FieldDescriptor - fd_Aliases_handle protoreflect.FieldDescriptor + fd_Aliases_subject protoreflect.FieldDescriptor fd_Aliases_controller protoreflect.FieldDescriptor fd_Aliases_expiration protoreflect.FieldDescriptor ) @@ -28,7 +28,7 @@ func init() { md_Aliases = File_did_v1_state_proto.Messages().ByName("Aliases") fd_Aliases_id = md_Aliases.Fields().ByName("id") fd_Aliases_origin = md_Aliases.Fields().ByName("origin") - fd_Aliases_handle = md_Aliases.Fields().ByName("handle") + fd_Aliases_subject = md_Aliases.Fields().ByName("subject") fd_Aliases_controller = md_Aliases.Fields().ByName("controller") fd_Aliases_expiration = md_Aliases.Fields().ByName("expiration") } @@ -110,9 +110,9 @@ func (x *fastReflection_Aliases) Range(f func(protoreflect.FieldDescriptor, prot return } } - if x.Handle != "" { - value := protoreflect.ValueOfString(x.Handle) - if !f(fd_Aliases_handle, value) { + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Aliases_subject, value) { return } } @@ -147,8 +147,8 @@ func (x *fastReflection_Aliases) Has(fd protoreflect.FieldDescriptor) bool { return x.Id != "" case "did.v1.Aliases.origin": return x.Origin != "" - case "did.v1.Aliases.handle": - return x.Handle != "" + case "did.v1.Aliases.subject": + return x.Subject != "" case "did.v1.Aliases.controller": return x.Controller != "" case "did.v1.Aliases.expiration": @@ -173,8 +173,8 @@ func (x *fastReflection_Aliases) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "did.v1.Aliases.origin": x.Origin = "" - case "did.v1.Aliases.handle": - x.Handle = "" + case "did.v1.Aliases.subject": + x.Subject = "" case "did.v1.Aliases.controller": x.Controller = "" case "did.v1.Aliases.expiration": @@ -201,8 +201,8 @@ func (x *fastReflection_Aliases) Get(descriptor protoreflect.FieldDescriptor) pr case "did.v1.Aliases.origin": value := x.Origin return protoreflect.ValueOfString(value) - case "did.v1.Aliases.handle": - value := x.Handle + case "did.v1.Aliases.subject": + value := x.Subject return protoreflect.ValueOfString(value) case "did.v1.Aliases.controller": value := x.Controller @@ -234,8 +234,8 @@ func (x *fastReflection_Aliases) Set(fd protoreflect.FieldDescriptor, value prot x.Id = value.Interface().(string) case "did.v1.Aliases.origin": x.Origin = value.Interface().(string) - case "did.v1.Aliases.handle": - x.Handle = value.Interface().(string) + case "did.v1.Aliases.subject": + x.Subject = value.Interface().(string) case "did.v1.Aliases.controller": x.Controller = value.Interface().(string) case "did.v1.Aliases.expiration": @@ -264,8 +264,8 @@ func (x *fastReflection_Aliases) Mutable(fd protoreflect.FieldDescriptor) protor panic(fmt.Errorf("field id of message did.v1.Aliases is not mutable")) case "did.v1.Aliases.origin": panic(fmt.Errorf("field origin of message did.v1.Aliases is not mutable")) - case "did.v1.Aliases.handle": - panic(fmt.Errorf("field handle of message did.v1.Aliases is not mutable")) + case "did.v1.Aliases.subject": + panic(fmt.Errorf("field subject of message did.v1.Aliases is not mutable")) case "did.v1.Aliases.controller": panic(fmt.Errorf("field controller of message did.v1.Aliases is not mutable")) case "did.v1.Aliases.expiration": @@ -287,7 +287,7 @@ func (x *fastReflection_Aliases) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfString("") case "did.v1.Aliases.origin": return protoreflect.ValueOfString("") - case "did.v1.Aliases.handle": + case "did.v1.Aliases.subject": return protoreflect.ValueOfString("") case "did.v1.Aliases.controller": return protoreflect.ValueOfString("") @@ -370,7 +370,7 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Handle) + l = len(x.Subject) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -422,10 +422,10 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if len(x.Handle) > 0 { - i -= len(x.Handle) - copy(dAtA[i:], x.Handle) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Handle))) + if len(x.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) i-- dAtA[i] = 0x1a } @@ -558,7 +558,7 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -586,7 +586,7 @@ func (x *fastReflection_Aliases) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Handle = string(dAtA[iNdEx:postIndex]) + x.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -4038,12 +4038,142 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.Map = (*_Service_5_map)(nil) + +type _Service_5_map struct { + m *map[string]string +} + +func (x *_Service_5_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Service_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Service_5_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_Service_5_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Service_5_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_Service_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Service_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_Service_5_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Service_5_map) IsValid() bool { + return x.m != nil +} + +var _ protoreflect.List = (*_Service_6_list)(nil) + +type _Service_6_list struct { + list *[]PermissionScope +} + +func (x *_Service_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Service_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +} + +func (x *_Service_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_Service_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Service_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Service at list field Scopes as it is not of Message kind")) +} + +func (x *_Service_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Service_6_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +} + +func (x *_Service_6_list) IsValid() bool { + return x.list != nil +} + var ( - md_Service protoreflect.MessageDescriptor - fd_Service_id protoreflect.FieldDescriptor - fd_Service_service_type protoreflect.FieldDescriptor - fd_Service_service_endpoint protoreflect.FieldDescriptor - fd_Service_controller_did protoreflect.FieldDescriptor + md_Service protoreflect.MessageDescriptor + fd_Service_id protoreflect.FieldDescriptor + fd_Service_service_type protoreflect.FieldDescriptor + fd_Service_controller_did protoreflect.FieldDescriptor + fd_Service_origin_uri protoreflect.FieldDescriptor + fd_Service_service_endpoints protoreflect.FieldDescriptor + fd_Service_scopes protoreflect.FieldDescriptor ) func init() { @@ -4051,8 +4181,10 @@ func init() { md_Service = File_did_v1_state_proto.Messages().ByName("Service") fd_Service_id = md_Service.Fields().ByName("id") fd_Service_service_type = md_Service.Fields().ByName("service_type") - fd_Service_service_endpoint = md_Service.Fields().ByName("service_endpoint") fd_Service_controller_did = md_Service.Fields().ByName("controller_did") + fd_Service_origin_uri = md_Service.Fields().ByName("origin_uri") + fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints") + fd_Service_scopes = md_Service.Fields().ByName("scopes") } var _ protoreflect.Message = (*fastReflection_Service)(nil) @@ -4132,18 +4264,30 @@ func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, prot return } } - if x.ServiceEndpoint != "" { - value := protoreflect.ValueOfString(x.ServiceEndpoint) - if !f(fd_Service_service_endpoint, value) { - return - } - } if x.ControllerDid != "" { value := protoreflect.ValueOfString(x.ControllerDid) if !f(fd_Service_controller_did, value) { return } } + if x.OriginUri != "" { + value := protoreflect.ValueOfString(x.OriginUri) + if !f(fd_Service_origin_uri, value) { + return + } + } + if len(x.ServiceEndpoints) != 0 { + value := protoreflect.ValueOfMap(&_Service_5_map{m: &x.ServiceEndpoints}) + if !f(fd_Service_service_endpoints, value) { + return + } + } + if len(x.Scopes) != 0 { + value := protoreflect.ValueOfList(&_Service_6_list{list: &x.Scopes}) + if !f(fd_Service_scopes, value) { + return + } + } } // Has reports whether a field is populated. @@ -4163,10 +4307,14 @@ func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { return x.Id != "" case "did.v1.Service.service_type": return x.ServiceType != "" - case "did.v1.Service.service_endpoint": - return x.ServiceEndpoint != "" case "did.v1.Service.controller_did": return x.ControllerDid != "" + case "did.v1.Service.origin_uri": + return x.OriginUri != "" + case "did.v1.Service.service_endpoints": + return len(x.ServiceEndpoints) != 0 + case "did.v1.Service.scopes": + return len(x.Scopes) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4187,10 +4335,14 @@ func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "did.v1.Service.service_type": x.ServiceType = "" - case "did.v1.Service.service_endpoint": - x.ServiceEndpoint = "" case "did.v1.Service.controller_did": x.ControllerDid = "" + case "did.v1.Service.origin_uri": + x.OriginUri = "" + case "did.v1.Service.service_endpoints": + x.ServiceEndpoints = nil + case "did.v1.Service.scopes": + x.Scopes = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4213,12 +4365,24 @@ func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) pr case "did.v1.Service.service_type": value := x.ServiceType return protoreflect.ValueOfString(value) - case "did.v1.Service.service_endpoint": - value := x.ServiceEndpoint - return protoreflect.ValueOfString(value) case "did.v1.Service.controller_did": value := x.ControllerDid return protoreflect.ValueOfString(value) + case "did.v1.Service.origin_uri": + value := x.OriginUri + return protoreflect.ValueOfString(value) + case "did.v1.Service.service_endpoints": + if len(x.ServiceEndpoints) == 0 { + return protoreflect.ValueOfMap(&_Service_5_map{}) + } + mapValue := &_Service_5_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Service.scopes": + if len(x.Scopes) == 0 { + return protoreflect.ValueOfList(&_Service_6_list{}) + } + listValue := &_Service_6_list{list: &x.Scopes} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4243,10 +4407,18 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot x.Id = value.Interface().(string) case "did.v1.Service.service_type": x.ServiceType = value.Interface().(string) - case "did.v1.Service.service_endpoint": - x.ServiceEndpoint = value.Interface().(string) case "did.v1.Service.controller_did": x.ControllerDid = value.Interface().(string) + case "did.v1.Service.origin_uri": + x.OriginUri = value.Interface().(string) + case "did.v1.Service.service_endpoints": + mv := value.Map() + cmv := mv.(*_Service_5_map) + x.ServiceEndpoints = *cmv.m + case "did.v1.Service.scopes": + lv := value.List() + clv := lv.(*_Service_6_list) + x.Scopes = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4267,14 +4439,26 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Service.service_endpoints": + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + value := &_Service_5_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(value) + case "did.v1.Service.scopes": + if x.Scopes == nil { + x.Scopes = []PermissionScope{} + } + value := &_Service_6_list{list: &x.Scopes} + return protoreflect.ValueOfList(value) case "did.v1.Service.id": panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) case "did.v1.Service.service_type": panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable")) - case "did.v1.Service.service_endpoint": - panic(fmt.Errorf("field service_endpoint of message did.v1.Service is not mutable")) case "did.v1.Service.controller_did": panic(fmt.Errorf("field controller_did of message did.v1.Service is not mutable")) + case "did.v1.Service.origin_uri": + panic(fmt.Errorf("field origin_uri of message did.v1.Service is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4292,10 +4476,16 @@ func (x *fastReflection_Service) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfString("") case "did.v1.Service.service_type": return protoreflect.ValueOfString("") - case "did.v1.Service.service_endpoint": - return protoreflect.ValueOfString("") case "did.v1.Service.controller_did": return protoreflect.ValueOfString("") + case "did.v1.Service.origin_uri": + return protoreflect.ValueOfString("") + case "did.v1.Service.service_endpoints": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_Service_5_map{m: &m}) + case "did.v1.Service.scopes": + list := []PermissionScope{} + return protoreflect.ValueOfList(&_Service_6_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) @@ -4373,14 +4563,42 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ServiceEndpoint) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } l = len(x.ControllerDid) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.OriginUri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ServiceEndpoints) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.ServiceEndpoints[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.ServiceEndpoints { + SiZeMaP(k, v) + } + } + } + if len(x.Scopes) > 0 { + l = 0 + for _, e := range x.Scopes { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -4410,18 +4628,82 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Scopes) > 0 { + var pksize2 int + for _, num := range x.Scopes { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Scopes { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x32 + } + if len(x.ServiceEndpoints) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) + } + sort.Slice(keysForServiceEndpoints, func(i, j int) bool { + return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] + }) + for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { + v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] + out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.ServiceEndpoints { + v := x.ServiceEndpoints[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.OriginUri) > 0 { + i -= len(x.OriginUri) + copy(dAtA[i:], x.OriginUri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) + i-- + dAtA[i] = 0x22 + } if len(x.ControllerDid) > 0 { i -= len(x.ControllerDid) copy(dAtA[i:], x.ControllerDid) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerDid))) i-- - dAtA[i] = 0x22 - } - if len(x.ServiceEndpoint) > 0 { - i -= len(x.ServiceEndpoint) - copy(dAtA[i:], x.ServiceEndpoint) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ServiceEndpoint))) - i-- dAtA[i] = 0x1a } if len(x.ServiceType) > 0 { @@ -4552,38 +4834,6 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { x.ServiceType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoint", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ServiceEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType) } @@ -4615,6 +4865,234 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } x.ControllerDid = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ServiceEndpoints == nil { + x.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 protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(x.Scopes) == 0 { + x.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -4673,8 +5151,8 @@ type Aliases struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Origin is the Alias provider Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - // Handle is the user defined alias - Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,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 @@ -4715,9 +5193,9 @@ func (x *Aliases) GetOrigin() string { return "" } -func (x *Aliases) GetHandle() string { +func (x *Aliases) GetSubject() string { if x != nil { - return x.Handle + return x.Subject } return "" } @@ -5065,10 +5543,14 @@ type Service struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - // The service endpoint - ServiceEndpoint string `protobuf:"bytes,3,opt,name=service_endpoint,json=serviceEndpoint,proto3" json:"service_endpoint,omitempty"` // The controller DID of the service - ControllerDid string `protobuf:"bytes,4,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + 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 (x *Service) Reset() { @@ -5105,13 +5587,6 @@ func (x *Service) GetServiceType() string { return "" } -func (x *Service) GetServiceEndpoint() string { - if x != nil { - return x.ServiceEndpoint - } - return "" -} - func (x *Service) GetControllerDid() string { if x != nil { return x.ControllerDid @@ -5119,6 +5594,27 @@ func (x *Service) GetControllerDid() string { return "" } +func (x *Service) GetOriginUri() string { + if x != nil { + return x.OriginUri + } + return "" +} + +func (x *Service) GetServiceEndpoints() map[string]string { + if x != nil { + return x.ServiceEndpoints + } + return nil +} + +func (x *Service) GetScopes() []PermissionScope { + if x != nil { + return x.Scopes + } + return nil +} + var File_did_v1_state_proto protoreflect.FileDescriptor var file_did_v1_state_proto_rawDesc = []byte{ @@ -5126,98 +5622,111 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x07, - 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, - 0x16, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, - 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1c, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x16, 0x0a, - 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0c, 0x0a, 0x06, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x10, - 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, - 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, - 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, - 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, - 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, 0x94, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, - 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, - 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, - 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, - 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, - 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, - 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, - 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, - 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, - 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, - 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, - 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, - 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, - 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, - 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, - 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, - 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, - 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, - 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, - 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, + 0xaa, 0x01, 0x0a, 0x07, 0x41, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1e, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x04, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x1d, 0xf2, + 0x9e, 0xd3, 0x8e, 0x03, 0x17, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, 0x80, 0x02, 0x0a, + 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, + 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, + 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x3b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, - 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x22, - 0x9e, 0x01, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x29, - 0x0a, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, - 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x06, - 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, - 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, - 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, - 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, - 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, - 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x22, + 0x94, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x70, 0x72, 0x6f, 0x6f, 0x66, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0xaf, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x66, 0x69, 0x6e, 0x67, 0x65, 0x72, + 0x70, 0x72, 0x69, 0x6e, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x66, 0x69, 0x6e, + 0x67, 0x65, 0x72, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, + 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0x8b, 0x03, 0x0a, 0x0a, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x25, 0x0a, + 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x44, 0x69, 0x64, 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, + 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x4d, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, + 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x5f, 0x69, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x04, 0x52, 0x09, 0x63, 0x68, 0x61, 0x6e, 0x6e, + 0x65, 0x6c, 0x49, 0x64, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x05, 0x22, 0xdc, 0x02, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, + 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, + 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x52, 0x0a, 0x11, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, + 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, + 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0e, 0x32, + 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x06, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, + 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, + 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, + 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, + 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -5232,25 +5741,29 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { return file_did_v1_state_proto_rawDescData } -var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 9) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Aliases)(nil), // 0: did.v1.Aliases - (*Assertion)(nil), // 1: did.v1.Assertion - (*Attestation)(nil), // 2: did.v1.Attestation - (*Controller)(nil), // 3: did.v1.Controller - (*Delegation)(nil), // 4: did.v1.Delegation - (*Service)(nil), // 5: did.v1.Service - nil, // 6: did.v1.Assertion.MetadataEntry - nil, // 7: did.v1.Delegation.PublicKeyJwksEntry + (*Aliases)(nil), // 0: did.v1.Aliases + (*Assertion)(nil), // 1: did.v1.Assertion + (*Attestation)(nil), // 2: did.v1.Attestation + (*Controller)(nil), // 3: did.v1.Controller + (*Delegation)(nil), // 4: did.v1.Delegation + (*Service)(nil), // 5: did.v1.Service + nil, // 6: did.v1.Assertion.MetadataEntry + nil, // 7: did.v1.Delegation.PublicKeyJwksEntry + nil, // 8: did.v1.Service.ServiceEndpointsEntry + (PermissionScope)(0), // 9: did.v1.PermissionScope } var file_did_v1_state_proto_depIdxs = []int32{ 6, // 0: did.v1.Assertion.metadata:type_name -> did.v1.Assertion.MetadataEntry 7, // 1: did.v1.Delegation.public_key_jwks:type_name -> did.v1.Delegation.PublicKeyJwksEntry - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 8, // 2: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry + 9, // 3: did.v1.Service.scopes:type_name -> did.v1.PermissionScope + 4, // [4:4] is the sub-list for method output_type + 4, // [4:4] is the sub-list for method input_type + 4, // [4:4] is the sub-list for extension type_name + 4, // [4:4] is the sub-list for extension extendee + 0, // [0:4] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -5259,6 +5772,7 @@ func file_did_v1_state_proto_init() { return } file_did_v1_genesis_proto_init() + file_did_v1_enums_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Aliases); i { @@ -5339,7 +5853,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 8, + NumMessages: 9, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index 3dad1b969..b9b465148 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -12,6 +12,7 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" + sort "sort" sync "sync" ) @@ -870,170 +871,32 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } -var _ protoreflect.List = (*_MsgInitializeController_2_list)(nil) - -type _MsgInitializeController_2_list struct { - list *[][]byte -} - -func (x *_MsgInitializeController_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitializeController_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgInitializeController_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitializeController_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitializeController_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgInitializeController at list field Assertions as it is not of Message kind")) -} - -func (x *_MsgInitializeController_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitializeController_2_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgInitializeController_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgInitializeController_3_list)(nil) - -type _MsgInitializeController_3_list struct { - list *[][]byte -} - -func (x *_MsgInitializeController_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitializeController_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgInitializeController_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitializeController_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitializeController_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgInitializeController at list field Keyshares as it is not of Message kind")) -} - -func (x *_MsgInitializeController_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitializeController_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgInitializeController_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_MsgInitializeController_4_list)(nil) - -type _MsgInitializeController_4_list struct { - list *[][]byte -} - -func (x *_MsgInitializeController_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitializeController_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgInitializeController_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitializeController_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitializeController_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgInitializeController at list field Verifications as it is not of Message kind")) -} - -func (x *_MsgInitializeController_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitializeController_4_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgInitializeController_4_list) IsValid() bool { - return x.list != nil -} - var ( - md_MsgInitializeController protoreflect.MessageDescriptor - fd_MsgInitializeController_authority protoreflect.FieldDescriptor - fd_MsgInitializeController_assertions protoreflect.FieldDescriptor - fd_MsgInitializeController_keyshares protoreflect.FieldDescriptor - fd_MsgInitializeController_verifications protoreflect.FieldDescriptor + md_MsgAuthenticate protoreflect.MessageDescriptor + fd_MsgAuthenticate_authority protoreflect.FieldDescriptor + fd_MsgAuthenticate_controller protoreflect.FieldDescriptor + fd_MsgAuthenticate_address protoreflect.FieldDescriptor + fd_MsgAuthenticate_origin protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgInitializeController = File_did_v1_tx_proto.Messages().ByName("MsgInitializeController") - fd_MsgInitializeController_authority = md_MsgInitializeController.Fields().ByName("authority") - fd_MsgInitializeController_assertions = md_MsgInitializeController.Fields().ByName("assertions") - fd_MsgInitializeController_keyshares = md_MsgInitializeController.Fields().ByName("keyshares") - fd_MsgInitializeController_verifications = md_MsgInitializeController.Fields().ByName("verifications") + md_MsgAuthenticate = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticate") + fd_MsgAuthenticate_authority = md_MsgAuthenticate.Fields().ByName("authority") + fd_MsgAuthenticate_controller = md_MsgAuthenticate.Fields().ByName("controller") + fd_MsgAuthenticate_address = md_MsgAuthenticate.Fields().ByName("address") + fd_MsgAuthenticate_origin = md_MsgAuthenticate.Fields().ByName("origin") } -var _ protoreflect.Message = (*fastReflection_MsgInitializeController)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAuthenticate)(nil) -type fastReflection_MsgInitializeController MsgInitializeController +type fastReflection_MsgAuthenticate MsgAuthenticate -func (x *MsgInitializeController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitializeController)(x) +func (x *MsgAuthenticate) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthenticate)(x) } -func (x *MsgInitializeController) slowProtoReflect() protoreflect.Message { +func (x *MsgAuthenticate) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1045,43 +908,43 @@ func (x *MsgInitializeController) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgInitializeController_messageType fastReflection_MsgInitializeController_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitializeController_messageType{} +var _fastReflection_MsgAuthenticate_messageType fastReflection_MsgAuthenticate_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthenticate_messageType{} -type fastReflection_MsgInitializeController_messageType struct{} +type fastReflection_MsgAuthenticate_messageType struct{} -func (x fastReflection_MsgInitializeController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitializeController)(nil) +func (x fastReflection_MsgAuthenticate_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthenticate)(nil) } -func (x fastReflection_MsgInitializeController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitializeController) +func (x fastReflection_MsgAuthenticate_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticate) } -func (x fastReflection_MsgInitializeController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeController +func (x fastReflection_MsgAuthenticate_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticate } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgInitializeController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeController +func (x *fastReflection_MsgAuthenticate) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticate } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitializeController) Type() protoreflect.MessageType { - return _fastReflection_MsgInitializeController_messageType +func (x *fastReflection_MsgAuthenticate) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthenticate_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitializeController) New() protoreflect.Message { - return new(fastReflection_MsgInitializeController) +func (x *fastReflection_MsgAuthenticate) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticate) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitializeController) Interface() protoreflect.ProtoMessage { - return (*MsgInitializeController)(x) +func (x *fastReflection_MsgAuthenticate) Interface() protoreflect.ProtoMessage { + return (*MsgAuthenticate)(x) } // Range iterates over every populated field in an undefined order, @@ -1089,1102 +952,28 @@ func (x *fastReflection_MsgInitializeController) Interface() protoreflect.ProtoM // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgInitializeController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAuthenticate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgInitializeController_authority, value) { - return - } - } - if len(x.Assertions) != 0 { - value := protoreflect.ValueOfList(&_MsgInitializeController_2_list{list: &x.Assertions}) - if !f(fd_MsgInitializeController_assertions, value) { - return - } - } - if len(x.Keyshares) != 0 { - value := protoreflect.ValueOfList(&_MsgInitializeController_3_list{list: &x.Keyshares}) - if !f(fd_MsgInitializeController_keyshares, value) { - return - } - } - if len(x.Verifications) != 0 { - value := protoreflect.ValueOfList(&_MsgInitializeController_4_list{list: &x.Verifications}) - if !f(fd_MsgInitializeController_verifications, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitializeController) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - return x.Authority != "" - case "did.v1.MsgInitializeController.assertions": - return len(x.Assertions) != 0 - case "did.v1.MsgInitializeController.keyshares": - return len(x.Keyshares) != 0 - case "did.v1.MsgInitializeController.verifications": - return len(x.Verifications) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeController) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - x.Authority = "" - case "did.v1.MsgInitializeController.assertions": - x.Assertions = nil - case "did.v1.MsgInitializeController.keyshares": - x.Keyshares = nil - case "did.v1.MsgInitializeController.verifications": - x.Verifications = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitializeController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgInitializeController.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "did.v1.MsgInitializeController.assertions": - if len(x.Assertions) == 0 { - return protoreflect.ValueOfList(&_MsgInitializeController_2_list{}) - } - listValue := &_MsgInitializeController_2_list{list: &x.Assertions} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgInitializeController.keyshares": - if len(x.Keyshares) == 0 { - return protoreflect.ValueOfList(&_MsgInitializeController_3_list{}) - } - listValue := &_MsgInitializeController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgInitializeController.verifications": - if len(x.Verifications) == 0 { - return protoreflect.ValueOfList(&_MsgInitializeController_4_list{}) - } - listValue := &_MsgInitializeController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - x.Authority = value.Interface().(string) - case "did.v1.MsgInitializeController.assertions": - lv := value.List() - clv := lv.(*_MsgInitializeController_2_list) - x.Assertions = *clv.list - case "did.v1.MsgInitializeController.keyshares": - lv := value.List() - clv := lv.(*_MsgInitializeController_3_list) - x.Keyshares = *clv.list - case "did.v1.MsgInitializeController.verifications": - lv := value.List() - clv := lv.(*_MsgInitializeController_4_list) - x.Verifications = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeController.assertions": - if x.Assertions == nil { - x.Assertions = [][]byte{} - } - value := &_MsgInitializeController_2_list{list: &x.Assertions} - return protoreflect.ValueOfList(value) - case "did.v1.MsgInitializeController.keyshares": - if x.Keyshares == nil { - x.Keyshares = [][]byte{} - } - value := &_MsgInitializeController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(value) - case "did.v1.MsgInitializeController.verifications": - if x.Verifications == nil { - x.Verifications = [][]byte{} - } - value := &_MsgInitializeController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(value) - case "did.v1.MsgInitializeController.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgInitializeController is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitializeController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeController.authority": - return protoreflect.ValueOfString("") - case "did.v1.MsgInitializeController.assertions": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgInitializeController_2_list{list: &list}) - case "did.v1.MsgInitializeController.keyshares": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgInitializeController_3_list{list: &list}) - case "did.v1.MsgInitializeController.verifications": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgInitializeController_4_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeController")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeController does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitializeController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgInitializeController", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitializeController) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeController) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitializeController) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitializeController) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitializeController) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Assertions) > 0 { - for _, b := range x.Assertions { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Keyshares) > 0 { - for _, b := range x.Keyshares { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Verifications) > 0 { - for _, b := range x.Verifications { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitializeController) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Verifications) > 0 { - for iNdEx := len(x.Verifications) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Verifications[iNdEx]) - copy(dAtA[i:], x.Verifications[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Verifications[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(x.Keyshares) > 0 { - for iNdEx := len(x.Keyshares) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Keyshares[iNdEx]) - copy(dAtA[i:], x.Keyshares[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshares[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.Assertions) > 0 { - for iNdEx := len(x.Assertions) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Assertions[iNdEx]) - copy(dAtA[i:], x.Assertions[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertions[iNdEx]))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitializeController) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) - copy(x.Assertions[len(x.Assertions)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) - copy(x.Keyshares[len(x.Keyshares)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) - copy(x.Verifications[len(x.Verifications)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgInitializeControllerResponse protoreflect.MessageDescriptor - fd_MsgInitializeControllerResponse_controller protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgInitializeControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgInitializeControllerResponse") - fd_MsgInitializeControllerResponse_controller = md_MsgInitializeControllerResponse.Fields().ByName("controller") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitializeControllerResponse)(nil) - -type fastReflection_MsgInitializeControllerResponse MsgInitializeControllerResponse - -func (x *MsgInitializeControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitializeControllerResponse)(x) -} - -func (x *MsgInitializeControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitializeControllerResponse_messageType fastReflection_MsgInitializeControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitializeControllerResponse_messageType{} - -type fastReflection_MsgInitializeControllerResponse_messageType struct{} - -func (x fastReflection_MsgInitializeControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitializeControllerResponse)(nil) -} -func (x fastReflection_MsgInitializeControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitializeControllerResponse) -} -func (x fastReflection_MsgInitializeControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeControllerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitializeControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitializeControllerResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitializeControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgInitializeControllerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitializeControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgInitializeControllerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitializeControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgInitializeControllerResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitializeControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgInitializeControllerResponse_controller, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitializeControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - return x.Controller != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeControllerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - x.Controller = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitializeControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - x.Controller = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgInitializeControllerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitializeControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgInitializeControllerResponse.controller": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgInitializeControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgInitializeControllerResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitializeControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgInitializeControllerResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitializeControllerResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitializeControllerResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitializeControllerResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitializeControllerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitializeControllerResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Controller) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitializeControllerResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitializeControllerResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitializeControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgAuthenticateController protoreflect.MessageDescriptor - fd_MsgAuthenticateController_authority protoreflect.FieldDescriptor - fd_MsgAuthenticateController_controller protoreflect.FieldDescriptor - fd_MsgAuthenticateController_address protoreflect.FieldDescriptor - fd_MsgAuthenticateController_origin protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgAuthenticateController = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateController") - fd_MsgAuthenticateController_authority = md_MsgAuthenticateController.Fields().ByName("authority") - fd_MsgAuthenticateController_controller = md_MsgAuthenticateController.Fields().ByName("controller") - fd_MsgAuthenticateController_address = md_MsgAuthenticateController.Fields().ByName("address") - fd_MsgAuthenticateController_origin = md_MsgAuthenticateController.Fields().ByName("origin") -} - -var _ protoreflect.Message = (*fastReflection_MsgAuthenticateController)(nil) - -type fastReflection_MsgAuthenticateController MsgAuthenticateController - -func (x *MsgAuthenticateController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticateController)(x) -} - -func (x *MsgAuthenticateController) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgAuthenticateController_messageType fastReflection_MsgAuthenticateController_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticateController_messageType{} - -type fastReflection_MsgAuthenticateController_messageType struct{} - -func (x fastReflection_MsgAuthenticateController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticateController)(nil) -} -func (x fastReflection_MsgAuthenticateController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateController) -} -func (x fastReflection_MsgAuthenticateController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateController -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgAuthenticateController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateController -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgAuthenticateController) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticateController_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticateController) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateController) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthenticateController) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticateController)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgAuthenticateController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgAuthenticateController_authority, value) { + if !f(fd_MsgAuthenticate_authority, value) { return } } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgAuthenticateController_controller, value) { + if !f(fd_MsgAuthenticate_controller, value) { return } } if x.Address != "" { value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgAuthenticateController_address, value) { + if !f(fd_MsgAuthenticate_address, value) { return } } if x.Origin != "" { value := protoreflect.ValueOfString(x.Origin) - if !f(fd_MsgAuthenticateController_origin, value) { + if !f(fd_MsgAuthenticate_origin, value) { return } } @@ -2201,21 +990,21 @@ func (x *fastReflection_MsgAuthenticateController) Range(f func(protoreflect.Fie // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAuthenticateController) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAuthenticate) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": return x.Authority != "" - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": return x.Controller != "" - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": return x.Address != "" - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": return x.Origin != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -2225,21 +1014,21 @@ func (x *fastReflection_MsgAuthenticateController) Has(fd protoreflect.FieldDesc // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAuthenticate) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": x.Authority = "" - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": x.Controller = "" - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": x.Address = "" - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": x.Origin = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -2249,25 +1038,25 @@ func (x *fastReflection_MsgAuthenticateController) Clear(fd protoreflect.FieldDe // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAuthenticateController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": value := x.Address return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": value := x.Origin return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", descriptor.FullName())) } } @@ -2281,21 +1070,21 @@ func (x *fastReflection_MsgAuthenticateController) Get(descriptor protoreflect.F // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": x.Authority = value.Interface().(string) - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": x.Controller = value.Interface().(string) - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": x.Address = value.Interface().(string) - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": x.Origin = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } @@ -2309,52 +1098,52 @@ func (x *fastReflection_MsgAuthenticateController) Set(fd protoreflect.FieldDesc // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgAuthenticateController is not mutable")) - case "did.v1.MsgAuthenticateController.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgAuthenticateController is not mutable")) - case "did.v1.MsgAuthenticateController.address": - panic(fmt.Errorf("field address of message did.v1.MsgAuthenticateController is not mutable")) - case "did.v1.MsgAuthenticateController.origin": - panic(fmt.Errorf("field origin of message did.v1.MsgAuthenticateController is not mutable")) + case "did.v1.MsgAuthenticate.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAuthenticate.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAuthenticate.address": + panic(fmt.Errorf("field address of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAuthenticate.origin": + panic(fmt.Errorf("field origin of message did.v1.MsgAuthenticate is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgAuthenticateController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthenticateController.authority": + case "did.v1.MsgAuthenticate.authority": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticateController.controller": + case "did.v1.MsgAuthenticate.controller": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticateController.address": + case "did.v1.MsgAuthenticate.address": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticateController.origin": + case "did.v1.MsgAuthenticate.origin": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgAuthenticateController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAuthenticate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateController", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticate", d.FullName())) } panic("unreachable") } @@ -2362,7 +1151,7 @@ func (x *fastReflection_MsgAuthenticateController) WhichOneof(d protoreflect.One // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAuthenticateController) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAuthenticate) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2373,7 +1162,7 @@ func (x *fastReflection_MsgAuthenticateController) GetUnknown() protoreflect.Raw // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateController) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAuthenticate) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2385,7 +1174,7 @@ func (x *fastReflection_MsgAuthenticateController) SetUnknown(fields protoreflec // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgAuthenticateController) IsValid() bool { +func (x *fastReflection_MsgAuthenticate) IsValid() bool { return x != nil } @@ -2395,9 +1184,9 @@ func (x *fastReflection_MsgAuthenticateController) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticateController) + x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2435,7 +1224,7 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateController) + x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2493,7 +1282,7 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateController) + x := input.Message.Interface().(*MsgAuthenticate) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2525,10 +1314,10 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateController: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateController: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2695,24 +1484,24 @@ func (x *fastReflection_MsgAuthenticateController) ProtoMethods() *protoiface.Me } var ( - md_MsgAuthenticateControllerResponse protoreflect.MessageDescriptor + md_MsgAuthenticateResponse protoreflect.MessageDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgAuthenticateControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateControllerResponse") + md_MsgAuthenticateResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateResponse") } -var _ protoreflect.Message = (*fastReflection_MsgAuthenticateControllerResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAuthenticateResponse)(nil) -type fastReflection_MsgAuthenticateControllerResponse MsgAuthenticateControllerResponse +type fastReflection_MsgAuthenticateResponse MsgAuthenticateResponse -func (x *MsgAuthenticateControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticateControllerResponse)(x) +func (x *MsgAuthenticateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthenticateResponse)(x) } -func (x *MsgAuthenticateControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[5] +func (x *MsgAuthenticateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2723,43 +1512,43 @@ func (x *MsgAuthenticateControllerResponse) slowProtoReflect() protoreflect.Mess return mi.MessageOf(x) } -var _fastReflection_MsgAuthenticateControllerResponse_messageType fastReflection_MsgAuthenticateControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticateControllerResponse_messageType{} +var _fastReflection_MsgAuthenticateResponse_messageType fastReflection_MsgAuthenticateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthenticateResponse_messageType{} -type fastReflection_MsgAuthenticateControllerResponse_messageType struct{} +type fastReflection_MsgAuthenticateResponse_messageType struct{} -func (x fastReflection_MsgAuthenticateControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticateControllerResponse)(nil) +func (x fastReflection_MsgAuthenticateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthenticateResponse)(nil) } -func (x fastReflection_MsgAuthenticateControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateControllerResponse) +func (x fastReflection_MsgAuthenticateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticateResponse) } -func (x fastReflection_MsgAuthenticateControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateControllerResponse +func (x fastReflection_MsgAuthenticateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticateResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAuthenticateControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateControllerResponse +func (x *fastReflection_MsgAuthenticateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthenticateResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgAuthenticateControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticateControllerResponse_messageType +func (x *fastReflection_MsgAuthenticateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthenticateResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticateControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateControllerResponse) +func (x *fastReflection_MsgAuthenticateResponse) New() protoreflect.Message { + return new(fastReflection_MsgAuthenticateResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthenticateControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticateControllerResponse)(x) +func (x *fastReflection_MsgAuthenticateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAuthenticateResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2767,7 +1556,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Interface() protorefl // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgAuthenticateControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAuthenticateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { } // Has reports whether a field is populated. @@ -2781,13 +1570,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Range(f func(protoref // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgAuthenticateControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAuthenticateResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -2797,13 +1586,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Has(fd protoreflect.F // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -2813,13 +1602,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Clear(fd protoreflect // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgAuthenticateControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", descriptor.FullName())) } } @@ -2833,13 +1622,13 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Get(descriptor protor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAuthenticateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } @@ -2853,36 +1642,36 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) Set(fd protoreflect.F // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgAuthenticateControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAuthenticateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgAuthenticateControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAuthenticateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateControllerResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateResponse", d.FullName())) } panic("unreachable") } @@ -2890,7 +1679,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) WhichOneof(d protoref // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgAuthenticateControllerResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAuthenticateResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2901,7 +1690,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) GetUnknown() protoref // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateControllerResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAuthenticateResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2913,7 +1702,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) SetUnknown(fields pro // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgAuthenticateControllerResponse) IsValid() bool { +func (x *fastReflection_MsgAuthenticateResponse) IsValid() bool { return x != nil } @@ -2923,9 +1712,9 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticateControllerResponse) + x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2947,7 +1736,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateControllerResponse) + x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2977,7 +1766,7 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateControllerResponse) + x := input.Message.Interface().(*MsgAuthenticateResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3009,10 +1798,10 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateControllerResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -3050,6 +1839,4574 @@ func (x *fastReflection_MsgAuthenticateControllerResponse) ProtoMethods() *proto } } +var ( + md_MsgProveWitness protoreflect.MessageDescriptor + fd_MsgProveWitness_authority protoreflect.FieldDescriptor + fd_MsgProveWitness_property protoreflect.FieldDescriptor + fd_MsgProveWitness_witness protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgProveWitness = File_did_v1_tx_proto.Messages().ByName("MsgProveWitness") + fd_MsgProveWitness_authority = md_MsgProveWitness.Fields().ByName("authority") + fd_MsgProveWitness_property = md_MsgProveWitness.Fields().ByName("property") + fd_MsgProveWitness_witness = md_MsgProveWitness.Fields().ByName("witness") +} + +var _ protoreflect.Message = (*fastReflection_MsgProveWitness)(nil) + +type fastReflection_MsgProveWitness MsgProveWitness + +func (x *MsgProveWitness) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgProveWitness)(x) +} + +func (x *MsgProveWitness) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgProveWitness_messageType fastReflection_MsgProveWitness_messageType +var _ protoreflect.MessageType = fastReflection_MsgProveWitness_messageType{} + +type fastReflection_MsgProveWitness_messageType struct{} + +func (x fastReflection_MsgProveWitness_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgProveWitness)(nil) +} +func (x fastReflection_MsgProveWitness_messageType) New() protoreflect.Message { + return new(fastReflection_MsgProveWitness) +} +func (x fastReflection_MsgProveWitness_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgProveWitness +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgProveWitness) Descriptor() protoreflect.MessageDescriptor { + return md_MsgProveWitness +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgProveWitness) Type() protoreflect.MessageType { + return _fastReflection_MsgProveWitness_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgProveWitness) New() protoreflect.Message { + return new(fastReflection_MsgProveWitness) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgProveWitness) Interface() protoreflect.ProtoMessage { + return (*MsgProveWitness)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgProveWitness) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgProveWitness_authority, value) { + return + } + } + if x.Property != "" { + value := protoreflect.ValueOfString(x.Property) + if !f(fd_MsgProveWitness_property, value) { + return + } + } + if len(x.Witness) != 0 { + value := protoreflect.ValueOfBytes(x.Witness) + if !f(fd_MsgProveWitness_witness, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgProveWitness) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgProveWitness.authority": + return x.Authority != "" + case "did.v1.MsgProveWitness.property": + return x.Property != "" + case "did.v1.MsgProveWitness.witness": + return len(x.Witness) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitness) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgProveWitness.authority": + x.Authority = "" + case "did.v1.MsgProveWitness.property": + x.Property = "" + case "did.v1.MsgProveWitness.witness": + x.Witness = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgProveWitness) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgProveWitness.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.MsgProveWitness.property": + value := x.Property + return protoreflect.ValueOfString(value) + case "did.v1.MsgProveWitness.witness": + value := x.Witness + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitness) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgProveWitness.authority": + x.Authority = value.Interface().(string) + case "did.v1.MsgProveWitness.property": + x.Property = value.Interface().(string) + case "did.v1.MsgProveWitness.witness": + x.Witness = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgProveWitness.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgProveWitness is not mutable")) + case "did.v1.MsgProveWitness.property": + panic(fmt.Errorf("field property of message did.v1.MsgProveWitness is not mutable")) + case "did.v1.MsgProveWitness.witness": + panic(fmt.Errorf("field witness of message did.v1.MsgProveWitness is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgProveWitness) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgProveWitness.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgProveWitness.property": + return protoreflect.ValueOfString("") + case "did.v1.MsgProveWitness.witness": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitness does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgProveWitness) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgProveWitness", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgProveWitness) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitness) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgProveWitness) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgProveWitness) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgProveWitness) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Property) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Witness) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgProveWitness) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Witness) > 0 { + i -= len(x.Witness) + copy(dAtA[i:], x.Witness) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Witness))) + i-- + dAtA[i] = 0x1a + } + if len(x.Property) > 0 { + i -= len(x.Property) + copy(dAtA[i:], x.Property) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgProveWitness) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitness: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitness: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Property = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Witness = append(x.Witness[:0], dAtA[iNdEx:postIndex]...) + if x.Witness == nil { + x.Witness = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgProveWitnessResponse protoreflect.MessageDescriptor + fd_MsgProveWitnessResponse_success protoreflect.FieldDescriptor + fd_MsgProveWitnessResponse_property protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgProveWitnessResponse = File_did_v1_tx_proto.Messages().ByName("MsgProveWitnessResponse") + fd_MsgProveWitnessResponse_success = md_MsgProveWitnessResponse.Fields().ByName("success") + fd_MsgProveWitnessResponse_property = md_MsgProveWitnessResponse.Fields().ByName("property") +} + +var _ protoreflect.Message = (*fastReflection_MsgProveWitnessResponse)(nil) + +type fastReflection_MsgProveWitnessResponse MsgProveWitnessResponse + +func (x *MsgProveWitnessResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgProveWitnessResponse)(x) +} + +func (x *MsgProveWitnessResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgProveWitnessResponse_messageType fastReflection_MsgProveWitnessResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgProveWitnessResponse_messageType{} + +type fastReflection_MsgProveWitnessResponse_messageType struct{} + +func (x fastReflection_MsgProveWitnessResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgProveWitnessResponse)(nil) +} +func (x fastReflection_MsgProveWitnessResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgProveWitnessResponse) +} +func (x fastReflection_MsgProveWitnessResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgProveWitnessResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgProveWitnessResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgProveWitnessResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgProveWitnessResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgProveWitnessResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgProveWitnessResponse) New() protoreflect.Message { + return new(fastReflection_MsgProveWitnessResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgProveWitnessResponse) Interface() protoreflect.ProtoMessage { + return (*MsgProveWitnessResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgProveWitnessResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgProveWitnessResponse_success, value) { + return + } + } + if x.Property != "" { + value := protoreflect.ValueOfString(x.Property) + if !f(fd_MsgProveWitnessResponse_property, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgProveWitnessResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgProveWitnessResponse.success": + return x.Success != false + case "did.v1.MsgProveWitnessResponse.property": + return x.Property != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitnessResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgProveWitnessResponse.success": + x.Success = false + case "did.v1.MsgProveWitnessResponse.property": + x.Property = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgProveWitnessResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgProveWitnessResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.MsgProveWitnessResponse.property": + value := x.Property + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitnessResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgProveWitnessResponse.success": + x.Success = value.Bool() + case "did.v1.MsgProveWitnessResponse.property": + x.Property = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitnessResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgProveWitnessResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgProveWitnessResponse is not mutable")) + case "did.v1.MsgProveWitnessResponse.property": + panic(fmt.Errorf("field property of message did.v1.MsgProveWitnessResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgProveWitnessResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgProveWitnessResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.MsgProveWitnessResponse.property": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitnessResponse")) + } + panic(fmt.Errorf("message did.v1.MsgProveWitnessResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgProveWitnessResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgProveWitnessResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgProveWitnessResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgProveWitnessResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgProveWitnessResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgProveWitnessResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgProveWitnessResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + l = len(x.Property) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgProveWitnessResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Property) > 0 { + i -= len(x.Property) + copy(dAtA[i:], x.Property) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Property))) + i-- + dAtA[i] = 0x12 + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgProveWitnessResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitnessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgProveWitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Property = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSyncVault protoreflect.MessageDescriptor + fd_MsgSyncVault_controller protoreflect.FieldDescriptor + fd_MsgSyncVault_cid protoreflect.FieldDescriptor + fd_MsgSyncVault_macron protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgSyncVault = File_did_v1_tx_proto.Messages().ByName("MsgSyncVault") + fd_MsgSyncVault_controller = md_MsgSyncVault.Fields().ByName("controller") + fd_MsgSyncVault_cid = md_MsgSyncVault.Fields().ByName("cid") + fd_MsgSyncVault_macron = md_MsgSyncVault.Fields().ByName("macron") +} + +var _ protoreflect.Message = (*fastReflection_MsgSyncVault)(nil) + +type fastReflection_MsgSyncVault MsgSyncVault + +func (x *MsgSyncVault) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSyncVault)(x) +} + +func (x *MsgSyncVault) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSyncVault_messageType fastReflection_MsgSyncVault_messageType +var _ protoreflect.MessageType = fastReflection_MsgSyncVault_messageType{} + +type fastReflection_MsgSyncVault_messageType struct{} + +func (x fastReflection_MsgSyncVault_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSyncVault)(nil) +} +func (x fastReflection_MsgSyncVault_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSyncVault) +} +func (x fastReflection_MsgSyncVault_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncVault +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSyncVault) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncVault +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSyncVault) Type() protoreflect.MessageType { + return _fastReflection_MsgSyncVault_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSyncVault) New() protoreflect.Message { + return new(fastReflection_MsgSyncVault) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSyncVault) Interface() protoreflect.ProtoMessage { + return (*MsgSyncVault)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSyncVault) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgSyncVault_controller, value) { + return + } + } + if x.Cid != "" { + value := protoreflect.ValueOfString(x.Cid) + if !f(fd_MsgSyncVault_cid, value) { + return + } + } + if len(x.Macron) != 0 { + value := protoreflect.ValueOfBytes(x.Macron) + if !f(fd_MsgSyncVault_macron, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSyncVault) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgSyncVault.controller": + return x.Controller != "" + case "did.v1.MsgSyncVault.cid": + return x.Cid != "" + case "did.v1.MsgSyncVault.macron": + return len(x.Macron) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVault) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgSyncVault.controller": + x.Controller = "" + case "did.v1.MsgSyncVault.cid": + x.Cid = "" + case "did.v1.MsgSyncVault.macron": + x.Macron = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSyncVault) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgSyncVault.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgSyncVault.cid": + value := x.Cid + return protoreflect.ValueOfString(value) + case "did.v1.MsgSyncVault.macron": + value := x.Macron + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVault) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgSyncVault.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgSyncVault.cid": + x.Cid = value.Interface().(string) + case "did.v1.MsgSyncVault.macron": + x.Macron = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVault) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgSyncVault.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgSyncVault is not mutable")) + case "did.v1.MsgSyncVault.cid": + panic(fmt.Errorf("field cid of message did.v1.MsgSyncVault is not mutable")) + case "did.v1.MsgSyncVault.macron": + panic(fmt.Errorf("field macron of message did.v1.MsgSyncVault is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSyncVault) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgSyncVault.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgSyncVault.cid": + return protoreflect.ValueOfString("") + case "did.v1.MsgSyncVault.macron": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVault does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSyncVault) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncVault", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSyncVault) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVault) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSyncVault) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSyncVault) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Cid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Macron) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSyncVault) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Macron) > 0 { + i -= len(x.Macron) + copy(dAtA[i:], x.Macron) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macron))) + i-- + dAtA[i] = 0x1a + } + if len(x.Cid) > 0 { + i -= len(x.Cid) + copy(dAtA[i:], x.Cid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) + i-- + dAtA[i] = 0x12 + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSyncVault) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Macron = append(x.Macron[:0], dAtA[iNdEx:postIndex]...) + if x.Macron == nil { + x.Macron = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgSyncVaultResponse protoreflect.MessageDescriptor + fd_MsgSyncVaultResponse_success protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgSyncVaultResponse = File_did_v1_tx_proto.Messages().ByName("MsgSyncVaultResponse") + fd_MsgSyncVaultResponse_success = md_MsgSyncVaultResponse.Fields().ByName("success") +} + +var _ protoreflect.Message = (*fastReflection_MsgSyncVaultResponse)(nil) + +type fastReflection_MsgSyncVaultResponse MsgSyncVaultResponse + +func (x *MsgSyncVaultResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgSyncVaultResponse)(x) +} + +func (x *MsgSyncVaultResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgSyncVaultResponse_messageType fastReflection_MsgSyncVaultResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgSyncVaultResponse_messageType{} + +type fastReflection_MsgSyncVaultResponse_messageType struct{} + +func (x fastReflection_MsgSyncVaultResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgSyncVaultResponse)(nil) +} +func (x fastReflection_MsgSyncVaultResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgSyncVaultResponse) +} +func (x fastReflection_MsgSyncVaultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncVaultResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgSyncVaultResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgSyncVaultResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgSyncVaultResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgSyncVaultResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgSyncVaultResponse) New() protoreflect.Message { + return new(fastReflection_MsgSyncVaultResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgSyncVaultResponse) Interface() protoreflect.ProtoMessage { + return (*MsgSyncVaultResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgSyncVaultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgSyncVaultResponse_success, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgSyncVaultResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgSyncVaultResponse.success": + return x.Success != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVaultResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgSyncVaultResponse.success": + x.Success = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgSyncVaultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgSyncVaultResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVaultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgSyncVaultResponse.success": + x.Success = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVaultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgSyncVaultResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgSyncVaultResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgSyncVaultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgSyncVaultResponse.success": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVaultResponse")) + } + panic(fmt.Errorf("message did.v1.MsgSyncVaultResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgSyncVaultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncVaultResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgSyncVaultResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgSyncVaultResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgSyncVaultResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgSyncVaultResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgSyncVaultResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgSyncVaultResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVaultResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgRegisterController_2_list)(nil) + +type _MsgRegisterController_2_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterController_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgRegisterController_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterController_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterController_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Assertions as it is not of Message kind")) +} + +func (x *_MsgRegisterController_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_2_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgRegisterController_3_list)(nil) + +type _MsgRegisterController_3_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterController_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgRegisterController_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterController_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterController_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Keyshares as it is not of Message kind")) +} + +func (x *_MsgRegisterController_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_3_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_3_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_MsgRegisterController_4_list)(nil) + +type _MsgRegisterController_4_list struct { + list *[][]byte +} + +func (x *_MsgRegisterController_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterController_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfBytes((*x.list)[i]) +} + +func (x *_MsgRegisterController_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterController_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterController_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Verifications as it is not of Message kind")) +} + +func (x *_MsgRegisterController_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterController_4_list) NewElement() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_MsgRegisterController_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterController protoreflect.MessageDescriptor + fd_MsgRegisterController_authority protoreflect.FieldDescriptor + fd_MsgRegisterController_assertions protoreflect.FieldDescriptor + fd_MsgRegisterController_keyshares protoreflect.FieldDescriptor + fd_MsgRegisterController_verifications protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterController = File_did_v1_tx_proto.Messages().ByName("MsgRegisterController") + fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") + fd_MsgRegisterController_assertions = md_MsgRegisterController.Fields().ByName("assertions") + fd_MsgRegisterController_keyshares = md_MsgRegisterController.Fields().ByName("keyshares") + fd_MsgRegisterController_verifications = md_MsgRegisterController.Fields().ByName("verifications") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) + +type fastReflection_MsgRegisterController MsgRegisterController + +func (x *MsgRegisterController) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterController)(x) +} + +func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterController_messageType fastReflection_MsgRegisterController_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterController_messageType{} + +type fastReflection_MsgRegisterController_messageType struct{} + +func (x fastReflection_MsgRegisterController_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterController)(nil) +} +func (x fastReflection_MsgRegisterController_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterController) +} +func (x fastReflection_MsgRegisterController_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterController +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterController) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterController +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterController) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterController_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterController) New() protoreflect.Message { + return new(fastReflection_MsgRegisterController) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterController) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterController)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRegisterController_authority, value) { + return + } + } + if len(x.Assertions) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &x.Assertions}) + if !f(fd_MsgRegisterController_assertions, value) { + return + } + } + if len(x.Keyshares) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &x.Keyshares}) + if !f(fd_MsgRegisterController_keyshares, value) { + return + } + } + if len(x.Verifications) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Verifications}) + if !f(fd_MsgRegisterController_verifications, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + return x.Authority != "" + case "did.v1.MsgRegisterController.assertions": + return len(x.Assertions) != 0 + case "did.v1.MsgRegisterController.keyshares": + return len(x.Keyshares) != 0 + case "did.v1.MsgRegisterController.verifications": + return len(x.Verifications) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + x.Authority = "" + case "did.v1.MsgRegisterController.assertions": + x.Assertions = nil + case "did.v1.MsgRegisterController.keyshares": + x.Keyshares = nil + case "did.v1.MsgRegisterController.verifications": + x.Verifications = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterController.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterController.assertions": + if len(x.Assertions) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_2_list{}) + } + listValue := &_MsgRegisterController_2_list{list: &x.Assertions} + return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.keyshares": + if len(x.Keyshares) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_3_list{}) + } + listValue := &_MsgRegisterController_3_list{list: &x.Keyshares} + return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.verifications": + if len(x.Verifications) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterController_4_list{}) + } + listValue := &_MsgRegisterController_4_list{list: &x.Verifications} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + x.Authority = value.Interface().(string) + case "did.v1.MsgRegisterController.assertions": + lv := value.List() + clv := lv.(*_MsgRegisterController_2_list) + x.Assertions = *clv.list + case "did.v1.MsgRegisterController.keyshares": + lv := value.List() + clv := lv.(*_MsgRegisterController_3_list) + x.Keyshares = *clv.list + case "did.v1.MsgRegisterController.verifications": + lv := value.List() + clv := lv.(*_MsgRegisterController_4_list) + x.Verifications = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterController.assertions": + if x.Assertions == nil { + x.Assertions = [][]byte{} + } + value := &_MsgRegisterController_2_list{list: &x.Assertions} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.keyshares": + if x.Keyshares == nil { + x.Keyshares = [][]byte{} + } + value := &_MsgRegisterController_3_list{list: &x.Keyshares} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.verifications": + if x.Verifications == nil { + x.Verifications = [][]byte{} + } + value := &_MsgRegisterController_4_list{list: &x.Verifications} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterController.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterController.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterController.assertions": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_2_list{list: &list}) + case "did.v1.MsgRegisterController.keyshares": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &list}) + case "did.v1.MsgRegisterController.verifications": + list := [][]byte{} + return protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterController", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterController) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterController) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterController) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterController) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Assertions) > 0 { + for _, b := range x.Assertions { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Keyshares) > 0 { + for _, b := range x.Keyshares { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.Verifications) > 0 { + for _, b := range x.Verifications { + l = len(b) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterController) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Verifications) > 0 { + for iNdEx := len(x.Verifications) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Verifications[iNdEx]) + copy(dAtA[i:], x.Verifications[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Verifications[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Keyshares) > 0 { + for iNdEx := len(x.Keyshares) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Keyshares[iNdEx]) + copy(dAtA[i:], x.Keyshares[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshares[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.Assertions) > 0 { + for iNdEx := len(x.Assertions) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Assertions[iNdEx]) + copy(dAtA[i:], x.Assertions[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertions[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterController) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Assertions = append(x.Assertions, make([]byte, postIndex-iNdEx)) + copy(x.Assertions[len(x.Assertions)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) + copy(x.Keyshares[len(x.Keyshares)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) + copy(x.Verifications[len(x.Verifications)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.Map = (*_MsgRegisterControllerResponse_2_map)(nil) + +type _MsgRegisterControllerResponse_2_map struct { + m *map[string]string +} + +func (x *_MsgRegisterControllerResponse_2_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_MsgRegisterControllerResponse_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_MsgRegisterControllerResponse_2_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_MsgRegisterControllerResponse_2_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_MsgRegisterControllerResponse_2_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterControllerResponse_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_MsgRegisterControllerResponse_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_MsgRegisterControllerResponse_2_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterControllerResponse_2_map) IsValid() bool { + return x.m != nil +} + +var ( + md_MsgRegisterControllerResponse protoreflect.MessageDescriptor + fd_MsgRegisterControllerResponse_controller protoreflect.FieldDescriptor + fd_MsgRegisterControllerResponse_accounts protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterControllerResponse") + fd_MsgRegisterControllerResponse_controller = md_MsgRegisterControllerResponse.Fields().ByName("controller") + fd_MsgRegisterControllerResponse_accounts = md_MsgRegisterControllerResponse.Fields().ByName("accounts") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterControllerResponse)(nil) + +type fastReflection_MsgRegisterControllerResponse MsgRegisterControllerResponse + +func (x *MsgRegisterControllerResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterControllerResponse)(x) +} + +func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterControllerResponse_messageType fastReflection_MsgRegisterControllerResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterControllerResponse_messageType{} + +type fastReflection_MsgRegisterControllerResponse_messageType struct{} + +func (x fastReflection_MsgRegisterControllerResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterControllerResponse)(nil) +} +func (x fastReflection_MsgRegisterControllerResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterControllerResponse) +} +func (x fastReflection_MsgRegisterControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterControllerResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterControllerResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterControllerResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterControllerResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterControllerResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterControllerResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterControllerResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterControllerResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterControllerResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgRegisterControllerResponse_controller, value) { + return + } + } + if len(x.Accounts) != 0 { + value := protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &x.Accounts}) + if !f(fd_MsgRegisterControllerResponse_accounts, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + return x.Controller != "" + case "did.v1.MsgRegisterControllerResponse.accounts": + return len(x.Accounts) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterControllerResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + x.Controller = "" + case "did.v1.MsgRegisterControllerResponse.accounts": + x.Accounts = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterControllerResponse.accounts": + if len(x.Accounts) == 0 { + return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{}) + } + mapValue := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} + return protoreflect.ValueOfMap(mapValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgRegisterControllerResponse.accounts": + mv := value.Map() + cmv := mv.(*_MsgRegisterControllerResponse_2_map) + x.Accounts = *cmv.m + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.accounts": + if x.Accounts == nil { + x.Accounts = make(map[string]string) + } + value := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} + return protoreflect.ValueOfMap(value) + case "did.v1.MsgRegisterControllerResponse.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgRegisterControllerResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterControllerResponse.accounts": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &m}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterControllerResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterControllerResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterControllerResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterControllerResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterControllerResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Accounts) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Accounts)) + for k := range x.Accounts { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Accounts[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Accounts { + SiZeMaP(k, v) + } + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterControllerResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Accounts) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForAccounts := make([]string, 0, len(x.Accounts)) + for k := range x.Accounts { + keysForAccounts = append(keysForAccounts, string(k)) + } + sort.Slice(keysForAccounts, func(i, j int) bool { + return keysForAccounts[i] < keysForAccounts[j] + }) + for iNdEx := len(keysForAccounts) - 1; iNdEx >= 0; iNdEx-- { + v := x.Accounts[string(keysForAccounts[iNdEx])] + out, err := MaRsHaLmAp(keysForAccounts[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Accounts { + v := x.Accounts[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterControllerResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Accounts == nil { + x.Accounts = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Accounts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_MsgRegisterService_3_list)(nil) + +type _MsgRegisterService_3_list struct { + list *[]PermissionScope +} + +func (x *_MsgRegisterService_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_MsgRegisterService_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +} + +func (x *_MsgRegisterService_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + (*x.list)[i] = concreteValue +} + +func (x *_MsgRegisterService_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Enum() + concreteValue := (PermissionScope)(valueUnwrapped) + *x.list = append(*x.list, concreteValue) +} + +func (x *_MsgRegisterService_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterService at list field Scopes as it is not of Message kind")) +} + +func (x *_MsgRegisterService_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_MsgRegisterService_3_list) NewElement() protoreflect.Value { + v := 0 + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +} + +func (x *_MsgRegisterService_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_MsgRegisterService protoreflect.MessageDescriptor + fd_MsgRegisterService_authority protoreflect.FieldDescriptor + fd_MsgRegisterService_origin_uri protoreflect.FieldDescriptor + fd_MsgRegisterService_scopes protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterService = File_did_v1_tx_proto.Messages().ByName("MsgRegisterService") + fd_MsgRegisterService_authority = md_MsgRegisterService.Fields().ByName("authority") + fd_MsgRegisterService_origin_uri = md_MsgRegisterService.Fields().ByName("origin_uri") + fd_MsgRegisterService_scopes = md_MsgRegisterService.Fields().ByName("scopes") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterService)(nil) + +type fastReflection_MsgRegisterService MsgRegisterService + +func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterService)(x) +} + +func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterService_messageType fastReflection_MsgRegisterService_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterService_messageType{} + +type fastReflection_MsgRegisterService_messageType struct{} + +func (x fastReflection_MsgRegisterService_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterService)(nil) +} +func (x fastReflection_MsgRegisterService_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterService) +} +func (x fastReflection_MsgRegisterService_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterService +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterService) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterService +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterService) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterService_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterService) New() protoreflect.Message { + return new(fastReflection_MsgRegisterService) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterService) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterService)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgRegisterService_authority, value) { + return + } + } + if x.OriginUri != "" { + value := protoreflect.ValueOfString(x.OriginUri) + if !f(fd_MsgRegisterService_origin_uri, value) { + return + } + } + if len(x.Scopes) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &x.Scopes}) + if !f(fd_MsgRegisterService_scopes, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + return x.Authority != "" + case "did.v1.MsgRegisterService.origin_uri": + return x.OriginUri != "" + case "did.v1.MsgRegisterService.scopes": + return len(x.Scopes) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + x.Authority = "" + case "did.v1.MsgRegisterService.origin_uri": + x.OriginUri = "" + case "did.v1.MsgRegisterService.scopes": + x.Scopes = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterService.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterService.origin_uri": + value := x.OriginUri + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterService.scopes": + if len(x.Scopes) == 0 { + return protoreflect.ValueOfList(&_MsgRegisterService_3_list{}) + } + listValue := &_MsgRegisterService_3_list{list: &x.Scopes} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + x.Authority = value.Interface().(string) + case "did.v1.MsgRegisterService.origin_uri": + x.OriginUri = value.Interface().(string) + case "did.v1.MsgRegisterService.scopes": + lv := value.List() + clv := lv.(*_MsgRegisterService_3_list) + x.Scopes = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterService.scopes": + if x.Scopes == nil { + x.Scopes = []PermissionScope{} + } + value := &_MsgRegisterService_3_list{list: &x.Scopes} + return protoreflect.ValueOfList(value) + case "did.v1.MsgRegisterService.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgRegisterService is not mutable")) + case "did.v1.MsgRegisterService.origin_uri": + panic(fmt.Errorf("field origin_uri of message did.v1.MsgRegisterService is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterService.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterService.origin_uri": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterService.scopes": + list := []PermissionScope{} + return protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterService does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterService) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterService", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterService) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterService) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterService) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterService) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginUri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Scopes) > 0 { + l = 0 + for _, e := range x.Scopes { + l += runtime.Sov(uint64(e)) + } + n += 1 + runtime.Sov(uint64(l)) + l + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterService) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Scopes) > 0 { + var pksize2 int + for _, num := range x.Scopes { + pksize2 += runtime.Sov(uint64(num)) + } + i -= pksize2 + j1 := i + for _, num1 := range x.Scopes { + num := uint64(num1) + for num >= 1<<7 { + dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA[j1] = uint8(num) + j1++ + } + i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + i-- + dAtA[i] = 0x1a + } + if len(x.OriginUri) > 0 { + i -= len(x.OriginUri) + copy(dAtA[i:], x.OriginUri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginUri))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterService) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(x.Scopes) == 0 { + x.Scopes = make([]PermissionScope, 0, elementCount) + } + for iNdEx < postIndex { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= PermissionScope(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Scopes = append(x.Scopes, v) + } + } else { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgRegisterServiceResponse protoreflect.MessageDescriptor + fd_MsgRegisterServiceResponse_success protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgRegisterServiceResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse") + fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success") +} + +var _ protoreflect.Message = (*fastReflection_MsgRegisterServiceResponse)(nil) + +type fastReflection_MsgRegisterServiceResponse MsgRegisterServiceResponse + +func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgRegisterServiceResponse)(x) +} + +func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgRegisterServiceResponse_messageType fastReflection_MsgRegisterServiceResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgRegisterServiceResponse_messageType{} + +type fastReflection_MsgRegisterServiceResponse_messageType struct{} + +func (x fastReflection_MsgRegisterServiceResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgRegisterServiceResponse)(nil) +} +func (x fastReflection_MsgRegisterServiceResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgRegisterServiceResponse) +} +func (x fastReflection_MsgRegisterServiceResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterServiceResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgRegisterServiceResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgRegisterServiceResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgRegisterServiceResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgRegisterServiceResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgRegisterServiceResponse) New() protoreflect.Message { + return new(fastReflection_MsgRegisterServiceResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgRegisterServiceResponse) Interface() protoreflect.ProtoMessage { + return (*MsgRegisterServiceResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgRegisterServiceResponse_success, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + return x.Success != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + x.Success = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + x.Success = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgRegisterServiceResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgRegisterServiceResponse.success": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) + } + panic(fmt.Errorf("message did.v1.MsgRegisterServiceResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgRegisterServiceResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterServiceResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgRegisterServiceResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgRegisterServiceResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgRegisterServiceResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgRegisterServiceResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterServiceResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgRegisterServiceResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -3143,109 +6500,8 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{1} } -// MsgInitializeController is the message type for the InitializeController RPC. -type MsgInitializeController struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Assertions is the list of assertions to initialize the controller with. - Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` -} - -func (x *MsgInitializeController) Reset() { - *x = MsgInitializeController{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitializeController) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitializeController) ProtoMessage() {} - -// Deprecated: Use MsgInitializeController.ProtoReflect.Descriptor instead. -func (*MsgInitializeController) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgInitializeController) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgInitializeController) GetAssertions() [][]byte { - if x != nil { - return x.Assertions - } - return nil -} - -func (x *MsgInitializeController) GetKeyshares() [][]byte { - if x != nil { - return x.Keyshares - } - return nil -} - -func (x *MsgInitializeController) GetVerifications() [][]byte { - if x != nil { - return x.Verifications - } - return nil -} - -// MsgInitializeControllerResponse is the response type for the InitializeController RPC. -type MsgInitializeControllerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (x *MsgInitializeControllerResponse) Reset() { - *x = MsgInitializeControllerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitializeControllerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitializeControllerResponse) ProtoMessage() {} - -// Deprecated: Use MsgInitializeControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgInitializeControllerResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{3} -} - -func (x *MsgInitializeControllerResponse) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - // MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticateController struct { +type MsgAuthenticate struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3260,8 +6516,97 @@ type MsgAuthenticateController struct { Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` } -func (x *MsgAuthenticateController) Reset() { - *x = MsgAuthenticateController{} +func (x *MsgAuthenticate) Reset() { + *x = MsgAuthenticate{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthenticate) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthenticate) ProtoMessage() {} + +// Deprecated: Use MsgAuthenticate.ProtoReflect.Descriptor instead. +func (*MsgAuthenticate) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgAuthenticate) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgAuthenticate) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgAuthenticate) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MsgAuthenticate) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +// MsgAuthenticateResponse is the response type for the Authenticate RPC. +type MsgAuthenticateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgAuthenticateResponse) Reset() { + *x = MsgAuthenticateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthenticateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthenticateResponse) ProtoMessage() {} + +// Deprecated: Use MsgAuthenticateResponse.ProtoReflect.Descriptor instead. +func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{3} +} + +// MsgProveWitness is the message type for the ProveWitness RPC. +type MsgProveWitness struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // property is key to prove. + Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` + // Witness Value is the bytes of the witness. + Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` +} + +func (x *MsgProveWitness) Reset() { + *x = MsgProveWitness{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3269,54 +6614,50 @@ func (x *MsgAuthenticateController) Reset() { } } -func (x *MsgAuthenticateController) String() string { +func (x *MsgProveWitness) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthenticateController) ProtoMessage() {} +func (*MsgProveWitness) ProtoMessage() {} -// Deprecated: Use MsgAuthenticateController.ProtoReflect.Descriptor instead. -func (*MsgAuthenticateController) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgProveWitness.ProtoReflect.Descriptor instead. +func (*MsgProveWitness) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{4} } -func (x *MsgAuthenticateController) GetAuthority() string { +func (x *MsgProveWitness) GetAuthority() string { if x != nil { return x.Authority } return "" } -func (x *MsgAuthenticateController) GetController() string { +func (x *MsgProveWitness) GetProperty() string { if x != nil { - return x.Controller + return x.Property } return "" } -func (x *MsgAuthenticateController) GetAddress() string { +func (x *MsgProveWitness) GetWitness() []byte { if x != nil { - return x.Address + return x.Witness } - return "" + return nil } -func (x *MsgAuthenticateController) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -// MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -type MsgAuthenticateControllerResponse struct { +// MsgProveWitnessResponse is the response type for the ProveWitness RPC. +type MsgProveWitnessResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` } -func (x *MsgAuthenticateControllerResponse) Reset() { - *x = MsgAuthenticateControllerResponse{} +func (x *MsgProveWitnessResponse) Reset() { + *x = MsgProveWitnessResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3324,100 +6665,466 @@ func (x *MsgAuthenticateControllerResponse) Reset() { } } -func (x *MsgAuthenticateControllerResponse) String() string { +func (x *MsgProveWitnessResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthenticateControllerResponse) ProtoMessage() {} +func (*MsgProveWitnessResponse) ProtoMessage() {} -// Deprecated: Use MsgAuthenticateControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgAuthenticateControllerResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgProveWitnessResponse.ProtoReflect.Descriptor instead. +func (*MsgProveWitnessResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{5} } +func (x *MsgProveWitnessResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgProveWitnessResponse) GetProperty() string { + if x != nil { + return x.Property + } + return "" +} + +// MsgSyncVault is the message type for the SyncVault RPC. +type MsgSyncVault struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // controller is the address of the controller to sync. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // cid is the IPFS content identifier. + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + // Macroon is the public token to authenticate the operation. + Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` +} + +func (x *MsgSyncVault) Reset() { + *x = MsgSyncVault{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSyncVault) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSyncVault) ProtoMessage() {} + +// Deprecated: Use MsgSyncVault.ProtoReflect.Descriptor instead. +func (*MsgSyncVault) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgSyncVault) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgSyncVault) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + +func (x *MsgSyncVault) GetMacron() []byte { + if x != nil { + return x.Macron + } + return nil +} + +// MsgSyncVaultResponse is the response type for the SyncVault RPC. +type MsgSyncVaultResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *MsgSyncVaultResponse) Reset() { + *x = MsgSyncVaultResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgSyncVaultResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgSyncVaultResponse) ProtoMessage() {} + +// Deprecated: Use MsgSyncVaultResponse.ProtoReflect.Descriptor instead. +func (*MsgSyncVaultResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgSyncVaultResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +// MsgRegisterController is the message type for the InitializeController RPC. +type MsgRegisterController struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Assertions is the list of assertions to initialize the controller with. + Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` + // Keyshares is the list of keyshares to initialize the controller with. + Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` + // Verifications is the list of verifications to initialize the controller with. + Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` +} + +func (x *MsgRegisterController) Reset() { + *x = MsgRegisterController{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterController) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterController) ProtoMessage() {} + +// Deprecated: Use MsgRegisterController.ProtoReflect.Descriptor instead. +func (*MsgRegisterController) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgRegisterController) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgRegisterController) GetAssertions() [][]byte { + if x != nil { + return x.Assertions + } + return nil +} + +func (x *MsgRegisterController) GetKeyshares() [][]byte { + if x != nil { + return x.Keyshares + } + return nil +} + +func (x *MsgRegisterController) GetVerifications() [][]byte { + if x != nil { + return x.Verifications + } + return nil +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +type MsgRegisterControllerResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Controller is the address of the initialized controller. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Accounts are a Address Map and Supported coin Denoms for the controller + Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *MsgRegisterControllerResponse) Reset() { + *x = MsgRegisterControllerResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterControllerResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterControllerResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterControllerResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *MsgRegisterControllerResponse) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgRegisterControllerResponse) GetAccounts() map[string]string { + if x != nil { + return x.Accounts + } + return nil +} + +// MsgRegisterService is the message type for the RegisterService RPC. +type MsgRegisterService struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // origin is the origin of the request in wildcard form. + OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // PermissionScope is the scope of the service. + Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` +} + +func (x *MsgRegisterService) Reset() { + *x = MsgRegisterService{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterService) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterService) ProtoMessage() {} + +// Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. +func (*MsgRegisterService) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgRegisterService) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgRegisterService) GetOriginUri() string { + if x != nil { + return x.OriginUri + } + return "" +} + +func (x *MsgRegisterService) GetScopes() []PermissionScope { + if x != nil { + return x.Scopes + } + return nil +} + +// MsgRegisterServiceResponse is the response type for the RegisterService RPC. +type MsgRegisterServiceResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *MsgRegisterServiceResponse) Reset() { + *x = MsgRegisterServiceResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgRegisterServiceResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgRegisterServiceResponse) ProtoMessage() {} + +// Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. +func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgRegisterServiceResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + var File_did_v1_tx_proto protoreflect.FileDescriptor var file_did_v1_tx_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, 0x0a, 0x0f, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xc5, - 0x01, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, - 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, - 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, - 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x5b, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, - 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x22, 0xe9, 0x01, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x74, 0x6f, 0x1a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x65, 0x6e, 0x75, 0x6d, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0xdf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x38, + 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, + 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x8f, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, + 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, + 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, + 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, + 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, + 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x10, 0x0a, + 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, + 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, + 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x15, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, + 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0c, + 0x52, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, + 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0c, 0x52, + 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x76, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, + 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, + 0x22, 0xe7, 0x01, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, + 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, + 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x01, 0x0a, 0x12, 0x4d, + 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, - 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, - 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, - 0x23, 0x0a, 0x21, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9e, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5e, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, - 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1f, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, - 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x27, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, - 0x6c, 0x69, 0x7a, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x16, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x12, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, - 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 0x1a, 0x29, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, - 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, - 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, - 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, - 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, + 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x36, 0x0a, 0x1a, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x32, 0xda, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, + 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, 0x1f, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, + 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, + 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x17, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, + 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x56, + 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, + 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, + 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, + 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, + 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, + 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, + 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, + 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3432,29 +7139,45 @@ func file_did_v1_tx_proto_rawDescGZIP() []byte { return file_did_v1_tx_proto_rawDescData } -var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_did_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse - (*MsgInitializeController)(nil), // 2: did.v1.MsgInitializeController - (*MsgInitializeControllerResponse)(nil), // 3: did.v1.MsgInitializeControllerResponse - (*MsgAuthenticateController)(nil), // 4: did.v1.MsgAuthenticateController - (*MsgAuthenticateControllerResponse)(nil), // 5: did.v1.MsgAuthenticateControllerResponse - (*Params)(nil), // 6: did.v1.Params + (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse + (*MsgAuthenticate)(nil), // 2: did.v1.MsgAuthenticate + (*MsgAuthenticateResponse)(nil), // 3: did.v1.MsgAuthenticateResponse + (*MsgProveWitness)(nil), // 4: did.v1.MsgProveWitness + (*MsgProveWitnessResponse)(nil), // 5: did.v1.MsgProveWitnessResponse + (*MsgSyncVault)(nil), // 6: did.v1.MsgSyncVault + (*MsgSyncVaultResponse)(nil), // 7: did.v1.MsgSyncVaultResponse + (*MsgRegisterController)(nil), // 8: did.v1.MsgRegisterController + (*MsgRegisterControllerResponse)(nil), // 9: did.v1.MsgRegisterControllerResponse + (*MsgRegisterService)(nil), // 10: did.v1.MsgRegisterService + (*MsgRegisterServiceResponse)(nil), // 11: did.v1.MsgRegisterServiceResponse + nil, // 12: did.v1.MsgRegisterControllerResponse.AccountsEntry + (*Params)(nil), // 13: did.v1.Params + (PermissionScope)(0), // 14: did.v1.PermissionScope } var file_did_v1_tx_proto_depIdxs = []int32{ - 6, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 0, // 1: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 2, // 2: did.v1.Msg.RegisterController:input_type -> did.v1.MsgInitializeController - 4, // 3: did.v1.Msg.AuthenticateController:input_type -> did.v1.MsgAuthenticateController - 1, // 4: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 3, // 5: did.v1.Msg.RegisterController:output_type -> did.v1.MsgInitializeControllerResponse - 5, // 6: did.v1.Msg.AuthenticateController:output_type -> did.v1.MsgAuthenticateControllerResponse - 4, // [4:7] is the sub-list for method output_type - 1, // [1:4] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 13, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 12, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry + 14, // 2: did.v1.MsgRegisterService.scopes:type_name -> did.v1.PermissionScope + 0, // 3: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams + 2, // 4: did.v1.Msg.Authenticate:input_type -> did.v1.MsgAuthenticate + 4, // 5: did.v1.Msg.ProveWitness:input_type -> did.v1.MsgProveWitness + 6, // 6: did.v1.Msg.SyncVault:input_type -> did.v1.MsgSyncVault + 8, // 7: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController + 10, // 8: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService + 1, // 9: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 3, // 10: did.v1.Msg.Authenticate:output_type -> did.v1.MsgAuthenticateResponse + 5, // 11: did.v1.Msg.ProveWitness:output_type -> did.v1.MsgProveWitnessResponse + 7, // 12: did.v1.Msg.SyncVault:output_type -> did.v1.MsgSyncVaultResponse + 9, // 13: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse + 11, // 14: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse + 9, // [9:15] is the sub-list for method output_type + 3, // [3:9] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name } func init() { file_did_v1_tx_proto_init() } @@ -3462,6 +7185,7 @@ func file_did_v1_tx_proto_init() { if File_did_v1_tx_proto != nil { return } + file_did_v1_enums_proto_init() file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -3489,7 +7213,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitializeController); i { + switch v := v.(*MsgAuthenticate); i { case 0: return &v.state case 1: @@ -3501,7 +7225,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitializeControllerResponse); i { + switch v := v.(*MsgAuthenticateResponse); i { case 0: return &v.state case 1: @@ -3513,7 +7237,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAuthenticateController); i { + switch v := v.(*MsgProveWitness); i { case 0: return &v.state case 1: @@ -3525,7 +7249,79 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgAuthenticateControllerResponse); i { + switch v := v.(*MsgProveWitnessResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSyncVault); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgSyncVaultResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterController); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterControllerResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterServiceResponse); i { case 0: return &v.state case 1: @@ -3543,7 +7339,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index 21ed312a1..29ad8109c 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -19,9 +19,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" - Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" - Msg_AuthenticateController_FullMethodName = "/did.v1.Msg/AuthenticateController" + Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" + Msg_Authenticate_FullMethodName = "/did.v1.Msg/Authenticate" + Msg_ProveWitness_FullMethodName = "/did.v1.Msg/ProveWitness" + Msg_SyncVault_FullMethodName = "/did.v1.Msg/SyncVault" + Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" + Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService" ) // MsgClient is the client API for Msg service. @@ -32,10 +35,16 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) + // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. + ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) + // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) + 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(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) } type msgClient struct { @@ -55,8 +64,35 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { - out := new(MsgInitializeControllerResponse) +func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { + out := new(MsgAuthenticateResponse) + err := c.cc.Invoke(ctx, Msg_Authenticate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) { + out := new(MsgProveWitnessResponse) + err := c.cc.Invoke(ctx, Msg_ProveWitness_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) { + out := new(MsgSyncVaultResponse) + err := c.cc.Invoke(ctx, Msg_SyncVault_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) { + out := new(MsgRegisterControllerResponse) err := c.cc.Invoke(ctx, Msg_RegisterController_FullMethodName, in, out, opts...) if err != nil { return nil, err @@ -64,9 +100,9 @@ func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeCon return out, nil } -func (c *msgClient) AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) { - out := new(MsgAuthenticateControllerResponse) - err := c.cc.Invoke(ctx, Msg_AuthenticateController_FullMethodName, in, out, opts...) +func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) { + out := new(MsgRegisterServiceResponse) + err := c.cc.Invoke(ctx, Msg_RegisterService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -81,10 +117,16 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) + // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. + ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) + // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, 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(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) mustEmbedUnimplementedMsgServer() } @@ -95,11 +137,20 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) { +func (UnimplementedMsgServer) Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") +} +func (UnimplementedMsgServer) ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented") +} +func (UnimplementedMsgServer) SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") +} +func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } -func (UnimplementedMsgServer) AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") +func (UnimplementedMsgServer) RegisterService(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented") } func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} @@ -132,8 +183,62 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthenticate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Authenticate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_Authenticate_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgProveWitness) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ProveWitness(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_ProveWitness_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSyncVault) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + 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) +} + func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgInitializeController) + in := new(MsgRegisterController) if err := dec(in); err != nil { return nil, err } @@ -145,25 +250,25 @@ func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec f FullMethod: Msg_RegisterController_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController)) + return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController)) } return interceptor(ctx, in, info, handler) } -func _Msg_AuthenticateController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticateController) +func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterService) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AuthenticateController(ctx, in) + return srv.(MsgServer).RegisterService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_AuthenticateController_FullMethodName, + FullMethod: Msg_RegisterService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AuthenticateController(ctx, req.(*MsgAuthenticateController)) + return srv.(MsgServer).RegisterService(ctx, req.(*MsgRegisterService)) } return interceptor(ctx, in, info, handler) } @@ -179,13 +284,25 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "Authenticate", + Handler: _Msg_Authenticate_Handler, + }, + { + MethodName: "ProveWitness", + Handler: _Msg_ProveWitness_Handler, + }, + { + MethodName: "SyncVault", + Handler: _Msg_SyncVault_Handler, + }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, }, { - MethodName: "AuthenticateController", - Handler: _Msg_AuthenticateController_Handler, + MethodName: "RegisterService", + Handler: _Msg_RegisterService_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/did/v1/types.pulsar.go b/api/did/v1/types.pulsar.go index 475fe7f8b..ba114c7ab 100644 --- a/api/did/v1/types.pulsar.go +++ b/api/did/v1/types.pulsar.go @@ -3,6 +3,7 @@ package didv1 import ( _ "cosmossdk.io/api/cosmos/msg/v1" + binary "encoding/binary" fmt "fmt" _ "github.com/cosmos/cosmos-proto" runtime "github.com/cosmos/cosmos-proto/runtime" @@ -11,276 +12,58 @@ import ( protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" + math "math" reflect "reflect" sort "sort" sync "sync" ) -var _ protoreflect.List = (*_BaseDocument_2_list)(nil) - -type _BaseDocument_2_list struct { - list *[]*VerificationMethod -} - -func (x *_BaseDocument_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseDocument_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_BaseDocument_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - (*x.list)[i] = concreteValue -} - -func (x *_BaseDocument_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseDocument_2_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseDocument_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_BaseDocument_2_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_BaseDocument_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BaseDocument_4_list)(nil) - -type _BaseDocument_4_list struct { - list *[]string -} - -func (x *_BaseDocument_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseDocument_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_BaseDocument_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_BaseDocument_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseDocument_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field Authentication as it is not of Message kind")) -} - -func (x *_BaseDocument_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_BaseDocument_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_BaseDocument_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BaseDocument_5_list)(nil) - -type _BaseDocument_5_list struct { - list *[]string -} - -func (x *_BaseDocument_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseDocument_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_BaseDocument_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_BaseDocument_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseDocument_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field AssertionMethod as it is not of Message kind")) -} - -func (x *_BaseDocument_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_BaseDocument_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_BaseDocument_5_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BaseDocument_7_list)(nil) - -type _BaseDocument_7_list struct { - list *[]string -} - -func (x *_BaseDocument_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseDocument_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_BaseDocument_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_BaseDocument_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseDocument_7_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field CapabilityDelegation as it is not of Message kind")) -} - -func (x *_BaseDocument_7_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_BaseDocument_7_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_BaseDocument_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_BaseDocument_8_list)(nil) - -type _BaseDocument_8_list struct { - list *[]string -} - -func (x *_BaseDocument_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_BaseDocument_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_BaseDocument_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_BaseDocument_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_BaseDocument_8_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message BaseDocument at list field CapabilityInvocation as it is not of Message kind")) -} - -func (x *_BaseDocument_8_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_BaseDocument_8_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_BaseDocument_8_list) IsValid() bool { - return x.list != nil -} - var ( - md_BaseDocument protoreflect.MessageDescriptor - fd_BaseDocument_id protoreflect.FieldDescriptor - fd_BaseDocument_verification_methods protoreflect.FieldDescriptor - fd_BaseDocument_authentication protoreflect.FieldDescriptor - fd_BaseDocument_assertion_method protoreflect.FieldDescriptor - fd_BaseDocument_capability_delegation protoreflect.FieldDescriptor - fd_BaseDocument_capability_invocation protoreflect.FieldDescriptor + md_AssetInfo protoreflect.MessageDescriptor + fd_AssetInfo_id protoreflect.FieldDescriptor + fd_AssetInfo_denom protoreflect.FieldDescriptor + fd_AssetInfo_symbol protoreflect.FieldDescriptor + fd_AssetInfo_asset_type protoreflect.FieldDescriptor + fd_AssetInfo_origin_chain protoreflect.FieldDescriptor + fd_AssetInfo_origin_denom protoreflect.FieldDescriptor + fd_AssetInfo_decimals protoreflect.FieldDescriptor + fd_AssetInfo_description protoreflect.FieldDescriptor + fd_AssetInfo_image_url protoreflect.FieldDescriptor + fd_AssetInfo_coingecko_id protoreflect.FieldDescriptor + fd_AssetInfo_is_enabled protoreflect.FieldDescriptor + fd_AssetInfo_ibc_path protoreflect.FieldDescriptor + fd_AssetInfo_ibc_channel protoreflect.FieldDescriptor + fd_AssetInfo_ibc_port protoreflect.FieldDescriptor ) func init() { file_did_v1_types_proto_init() - md_BaseDocument = File_did_v1_types_proto.Messages().ByName("BaseDocument") - fd_BaseDocument_id = md_BaseDocument.Fields().ByName("id") - fd_BaseDocument_verification_methods = md_BaseDocument.Fields().ByName("verification_methods") - fd_BaseDocument_authentication = md_BaseDocument.Fields().ByName("authentication") - fd_BaseDocument_assertion_method = md_BaseDocument.Fields().ByName("assertion_method") - fd_BaseDocument_capability_delegation = md_BaseDocument.Fields().ByName("capability_delegation") - fd_BaseDocument_capability_invocation = md_BaseDocument.Fields().ByName("capability_invocation") + md_AssetInfo = File_did_v1_types_proto.Messages().ByName("AssetInfo") + fd_AssetInfo_id = md_AssetInfo.Fields().ByName("id") + fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") + fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") + fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") + fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") + fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") + fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") + fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") + fd_AssetInfo_image_url = md_AssetInfo.Fields().ByName("image_url") + fd_AssetInfo_coingecko_id = md_AssetInfo.Fields().ByName("coingecko_id") + fd_AssetInfo_is_enabled = md_AssetInfo.Fields().ByName("is_enabled") + fd_AssetInfo_ibc_path = md_AssetInfo.Fields().ByName("ibc_path") + fd_AssetInfo_ibc_channel = md_AssetInfo.Fields().ByName("ibc_channel") + fd_AssetInfo_ibc_port = md_AssetInfo.Fields().ByName("ibc_port") } -var _ protoreflect.Message = (*fastReflection_BaseDocument)(nil) +var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) -type fastReflection_BaseDocument BaseDocument +type fastReflection_AssetInfo AssetInfo -func (x *BaseDocument) ProtoReflect() protoreflect.Message { - return (*fastReflection_BaseDocument)(x) +func (x *AssetInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_AssetInfo)(x) } -func (x *BaseDocument) slowProtoReflect() protoreflect.Message { +func (x *AssetInfo) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_types_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -292,43 +75,43 @@ func (x *BaseDocument) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_BaseDocument_messageType fastReflection_BaseDocument_messageType -var _ protoreflect.MessageType = fastReflection_BaseDocument_messageType{} +var _fastReflection_AssetInfo_messageType fastReflection_AssetInfo_messageType +var _ protoreflect.MessageType = fastReflection_AssetInfo_messageType{} -type fastReflection_BaseDocument_messageType struct{} +type fastReflection_AssetInfo_messageType struct{} -func (x fastReflection_BaseDocument_messageType) Zero() protoreflect.Message { - return (*fastReflection_BaseDocument)(nil) +func (x fastReflection_AssetInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_AssetInfo)(nil) } -func (x fastReflection_BaseDocument_messageType) New() protoreflect.Message { - return new(fastReflection_BaseDocument) +func (x fastReflection_AssetInfo_messageType) New() protoreflect.Message { + return new(fastReflection_AssetInfo) } -func (x fastReflection_BaseDocument_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_BaseDocument +func (x fastReflection_AssetInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AssetInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_BaseDocument) Descriptor() protoreflect.MessageDescriptor { - return md_BaseDocument +func (x *fastReflection_AssetInfo) Descriptor() protoreflect.MessageDescriptor { + return md_AssetInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_BaseDocument) Type() protoreflect.MessageType { - return _fastReflection_BaseDocument_messageType +func (x *fastReflection_AssetInfo) Type() protoreflect.MessageType { + return _fastReflection_AssetInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_BaseDocument) New() protoreflect.Message { - return new(fastReflection_BaseDocument) +func (x *fastReflection_AssetInfo) New() protoreflect.Message { + return new(fastReflection_AssetInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_BaseDocument) Interface() protoreflect.ProtoMessage { - return (*BaseDocument)(x) +func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { + return (*AssetInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -336,40 +119,88 @@ func (x *fastReflection_BaseDocument) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_BaseDocument) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_BaseDocument_id, value) { + if !f(fd_AssetInfo_id, value) { return } } - if len(x.VerificationMethods) != 0 { - value := protoreflect.ValueOfList(&_BaseDocument_2_list{list: &x.VerificationMethods}) - if !f(fd_BaseDocument_verification_methods, value) { + if x.Denom != "" { + value := protoreflect.ValueOfString(x.Denom) + if !f(fd_AssetInfo_denom, value) { return } } - if len(x.Authentication) != 0 { - value := protoreflect.ValueOfList(&_BaseDocument_4_list{list: &x.Authentication}) - if !f(fd_BaseDocument_authentication, value) { + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_AssetInfo_symbol, value) { return } } - if len(x.AssertionMethod) != 0 { - value := protoreflect.ValueOfList(&_BaseDocument_5_list{list: &x.AssertionMethod}) - if !f(fd_BaseDocument_assertion_method, value) { + if x.AssetType != "" { + value := protoreflect.ValueOfString(x.AssetType) + if !f(fd_AssetInfo_asset_type, value) { return } } - if len(x.CapabilityDelegation) != 0 { - value := protoreflect.ValueOfList(&_BaseDocument_7_list{list: &x.CapabilityDelegation}) - if !f(fd_BaseDocument_capability_delegation, value) { + if x.OriginChain != "" { + value := protoreflect.ValueOfString(x.OriginChain) + if !f(fd_AssetInfo_origin_chain, value) { return } } - if len(x.CapabilityInvocation) != 0 { - value := protoreflect.ValueOfList(&_BaseDocument_8_list{list: &x.CapabilityInvocation}) - if !f(fd_BaseDocument_capability_invocation, value) { + if x.OriginDenom != "" { + value := protoreflect.ValueOfString(x.OriginDenom) + if !f(fd_AssetInfo_origin_denom, value) { + return + } + } + if x.Decimals != int32(0) { + value := protoreflect.ValueOfInt32(x.Decimals) + if !f(fd_AssetInfo_decimals, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_AssetInfo_description, value) { + return + } + } + if x.ImageUrl != "" { + value := protoreflect.ValueOfString(x.ImageUrl) + if !f(fd_AssetInfo_image_url, value) { + return + } + } + if x.CoingeckoId != "" { + value := protoreflect.ValueOfString(x.CoingeckoId) + if !f(fd_AssetInfo_coingecko_id, value) { + return + } + } + if x.IsEnabled != false { + value := protoreflect.ValueOfBool(x.IsEnabled) + if !f(fd_AssetInfo_is_enabled, value) { + return + } + } + if x.IbcPath != "" { + value := protoreflect.ValueOfString(x.IbcPath) + if !f(fd_AssetInfo_ibc_path, value) { + return + } + } + if x.IbcChannel != "" { + value := protoreflect.ValueOfString(x.IbcChannel) + if !f(fd_AssetInfo_ibc_channel, value) { + return + } + } + if x.IbcPort != "" { + value := protoreflect.ValueOfString(x.IbcPort) + if !f(fd_AssetInfo_ibc_port, value) { return } } @@ -386,25 +217,41 @@ func (x *fastReflection_BaseDocument) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_BaseDocument) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.BaseDocument.id": + case "did.v1.AssetInfo.id": return x.Id != "" - case "did.v1.BaseDocument.verification_methods": - return len(x.VerificationMethods) != 0 - case "did.v1.BaseDocument.authentication": - return len(x.Authentication) != 0 - case "did.v1.BaseDocument.assertion_method": - return len(x.AssertionMethod) != 0 - case "did.v1.BaseDocument.capability_delegation": - return len(x.CapabilityDelegation) != 0 - case "did.v1.BaseDocument.capability_invocation": - return len(x.CapabilityInvocation) != 0 + case "did.v1.AssetInfo.denom": + return x.Denom != "" + case "did.v1.AssetInfo.symbol": + return x.Symbol != "" + case "did.v1.AssetInfo.asset_type": + return x.AssetType != "" + case "did.v1.AssetInfo.origin_chain": + return x.OriginChain != "" + case "did.v1.AssetInfo.origin_denom": + return x.OriginDenom != "" + case "did.v1.AssetInfo.decimals": + return x.Decimals != int32(0) + case "did.v1.AssetInfo.description": + return x.Description != "" + case "did.v1.AssetInfo.image_url": + return x.ImageUrl != "" + case "did.v1.AssetInfo.coingecko_id": + return x.CoingeckoId != "" + case "did.v1.AssetInfo.is_enabled": + return x.IsEnabled != false + case "did.v1.AssetInfo.ibc_path": + return x.IbcPath != "" + case "did.v1.AssetInfo.ibc_channel": + return x.IbcChannel != "" + case "did.v1.AssetInfo.ibc_port": + return x.IbcPort != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) } - panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) } } @@ -414,25 +261,41 @@ func (x *fastReflection_BaseDocument) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BaseDocument) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.BaseDocument.id": + case "did.v1.AssetInfo.id": x.Id = "" - case "did.v1.BaseDocument.verification_methods": - x.VerificationMethods = nil - case "did.v1.BaseDocument.authentication": - x.Authentication = nil - case "did.v1.BaseDocument.assertion_method": - x.AssertionMethod = nil - case "did.v1.BaseDocument.capability_delegation": - x.CapabilityDelegation = nil - case "did.v1.BaseDocument.capability_invocation": - x.CapabilityInvocation = nil + case "did.v1.AssetInfo.denom": + x.Denom = "" + case "did.v1.AssetInfo.symbol": + x.Symbol = "" + case "did.v1.AssetInfo.asset_type": + x.AssetType = "" + case "did.v1.AssetInfo.origin_chain": + x.OriginChain = "" + case "did.v1.AssetInfo.origin_denom": + x.OriginDenom = "" + case "did.v1.AssetInfo.decimals": + x.Decimals = int32(0) + case "did.v1.AssetInfo.description": + x.Description = "" + case "did.v1.AssetInfo.image_url": + x.ImageUrl = "" + case "did.v1.AssetInfo.coingecko_id": + x.CoingeckoId = "" + case "did.v1.AssetInfo.is_enabled": + x.IsEnabled = false + case "did.v1.AssetInfo.ibc_path": + x.IbcPath = "" + case "did.v1.AssetInfo.ibc_channel": + x.IbcChannel = "" + case "did.v1.AssetInfo.ibc_port": + x.IbcPort = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) } - panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) } } @@ -442,46 +305,55 @@ func (x *fastReflection_BaseDocument) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_BaseDocument) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.BaseDocument.id": + case "did.v1.AssetInfo.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.BaseDocument.verification_methods": - if len(x.VerificationMethods) == 0 { - return protoreflect.ValueOfList(&_BaseDocument_2_list{}) - } - listValue := &_BaseDocument_2_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(listValue) - case "did.v1.BaseDocument.authentication": - if len(x.Authentication) == 0 { - return protoreflect.ValueOfList(&_BaseDocument_4_list{}) - } - listValue := &_BaseDocument_4_list{list: &x.Authentication} - return protoreflect.ValueOfList(listValue) - case "did.v1.BaseDocument.assertion_method": - if len(x.AssertionMethod) == 0 { - return protoreflect.ValueOfList(&_BaseDocument_5_list{}) - } - listValue := &_BaseDocument_5_list{list: &x.AssertionMethod} - return protoreflect.ValueOfList(listValue) - case "did.v1.BaseDocument.capability_delegation": - if len(x.CapabilityDelegation) == 0 { - return protoreflect.ValueOfList(&_BaseDocument_7_list{}) - } - listValue := &_BaseDocument_7_list{list: &x.CapabilityDelegation} - return protoreflect.ValueOfList(listValue) - case "did.v1.BaseDocument.capability_invocation": - if len(x.CapabilityInvocation) == 0 { - return protoreflect.ValueOfList(&_BaseDocument_8_list{}) - } - listValue := &_BaseDocument_8_list{list: &x.CapabilityInvocation} - return protoreflect.ValueOfList(listValue) + case "did.v1.AssetInfo.denom": + value := x.Denom + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.asset_type": + value := x.AssetType + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_chain": + value := x.OriginChain + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.origin_denom": + value := x.OriginDenom + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.decimals": + value := x.Decimals + return protoreflect.ValueOfInt32(value) + case "did.v1.AssetInfo.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.image_url": + value := x.ImageUrl + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.coingecko_id": + value := x.CoingeckoId + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.is_enabled": + value := x.IsEnabled + return protoreflect.ValueOfBool(value) + case "did.v1.AssetInfo.ibc_path": + value := x.IbcPath + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.ibc_channel": + value := x.IbcChannel + return protoreflect.ValueOfString(value) + case "did.v1.AssetInfo.ibc_port": + value := x.IbcPort + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) } - panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", descriptor.FullName())) } } @@ -495,35 +367,41 @@ func (x *fastReflection_BaseDocument) Get(descriptor protoreflect.FieldDescripto // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BaseDocument) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.BaseDocument.id": + case "did.v1.AssetInfo.id": x.Id = value.Interface().(string) - case "did.v1.BaseDocument.verification_methods": - lv := value.List() - clv := lv.(*_BaseDocument_2_list) - x.VerificationMethods = *clv.list - case "did.v1.BaseDocument.authentication": - lv := value.List() - clv := lv.(*_BaseDocument_4_list) - x.Authentication = *clv.list - case "did.v1.BaseDocument.assertion_method": - lv := value.List() - clv := lv.(*_BaseDocument_5_list) - x.AssertionMethod = *clv.list - case "did.v1.BaseDocument.capability_delegation": - lv := value.List() - clv := lv.(*_BaseDocument_7_list) - x.CapabilityDelegation = *clv.list - case "did.v1.BaseDocument.capability_invocation": - lv := value.List() - clv := lv.(*_BaseDocument_8_list) - x.CapabilityInvocation = *clv.list + case "did.v1.AssetInfo.denom": + x.Denom = value.Interface().(string) + case "did.v1.AssetInfo.symbol": + x.Symbol = value.Interface().(string) + case "did.v1.AssetInfo.asset_type": + x.AssetType = value.Interface().(string) + case "did.v1.AssetInfo.origin_chain": + x.OriginChain = value.Interface().(string) + case "did.v1.AssetInfo.origin_denom": + x.OriginDenom = value.Interface().(string) + case "did.v1.AssetInfo.decimals": + x.Decimals = int32(value.Int()) + case "did.v1.AssetInfo.description": + x.Description = value.Interface().(string) + case "did.v1.AssetInfo.image_url": + x.ImageUrl = value.Interface().(string) + case "did.v1.AssetInfo.coingecko_id": + x.CoingeckoId = value.Interface().(string) + case "did.v1.AssetInfo.is_enabled": + x.IsEnabled = value.Bool() + case "did.v1.AssetInfo.ibc_path": + x.IbcPath = value.Interface().(string) + case "did.v1.AssetInfo.ibc_channel": + x.IbcChannel = value.Interface().(string) + case "did.v1.AssetInfo.ibc_port": + x.IbcPort = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) } - panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) } } @@ -537,85 +415,92 @@ func (x *fastReflection_BaseDocument) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BaseDocument) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.BaseDocument.verification_methods": - if x.VerificationMethods == nil { - x.VerificationMethods = []*VerificationMethod{} - } - value := &_BaseDocument_2_list{list: &x.VerificationMethods} - return protoreflect.ValueOfList(value) - case "did.v1.BaseDocument.authentication": - if x.Authentication == nil { - x.Authentication = []string{} - } - value := &_BaseDocument_4_list{list: &x.Authentication} - return protoreflect.ValueOfList(value) - case "did.v1.BaseDocument.assertion_method": - if x.AssertionMethod == nil { - x.AssertionMethod = []string{} - } - value := &_BaseDocument_5_list{list: &x.AssertionMethod} - return protoreflect.ValueOfList(value) - case "did.v1.BaseDocument.capability_delegation": - if x.CapabilityDelegation == nil { - x.CapabilityDelegation = []string{} - } - value := &_BaseDocument_7_list{list: &x.CapabilityDelegation} - return protoreflect.ValueOfList(value) - case "did.v1.BaseDocument.capability_invocation": - if x.CapabilityInvocation == nil { - x.CapabilityInvocation = []string{} - } - value := &_BaseDocument_8_list{list: &x.CapabilityInvocation} - return protoreflect.ValueOfList(value) - case "did.v1.BaseDocument.id": - panic(fmt.Errorf("field id of message did.v1.BaseDocument is not mutable")) + case "did.v1.AssetInfo.id": + panic(fmt.Errorf("field id of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.denom": + panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.symbol": + panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.asset_type": + panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_chain": + panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.origin_denom": + panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.decimals": + panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.description": + panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.image_url": + panic(fmt.Errorf("field image_url of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.coingecko_id": + panic(fmt.Errorf("field coingecko_id of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.is_enabled": + panic(fmt.Errorf("field is_enabled of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.ibc_path": + panic(fmt.Errorf("field ibc_path of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.ibc_channel": + panic(fmt.Errorf("field ibc_channel of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.ibc_port": + panic(fmt.Errorf("field ibc_port of message did.v1.AssetInfo is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) } - panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_BaseDocument) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.BaseDocument.id": + case "did.v1.AssetInfo.id": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.denom": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.symbol": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.asset_type": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_chain": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.origin_denom": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.decimals": + return protoreflect.ValueOfInt32(int32(0)) + case "did.v1.AssetInfo.description": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.image_url": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.coingecko_id": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.is_enabled": + return protoreflect.ValueOfBool(false) + case "did.v1.AssetInfo.ibc_path": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.ibc_channel": + return protoreflect.ValueOfString("") + case "did.v1.AssetInfo.ibc_port": return protoreflect.ValueOfString("") - case "did.v1.BaseDocument.verification_methods": - list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_BaseDocument_2_list{list: &list}) - case "did.v1.BaseDocument.authentication": - list := []string{} - return protoreflect.ValueOfList(&_BaseDocument_4_list{list: &list}) - case "did.v1.BaseDocument.assertion_method": - list := []string{} - return protoreflect.ValueOfList(&_BaseDocument_5_list{list: &list}) - case "did.v1.BaseDocument.capability_delegation": - list := []string{} - return protoreflect.ValueOfList(&_BaseDocument_7_list{list: &list}) - case "did.v1.BaseDocument.capability_invocation": - list := []string{} - return protoreflect.ValueOfList(&_BaseDocument_8_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.BaseDocument")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) } - panic(fmt.Errorf("message did.v1.BaseDocument does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.AssetInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_BaseDocument) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_AssetInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.BaseDocument", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.AssetInfo", d.FullName())) } panic("unreachable") } @@ -623,7 +508,7 @@ func (x *fastReflection_BaseDocument) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_BaseDocument) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_AssetInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -634,7 +519,7 @@ func (x *fastReflection_BaseDocument) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_BaseDocument) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_AssetInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -646,7 +531,7 @@ func (x *fastReflection_BaseDocument) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_BaseDocument) IsValid() bool { +func (x *fastReflection_AssetInfo) IsValid() bool { return x != nil } @@ -656,9 +541,3392 @@ func (x *fastReflection_BaseDocument) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_BaseDocument) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*BaseDocument) + x := input.Message.Interface().(*AssetInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Denom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AssetType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginChain) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.OriginDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Decimals != 0 { + n += 1 + runtime.Sov(uint64(x.Decimals)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ImageUrl) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CoingeckoId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.IsEnabled { + n += 2 + } + l = len(x.IbcPath) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.IbcChannel) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.IbcPort) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*AssetInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.IbcPort) > 0 { + i -= len(x.IbcPort) + copy(dAtA[i:], x.IbcPort) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPort))) + i-- + dAtA[i] = 0x72 + } + if len(x.IbcChannel) > 0 { + i -= len(x.IbcChannel) + copy(dAtA[i:], x.IbcChannel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcChannel))) + i-- + dAtA[i] = 0x6a + } + if len(x.IbcPath) > 0 { + i -= len(x.IbcPath) + copy(dAtA[i:], x.IbcPath) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPath))) + i-- + dAtA[i] = 0x62 + } + if x.IsEnabled { + i-- + if x.IsEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(x.CoingeckoId) > 0 { + i -= len(x.CoingeckoId) + copy(dAtA[i:], x.CoingeckoId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoingeckoId))) + i-- + dAtA[i] = 0x52 + } + if len(x.ImageUrl) > 0 { + i -= len(x.ImageUrl) + copy(dAtA[i:], x.ImageUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ImageUrl))) + i-- + dAtA[i] = 0x4a + } + if len(x.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x42 + } + if x.Decimals != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(x.OriginDenom) > 0 { + i -= len(x.OriginDenom) + copy(dAtA[i:], x.OriginDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) + i-- + dAtA[i] = 0x32 + } + if len(x.OriginChain) > 0 { + i -= len(x.OriginChain) + copy(dAtA[i:], x.OriginChain) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) + i-- + dAtA[i] = 0x2a + } + if len(x.AssetType) > 0 { + i -= len(x.AssetType) + copy(dAtA[i:], x.AssetType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) + i-- + dAtA[i] = 0x22 + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0x1a + } + if len(x.Denom) > 0 { + i -= len(x.Denom) + copy(dAtA[i:], x.Denom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*AssetInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AssetType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OriginChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.OriginDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + x.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.Decimals |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ImageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CoingeckoId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IsEnabled = bool(v != 0) + case 12: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.IbcPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.IbcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.IbcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ChainInfo_7_list)(nil) + +type _ChainInfo_7_list struct { + list *[]*Endpoint +} + +func (x *_ChainInfo_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Endpoint) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Endpoint) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { + v := new(Endpoint) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_7_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { + v := new(Endpoint) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ChainInfo_8_list)(nil) + +type _ChainInfo_8_list struct { + list *[]*Endpoint +} + +func (x *_ChainInfo_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Endpoint) + (*x.list)[i] = concreteValue +} + +func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Endpoint) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { + v := new(Endpoint) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_8_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { + v := new(Endpoint) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ChainInfo_8_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ChainInfo protoreflect.MessageDescriptor + fd_ChainInfo_id protoreflect.FieldDescriptor + fd_ChainInfo_chain_id protoreflect.FieldDescriptor + fd_ChainInfo_name protoreflect.FieldDescriptor + fd_ChainInfo_symbol protoreflect.FieldDescriptor + fd_ChainInfo_bech32_prefix protoreflect.FieldDescriptor + fd_ChainInfo_genesis_time protoreflect.FieldDescriptor + fd_ChainInfo_grpc_endpoints protoreflect.FieldDescriptor + fd_ChainInfo_rest_endpoints protoreflect.FieldDescriptor + fd_ChainInfo_explorer protoreflect.FieldDescriptor + fd_ChainInfo_fee_info protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_ChainInfo = File_did_v1_types_proto.Messages().ByName("ChainInfo") + fd_ChainInfo_id = md_ChainInfo.Fields().ByName("id") + fd_ChainInfo_chain_id = md_ChainInfo.Fields().ByName("chain_id") + fd_ChainInfo_name = md_ChainInfo.Fields().ByName("name") + fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") + fd_ChainInfo_bech32_prefix = md_ChainInfo.Fields().ByName("bech32_prefix") + fd_ChainInfo_genesis_time = md_ChainInfo.Fields().ByName("genesis_time") + fd_ChainInfo_grpc_endpoints = md_ChainInfo.Fields().ByName("grpc_endpoints") + fd_ChainInfo_rest_endpoints = md_ChainInfo.Fields().ByName("rest_endpoints") + fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") + fd_ChainInfo_fee_info = md_ChainInfo.Fields().ByName("fee_info") +} + +var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) + +type fastReflection_ChainInfo ChainInfo + +func (x *ChainInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ChainInfo)(x) +} + +func (x *ChainInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ChainInfo_messageType fastReflection_ChainInfo_messageType +var _ protoreflect.MessageType = fastReflection_ChainInfo_messageType{} + +type fastReflection_ChainInfo_messageType struct{} + +func (x fastReflection_ChainInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ChainInfo)(nil) +} +func (x fastReflection_ChainInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ChainInfo) +} +func (x fastReflection_ChainInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ChainInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ChainInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ChainInfo) Type() protoreflect.MessageType { + return _fastReflection_ChainInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ChainInfo) New() protoreflect.Message { + return new(fastReflection_ChainInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ChainInfo) Interface() protoreflect.ProtoMessage { + return (*ChainInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ChainInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_ChainInfo_id, value) { + return + } + } + if x.ChainId != "" { + value := protoreflect.ValueOfString(x.ChainId) + if !f(fd_ChainInfo_chain_id, value) { + return + } + } + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_ChainInfo_name, value) { + return + } + } + if x.Symbol != "" { + value := protoreflect.ValueOfString(x.Symbol) + if !f(fd_ChainInfo_symbol, value) { + return + } + } + if x.Bech32Prefix != "" { + value := protoreflect.ValueOfString(x.Bech32Prefix) + if !f(fd_ChainInfo_bech32_prefix, value) { + return + } + } + if x.GenesisTime != "" { + value := protoreflect.ValueOfString(x.GenesisTime) + if !f(fd_ChainInfo_genesis_time, value) { + return + } + } + if len(x.GrpcEndpoints) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.GrpcEndpoints}) + if !f(fd_ChainInfo_grpc_endpoints, value) { + return + } + } + if len(x.RestEndpoints) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.RestEndpoints}) + if !f(fd_ChainInfo_rest_endpoints, value) { + return + } + } + if x.Explorer != nil { + value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + if !f(fd_ChainInfo_explorer, value) { + return + } + } + if x.FeeInfo != nil { + value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) + if !f(fd_ChainInfo_fee_info, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + return x.Id != "" + case "did.v1.ChainInfo.chain_id": + return x.ChainId != "" + case "did.v1.ChainInfo.name": + return x.Name != "" + case "did.v1.ChainInfo.symbol": + return x.Symbol != "" + case "did.v1.ChainInfo.bech32_prefix": + return x.Bech32Prefix != "" + case "did.v1.ChainInfo.genesis_time": + return x.GenesisTime != "" + case "did.v1.ChainInfo.grpc_endpoints": + return len(x.GrpcEndpoints) != 0 + case "did.v1.ChainInfo.rest_endpoints": + return len(x.RestEndpoints) != 0 + case "did.v1.ChainInfo.explorer": + return x.Explorer != nil + case "did.v1.ChainInfo.fee_info": + return x.FeeInfo != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + x.Id = "" + case "did.v1.ChainInfo.chain_id": + x.ChainId = "" + case "did.v1.ChainInfo.name": + x.Name = "" + case "did.v1.ChainInfo.symbol": + x.Symbol = "" + case "did.v1.ChainInfo.bech32_prefix": + x.Bech32Prefix = "" + case "did.v1.ChainInfo.genesis_time": + x.GenesisTime = "" + case "did.v1.ChainInfo.grpc_endpoints": + x.GrpcEndpoints = nil + case "did.v1.ChainInfo.rest_endpoints": + x.RestEndpoints = nil + case "did.v1.ChainInfo.explorer": + x.Explorer = nil + case "did.v1.ChainInfo.fee_info": + x.FeeInfo = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ChainInfo.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.chain_id": + value := x.ChainId + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.symbol": + value := x.Symbol + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.bech32_prefix": + value := x.Bech32Prefix + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.genesis_time": + value := x.GenesisTime + return protoreflect.ValueOfString(value) + case "did.v1.ChainInfo.grpc_endpoints": + if len(x.GrpcEndpoints) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_7_list{}) + } + listValue := &_ChainInfo_7_list{list: &x.GrpcEndpoints} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.rest_endpoints": + if len(x.RestEndpoints) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_8_list{}) + } + listValue := &_ChainInfo_8_list{list: &x.RestEndpoints} + return protoreflect.ValueOfList(listValue) + case "did.v1.ChainInfo.explorer": + value := x.Explorer + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.ChainInfo.fee_info": + value := x.FeeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ChainInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + x.Id = value.Interface().(string) + case "did.v1.ChainInfo.chain_id": + x.ChainId = value.Interface().(string) + case "did.v1.ChainInfo.name": + x.Name = value.Interface().(string) + case "did.v1.ChainInfo.symbol": + x.Symbol = value.Interface().(string) + case "did.v1.ChainInfo.bech32_prefix": + x.Bech32Prefix = value.Interface().(string) + case "did.v1.ChainInfo.genesis_time": + x.GenesisTime = value.Interface().(string) + case "did.v1.ChainInfo.grpc_endpoints": + lv := value.List() + clv := lv.(*_ChainInfo_7_list) + x.GrpcEndpoints = *clv.list + case "did.v1.ChainInfo.rest_endpoints": + lv := value.List() + clv := lv.(*_ChainInfo_8_list) + x.RestEndpoints = *clv.list + case "did.v1.ChainInfo.explorer": + x.Explorer = value.Message().Interface().(*ExplorerInfo) + case "did.v1.ChainInfo.fee_info": + x.FeeInfo = value.Message().Interface().(*FeeInfo) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.grpc_endpoints": + if x.GrpcEndpoints == nil { + x.GrpcEndpoints = []*Endpoint{} + } + value := &_ChainInfo_7_list{list: &x.GrpcEndpoints} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.rest_endpoints": + if x.RestEndpoints == nil { + x.RestEndpoints = []*Endpoint{} + } + value := &_ChainInfo_8_list{list: &x.RestEndpoints} + return protoreflect.ValueOfList(value) + case "did.v1.ChainInfo.explorer": + if x.Explorer == nil { + x.Explorer = new(ExplorerInfo) + } + return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + case "did.v1.ChainInfo.fee_info": + if x.FeeInfo == nil { + x.FeeInfo = new(FeeInfo) + } + return protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) + case "did.v1.ChainInfo.id": + panic(fmt.Errorf("field id of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.chain_id": + panic(fmt.Errorf("field chain_id of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.name": + panic(fmt.Errorf("field name of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.symbol": + panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.bech32_prefix": + panic(fmt.Errorf("field bech32_prefix of message did.v1.ChainInfo is not mutable")) + case "did.v1.ChainInfo.genesis_time": + panic(fmt.Errorf("field genesis_time of message did.v1.ChainInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ChainInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ChainInfo.id": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.chain_id": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.name": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.symbol": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.bech32_prefix": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.genesis_time": + return protoreflect.ValueOfString("") + case "did.v1.ChainInfo.grpc_endpoints": + list := []*Endpoint{} + return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) + case "did.v1.ChainInfo.rest_endpoints": + list := []*Endpoint{} + return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) + case "did.v1.ChainInfo.explorer": + m := new(ExplorerInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ChainInfo.fee_info": + m := new(FeeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) + } + panic(fmt.Errorf("message did.v1.ChainInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ChainInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ChainInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ChainInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ChainInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ChainInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Symbol) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Bech32Prefix) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.GenesisTime) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.GrpcEndpoints) > 0 { + for _, e := range x.GrpcEndpoints { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RestEndpoints) > 0 { + for _, e := range x.RestEndpoints { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Explorer != nil { + l = options.Size(x.Explorer) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.FeeInfo != nil { + l = options.Size(x.FeeInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ChainInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.FeeInfo != nil { + encoded, err := options.Marshal(x.FeeInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x52 + } + if x.Explorer != nil { + encoded, err := options.Marshal(x.Explorer) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x4a + } + if len(x.RestEndpoints) > 0 { + for iNdEx := len(x.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RestEndpoints[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.GrpcEndpoints) > 0 { + for iNdEx := len(x.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.GrpcEndpoints[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.GenesisTime) > 0 { + i -= len(x.GenesisTime) + copy(dAtA[i:], x.GenesisTime) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GenesisTime))) + i-- + dAtA[i] = 0x32 + } + if len(x.Bech32Prefix) > 0 { + i -= len(x.Bech32Prefix) + copy(dAtA[i:], x.Bech32Prefix) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) + i-- + dAtA[i] = 0x2a + } + if len(x.Symbol) > 0 { + i -= len(x.Symbol) + copy(dAtA[i:], x.Symbol) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Symbol))) + i-- + dAtA[i] = 0x22 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0x1a + } + if len(x.ChainId) > 0 { + i -= len(x.ChainId) + copy(dAtA[i:], x.ChainId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ChainInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.GenesisTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.GrpcEndpoints = append(x.GrpcEndpoints, &Endpoint{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoints[len(x.GrpcEndpoints)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RestEndpoints = append(x.RestEndpoints, &Endpoint{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RestEndpoints[len(x.RestEndpoints)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Explorer == nil { + x.Explorer = &ExplorerInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.FeeInfo == nil { + x.FeeInfo = &FeeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeeInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_Credential_4_list)(nil) + +type _Credential_4_list struct { + list *[]string +} + +func (x *_Credential_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Credential_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Credential_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Credential_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Credential_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Credential at list field Transport as it is not of Message kind")) +} + +func (x *_Credential_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Credential_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Credential_4_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Credential protoreflect.MessageDescriptor + fd_Credential_id protoreflect.FieldDescriptor + fd_Credential_credential_type protoreflect.FieldDescriptor + fd_Credential_credential_id protoreflect.FieldDescriptor + fd_Credential_transport protoreflect.FieldDescriptor + fd_Credential_attestation_type protoreflect.FieldDescriptor + fd_Credential_display_name protoreflect.FieldDescriptor + fd_Credential_controller protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_Credential = File_did_v1_types_proto.Messages().ByName("Credential") + fd_Credential_id = md_Credential.Fields().ByName("id") + fd_Credential_credential_type = md_Credential.Fields().ByName("credential_type") + fd_Credential_credential_id = md_Credential.Fields().ByName("credential_id") + fd_Credential_transport = md_Credential.Fields().ByName("transport") + fd_Credential_attestation_type = md_Credential.Fields().ByName("attestation_type") + fd_Credential_display_name = md_Credential.Fields().ByName("display_name") + fd_Credential_controller = md_Credential.Fields().ByName("controller") +} + +var _ protoreflect.Message = (*fastReflection_Credential)(nil) + +type fastReflection_Credential Credential + +func (x *Credential) ProtoReflect() protoreflect.Message { + return (*fastReflection_Credential)(x) +} + +func (x *Credential) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Credential_messageType fastReflection_Credential_messageType +var _ protoreflect.MessageType = fastReflection_Credential_messageType{} + +type fastReflection_Credential_messageType struct{} + +func (x fastReflection_Credential_messageType) Zero() protoreflect.Message { + return (*fastReflection_Credential)(nil) +} +func (x fastReflection_Credential_messageType) New() protoreflect.Message { + return new(fastReflection_Credential) +} +func (x fastReflection_Credential_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Credential +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Credential) Descriptor() protoreflect.MessageDescriptor { + return md_Credential +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Credential) Type() protoreflect.MessageType { + return _fastReflection_Credential_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Credential) New() protoreflect.Message { + return new(fastReflection_Credential) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Credential) Interface() protoreflect.ProtoMessage { + return (*Credential)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Credential) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Credential_id, value) { + return + } + } + if x.CredentialType != "" { + value := protoreflect.ValueOfString(x.CredentialType) + if !f(fd_Credential_credential_type, value) { + return + } + } + if len(x.CredentialId) != 0 { + value := protoreflect.ValueOfBytes(x.CredentialId) + if !f(fd_Credential_credential_id, value) { + return + } + } + if len(x.Transport) != 0 { + value := protoreflect.ValueOfList(&_Credential_4_list{list: &x.Transport}) + if !f(fd_Credential_transport, value) { + return + } + } + if x.AttestationType != "" { + value := protoreflect.ValueOfString(x.AttestationType) + if !f(fd_Credential_attestation_type, value) { + return + } + } + if x.DisplayName != "" { + value := protoreflect.ValueOfString(x.DisplayName) + if !f(fd_Credential_display_name, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Credential_controller, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Credential) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Credential.id": + return x.Id != "" + case "did.v1.Credential.credential_type": + return x.CredentialType != "" + case "did.v1.Credential.credential_id": + return len(x.CredentialId) != 0 + case "did.v1.Credential.transport": + return len(x.Transport) != 0 + case "did.v1.Credential.attestation_type": + return x.AttestationType != "" + case "did.v1.Credential.display_name": + return x.DisplayName != "" + case "did.v1.Credential.controller": + return x.Controller != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) + } + panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Credential) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Credential.id": + x.Id = "" + case "did.v1.Credential.credential_type": + x.CredentialType = "" + case "did.v1.Credential.credential_id": + x.CredentialId = nil + case "did.v1.Credential.transport": + x.Transport = nil + case "did.v1.Credential.attestation_type": + x.AttestationType = "" + case "did.v1.Credential.display_name": + x.DisplayName = "" + case "did.v1.Credential.controller": + x.Controller = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) + } + panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Credential) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Credential.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Credential.credential_type": + value := x.CredentialType + return protoreflect.ValueOfString(value) + case "did.v1.Credential.credential_id": + value := x.CredentialId + return protoreflect.ValueOfBytes(value) + case "did.v1.Credential.transport": + if len(x.Transport) == 0 { + return protoreflect.ValueOfList(&_Credential_4_list{}) + } + listValue := &_Credential_4_list{list: &x.Transport} + return protoreflect.ValueOfList(listValue) + case "did.v1.Credential.attestation_type": + value := x.AttestationType + return protoreflect.ValueOfString(value) + case "did.v1.Credential.display_name": + value := x.DisplayName + return protoreflect.ValueOfString(value) + case "did.v1.Credential.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) + } + panic(fmt.Errorf("message did.v1.Credential does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Credential) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Credential.id": + x.Id = value.Interface().(string) + case "did.v1.Credential.credential_type": + x.CredentialType = value.Interface().(string) + case "did.v1.Credential.credential_id": + x.CredentialId = value.Bytes() + case "did.v1.Credential.transport": + lv := value.List() + clv := lv.(*_Credential_4_list) + x.Transport = *clv.list + case "did.v1.Credential.attestation_type": + x.AttestationType = value.Interface().(string) + case "did.v1.Credential.display_name": + x.DisplayName = value.Interface().(string) + case "did.v1.Credential.controller": + x.Controller = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) + } + panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Credential) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Credential.transport": + if x.Transport == nil { + x.Transport = []string{} + } + value := &_Credential_4_list{list: &x.Transport} + return protoreflect.ValueOfList(value) + case "did.v1.Credential.id": + panic(fmt.Errorf("field id of message did.v1.Credential is not mutable")) + case "did.v1.Credential.credential_type": + panic(fmt.Errorf("field credential_type of message did.v1.Credential is not mutable")) + case "did.v1.Credential.credential_id": + panic(fmt.Errorf("field credential_id of message did.v1.Credential is not mutable")) + case "did.v1.Credential.attestation_type": + panic(fmt.Errorf("field attestation_type of message did.v1.Credential is not mutable")) + case "did.v1.Credential.display_name": + panic(fmt.Errorf("field display_name of message did.v1.Credential is not mutable")) + case "did.v1.Credential.controller": + panic(fmt.Errorf("field controller of message did.v1.Credential is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) + } + panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Credential) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Credential.id": + return protoreflect.ValueOfString("") + case "did.v1.Credential.credential_type": + return protoreflect.ValueOfString("") + case "did.v1.Credential.credential_id": + return protoreflect.ValueOfBytes(nil) + case "did.v1.Credential.transport": + list := []string{} + return protoreflect.ValueOfList(&_Credential_4_list{list: &list}) + case "did.v1.Credential.attestation_type": + return protoreflect.ValueOfString("") + case "did.v1.Credential.display_name": + return protoreflect.ValueOfString("") + case "did.v1.Credential.controller": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Credential")) + } + panic(fmt.Errorf("message did.v1.Credential does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Credential) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Credential", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Credential) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Credential) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Credential) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Credential) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CredentialType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CredentialId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Transport) > 0 { + for _, s := range x.Transport { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.AttestationType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DisplayName) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Credential) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x3a + } + if len(x.DisplayName) > 0 { + i -= len(x.DisplayName) + copy(dAtA[i:], x.DisplayName) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DisplayName))) + i-- + dAtA[i] = 0x32 + } + if len(x.AttestationType) > 0 { + i -= len(x.AttestationType) + copy(dAtA[i:], x.AttestationType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AttestationType))) + i-- + dAtA[i] = 0x2a + } + if len(x.Transport) > 0 { + for iNdEx := len(x.Transport) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Transport[iNdEx]) + copy(dAtA[i:], x.Transport[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Transport[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.CredentialId) > 0 { + i -= len(x.CredentialId) + copy(dAtA[i:], x.CredentialId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) + i-- + dAtA[i] = 0x1a + } + if len(x.CredentialType) > 0 { + i -= len(x.CredentialType) + copy(dAtA[i:], x.CredentialType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialType))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Credential) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CredentialType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if x.CredentialId == nil { + x.CredentialId = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Transport = append(x.Transport, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.AttestationType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.DisplayName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_Document_2_list)(nil) + +type _Document_2_list struct { + list *[]*VerificationMethod +} + +func (x *_Document_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Document_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + (*x.list)[i] = concreteValue +} + +func (x *_Document_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_2_list) AppendMutable() protoreflect.Value { + v := new(VerificationMethod) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Document_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Document_2_list) NewElement() protoreflect.Value { + v := new(VerificationMethod) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Document_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_4_list)(nil) + +type _Document_4_list struct { + list *[]string +} + +func (x *_Document_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_4_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Authentication as it is not of Message kind")) +} + +func (x *_Document_4_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_4_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_5_list)(nil) + +type _Document_5_list struct { + list *[]string +} + +func (x *_Document_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field AssertionMethod as it is not of Message kind")) +} + +func (x *_Document_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_7_list)(nil) + +type _Document_7_list struct { + list *[]string +} + +func (x *_Document_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_7_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityDelegation as it is not of Message kind")) +} + +func (x *_Document_7_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_7_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Document_8_list)(nil) + +type _Document_8_list struct { + list *[]string +} + +func (x *_Document_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_8_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field CapabilityInvocation as it is not of Message kind")) +} + +func (x *_Document_8_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_8_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_8_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Document protoreflect.MessageDescriptor + fd_Document_id protoreflect.FieldDescriptor + fd_Document_verification_methods protoreflect.FieldDescriptor + fd_Document_authentication protoreflect.FieldDescriptor + fd_Document_assertion_method protoreflect.FieldDescriptor + fd_Document_capability_delegation protoreflect.FieldDescriptor + fd_Document_capability_invocation protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_Document = File_did_v1_types_proto.Messages().ByName("Document") + fd_Document_id = md_Document.Fields().ByName("id") + fd_Document_verification_methods = md_Document.Fields().ByName("verification_methods") + fd_Document_authentication = md_Document.Fields().ByName("authentication") + fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method") + fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation") + fd_Document_capability_invocation = md_Document.Fields().ByName("capability_invocation") +} + +var _ protoreflect.Message = (*fastReflection_Document)(nil) + +type fastReflection_Document Document + +func (x *Document) ProtoReflect() protoreflect.Message { + return (*fastReflection_Document)(x) +} + +func (x *Document) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Document_messageType fastReflection_Document_messageType +var _ protoreflect.MessageType = fastReflection_Document_messageType{} + +type fastReflection_Document_messageType struct{} + +func (x fastReflection_Document_messageType) Zero() protoreflect.Message { + return (*fastReflection_Document)(nil) +} +func (x fastReflection_Document_messageType) New() protoreflect.Message { + return new(fastReflection_Document) +} +func (x fastReflection_Document_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Document +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Document) Descriptor() protoreflect.MessageDescriptor { + return md_Document +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Document) Type() protoreflect.MessageType { + return _fastReflection_Document_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Document) New() protoreflect.Message { + return new(fastReflection_Document) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Document) Interface() protoreflect.ProtoMessage { + return (*Document)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Document_id, value) { + return + } + } + if len(x.VerificationMethods) != 0 { + value := protoreflect.ValueOfList(&_Document_2_list{list: &x.VerificationMethods}) + if !f(fd_Document_verification_methods, value) { + return + } + } + if len(x.Authentication) != 0 { + value := protoreflect.ValueOfList(&_Document_4_list{list: &x.Authentication}) + if !f(fd_Document_authentication, value) { + return + } + } + if len(x.AssertionMethod) != 0 { + value := protoreflect.ValueOfList(&_Document_5_list{list: &x.AssertionMethod}) + if !f(fd_Document_assertion_method, value) { + return + } + } + if len(x.CapabilityDelegation) != 0 { + value := protoreflect.ValueOfList(&_Document_7_list{list: &x.CapabilityDelegation}) + if !f(fd_Document_capability_delegation, value) { + return + } + } + if len(x.CapabilityInvocation) != 0 { + value := protoreflect.ValueOfList(&_Document_8_list{list: &x.CapabilityInvocation}) + if !f(fd_Document_capability_invocation, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Document.id": + return x.Id != "" + case "did.v1.Document.verification_methods": + return len(x.VerificationMethods) != 0 + case "did.v1.Document.authentication": + return len(x.Authentication) != 0 + case "did.v1.Document.assertion_method": + return len(x.AssertionMethod) != 0 + case "did.v1.Document.capability_delegation": + return len(x.CapabilityDelegation) != 0 + case "did.v1.Document.capability_invocation": + return len(x.CapabilityInvocation) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Document.id": + x.Id = "" + case "did.v1.Document.verification_methods": + x.VerificationMethods = nil + case "did.v1.Document.authentication": + x.Authentication = nil + case "did.v1.Document.assertion_method": + x.AssertionMethod = nil + case "did.v1.Document.capability_delegation": + x.CapabilityDelegation = nil + case "did.v1.Document.capability_invocation": + x.CapabilityInvocation = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Document.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Document.verification_methods": + if len(x.VerificationMethods) == 0 { + return protoreflect.ValueOfList(&_Document_2_list{}) + } + listValue := &_Document_2_list{list: &x.VerificationMethods} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.authentication": + if len(x.Authentication) == 0 { + return protoreflect.ValueOfList(&_Document_4_list{}) + } + listValue := &_Document_4_list{list: &x.Authentication} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.assertion_method": + if len(x.AssertionMethod) == 0 { + return protoreflect.ValueOfList(&_Document_5_list{}) + } + listValue := &_Document_5_list{list: &x.AssertionMethod} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.capability_delegation": + if len(x.CapabilityDelegation) == 0 { + return protoreflect.ValueOfList(&_Document_7_list{}) + } + listValue := &_Document_7_list{list: &x.CapabilityDelegation} + return protoreflect.ValueOfList(listValue) + case "did.v1.Document.capability_invocation": + if len(x.CapabilityInvocation) == 0 { + return protoreflect.ValueOfList(&_Document_8_list{}) + } + listValue := &_Document_8_list{list: &x.CapabilityInvocation} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Document.id": + x.Id = value.Interface().(string) + case "did.v1.Document.verification_methods": + lv := value.List() + clv := lv.(*_Document_2_list) + x.VerificationMethods = *clv.list + case "did.v1.Document.authentication": + lv := value.List() + clv := lv.(*_Document_4_list) + x.Authentication = *clv.list + case "did.v1.Document.assertion_method": + lv := value.List() + clv := lv.(*_Document_5_list) + x.AssertionMethod = *clv.list + case "did.v1.Document.capability_delegation": + lv := value.List() + clv := lv.(*_Document_7_list) + x.CapabilityDelegation = *clv.list + case "did.v1.Document.capability_invocation": + lv := value.List() + clv := lv.(*_Document_8_list) + x.CapabilityInvocation = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Document.verification_methods": + if x.VerificationMethods == nil { + x.VerificationMethods = []*VerificationMethod{} + } + value := &_Document_2_list{list: &x.VerificationMethods} + return protoreflect.ValueOfList(value) + case "did.v1.Document.authentication": + if x.Authentication == nil { + x.Authentication = []string{} + } + value := &_Document_4_list{list: &x.Authentication} + return protoreflect.ValueOfList(value) + case "did.v1.Document.assertion_method": + if x.AssertionMethod == nil { + x.AssertionMethod = []string{} + } + value := &_Document_5_list{list: &x.AssertionMethod} + return protoreflect.ValueOfList(value) + case "did.v1.Document.capability_delegation": + if x.CapabilityDelegation == nil { + x.CapabilityDelegation = []string{} + } + value := &_Document_7_list{list: &x.CapabilityDelegation} + return protoreflect.ValueOfList(value) + case "did.v1.Document.capability_invocation": + if x.CapabilityInvocation == nil { + x.CapabilityInvocation = []string{} + } + value := &_Document_8_list{list: &x.CapabilityInvocation} + return protoreflect.ValueOfList(value) + case "did.v1.Document.id": + panic(fmt.Errorf("field id of message did.v1.Document is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Document.id": + return protoreflect.ValueOfString("") + case "did.v1.Document.verification_methods": + list := []*VerificationMethod{} + return protoreflect.ValueOfList(&_Document_2_list{list: &list}) + case "did.v1.Document.authentication": + list := []string{} + return protoreflect.ValueOfList(&_Document_4_list{list: &list}) + case "did.v1.Document.assertion_method": + list := []string{} + return protoreflect.ValueOfList(&_Document_5_list{list: &list}) + case "did.v1.Document.capability_delegation": + list := []string{} + return protoreflect.ValueOfList(&_Document_7_list{list: &list}) + case "did.v1.Document.capability_invocation": + list := []string{} + return protoreflect.ValueOfList(&_Document_8_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) + } + panic(fmt.Errorf("message did.v1.Document does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Document) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Document", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Document) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Document) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Document) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Document) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -714,7 +3982,7 @@ func (x *fastReflection_BaseDocument) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*BaseDocument) + x := input.Message.Interface().(*Document) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -803,7 +4071,7 @@ func (x *fastReflection_BaseDocument) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*BaseDocument) + x := input.Message.Interface().(*Document) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -835,10 +4103,10 @@ func (x *fastReflection_BaseDocument) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BaseDocument: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: BaseDocument: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1070,6 +4338,3089 @@ func (x *fastReflection_BaseDocument) ProtoMethods() *protoiface.Methods { } } +var ( + md_Endpoint protoreflect.MessageDescriptor + fd_Endpoint_url protoreflect.FieldDescriptor + fd_Endpoint_is_primary protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_Endpoint = File_did_v1_types_proto.Messages().ByName("Endpoint") + fd_Endpoint_url = md_Endpoint.Fields().ByName("url") + fd_Endpoint_is_primary = md_Endpoint.Fields().ByName("is_primary") +} + +var _ protoreflect.Message = (*fastReflection_Endpoint)(nil) + +type fastReflection_Endpoint Endpoint + +func (x *Endpoint) ProtoReflect() protoreflect.Message { + return (*fastReflection_Endpoint)(x) +} + +func (x *Endpoint) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Endpoint_messageType fastReflection_Endpoint_messageType +var _ protoreflect.MessageType = fastReflection_Endpoint_messageType{} + +type fastReflection_Endpoint_messageType struct{} + +func (x fastReflection_Endpoint_messageType) Zero() protoreflect.Message { + return (*fastReflection_Endpoint)(nil) +} +func (x fastReflection_Endpoint_messageType) New() protoreflect.Message { + return new(fastReflection_Endpoint) +} +func (x fastReflection_Endpoint_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Endpoint +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Endpoint) Descriptor() protoreflect.MessageDescriptor { + return md_Endpoint +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Endpoint) Type() protoreflect.MessageType { + return _fastReflection_Endpoint_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Endpoint) New() protoreflect.Message { + return new(fastReflection_Endpoint) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Endpoint) Interface() protoreflect.ProtoMessage { + return (*Endpoint)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Endpoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_Endpoint_url, value) { + return + } + } + if x.IsPrimary != false { + value := protoreflect.ValueOfBool(x.IsPrimary) + if !f(fd_Endpoint_is_primary, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Endpoint) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Endpoint.url": + return x.Url != "" + case "did.v1.Endpoint.is_primary": + return x.IsPrimary != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) + } + panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Endpoint) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Endpoint.url": + x.Url = "" + case "did.v1.Endpoint.is_primary": + x.IsPrimary = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) + } + panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Endpoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Endpoint.url": + value := x.Url + return protoreflect.ValueOfString(value) + case "did.v1.Endpoint.is_primary": + value := x.IsPrimary + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) + } + panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Endpoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Endpoint.url": + x.Url = value.Interface().(string) + case "did.v1.Endpoint.is_primary": + x.IsPrimary = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) + } + panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Endpoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Endpoint.url": + panic(fmt.Errorf("field url of message did.v1.Endpoint is not mutable")) + case "did.v1.Endpoint.is_primary": + panic(fmt.Errorf("field is_primary of message did.v1.Endpoint is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) + } + panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Endpoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Endpoint.url": + return protoreflect.ValueOfString("") + case "did.v1.Endpoint.is_primary": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Endpoint")) + } + panic(fmt.Errorf("message did.v1.Endpoint does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Endpoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Endpoint", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Endpoint) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Endpoint) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Endpoint) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Endpoint) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Endpoint) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Url) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.IsPrimary { + n += 2 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Endpoint) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.IsPrimary { + i-- + if x.IsPrimary { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(x.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Endpoint) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IsPrimary = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_ExplorerInfo protoreflect.MessageDescriptor + fd_ExplorerInfo_name protoreflect.FieldDescriptor + fd_ExplorerInfo_url protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_ExplorerInfo = File_did_v1_types_proto.Messages().ByName("ExplorerInfo") + fd_ExplorerInfo_name = md_ExplorerInfo.Fields().ByName("name") + fd_ExplorerInfo_url = md_ExplorerInfo.Fields().ByName("url") +} + +var _ protoreflect.Message = (*fastReflection_ExplorerInfo)(nil) + +type fastReflection_ExplorerInfo ExplorerInfo + +func (x *ExplorerInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ExplorerInfo)(x) +} + +func (x *ExplorerInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_ExplorerInfo_messageType fastReflection_ExplorerInfo_messageType +var _ protoreflect.MessageType = fastReflection_ExplorerInfo_messageType{} + +type fastReflection_ExplorerInfo_messageType struct{} + +func (x fastReflection_ExplorerInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ExplorerInfo)(nil) +} +func (x fastReflection_ExplorerInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ExplorerInfo) +} +func (x fastReflection_ExplorerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ExplorerInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ExplorerInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ExplorerInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ExplorerInfo) Type() protoreflect.MessageType { + return _fastReflection_ExplorerInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ExplorerInfo) New() protoreflect.Message { + return new(fastReflection_ExplorerInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ExplorerInfo) Interface() protoreflect.ProtoMessage { + return (*ExplorerInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_ExplorerInfo_name, value) { + return + } + } + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_ExplorerInfo_url, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ExplorerInfo.name": + return x.Name != "" + case "did.v1.ExplorerInfo.url": + return x.Url != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ExplorerInfo.name": + x.Name = "" + case "did.v1.ExplorerInfo.url": + x.Url = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ExplorerInfo.name": + value := x.Name + return protoreflect.ValueOfString(value) + case "did.v1.ExplorerInfo.url": + value := x.Url + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ExplorerInfo.name": + x.Name = value.Interface().(string) + case "did.v1.ExplorerInfo.url": + x.Url = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ExplorerInfo.name": + panic(fmt.Errorf("field name of message did.v1.ExplorerInfo is not mutable")) + case "did.v1.ExplorerInfo.url": + panic(fmt.Errorf("field url of message did.v1.ExplorerInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ExplorerInfo.name": + return protoreflect.ValueOfString("") + case "did.v1.ExplorerInfo.url": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ExplorerInfo")) + } + panic(fmt.Errorf("message did.v1.ExplorerInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ExplorerInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ExplorerInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ExplorerInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ExplorerInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ExplorerInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ExplorerInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Name) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Url) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*ExplorerInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Url) > 0 { + i -= len(x.Url) + copy(dAtA[i:], x.Url) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Url))) + i-- + dAtA[i] = 0x12 + } + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*ExplorerInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExplorerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_FeeInfo_2_list)(nil) + +type _FeeInfo_2_list struct { + list *[]string +} + +func (x *_FeeInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_FeeInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_FeeInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_FeeInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_FeeInfo_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message FeeInfo at list field FeeRates as it is not of Message kind")) +} + +func (x *_FeeInfo_2_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_FeeInfo_2_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_FeeInfo_2_list) IsValid() bool { + return x.list != nil +} + +var ( + md_FeeInfo protoreflect.MessageDescriptor + fd_FeeInfo_base_denom protoreflect.FieldDescriptor + fd_FeeInfo_fee_rates protoreflect.FieldDescriptor + fd_FeeInfo_init_gas_limit protoreflect.FieldDescriptor + fd_FeeInfo_is_simulable protoreflect.FieldDescriptor + fd_FeeInfo_gas_multiply protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_FeeInfo = File_did_v1_types_proto.Messages().ByName("FeeInfo") + fd_FeeInfo_base_denom = md_FeeInfo.Fields().ByName("base_denom") + fd_FeeInfo_fee_rates = md_FeeInfo.Fields().ByName("fee_rates") + fd_FeeInfo_init_gas_limit = md_FeeInfo.Fields().ByName("init_gas_limit") + fd_FeeInfo_is_simulable = md_FeeInfo.Fields().ByName("is_simulable") + fd_FeeInfo_gas_multiply = md_FeeInfo.Fields().ByName("gas_multiply") +} + +var _ protoreflect.Message = (*fastReflection_FeeInfo)(nil) + +type fastReflection_FeeInfo FeeInfo + +func (x *FeeInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_FeeInfo)(x) +} + +func (x *FeeInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_FeeInfo_messageType fastReflection_FeeInfo_messageType +var _ protoreflect.MessageType = fastReflection_FeeInfo_messageType{} + +type fastReflection_FeeInfo_messageType struct{} + +func (x fastReflection_FeeInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_FeeInfo)(nil) +} +func (x fastReflection_FeeInfo_messageType) New() protoreflect.Message { + return new(fastReflection_FeeInfo) +} +func (x fastReflection_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_FeeInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_FeeInfo) Descriptor() protoreflect.MessageDescriptor { + return md_FeeInfo +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_FeeInfo) Type() protoreflect.MessageType { + return _fastReflection_FeeInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_FeeInfo) New() protoreflect.Message { + return new(fastReflection_FeeInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_FeeInfo) Interface() protoreflect.ProtoMessage { + return (*FeeInfo)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.BaseDenom != "" { + value := protoreflect.ValueOfString(x.BaseDenom) + if !f(fd_FeeInfo_base_denom, value) { + return + } + } + if len(x.FeeRates) != 0 { + value := protoreflect.ValueOfList(&_FeeInfo_2_list{list: &x.FeeRates}) + if !f(fd_FeeInfo_fee_rates, value) { + return + } + } + if x.InitGasLimit != int32(0) { + value := protoreflect.ValueOfInt32(x.InitGasLimit) + if !f(fd_FeeInfo_init_gas_limit, value) { + return + } + } + if x.IsSimulable != false { + value := protoreflect.ValueOfBool(x.IsSimulable) + if !f(fd_FeeInfo_is_simulable, value) { + return + } + } + if x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) { + value := protoreflect.ValueOfFloat64(x.GasMultiply) + if !f(fd_FeeInfo_gas_multiply, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.FeeInfo.base_denom": + return x.BaseDenom != "" + case "did.v1.FeeInfo.fee_rates": + return len(x.FeeRates) != 0 + case "did.v1.FeeInfo.init_gas_limit": + return x.InitGasLimit != int32(0) + case "did.v1.FeeInfo.is_simulable": + return x.IsSimulable != false + case "did.v1.FeeInfo.gas_multiply": + return x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.FeeInfo.base_denom": + x.BaseDenom = "" + case "did.v1.FeeInfo.fee_rates": + x.FeeRates = nil + case "did.v1.FeeInfo.init_gas_limit": + x.InitGasLimit = int32(0) + case "did.v1.FeeInfo.is_simulable": + x.IsSimulable = false + case "did.v1.FeeInfo.gas_multiply": + x.GasMultiply = float64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.FeeInfo.base_denom": + value := x.BaseDenom + return protoreflect.ValueOfString(value) + case "did.v1.FeeInfo.fee_rates": + if len(x.FeeRates) == 0 { + return protoreflect.ValueOfList(&_FeeInfo_2_list{}) + } + listValue := &_FeeInfo_2_list{list: &x.FeeRates} + return protoreflect.ValueOfList(listValue) + case "did.v1.FeeInfo.init_gas_limit": + value := x.InitGasLimit + return protoreflect.ValueOfInt32(value) + case "did.v1.FeeInfo.is_simulable": + value := x.IsSimulable + return protoreflect.ValueOfBool(value) + case "did.v1.FeeInfo.gas_multiply": + value := x.GasMultiply + return protoreflect.ValueOfFloat64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.FeeInfo.base_denom": + x.BaseDenom = value.Interface().(string) + case "did.v1.FeeInfo.fee_rates": + lv := value.List() + clv := lv.(*_FeeInfo_2_list) + x.FeeRates = *clv.list + case "did.v1.FeeInfo.init_gas_limit": + x.InitGasLimit = int32(value.Int()) + case "did.v1.FeeInfo.is_simulable": + x.IsSimulable = value.Bool() + case "did.v1.FeeInfo.gas_multiply": + x.GasMultiply = value.Float() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.FeeInfo.fee_rates": + if x.FeeRates == nil { + x.FeeRates = []string{} + } + value := &_FeeInfo_2_list{list: &x.FeeRates} + return protoreflect.ValueOfList(value) + case "did.v1.FeeInfo.base_denom": + panic(fmt.Errorf("field base_denom of message did.v1.FeeInfo is not mutable")) + case "did.v1.FeeInfo.init_gas_limit": + panic(fmt.Errorf("field init_gas_limit of message did.v1.FeeInfo is not mutable")) + case "did.v1.FeeInfo.is_simulable": + panic(fmt.Errorf("field is_simulable of message did.v1.FeeInfo is not mutable")) + case "did.v1.FeeInfo.gas_multiply": + panic(fmt.Errorf("field gas_multiply of message did.v1.FeeInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.FeeInfo.base_denom": + return protoreflect.ValueOfString("") + case "did.v1.FeeInfo.fee_rates": + list := []string{} + return protoreflect.ValueOfList(&_FeeInfo_2_list{list: &list}) + case "did.v1.FeeInfo.init_gas_limit": + return protoreflect.ValueOfInt32(int32(0)) + case "did.v1.FeeInfo.is_simulable": + return protoreflect.ValueOfBool(false) + case "did.v1.FeeInfo.gas_multiply": + return protoreflect.ValueOfFloat64(float64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.FeeInfo")) + } + panic(fmt.Errorf("message did.v1.FeeInfo does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.FeeInfo", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_FeeInfo) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_FeeInfo) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_FeeInfo) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_FeeInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*FeeInfo) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.BaseDenom) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.FeeRates) > 0 { + for _, s := range x.FeeRates { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.InitGasLimit != 0 { + n += 1 + runtime.Sov(uint64(x.InitGasLimit)) + } + if x.IsSimulable { + n += 2 + } + if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { + n += 9 + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*FeeInfo) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.GasMultiply != 0 || math.Signbit(x.GasMultiply) { + i -= 8 + binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(x.GasMultiply)))) + i-- + dAtA[i] = 0x29 + } + if x.IsSimulable { + i-- + if x.IsSimulable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if x.InitGasLimit != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.InitGasLimit)) + i-- + dAtA[i] = 0x18 + } + if len(x.FeeRates) > 0 { + for iNdEx := len(x.FeeRates) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.FeeRates[iNdEx]) + copy(dAtA[i:], x.FeeRates[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.FeeRates[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.BaseDenom) > 0 { + i -= len(x.BaseDenom) + copy(dAtA[i:], x.BaseDenom) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.BaseDenom))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*FeeInfo) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.FeeRates = append(x.FeeRates, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) + } + x.InitGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.InitGasLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.IsSimulable = bool(v != 0) + case 5: + if wireType != 1 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + v = uint64(binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + x.GasMultiply = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_Identity_4_list)(nil) + +type _Identity_4_list struct { + list *[]*Credential +} + +func (x *_Identity_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Identity_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Identity_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + (*x.list)[i] = concreteValue +} + +func (x *_Identity_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Identity_4_list) AppendMutable() protoreflect.Value { + v := new(Credential) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Identity_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Identity_4_list) NewElement() protoreflect.Value { + v := new(Credential) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Identity_4_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_Identity_5_list)(nil) + +type _Identity_5_list struct { + list *[]*VerificationMethod +} + +func (x *_Identity_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Identity_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_Identity_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + (*x.list)[i] = concreteValue +} + +func (x *_Identity_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*VerificationMethod) + *x.list = append(*x.list, concreteValue) +} + +func (x *_Identity_5_list) AppendMutable() protoreflect.Value { + v := new(VerificationMethod) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Identity_5_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_Identity_5_list) NewElement() protoreflect.Value { + v := new(VerificationMethod) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_Identity_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Identity protoreflect.MessageDescriptor + fd_Identity_id protoreflect.FieldDescriptor + fd_Identity_subject protoreflect.FieldDescriptor + fd_Identity_controller protoreflect.FieldDescriptor + fd_Identity_credentials protoreflect.FieldDescriptor + fd_Identity_verification_methods protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_Identity = File_did_v1_types_proto.Messages().ByName("Identity") + fd_Identity_id = md_Identity.Fields().ByName("id") + fd_Identity_subject = md_Identity.Fields().ByName("subject") + fd_Identity_controller = md_Identity.Fields().ByName("controller") + fd_Identity_credentials = md_Identity.Fields().ByName("credentials") + fd_Identity_verification_methods = md_Identity.Fields().ByName("verification_methods") +} + +var _ protoreflect.Message = (*fastReflection_Identity)(nil) + +type fastReflection_Identity Identity + +func (x *Identity) ProtoReflect() protoreflect.Message { + return (*fastReflection_Identity)(x) +} + +func (x *Identity) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Identity_messageType fastReflection_Identity_messageType +var _ protoreflect.MessageType = fastReflection_Identity_messageType{} + +type fastReflection_Identity_messageType struct{} + +func (x fastReflection_Identity_messageType) Zero() protoreflect.Message { + return (*fastReflection_Identity)(nil) +} +func (x fastReflection_Identity_messageType) New() protoreflect.Message { + return new(fastReflection_Identity) +} +func (x fastReflection_Identity_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Identity +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Identity) Descriptor() protoreflect.MessageDescriptor { + return md_Identity +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_Identity) Type() protoreflect.MessageType { + return _fastReflection_Identity_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Identity) New() protoreflect.Message { + return new(fastReflection_Identity) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Identity) Interface() protoreflect.ProtoMessage { + return (*Identity)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_Identity) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Identity_id, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Identity_subject, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Identity_controller, value) { + return + } + } + if len(x.Credentials) != 0 { + value := protoreflect.ValueOfList(&_Identity_4_list{list: &x.Credentials}) + if !f(fd_Identity_credentials, value) { + return + } + } + if len(x.VerificationMethods) != 0 { + value := protoreflect.ValueOfList(&_Identity_5_list{list: &x.VerificationMethods}) + if !f(fd_Identity_verification_methods, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Identity) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Identity.id": + return x.Id != "" + case "did.v1.Identity.subject": + return x.Subject != "" + case "did.v1.Identity.controller": + return x.Controller != "" + case "did.v1.Identity.credentials": + return len(x.Credentials) != 0 + case "did.v1.Identity.verification_methods": + return len(x.VerificationMethods) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + } + panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Identity) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Identity.id": + x.Id = "" + case "did.v1.Identity.subject": + x.Subject = "" + case "did.v1.Identity.controller": + x.Controller = "" + case "did.v1.Identity.credentials": + x.Credentials = nil + case "did.v1.Identity.verification_methods": + x.VerificationMethods = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + } + panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_Identity) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Identity.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Identity.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.Identity.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.Identity.credentials": + if len(x.Credentials) == 0 { + return protoreflect.ValueOfList(&_Identity_4_list{}) + } + listValue := &_Identity_4_list{list: &x.Credentials} + return protoreflect.ValueOfList(listValue) + case "did.v1.Identity.verification_methods": + if len(x.VerificationMethods) == 0 { + return protoreflect.ValueOfList(&_Identity_5_list{}) + } + listValue := &_Identity_5_list{list: &x.VerificationMethods} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + } + panic(fmt.Errorf("message did.v1.Identity does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Identity) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Identity.id": + x.Id = value.Interface().(string) + case "did.v1.Identity.subject": + x.Subject = value.Interface().(string) + case "did.v1.Identity.controller": + x.Controller = value.Interface().(string) + case "did.v1.Identity.credentials": + lv := value.List() + clv := lv.(*_Identity_4_list) + x.Credentials = *clv.list + case "did.v1.Identity.verification_methods": + lv := value.List() + clv := lv.(*_Identity_5_list) + x.VerificationMethods = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + } + panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Identity) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Identity.credentials": + if x.Credentials == nil { + x.Credentials = []*Credential{} + } + value := &_Identity_4_list{list: &x.Credentials} + return protoreflect.ValueOfList(value) + case "did.v1.Identity.verification_methods": + if x.VerificationMethods == nil { + x.VerificationMethods = []*VerificationMethod{} + } + value := &_Identity_5_list{list: &x.VerificationMethods} + return protoreflect.ValueOfList(value) + case "did.v1.Identity.id": + panic(fmt.Errorf("field id of message did.v1.Identity is not mutable")) + case "did.v1.Identity.subject": + panic(fmt.Errorf("field subject of message did.v1.Identity is not mutable")) + case "did.v1.Identity.controller": + panic(fmt.Errorf("field controller of message did.v1.Identity is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + } + panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_Identity) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Identity.id": + return protoreflect.ValueOfString("") + case "did.v1.Identity.subject": + return protoreflect.ValueOfString("") + case "did.v1.Identity.controller": + return protoreflect.ValueOfString("") + case "did.v1.Identity.credentials": + list := []*Credential{} + return protoreflect.ValueOfList(&_Identity_4_list{list: &list}) + case "did.v1.Identity.verification_methods": + list := []*VerificationMethod{} + return protoreflect.ValueOfList(&_Identity_5_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Identity")) + } + panic(fmt.Errorf("message did.v1.Identity does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_Identity) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Identity", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_Identity) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_Identity) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_Identity) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_Identity) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Identity) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Credentials) > 0 { + for _, e := range x.Credentials { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.VerificationMethods) > 0 { + for _, e := range x.VerificationMethods { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Identity) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.VerificationMethods) > 0 { + for iNdEx := len(x.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.VerificationMethods[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.Credentials) > 0 { + for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Credentials[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x1a + } + if len(x.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Identity) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Identity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Credentials = append(x.Credentials, &Credential{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.VerificationMethods = append(x.VerificationMethods, &VerificationMethod{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethods[len(x.VerificationMethods)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_PubKey protoreflect.MessageDescriptor + fd_PubKey_id protoreflect.FieldDescriptor + fd_PubKey_key protoreflect.FieldDescriptor + fd_PubKey_key_type protoreflect.FieldDescriptor + fd_PubKey_controller protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_types_proto_init() + md_PubKey = File_did_v1_types_proto.Messages().ByName("PubKey") + fd_PubKey_id = md_PubKey.Fields().ByName("id") + fd_PubKey_key = md_PubKey.Fields().ByName("key") + fd_PubKey_key_type = md_PubKey.Fields().ByName("key_type") + fd_PubKey_controller = md_PubKey.Fields().ByName("controller") +} + +var _ protoreflect.Message = (*fastReflection_PubKey)(nil) + +type fastReflection_PubKey PubKey + +func (x *PubKey) ProtoReflect() protoreflect.Message { + return (*fastReflection_PubKey)(x) +} + +func (x *PubKey) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_types_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_PubKey_messageType fastReflection_PubKey_messageType +var _ protoreflect.MessageType = fastReflection_PubKey_messageType{} + +type fastReflection_PubKey_messageType struct{} + +func (x fastReflection_PubKey_messageType) Zero() protoreflect.Message { + return (*fastReflection_PubKey)(nil) +} +func (x fastReflection_PubKey_messageType) New() protoreflect.Message { + return new(fastReflection_PubKey) +} +func (x fastReflection_PubKey_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_PubKey) Descriptor() protoreflect.MessageDescriptor { + return md_PubKey +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_PubKey) Type() protoreflect.MessageType { + return _fastReflection_PubKey_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_PubKey) New() protoreflect.Message { + return new(fastReflection_PubKey) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { + return (*PubKey)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_PubKey_id, value) { + return + } + } + if len(x.Key) != 0 { + value := protoreflect.ValueOfBytes(x.Key) + if !f(fd_PubKey_key, value) { + return + } + } + if x.KeyType != "" { + value := protoreflect.ValueOfString(x.KeyType) + if !f(fd_PubKey_key_type, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_PubKey_controller, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.PubKey.id": + return x.Id != "" + case "did.v1.PubKey.key": + return len(x.Key) != 0 + case "did.v1.PubKey.key_type": + return x.KeyType != "" + case "did.v1.PubKey.controller": + return x.Controller != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) + } + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.PubKey.id": + x.Id = "" + case "did.v1.PubKey.key": + x.Key = nil + case "did.v1.PubKey.key_type": + x.KeyType = "" + case "did.v1.PubKey.controller": + x.Controller = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) + } + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.PubKey.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.key": + value := x.Key + return protoreflect.ValueOfBytes(value) + case "did.v1.PubKey.key_type": + value := x.KeyType + return protoreflect.ValueOfString(value) + case "did.v1.PubKey.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) + } + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.PubKey.id": + x.Id = value.Interface().(string) + case "did.v1.PubKey.key": + x.Key = value.Bytes() + case "did.v1.PubKey.key_type": + x.KeyType = value.Interface().(string) + case "did.v1.PubKey.controller": + x.Controller = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) + } + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.PubKey.id": + panic(fmt.Errorf("field id of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.key": + panic(fmt.Errorf("field key of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.key_type": + panic(fmt.Errorf("field key_type of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.controller": + panic(fmt.Errorf("field controller of message did.v1.PubKey is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) + } + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.PubKey.id": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.key": + return protoreflect.ValueOfBytes(nil) + case "did.v1.PubKey.key_type": + return protoreflect.ValueOfString("") + case "did.v1.PubKey.controller": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) + } + panic(fmt.Errorf("message did.v1.PubKey does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_PubKey) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.PubKey", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_PubKey) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_PubKey) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_PubKey) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*PubKey) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Key) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.KeyType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*PubKey) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0x22 + } + if len(x.KeyType) > 0 { + i -= len(x.KeyType) + copy(dAtA[i:], x.KeyType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.KeyType))) + i-- + dAtA[i] = 0x1a + } + if len(x.Key) > 0 { + i -= len(x.Key) + copy(dAtA[i:], x.Key) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + i-- + dAtA[i] = 0x12 + } + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*PubKey) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) + if x.Key == nil { + x.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.KeyType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var _ protoreflect.Map = (*_VerificationMethod_4_map)(nil) type _VerificationMethod_4_map struct { @@ -1178,7 +7529,7 @@ func (x *VerificationMethod) ProtoReflect() protoreflect.Message { } func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_types_proto_msgTypes[1] + mi := &file_did_v1_types_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1935,8 +8286,340 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// BaseDocument defines a DID document -type BaseDocument struct { +// AssetInfo defines the asset info +type AssetInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` + OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` + Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` + CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` + IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` + IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` + IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` + IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` +} + +func (x *AssetInfo) Reset() { + *x = AssetInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AssetInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AssetInfo) ProtoMessage() {} + +// Deprecated: Use AssetInfo.ProtoReflect.Descriptor instead. +func (*AssetInfo) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{0} +} + +func (x *AssetInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *AssetInfo) GetDenom() string { + if x != nil { + return x.Denom + } + return "" +} + +func (x *AssetInfo) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *AssetInfo) GetAssetType() string { + if x != nil { + return x.AssetType + } + return "" +} + +func (x *AssetInfo) GetOriginChain() string { + if x != nil { + return x.OriginChain + } + return "" +} + +func (x *AssetInfo) GetOriginDenom() string { + if x != nil { + return x.OriginDenom + } + return "" +} + +func (x *AssetInfo) GetDecimals() int32 { + if x != nil { + return x.Decimals + } + return 0 +} + +func (x *AssetInfo) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *AssetInfo) GetImageUrl() string { + if x != nil { + return x.ImageUrl + } + return "" +} + +func (x *AssetInfo) GetCoingeckoId() string { + if x != nil { + return x.CoingeckoId + } + return "" +} + +func (x *AssetInfo) GetIsEnabled() bool { + if x != nil { + return x.IsEnabled + } + return false +} + +func (x *AssetInfo) GetIbcPath() string { + if x != nil { + return x.IbcPath + } + return "" +} + +func (x *AssetInfo) GetIbcChannel() string { + if x != nil { + return x.IbcChannel + } + return "" +} + +func (x *AssetInfo) GetIbcPort() string { + if x != nil { + return x.IbcPort + } + return "" +} + +// ChainInfo defines the chain info +type ChainInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` + GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` + RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` + Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` +} + +func (x *ChainInfo) Reset() { + *x = ChainInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ChainInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ChainInfo) ProtoMessage() {} + +// Deprecated: Use ChainInfo.ProtoReflect.Descriptor instead. +func (*ChainInfo) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{1} +} + +func (x *ChainInfo) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ChainInfo) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +func (x *ChainInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ChainInfo) GetSymbol() string { + if x != nil { + return x.Symbol + } + return "" +} + +func (x *ChainInfo) GetBech32Prefix() string { + if x != nil { + return x.Bech32Prefix + } + return "" +} + +func (x *ChainInfo) GetGenesisTime() string { + if x != nil { + return x.GenesisTime + } + return "" +} + +func (x *ChainInfo) GetGrpcEndpoints() []*Endpoint { + if x != nil { + return x.GrpcEndpoints + } + return nil +} + +func (x *ChainInfo) GetRestEndpoints() []*Endpoint { + if x != nil { + return x.RestEndpoints + } + return nil +} + +func (x *ChainInfo) GetExplorer() *ExplorerInfo { + if x != nil { + return x.Explorer + } + return nil +} + +func (x *ChainInfo) GetFeeInfo() *FeeInfo { + if x != nil { + return x.FeeInfo + } + return nil +} + +// Credential defines a WebAuthn credential +type Credential struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` + CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` + AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` + DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (x *Credential) Reset() { + *x = Credential{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Credential) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Credential) ProtoMessage() {} + +// Deprecated: Use Credential.ProtoReflect.Descriptor instead. +func (*Credential) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{2} +} + +func (x *Credential) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Credential) GetCredentialType() string { + if x != nil { + return x.CredentialType + } + return "" +} + +func (x *Credential) GetCredentialId() []byte { + if x != nil { + return x.CredentialId + } + return nil +} + +func (x *Credential) GetTransport() []string { + if x != nil { + return x.Transport + } + return nil +} + +func (x *Credential) GetAttestationType() string { + if x != nil { + return x.AttestationType + } + return "" +} + +func (x *Credential) GetDisplayName() string { + if x != nil { + return x.DisplayName + } + return "" +} + +func (x *Credential) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +// Document defines a DID document +type Document struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1949,68 +8632,352 @@ type BaseDocument struct { CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` } -func (x *BaseDocument) Reset() { - *x = BaseDocument{} +func (x *Document) Reset() { + *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[0] + mi := &file_did_v1_types_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BaseDocument) String() string { +func (x *Document) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BaseDocument) ProtoMessage() {} +func (*Document) ProtoMessage() {} -// Deprecated: Use BaseDocument.ProtoReflect.Descriptor instead. -func (*BaseDocument) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{0} +// Deprecated: Use Document.ProtoReflect.Descriptor instead. +func (*Document) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{3} } -func (x *BaseDocument) GetId() string { +func (x *Document) GetId() string { if x != nil { return x.Id } return "" } -func (x *BaseDocument) GetVerificationMethods() []*VerificationMethod { +func (x *Document) GetVerificationMethods() []*VerificationMethod { if x != nil { return x.VerificationMethods } return nil } -func (x *BaseDocument) GetAuthentication() []string { +func (x *Document) GetAuthentication() []string { if x != nil { return x.Authentication } return nil } -func (x *BaseDocument) GetAssertionMethod() []string { +func (x *Document) GetAssertionMethod() []string { if x != nil { return x.AssertionMethod } return nil } -func (x *BaseDocument) GetCapabilityDelegation() []string { +func (x *Document) GetCapabilityDelegation() []string { if x != nil { return x.CapabilityDelegation } return nil } -func (x *BaseDocument) GetCapabilityInvocation() []string { +func (x *Document) GetCapabilityInvocation() []string { if x != nil { return x.CapabilityInvocation } return nil } +// Endpoint defines an endpoint +type Endpoint struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` +} + +func (x *Endpoint) Reset() { + *x = Endpoint{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Endpoint) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Endpoint) ProtoMessage() {} + +// Deprecated: Use Endpoint.ProtoReflect.Descriptor instead. +func (*Endpoint) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{4} +} + +func (x *Endpoint) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +func (x *Endpoint) GetIsPrimary() bool { + if x != nil { + return x.IsPrimary + } + return false +} + +// ExplorerInfo defines the explorer info +type ExplorerInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (x *ExplorerInfo) Reset() { + *x = ExplorerInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ExplorerInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ExplorerInfo) ProtoMessage() {} + +// Deprecated: Use ExplorerInfo.ProtoReflect.Descriptor instead. +func (*ExplorerInfo) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{5} +} + +func (x *ExplorerInfo) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *ExplorerInfo) GetUrl() string { + if x != nil { + return x.Url + } + return "" +} + +// FeeInfo defines a fee info +type FeeInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` + InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` + IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` + GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` +} + +func (x *FeeInfo) Reset() { + *x = FeeInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FeeInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FeeInfo) ProtoMessage() {} + +// Deprecated: Use FeeInfo.ProtoReflect.Descriptor instead. +func (*FeeInfo) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{6} +} + +func (x *FeeInfo) GetBaseDenom() string { + if x != nil { + return x.BaseDenom + } + return "" +} + +func (x *FeeInfo) GetFeeRates() []string { + if x != nil { + return x.FeeRates + } + return nil +} + +func (x *FeeInfo) GetInitGasLimit() int32 { + if x != nil { + return x.InitGasLimit + } + return 0 +} + +func (x *FeeInfo) GetIsSimulable() bool { + if x != nil { + return x.IsSimulable + } + return false +} + +func (x *FeeInfo) GetGasMultiply() float64 { + if x != nil { + return x.GasMultiply + } + return 0 +} + +// Identity defines an associated profile for a did subject +type Identity struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` + VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` +} + +func (x *Identity) Reset() { + *x = Identity{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Identity) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Identity) ProtoMessage() {} + +// Deprecated: Use Identity.ProtoReflect.Descriptor instead. +func (*Identity) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{7} +} + +func (x *Identity) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Identity) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *Identity) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Identity) GetCredentials() []*Credential { + if x != nil { + return x.Credentials + } + return nil +} + +func (x *Identity) GetVerificationMethods() []*VerificationMethod { + if x != nil { + return x.VerificationMethods + } + return nil +} + +// PubKey defines a public key for a did +type PubKey struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (x *PubKey) Reset() { + *x = PubKey{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_types_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *PubKey) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*PubKey) ProtoMessage() {} + +// Deprecated: Use PubKey.ProtoReflect.Descriptor instead. +func (*PubKey) Descriptor() ([]byte, []int) { + return file_did_v1_types_proto_rawDescGZIP(), []int{8} +} + +func (x *PubKey) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *PubKey) GetKey() []byte { + if x != nil { + return x.Key + } + return nil +} + +func (x *PubKey) GetKeyType() string { + if x != nil { + return x.KeyType + } + return "" +} + +func (x *PubKey) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + // VerificationMethod defines a verification method type VerificationMethod struct { state protoimpl.MessageState @@ -2028,7 +8995,7 @@ type VerificationMethod struct { func (x *VerificationMethod) Reset() { *x = VerificationMethod{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_types_proto_msgTypes[1] + mi := &file_did_v1_types_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2042,7 +9009,7 @@ func (*VerificationMethod) ProtoMessage() {} // Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_types_proto_rawDescGZIP(), []int{1} + return file_did_v1_types_proto_rawDescGZIP(), []int{9} } func (x *VerificationMethod) GetId() string { @@ -2079,55 +9046,158 @@ var file_did_v1_types_proto_rawDesc = []byte{ 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xaa, 0x02, 0x0a, - 0x0c, 0x42, 0x61, 0x73, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, - 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, - 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, - 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, - 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, - 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, - 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, - 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, - 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, - 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x56, 0x65, - 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x12, 0x30, 0x0a, 0x14, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, - 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, - 0x73, 0x65, 0x12, 0x55, 0x0a, 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, - 0x5f, 0x6a, 0x77, 0x6b, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, - 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, - 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, - 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, - 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, - 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x7a, 0x0a, 0x0a, 0x63, - 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, - 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, - 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, - 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa2, 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, + 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, + 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, + 0x6f, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, + 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x64, + 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, + 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, + 0x61, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, + 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, + 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, + 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x5f, + 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, + 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, + 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, + 0x62, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, + 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, + 0x1f, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0d, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x62, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, 0x6f, 0x72, 0x74, 0x22, 0xfa, 0x02, 0x0a, 0x09, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, + 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, + 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, + 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, + 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, + 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x65, 0x6e, + 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x37, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x12, 0x37, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, + 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, + 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x30, 0x0a, 0x08, 0x65, 0x78, + 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, + 0x66, 0x6f, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x08, + 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0xf6, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, + 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, + 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, + 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, + 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x61, + 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, + 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x22, 0xa6, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, + 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, + 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, + 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, + 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, + 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x3b, 0x0a, 0x08, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, + 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, + 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x22, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, + 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x22, 0xb1, 0x01, + 0x0a, 0x07, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, + 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, + 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, + 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, + 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, + 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, + 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, + 0x73, 0x5f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, + 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, + 0x79, 0x22, 0xd9, 0x01, 0x0a, 0x08, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x4d, + 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x22, 0x65, 0x0a, + 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x19, 0x0a, 0x08, 0x6b, 0x65, 0x79, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6b, 0x65, 0x79, + 0x54, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x8f, 0x02, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x70, + 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x62, + 0x61, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x55, 0x0a, + 0x0f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x5f, 0x6a, 0x77, 0x6b, 0x73, + 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x4a, 0x77, 0x6b, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0d, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, + 0x4a, 0x77, 0x6b, 0x73, 0x1a, 0x40, 0x0a, 0x12, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x54, 0x79, 0x70, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, + 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, + 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, + 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, + 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, + 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2142,20 +9212,34 @@ func file_did_v1_types_proto_rawDescGZIP() []byte { return file_did_v1_types_proto_rawDescData } -var file_did_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 3) +var file_did_v1_types_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_did_v1_types_proto_goTypes = []interface{}{ - (*BaseDocument)(nil), // 0: did.v1.BaseDocument - (*VerificationMethod)(nil), // 1: did.v1.VerificationMethod - nil, // 2: did.v1.VerificationMethod.PublicKeyJwksEntry + (*AssetInfo)(nil), // 0: did.v1.AssetInfo + (*ChainInfo)(nil), // 1: did.v1.ChainInfo + (*Credential)(nil), // 2: did.v1.Credential + (*Document)(nil), // 3: did.v1.Document + (*Endpoint)(nil), // 4: did.v1.Endpoint + (*ExplorerInfo)(nil), // 5: did.v1.ExplorerInfo + (*FeeInfo)(nil), // 6: did.v1.FeeInfo + (*Identity)(nil), // 7: did.v1.Identity + (*PubKey)(nil), // 8: did.v1.PubKey + (*VerificationMethod)(nil), // 9: did.v1.VerificationMethod + nil, // 10: did.v1.VerificationMethod.PublicKeyJwksEntry } var file_did_v1_types_proto_depIdxs = []int32{ - 1, // 0: did.v1.BaseDocument.verification_methods:type_name -> did.v1.VerificationMethod - 2, // 1: did.v1.VerificationMethod.public_key_jwks:type_name -> did.v1.VerificationMethod.PublicKeyJwksEntry - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 4, // 0: did.v1.ChainInfo.grpc_endpoints:type_name -> did.v1.Endpoint + 4, // 1: did.v1.ChainInfo.rest_endpoints:type_name -> did.v1.Endpoint + 5, // 2: did.v1.ChainInfo.explorer:type_name -> did.v1.ExplorerInfo + 6, // 3: did.v1.ChainInfo.fee_info:type_name -> did.v1.FeeInfo + 9, // 4: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod + 2, // 5: did.v1.Identity.credentials:type_name -> did.v1.Credential + 9, // 6: did.v1.Identity.verification_methods:type_name -> did.v1.VerificationMethod + 10, // 7: did.v1.VerificationMethod.public_key_jwks:type_name -> did.v1.VerificationMethod.PublicKeyJwksEntry + 8, // [8:8] is the sub-list for method output_type + 8, // [8:8] is the sub-list for method input_type + 8, // [8:8] is the sub-list for extension type_name + 8, // [8:8] is the sub-list for extension extendee + 0, // [0:8] is the sub-list for field type_name } func init() { file_did_v1_types_proto_init() } @@ -2163,10 +9247,9 @@ func file_did_v1_types_proto_init() { if File_did_v1_types_proto != nil { return } - file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_types_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BaseDocument); i { + switch v := v.(*AssetInfo); i { case 0: return &v.state case 1: @@ -2178,6 +9261,102 @@ func file_did_v1_types_proto_init() { } } file_did_v1_types_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ChainInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Credential); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Document); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Endpoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ExplorerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FeeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Identity); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_types_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerificationMethod); i { case 0: return &v.state @@ -2196,7 +9375,7 @@ func file_did_v1_types_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_types_proto_rawDesc, NumEnums: 0, - NumMessages: 3, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, diff --git a/client/go.mod b/client/go.mod new file mode 100644 index 000000000..a07a4b514 --- /dev/null +++ b/client/go.mod @@ -0,0 +1,3 @@ +module client + +go 1.22.0 diff --git a/devbox.json b/devbox.json index 2d7543be6..00c605fbd 100644 --- a/devbox.json +++ b/devbox.json @@ -1,21 +1,16 @@ { - "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.10.5/.schema/devbox.schema.json", - "packages": [ - "ipfs@latest", - "golangci-lint@latest", - "go@1.21", - "templ@latest", - "air@latest" - ], + "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", + "packages": ["golangci-lint@latest", "go@1.21", "air@latest"], "env": { "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH" }, "shell": { "scripts": { + "install": ["make install"], "proto": ["make proto-gen"], - "templ": ["templ generate"], - "ps": ["devbox services ls"] + "build": ["go build -o ./bin/sonrd ./cmd/sonrd"], + "testnet": ["make sh-testnet"] } } } diff --git a/go.mod b/go.mod index 06a70b71c..10bba71dc 100644 --- a/go.mod +++ b/go.mod @@ -70,6 +70,7 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 + gopkg.in/macaroon-bakery.v2 v2.3.0 ) require ( @@ -304,7 +305,9 @@ require ( google.golang.org/api v0.169.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect + gopkg.in/errgo.v1 v1.0.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect + gopkg.in/macaroon.v2 v2.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index b962d0444..4ba2f4eec 100644 --- a/go.sum +++ b/go.sum @@ -1110,6 +1110,10 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= +github.com/frankban/quicktest v1.0.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k= +github.com/frankban/quicktest v1.1.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k= +github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= @@ -1155,6 +1159,7 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= +github.com/go-macaroon-bakery/macaroonpb v1.0.0/go.mod h1:UzrGOcbiwTXISFP2XDLDPjfhMINZa+fX/7A2lMd31zc= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -1245,6 +1250,7 @@ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= +github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -1557,6 +1563,12 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= +github.com/juju/mgotest v1.0.1/go.mod h1:vTaDufYul+Ps8D7bgseHjq87X8eu0ivlKLp9mVc/Bfc= +github.com/juju/postgrestest v1.1.0/go.mod h1:/n17Y2T6iFozzXwSCO0JYJ5gSiz2caEtSwAjh/uLXDM= +github.com/juju/qthttptest v0.0.1/go.mod h1://LCf/Ls22/rPw2u1yWukUJvYtfPY4nYpWUl2uZhryo= +github.com/juju/schema v1.0.0/go.mod h1:Y+ThzXpUJ0E7NYYocAbuvJ7vTivXfrof/IfRPq/0abI= +github.com/juju/webbrowser v0.0.0-20160309143629-54b8c57083b4/go.mod h1:G6PCelgkM6cuvyD10iYJsjLBsSadVXtJ+nBxFAxE2BU= +github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= @@ -1597,6 +1609,8 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= +github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= +github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -1886,6 +1900,7 @@ github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGn github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= +github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -2108,7 +2123,9 @@ go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZM go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= +golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -2203,6 +2220,7 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/net v0.0.0-20150829230318-ea47fc708ee3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2344,6 +2362,7 @@ golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2506,6 +2525,7 @@ golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2930,10 +2950,20 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= +gopkg.in/errgo.v1 v1.0.0/go.mod h1:CxwszS/Xz1C49Ucd2i6Zil5UToP1EmyrFhKaMVbg1mk= +gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso= +gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= +gopkg.in/httprequest.v1 v1.2.0/go.mod h1:T61ZUaJLpMnzvoJDO03ZD8yRXD4nZzBeDoW5e9sffjg= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= +gopkg.in/juju/environschema.v1 v1.0.0/go.mod h1:WTgU3KXKCVoO9bMmG/4KHzoaRvLeoxfjArpgd1MGWFA= +gopkg.in/macaroon-bakery.v2 v2.3.0 h1:b40knPgPTke1QLTE8BSYeH7+R/hiIozB1A8CTLYN0Ic= +gopkg.in/macaroon-bakery.v2 v2.3.0/go.mod h1:/8YhtPARXeRzbpEPLmRB66+gQE8/pzBBkWwg7Vz/guc= +gopkg.in/macaroon.v2 v2.1.0 h1:HZcsjBCzq9t0eBPMKqTN/uSN6JOm78ZJ2INbqcBQOUI= +gopkg.in/macaroon.v2 v2.1.0/go.mod h1:OUb+TQP/OP0WOerC2Jp/3CwhIKyIa9kQjuc7H24e6/o= +gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/process-compose.yml b/process-compose.yml deleted file mode 100644 index b6d152c44..000000000 --- a/process-compose.yml +++ /dev/null @@ -1,8 +0,0 @@ -version: "0.5" - -processes: - ipfs: - command: ipfs daemon - restart: always - sonrd: - command: task testnet diff --git a/proto/did/v1/accounts.proto b/proto/did/v1/accounts.proto new file mode 100644 index 000000000..f189a6a7b --- /dev/null +++ b/proto/did/v1/accounts.proto @@ -0,0 +1,4 @@ +syntax = "proto3"; +package did.v1; + +option go_package = "github.com/onsonr/hway/x/did/types"; diff --git a/proto/did/v1/enums.proto b/proto/did/v1/enums.proto new file mode 100644 index 000000000..d7a1bd08b --- /dev/null +++ b/proto/did/v1/enums.proto @@ -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; +} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 66da7d357..1b751a26e 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -3,11 +3,13 @@ package did.v1; import "gogoproto/gogo.proto"; import "amino/amino.proto"; +import "did/v1/types.proto"; + option go_package = "github.com/onsonr/hway/x/did/types"; // GenesisState defines the module genesis state message GenesisState { - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params params = 1 [(gogoproto.nullable) = false]; } @@ -24,49 +26,4 @@ message Params { repeated ChainInfo whitelisted_chains = 2; } -// Meta represents -message Meta { - option (amino.name) = "did/meta"; - option (gogoproto.equal) = true; - option (gogoproto.goproto_stringer) = false; - - // Key value data for the Property - map data = 1; -} - -message AssetInfo { - string denom = 1; - string asset_type = 2; - string origin_chain = 3; - string origin_denom = 4; - string origin_type = 5; - string symbol = 6; - int32 decimals = 7; - string description = 8; - string image = 9; - string coinGeckoId = 10; - bool enable = 11; - string path = 12; - string channel = 13; - string port = 14; - Meta counter_party = 15; -} - -message ChainInfo { - string chain_id_cosmos = 1; - string chain_name = 2; - string symbol = 3; - string bechAccountPrefix = 4; - string bechValidatorPrefix = 5; - string origin_genesis_time = 6; - repeated Meta accountType = 7; - repeated Meta grpc_endpoint = 8; - repeated Meta lcd_endpoint = 9; - Meta explorer = 10; - string fee_base = 11; - repeated string fee_rate = 12; - int32 fee_init_gas_limit = 13; - bool fee_isSimulable = 14; - double simul_gas_multiply = 15; -} diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 9ff61ffbc..2bd10adcd 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -3,6 +3,7 @@ package did.v1; import "google/api/annotations.proto"; import "did/v1/genesis.proto"; +import "did/v1/types.proto"; option go_package = "github.com/onsonr/hway/x/did/types"; @@ -13,14 +14,29 @@ service Query { option (google.api.http).get = "/did/params"; } -// Resolve queries the DID document by its id. - rpc ResolveIdentifier(QueryResolveRequest) returns (QueryResolveResponse) { - option (google.api.http).get = "/did/resolve/{id}"; + // 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}"; } - // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - rpc WitnessCredential(QueryWitnessCredentialRequest) returns (QueryWitnessCredentialResponse) { - option (google.api.http).get = "/did/assertion/{id}/witness"; + // Service returns associated ServiceInfo for a given Origin + rpc Service(QueryServiceRequest) returns (QueryServiceResponse) { + option (google.api.http).get = "/did/service/{origin}"; } } @@ -33,35 +49,56 @@ message QueryParamsResponse { Params params = 1; } -// QueryExistsRequest is the request type for the Query/Exists RPC method. -message QueryExistsRequest { - string kind = 1; - string value = 2; +// QueryAccountsRequest is the request type for the Query/Exists RPC method. +message QueryAccountsRequest { + string did = 1; } -// QueryExistsResponse is the response type for the Query/Exists RPC method. -message QueryExistsResponse { +// 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 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 id = 1; + string did = 1; } // QueryResolveResponse is the response type for the Query/Resolve RPC method. message QueryResolveResponse { // document is the DID document - string document = 1; + Document document = 1; } -// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. -message QueryWitnessCredentialRequest { - string id = 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 QueryWitnessCredentialResponse { +message QueryServiceResponse { // options is the PublicKeyCredentialAttestationOptions string options = 1; } diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index d821c75ab..9eb487d27 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -5,13 +5,14 @@ option go_package = "github.com/onsonr/hway/x/did/types"; import "cosmos/orm/v1/orm.proto"; import "did/v1/genesis.proto"; +import "did/v1/enums.proto"; // Aliases represents the `alsoKnownAs` property associated with a DID Controller message Aliases { option (cosmos.orm.v1.table) = { id: 1 primary_key: {fields: "id"} - index: { id: 1, fields: "handle", unique: true } + index: { id: 1, fields: "subject", unique: true } }; // The unique identifier of the alias @@ -20,8 +21,8 @@ message Aliases { // Origin is the Alias provider string origin = 2; - // Handle is the user defined alias - string handle = 3; + // Subject is the user defined alias + string subject = 3; // Controller of the alias string controller = 4; @@ -146,9 +147,15 @@ message Service { // The type of the service string service_type = 2; - // The service endpoint - string service_endpoint = 3; - // The controller DID of the service - string controller_did = 4; + string controller_did = 3; + + // The domain name of the service + string origin_uri = 4; + + // The service endpoint + map service_endpoints = 5; + + // Scopes is the Authorization Grants of the service + repeated PermissionScope scopes = 6; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index a707feb32..3ec2a6700 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -3,6 +3,7 @@ syntax = "proto3"; package did.v1; 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"; @@ -16,11 +17,20 @@ service Msg { // Since: cosmos-sdk 0.47 rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - rpc RegisterController(MsgInitializeController) returns (MsgInitializeControllerResponse); + // Authenticate asserts the given controller is the owner of the given address. + rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse); - // AuthenticateController asserts the given controller is the owner of the given address. - rpc AuthenticateController(MsgAuthenticateController) returns (MsgAuthenticateControllerResponse); + // 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. @@ -44,31 +54,8 @@ message MsgUpdateParams { // Since: cosmos-sdk 0.47 message MsgUpdateParamsResponse {} -// MsgInitializeController is the message type for the InitializeController RPC. -message MsgInitializeController { - 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; -} - -// MsgInitializeControllerResponse is the response type for the InitializeController RPC. -message MsgInitializeControllerResponse { - // Controller is the address of the initialized controller. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; -} - // MsgAuthenticate is the message type for the Authenticate RPC. -message MsgAuthenticateController { +message MsgAuthenticate { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. @@ -84,6 +71,89 @@ message MsgAuthenticateController { string origin = 4; } -// MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -message MsgAuthenticateControllerResponse {} +// 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"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // 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. +message MsgRegisterControllerResponse { + // 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 accounts = 2; +} + +// MsgRegisterService is the message type for the RegisterService RPC. +message MsgRegisterService { + 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. +message MsgRegisterServiceResponse { + bool success = 1; +} diff --git a/proto/did/v1/types.proto b/proto/did/v1/types.proto index 32994f964..1e7b87cfb 100644 --- a/proto/did/v1/types.proto +++ b/proto/did/v1/types.proto @@ -3,15 +3,56 @@ syntax = "proto3"; package did.v1; import "cosmos/msg/v1/msg.proto"; -import "did/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; option go_package = "github.com/onsonr/hway/x/did/types"; +// 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; +} -// BaseDocument defines a DID document -message BaseDocument { +// 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; @@ -20,6 +61,44 @@ message BaseDocument { 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; diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index c2f402fea..9833169ce 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -31,23 +31,32 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type return &types.QueryParamsResponse{Params: &p}, nil } -// PropertyExists implements types.QueryServer. -func (k Querier) PropertyExists(goCtx context.Context, req *types.QueryExistsRequest) (*types.QueryExistsResponse, error) { +// Accounts implements types.QueryServer. +func (k Querier) Accounts(goCtx context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) - panic("PropertyExists is unimplemented") - return &types.QueryExistsResponse{}, nil + return &types.QueryAccountsResponse{}, nil } -// ResolveIdentifier implements types.QueryServer. -func (k Querier) ResolveIdentifier(goCtx context.Context, req *types.QueryResolveRequest) (*types.QueryResolveResponse, error) { +// 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) - panic("ResolveIdentifier is unimplemented") return &types.QueryResolveResponse{}, nil } -// WitnessCredential implements types.QueryServer. -func (k Querier) WitnessCredential(goCtx context.Context, req *types.QueryWitnessCredentialRequest) (*types.QueryWitnessCredentialResponse, error) { +// Service implements types.QueryServer. +func (k Querier) Service(goCtx context.Context, req *types.QueryServiceRequest) (*types.QueryServiceResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) - panic("WitnessCredential is unimplemented") - return &types.QueryWitnessCredentialResponse{}, nil + return &types.QueryServiceResponse{}, nil } diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index 708528065..b0d9c84de 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -3,9 +3,11 @@ package keeper import ( "context" + 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" ) @@ -29,16 +31,45 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams return nil, ms.k.Params.Set(ctx, msg.Params) } -// AuthenticateController implements types.MsgServer. -func (ms msgServer) AuthenticateController(ctx context.Context, msg *types.MsgAuthenticateController) (*types.MsgAuthenticateControllerResponse, error) { +// 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) - panic("AuthenticateController is unimplemented") - return &types.MsgAuthenticateControllerResponse{}, nil + return &types.MsgAuthenticateResponse{}, nil } // RegisterController implements types.MsgServer. -func (ms msgServer) RegisterController(ctx context.Context, msg *types.MsgInitializeController) (*types.MsgInitializeControllerResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - panic("RegisterController is unimplemented") - return &types.MsgInitializeControllerResponse{}, nil +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) + } + ctx := sdk.UnwrapSDKContext(goCtx) + svc := didv1.Service{ + ControllerDid: msg.Authority, + } + ms.k.OrmDB.ServiceTable().Insert(ctx, &svc) + return &types.MsgRegisterControllerResponse{}, nil +} + +// RegisterService implements types.MsgServer. +func (ms msgServer) RegisterService(ctx 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) + 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 } diff --git a/x/did/keeper/state.go b/x/did/keeper/state.go index b55569d4a..b64f6c9e5 100644 --- a/x/did/keeper/state.go +++ b/x/did/keeper/state.go @@ -1 +1,16 @@ package keeper + +func (k Keeper) insertAliasFromDisplayName() { +} + +func (k Keeper) insertAssertionFromIdentity() { +} + +func (k Keeper) insertAuthenticationFromCredential() { +} + +func (k Keeper) insertControllerFromMotrVault() { +} + +func (k Keeper) insertDelegationFromAccount() { +} diff --git a/x/did/types/accounts.pb.go b/x/did/types/accounts.pb.go new file mode 100644 index 000000000..bdef8a1e6 --- /dev/null +++ b/x/did/types/accounts.pb.go @@ -0,0 +1,35 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: did/v1/accounts.proto + +package types + +import ( + fmt "fmt" + 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 + +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, +} diff --git a/x/did/types/codec.go b/x/did/types/codec.go index 303293b86..4e875afeb 100644 --- a/x/did/types/codec.go +++ b/x/did/types/codec.go @@ -34,7 +34,8 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, - &MsgInitializeController{}, + &MsgRegisterController{}, + &MsgRegisterService{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/did/types/enums.pb.go b/x/did/types/enums.pb.go new file mode 100644 index 000000000..5d96c7ec0 --- /dev/null +++ b/x/did/types/enums.pb.go @@ -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, +} diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index bda419ca8..7dd981913 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -4,23 +4,19 @@ package types import ( - encoding_binary "encoding/binary" fmt "fmt" - io "io" - math "math" - math_bits "math/bits" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" ) // Reference imports to suppress errors if they are not otherwise used. -var ( - _ = proto.Marshal - _ = fmt.Errorf - _ = math.Inf -) +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. @@ -30,7 +26,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the module genesis state type GenesisState struct { - // Params defines all the paramaters of the module. + // Params defines all the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` } @@ -40,11 +36,9 @@ func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { return fileDescriptor_fda181cae44f7c00, []int{0} } - func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_GenesisState.Marshal(b, m, deterministic) @@ -57,15 +51,12 @@ func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } - func (m *GenesisState) XXX_Merge(src proto.Message) { xxx_messageInfo_GenesisState.Merge(m, src) } - func (m *GenesisState) XXX_Size() int { return m.Size() } - func (m *GenesisState) XXX_DiscardUnknown() { xxx_messageInfo_GenesisState.DiscardUnknown(m) } @@ -92,11 +83,9 @@ func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { return fileDescriptor_fda181cae44f7c00, []int{1} } - func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } - func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { return xxx_messageInfo_Params.Marshal(b, m, deterministic) @@ -109,15 +98,12 @@ func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } - func (m *Params) XXX_Merge(src proto.Message) { xxx_messageInfo_Params.Merge(m, src) } - func (m *Params) XXX_Size() int { return m.Size() } - func (m *Params) XXX_DiscardUnknown() { xxx_messageInfo_Params.DiscardUnknown(m) } @@ -138,445 +124,34 @@ func (m *Params) GetWhitelistedChains() []*ChainInfo { return nil } -// Meta represents -type Meta struct { - // Key value data for the Property - Data map[string]string `protobuf:"bytes,1,rep,name=data,proto3" json:"data,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *Meta) Reset() { *m = Meta{} } -func (*Meta) ProtoMessage() {} -func (*Meta) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{2} -} - -func (m *Meta) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *Meta) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Meta.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} - -func (m *Meta) XXX_Merge(src proto.Message) { - xxx_messageInfo_Meta.Merge(m, src) -} - -func (m *Meta) XXX_Size() int { - return m.Size() -} - -func (m *Meta) XXX_DiscardUnknown() { - xxx_messageInfo_Meta.DiscardUnknown(m) -} - -var xxx_messageInfo_Meta proto.InternalMessageInfo - -func (m *Meta) GetData() map[string]string { - if m != nil { - return m.Data - } - return nil -} - -type AssetInfo struct { - Denom string `protobuf:"bytes,1,opt,name=denom,proto3" json:"denom,omitempty"` - AssetType string `protobuf:"bytes,2,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,3,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,4,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - OriginType string `protobuf:"bytes,5,opt,name=origin_type,json=originType,proto3" json:"origin_type,omitempty"` - Symbol string `protobuf:"bytes,6,opt,name=symbol,proto3" json:"symbol,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - Image string `protobuf:"bytes,9,opt,name=image,proto3" json:"image,omitempty"` - CoinGeckoId string `protobuf:"bytes,10,opt,name=coinGeckoId,proto3" json:"coinGeckoId,omitempty"` - Enable bool `protobuf:"varint,11,opt,name=enable,proto3" json:"enable,omitempty"` - Path string `protobuf:"bytes,12,opt,name=path,proto3" json:"path,omitempty"` - Channel string `protobuf:"bytes,13,opt,name=channel,proto3" json:"channel,omitempty"` - Port string `protobuf:"bytes,14,opt,name=port,proto3" json:"port,omitempty"` - CounterParty *Meta `protobuf:"bytes,15,opt,name=counter_party,json=counterParty,proto3" json:"counter_party,omitempty"` -} - -func (m *AssetInfo) Reset() { *m = AssetInfo{} } -func (m *AssetInfo) String() string { return proto.CompactTextString(m) } -func (*AssetInfo) ProtoMessage() {} -func (*AssetInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{3} -} - -func (m *AssetInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_AssetInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} - -func (m *AssetInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_AssetInfo.Merge(m, src) -} - -func (m *AssetInfo) XXX_Size() int { - return m.Size() -} - -func (m *AssetInfo) XXX_DiscardUnknown() { - xxx_messageInfo_AssetInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_AssetInfo proto.InternalMessageInfo - -func (m *AssetInfo) GetDenom() string { - if m != nil { - return m.Denom - } - return "" -} - -func (m *AssetInfo) GetAssetType() string { - if m != nil { - return m.AssetType - } - return "" -} - -func (m *AssetInfo) GetOriginChain() string { - if m != nil { - return m.OriginChain - } - return "" -} - -func (m *AssetInfo) GetOriginDenom() string { - if m != nil { - return m.OriginDenom - } - return "" -} - -func (m *AssetInfo) GetOriginType() string { - if m != nil { - return m.OriginType - } - return "" -} - -func (m *AssetInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *AssetInfo) GetDecimals() int32 { - if m != nil { - return m.Decimals - } - return 0 -} - -func (m *AssetInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *AssetInfo) GetImage() string { - if m != nil { - return m.Image - } - return "" -} - -func (m *AssetInfo) GetCoinGeckoId() string { - if m != nil { - return m.CoinGeckoId - } - return "" -} - -func (m *AssetInfo) GetEnable() bool { - if m != nil { - return m.Enable - } - return false -} - -func (m *AssetInfo) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *AssetInfo) GetChannel() string { - if m != nil { - return m.Channel - } - return "" -} - -func (m *AssetInfo) GetPort() string { - if m != nil { - return m.Port - } - return "" -} - -func (m *AssetInfo) GetCounterParty() *Meta { - if m != nil { - return m.CounterParty - } - return nil -} - -type ChainInfo struct { - ChainIdCosmos string `protobuf:"bytes,1,opt,name=chain_id_cosmos,json=chainIdCosmos,proto3" json:"chain_id_cosmos,omitempty"` - ChainName string `protobuf:"bytes,2,opt,name=chain_name,json=chainName,proto3" json:"chain_name,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - BechAccountPrefix string `protobuf:"bytes,4,opt,name=bechAccountPrefix,proto3" json:"bechAccountPrefix,omitempty"` - BechValidatorPrefix string `protobuf:"bytes,5,opt,name=bechValidatorPrefix,proto3" json:"bechValidatorPrefix,omitempty"` - OriginGenesisTime string `protobuf:"bytes,6,opt,name=origin_genesis_time,json=originGenesisTime,proto3" json:"origin_genesis_time,omitempty"` - AccountType []*Meta `protobuf:"bytes,7,rep,name=accountType,proto3" json:"accountType,omitempty"` - GrpcEndpoint []*Meta `protobuf:"bytes,8,rep,name=grpc_endpoint,json=grpcEndpoint,proto3" json:"grpc_endpoint,omitempty"` - LcdEndpoint []*Meta `protobuf:"bytes,9,rep,name=lcd_endpoint,json=lcdEndpoint,proto3" json:"lcd_endpoint,omitempty"` - Explorer *Meta `protobuf:"bytes,10,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeBase string `protobuf:"bytes,11,opt,name=fee_base,json=feeBase,proto3" json:"fee_base,omitempty"` - FeeRate []string `protobuf:"bytes,12,rep,name=fee_rate,json=feeRate,proto3" json:"fee_rate,omitempty"` - FeeInitGasLimit int32 `protobuf:"varint,13,opt,name=fee_init_gas_limit,json=feeInitGasLimit,proto3" json:"fee_init_gas_limit,omitempty"` - FeeIsSimulable bool `protobuf:"varint,14,opt,name=fee_isSimulable,json=feeIsSimulable,proto3" json:"fee_isSimulable,omitempty"` - SimulGasMultiply float64 `protobuf:"fixed64,15,opt,name=simul_gas_multiply,json=simulGasMultiply,proto3" json:"simul_gas_multiply,omitempty"` -} - -func (m *ChainInfo) Reset() { *m = ChainInfo{} } -func (m *ChainInfo) String() string { return proto.CompactTextString(m) } -func (*ChainInfo) ProtoMessage() {} -func (*ChainInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{4} -} - -func (m *ChainInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} - -func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} - -func (m *ChainInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo.Merge(m, src) -} - -func (m *ChainInfo) XXX_Size() int { - return m.Size() -} - -func (m *ChainInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo proto.InternalMessageInfo - -func (m *ChainInfo) GetChainIdCosmos() string { - if m != nil { - return m.ChainIdCosmos - } - return "" -} - -func (m *ChainInfo) GetChainName() string { - if m != nil { - return m.ChainName - } - return "" -} - -func (m *ChainInfo) GetSymbol() string { - if m != nil { - return m.Symbol - } - return "" -} - -func (m *ChainInfo) GetBechAccountPrefix() string { - if m != nil { - return m.BechAccountPrefix - } - return "" -} - -func (m *ChainInfo) GetBechValidatorPrefix() string { - if m != nil { - return m.BechValidatorPrefix - } - return "" -} - -func (m *ChainInfo) GetOriginGenesisTime() string { - if m != nil { - return m.OriginGenesisTime - } - return "" -} - -func (m *ChainInfo) GetAccountType() []*Meta { - if m != nil { - return m.AccountType - } - return nil -} - -func (m *ChainInfo) GetGrpcEndpoint() []*Meta { - if m != nil { - return m.GrpcEndpoint - } - return nil -} - -func (m *ChainInfo) GetLcdEndpoint() []*Meta { - if m != nil { - return m.LcdEndpoint - } - return nil -} - -func (m *ChainInfo) GetExplorer() *Meta { - if m != nil { - return m.Explorer - } - return nil -} - -func (m *ChainInfo) GetFeeBase() string { - if m != nil { - return m.FeeBase - } - return "" -} - -func (m *ChainInfo) GetFeeRate() []string { - if m != nil { - return m.FeeRate - } - return nil -} - -func (m *ChainInfo) GetFeeInitGasLimit() int32 { - if m != nil { - return m.FeeInitGasLimit - } - return 0 -} - -func (m *ChainInfo) GetFeeIsSimulable() bool { - if m != nil { - return m.FeeIsSimulable - } - return false -} - -func (m *ChainInfo) GetSimulGasMultiply() float64 { - if m != nil { - return m.SimulGasMultiply - } - return 0 -} - func init() { proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*Params)(nil), "did.v1.Params") - proto.RegisterType((*Meta)(nil), "did.v1.Meta") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Meta.DataEntry") - proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") - proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") } func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 859 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x54, 0x31, 0x6f, 0x1b, 0x37, - 0x14, 0xd6, 0x45, 0xb2, 0x2c, 0x3d, 0xc9, 0x76, 0xc4, 0xb8, 0x29, 0x6b, 0xa0, 0xb2, 0xaa, 0xa1, - 0x15, 0x52, 0x43, 0x57, 0xa7, 0x43, 0x0b, 0x23, 0x43, 0xe3, 0x24, 0x30, 0x0c, 0x34, 0x85, 0x71, - 0x09, 0x3a, 0x74, 0x39, 0x50, 0x77, 0x94, 0x44, 0xe4, 0x8e, 0x3c, 0x1c, 0x29, 0xc7, 0x5a, 0x3b, - 0x76, 0xea, 0xd8, 0x31, 0x4b, 0xf7, 0xfe, 0x86, 0x4e, 0x19, 0x33, 0x76, 0x2a, 0x0a, 0x7b, 0x68, - 0xe7, 0xfe, 0x82, 0x82, 0x8f, 0x94, 0x72, 0xae, 0xbd, 0x08, 0x7c, 0xdf, 0xf7, 0xbd, 0x8f, 0x4f, - 0xef, 0xbd, 0x23, 0xec, 0xa6, 0x22, 0x0d, 0xcf, 0x0f, 0xc3, 0x19, 0x97, 0x5c, 0x0b, 0x3d, 0x2e, - 0x4a, 0x65, 0x14, 0x69, 0xa6, 0x22, 0x1d, 0x9f, 0x1f, 0xee, 0xed, 0xce, 0xd4, 0x4c, 0x21, 0x14, - 0xda, 0x93, 0x63, 0xf7, 0x7a, 0x2c, 0x17, 0x52, 0x85, 0xf8, 0xeb, 0xa0, 0xe1, 0x23, 0xe8, 0x9e, - 0x38, 0x87, 0x17, 0x86, 0x19, 0x4e, 0x0e, 0xa0, 0x59, 0xb0, 0x92, 0xe5, 0x9a, 0x06, 0x83, 0x60, - 0xd4, 0x79, 0xb8, 0x3d, 0x76, 0x8e, 0xe3, 0x33, 0x44, 0x8f, 0x1b, 0x6f, 0xff, 0xdc, 0xaf, 0x45, - 0x5e, 0x33, 0xfc, 0x35, 0x80, 0xa6, 0x23, 0xc8, 0x37, 0x40, 0x5e, 0xcf, 0x85, 0xe1, 0x99, 0xd0, - 0x86, 0xa7, 0x31, 0xd3, 0x9a, 0x1b, 0x6b, 0x52, 0x1f, 0x75, 0x1e, 0xf6, 0x56, 0x26, 0x8f, 0x2d, - 0x7a, 0x2a, 0xa7, 0x2a, 0xea, 0x55, 0xc4, 0x88, 0xde, 0x70, 0x48, 0xe6, 0x4c, 0x48, 0x4d, 0xef, - 0x5c, 0x77, 0x78, 0x62, 0xd1, 0x1b, 0x0e, 0x88, 0xea, 0xa3, 0x0f, 0x7f, 0x79, 0xb3, 0x5f, 0xfb, - 0xe7, 0xcd, 0x7e, 0xf0, 0xd3, 0xdf, 0xbf, 0x3d, 0x00, 0xdb, 0x20, 0x5f, 0xe7, 0x8f, 0x01, 0x34, - 0x9e, 0x73, 0xc3, 0xc8, 0x03, 0x68, 0xa4, 0xcc, 0x30, 0x5f, 0xd7, 0xfd, 0x95, 0xab, 0xe5, 0xc6, - 0x4f, 0x99, 0x61, 0xcf, 0xa4, 0x29, 0x97, 0x11, 0x6a, 0xf6, 0xbe, 0x82, 0xf6, 0x1a, 0x22, 0x77, - 0xa1, 0xfe, 0x8a, 0x2f, 0xb1, 0x29, 0xed, 0xc8, 0x1e, 0xc9, 0x2e, 0x6c, 0x9c, 0xb3, 0x6c, 0xc1, - 0xe9, 0x1d, 0xc4, 0x5c, 0x70, 0x74, 0xe7, 0xeb, 0xe0, 0xe8, 0x83, 0x6a, 0x19, 0x2d, 0x5b, 0x46, - 0xce, 0x0d, 0x1b, 0xfe, 0x5e, 0x87, 0xf6, 0xba, 0x01, 0x36, 0x3d, 0xe5, 0x52, 0xe5, 0xde, 0xd2, - 0x05, 0xe4, 0x63, 0x00, 0xec, 0x5c, 0x6c, 0x96, 0xc5, 0xca, 0xb9, 0x8d, 0xc8, 0xcb, 0x65, 0xc1, - 0xc9, 0x27, 0xd0, 0x55, 0xa5, 0x98, 0x09, 0xe9, 0xba, 0x43, 0xeb, 0x28, 0xe8, 0x38, 0x0c, 0x9b, - 0x50, 0x91, 0x38, 0xfb, 0x46, 0x55, 0xf2, 0x14, 0x2f, 0xd9, 0x07, 0x1f, 0xba, 0x5b, 0x36, 0x50, - 0x01, 0x0e, 0xc2, 0x6b, 0xee, 0x43, 0x53, 0x2f, 0xf3, 0x89, 0xca, 0x68, 0x13, 0x39, 0x1f, 0x91, - 0x3d, 0x68, 0xa5, 0x3c, 0x11, 0x39, 0xcb, 0x34, 0xdd, 0x1c, 0x04, 0xa3, 0x8d, 0x68, 0x1d, 0x93, - 0x01, 0x74, 0x52, 0xae, 0x93, 0x52, 0x14, 0x46, 0x28, 0x49, 0x5b, 0xee, 0xda, 0x0a, 0x64, 0xff, - 0xb1, 0xc8, 0xd9, 0x8c, 0xd3, 0xb6, 0xfb, 0xc7, 0x18, 0xd8, 0xbc, 0x44, 0x09, 0x79, 0xc2, 0x93, - 0x57, 0xea, 0x34, 0xa5, 0xe0, 0xf2, 0x2a, 0x90, 0xad, 0x86, 0x4b, 0x36, 0xc9, 0x38, 0xed, 0x0c, - 0x82, 0x51, 0x2b, 0xf2, 0x11, 0x21, 0xd0, 0x28, 0x98, 0x99, 0xd3, 0x2e, 0xa6, 0xe0, 0x99, 0x50, - 0xd8, 0x4c, 0xe6, 0x4c, 0x4a, 0x9e, 0xd1, 0x2d, 0x84, 0x57, 0x21, 0xaa, 0x55, 0x69, 0xe8, 0xb6, - 0x57, 0xab, 0xd2, 0x90, 0x43, 0xd8, 0x4a, 0xd4, 0x42, 0x1a, 0x5e, 0xc6, 0x05, 0x2b, 0xcd, 0x92, - 0xee, 0xe0, 0xce, 0x77, 0xab, 0x6b, 0x11, 0x75, 0xbd, 0xe4, 0xcc, 0x2a, 0x86, 0xff, 0x36, 0xa0, - 0xbd, 0xde, 0x41, 0xf2, 0x29, 0xec, 0xe0, 0x20, 0x62, 0x91, 0xc6, 0x89, 0xd2, 0xb9, 0xd2, 0x7e, - 0x9c, 0x5b, 0x08, 0x9f, 0xa6, 0x4f, 0x10, 0xb4, 0x63, 0x75, 0x3a, 0xc9, 0xf2, 0xf5, 0x58, 0x11, - 0xf9, 0x8e, 0xe5, 0xd5, 0x7e, 0xd7, 0xaf, 0xf5, 0xfb, 0x00, 0x7a, 0x13, 0x9e, 0xcc, 0x1f, 0x27, - 0x58, 0xc2, 0x59, 0xc9, 0xa7, 0xe2, 0xc2, 0x0f, 0xf4, 0x26, 0x41, 0xbe, 0x80, 0x7b, 0x16, 0xfc, - 0x9e, 0x65, 0x22, 0x65, 0x46, 0x95, 0x5e, 0xef, 0xc6, 0x7b, 0x1b, 0x45, 0xc6, 0x70, 0xcf, 0x2f, - 0x82, 0x7f, 0x45, 0x62, 0x23, 0x72, 0xee, 0x87, 0xde, 0x73, 0x94, 0x7f, 0x1d, 0x5e, 0x8a, 0x9c, - 0x93, 0x31, 0x74, 0x98, 0xbb, 0xd2, 0xae, 0x09, 0xdd, 0xc4, 0x8f, 0xe8, 0x7a, 0xb7, 0xaa, 0x02, - 0xdb, 0xdf, 0x59, 0x59, 0x24, 0x31, 0x97, 0x69, 0xa1, 0x84, 0x34, 0xb4, 0x75, 0x4b, 0x46, 0xd7, - 0x4a, 0x9e, 0x79, 0x05, 0x09, 0xa1, 0x9b, 0x25, 0xe9, 0xfb, 0x8c, 0xf6, 0x6d, 0x77, 0x64, 0x49, - 0xba, 0x4e, 0x18, 0x41, 0x8b, 0x5f, 0x14, 0x99, 0x2a, 0x79, 0x89, 0xcb, 0xf3, 0x7f, 0xf1, 0x9a, - 0x25, 0x1f, 0x41, 0x6b, 0xca, 0x79, 0x3c, 0x61, 0xda, 0x6d, 0x52, 0x3b, 0xda, 0x9c, 0x72, 0x7e, - 0xcc, 0x34, 0x5f, 0x51, 0x25, 0x33, 0x9c, 0x76, 0x07, 0x75, 0x4f, 0x45, 0xf6, 0x41, 0xfc, 0x1c, - 0x88, 0xa5, 0x84, 0x14, 0x26, 0x9e, 0x31, 0x1d, 0x67, 0x22, 0x17, 0x06, 0x97, 0x6b, 0x23, 0xda, - 0x99, 0x72, 0x7e, 0x2a, 0x85, 0x39, 0x61, 0xfa, 0x5b, 0x0b, 0x93, 0xcf, 0x60, 0x07, 0xc5, 0xfa, - 0x85, 0xc8, 0x17, 0x19, 0xee, 0xec, 0x36, 0xee, 0xec, 0xb6, 0x55, 0xbe, 0x47, 0xc9, 0x01, 0x10, - 0x6d, 0x03, 0xb4, 0xcc, 0x17, 0x99, 0x11, 0x45, 0xe6, 0xd6, 0x2f, 0x88, 0xee, 0x22, 0x73, 0xc2, - 0xf4, 0x73, 0x8f, 0x1f, 0x3f, 0x7a, 0x7b, 0xd9, 0x0f, 0xde, 0x5d, 0xf6, 0x83, 0xbf, 0x2e, 0xfb, - 0xc1, 0xcf, 0x57, 0xfd, 0xda, 0xbb, 0xab, 0x7e, 0xed, 0x8f, 0xab, 0x7e, 0xed, 0x87, 0xe1, 0x4c, - 0x98, 0xf9, 0x62, 0x32, 0x4e, 0x54, 0x1e, 0x2a, 0xa9, 0x95, 0x2c, 0xc3, 0xf9, 0x6b, 0xb6, 0x0c, - 0x2f, 0x42, 0xfb, 0xec, 0xd8, 0xcf, 0x5b, 0x4f, 0x9a, 0xf8, 0xd2, 0x7f, 0xf9, 0x5f, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x76, 0xe7, 0x1f, 0x84, 0x32, 0x06, 0x00, 0x00, + // 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 { @@ -616,37 +191,6 @@ func (this *Params) Equal(that interface{}) bool { } return true } - -func (this *Meta) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Meta) - if !ok { - that2, ok := that.(Meta) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Data) != len(that1.Data) { - return false - } - for i := range this.Data { - if this.Data[i] != that1.Data[i] { - return false - } - } - return true -} - func (m *GenesisState) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -731,338 +275,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Meta) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Meta) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Meta) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Data) > 0 { - for k := range m.Data { - v := m.Data[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintGenesis(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintGenesis(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintGenesis(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *AssetInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *AssetInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.CounterParty != nil { - { - size, err := m.CounterParty.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x7a - } - if len(m.Port) > 0 { - i -= len(m.Port) - copy(dAtA[i:], m.Port) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Port))) - i-- - dAtA[i] = 0x72 - } - if len(m.Channel) > 0 { - i -= len(m.Channel) - copy(dAtA[i:], m.Channel) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Channel))) - i-- - dAtA[i] = 0x6a - } - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0x62 - } - if m.Enable { - i-- - if m.Enable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(m.CoinGeckoId) > 0 { - i -= len(m.CoinGeckoId) - copy(dAtA[i:], m.CoinGeckoId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CoinGeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(m.Image) > 0 { - i -= len(m.Image) - copy(dAtA[i:], m.Image) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Image))) - i-- - dAtA[i] = 0x4a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x42 - } - if m.Decimals != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x32 - } - if len(m.OriginType) > 0 { - i -= len(m.OriginType) - copy(dAtA[i:], m.OriginType) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginType))) - i-- - dAtA[i] = 0x2a - } - if len(m.OriginDenom) > 0 { - i -= len(m.OriginDenom) - copy(dAtA[i:], m.OriginDenom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginDenom))) - i-- - dAtA[i] = 0x22 - } - if len(m.OriginChain) > 0 { - i -= len(m.OriginChain) - copy(dAtA[i:], m.OriginChain) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginChain))) - i-- - dAtA[i] = 0x1a - } - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.AssetType))) - i-- - dAtA[i] = 0x12 - } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *ChainInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *ChainInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.SimulGasMultiply != 0 { - i -= 8 - encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.SimulGasMultiply)))) - i-- - dAtA[i] = 0x79 - } - if m.FeeIsSimulable { - i-- - if m.FeeIsSimulable { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x70 - } - if m.FeeInitGasLimit != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.FeeInitGasLimit)) - i-- - dAtA[i] = 0x68 - } - if len(m.FeeRate) > 0 { - for iNdEx := len(m.FeeRate) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.FeeRate[iNdEx]) - copy(dAtA[i:], m.FeeRate[iNdEx]) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeeRate[iNdEx]))) - i-- - dAtA[i] = 0x62 - } - } - if len(m.FeeBase) > 0 { - i -= len(m.FeeBase) - copy(dAtA[i:], m.FeeBase) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.FeeBase))) - i-- - dAtA[i] = 0x5a - } - if m.Explorer != nil { - { - size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if len(m.LcdEndpoint) > 0 { - for iNdEx := len(m.LcdEndpoint) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.LcdEndpoint[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - } - if len(m.GrpcEndpoint) > 0 { - for iNdEx := len(m.GrpcEndpoint) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.GrpcEndpoint[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x42 - } - } - if len(m.AccountType) > 0 { - for iNdEx := len(m.AccountType) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.AccountType[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.OriginGenesisTime) > 0 { - i -= len(m.OriginGenesisTime) - copy(dAtA[i:], m.OriginGenesisTime) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginGenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(m.BechValidatorPrefix) > 0 { - i -= len(m.BechValidatorPrefix) - copy(dAtA[i:], m.BechValidatorPrefix) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.BechValidatorPrefix))) - i-- - dAtA[i] = 0x2a - } - if len(m.BechAccountPrefix) > 0 { - i -= len(m.BechAccountPrefix) - copy(dAtA[i:], m.BechAccountPrefix) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.BechAccountPrefix))) - i-- - dAtA[i] = 0x22 - } - if len(m.Symbol) > 0 { - i -= len(m.Symbol) - copy(dAtA[i:], m.Symbol) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Symbol))) - i-- - dAtA[i] = 0x1a - } - if len(m.ChainName) > 0 { - i -= len(m.ChainName) - copy(dAtA[i:], m.ChainName) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChainName))) - i-- - dAtA[i] = 0x12 - } - if len(m.ChainIdCosmos) > 0 { - i -= len(m.ChainIdCosmos) - copy(dAtA[i:], m.ChainIdCosmos) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ChainIdCosmos))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -1074,7 +286,6 @@ func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } - func (m *GenesisState) Size() (n int) { if m == nil { return 0 @@ -1107,172 +318,12 @@ func (m *Params) Size() (n int) { return n } -func (m *Meta) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Data) > 0 { - for k, v := range m.Data { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovGenesis(uint64(len(k))) + 1 + len(v) + sovGenesis(uint64(len(v))) - n += mapEntrySize + 1 + sovGenesis(uint64(mapEntrySize)) - } - } - return n -} - -func (m *AssetInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Denom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.AssetType) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.OriginChain) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.OriginDenom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.OriginType) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovGenesis(uint64(m.Decimals)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Image) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.CoinGeckoId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Enable { - n += 2 - } - l = len(m.Path) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Channel) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Port) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.CounterParty != nil { - l = m.CounterParty.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - return n -} - -func (m *ChainInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.ChainIdCosmos) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.ChainName) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Symbol) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.BechAccountPrefix) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.BechValidatorPrefix) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.OriginGenesisTime) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.AccountType) > 0 { - for _, e := range m.AccountType { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.GrpcEndpoint) > 0 { - for _, e := range m.GrpcEndpoint { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if len(m.LcdEndpoint) > 0 { - for _, e := range m.LcdEndpoint { - l = e.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.Explorer != nil { - l = m.Explorer.Size() - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.FeeBase) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if len(m.FeeRate) > 0 { - for _, s := range m.FeeRate { - l = len(s) - n += 1 + l + sovGenesis(uint64(l)) - } - } - if m.FeeInitGasLimit != 0 { - n += 1 + sovGenesis(uint64(m.FeeInitGasLimit)) - } - if m.FeeIsSimulable { - n += 2 - } - if m.SimulGasMultiply != 0 { - n += 9 - } - return n -} - func sovGenesis(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } - func sozGenesis(x uint64) (n int) { return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } - func (m *GenesisState) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1356,7 +407,6 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } return nil } - func (m *Params) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1475,1190 +525,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } return nil } - -func (m *Meta) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Meta: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Meta: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Data == nil { - m.Data = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthGenesis - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthGenesis - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthGenesis - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthGenesis - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Data[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func (m *AssetInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: AssetInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Denom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginChain = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginDenom = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Image", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Image = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoinGeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CoinGeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Enable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Enable = bool(v != 0) - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Channel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Channel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Port = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 15: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CounterParty", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.CounterParty == nil { - m.CounterParty = &Meta{} - } - if err := m.CounterParty.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - -func (m *ChainInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ChainInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainIdCosmos", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainIdCosmos = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ChainName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Symbol = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BechAccountPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BechAccountPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BechValidatorPrefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BechValidatorPrefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginGenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.OriginGenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountType", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AccountType = append(m.AccountType, &Meta{}) - if err := m.AccountType[len(m.AccountType)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GrpcEndpoint = append(m.GrpcEndpoint, &Meta{}) - if err := m.GrpcEndpoint[len(m.GrpcEndpoint)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LcdEndpoint", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LcdEndpoint = append(m.LcdEndpoint, &Meta{}) - if err := m.LcdEndpoint[len(m.LcdEndpoint)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Explorer == nil { - m.Explorer = &Meta{} - } - if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 11: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeBase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeBase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeRate", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.FeeRate = append(m.FeeRate, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 13: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeInitGasLimit", wireType) - } - m.FeeInitGasLimit = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.FeeInitGasLimit |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 14: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field FeeIsSimulable", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.FeeIsSimulable = bool(v != 0) - case 15: - if wireType != 1 { - return fmt.Errorf("proto: wrong wireType = %d for field SimulGasMultiply", wireType) - } - var v uint64 - if (iNdEx + 8) > l { - return io.ErrUnexpectedEOF - } - v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) - iNdEx += 8 - m.SimulGasMultiply = float64(math.Float64frombits(v)) - default: - iNdEx = preIndex - skippy, err := skipGenesis(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthGenesis - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} - func skipGenesis(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/msgs.go b/x/did/types/msgs.go index 1b827d9e2..e308bb52a 100644 --- a/x/did/types/msgs.go +++ b/x/did/types/msgs.go @@ -7,6 +7,10 @@ import ( var _ sdk.Msg = &MsgUpdateParams{} +// +// [UpdateParams] +// + // NewMsgUpdateParams creates new instance of MsgUpdateParams func NewMsgUpdateParams( sender sdk.Address, @@ -44,33 +48,72 @@ func (msg *MsgUpdateParams) Validate() error { return msg.Params.Validate() } -// NewMsgInitializeController creates a new instance of MsgInitializeController -func NewMsgInitializeController( +// +// [RegisterController] +// + +// NewMsgRegisterController creates a new instance of MsgRegisterController +func NewMsgRegisterController( sender sdk.Address, -) (*MsgInitializeController, error) { - return &MsgInitializeController{ +) (*MsgRegisterController, error) { + return &MsgRegisterController{ Authority: sender.String(), }, nil } // Route returns the name of the module -func (msg MsgInitializeController) Route() string { return ModuleName } +func (msg MsgRegisterController) Route() string { return ModuleName } // Type returns the the action -func (msg MsgInitializeController) Type() string { return "initialize_controller" } +func (msg MsgRegisterController) Type() string { return "initialize_controller" } // GetSignBytes implements the LegacyMsg interface. -func (msg MsgInitializeController) GetSignBytes() []byte { +func (msg MsgRegisterController) GetSignBytes() []byte { return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) } // GetSigners returns the expected signers for a MsgUpdateParams message. -func (msg *MsgInitializeController) GetSigners() []sdk.AccAddress { +func (msg *MsgRegisterController) GetSigners() []sdk.AccAddress { addr, _ := sdk.AccAddressFromBech32(msg.Authority) return []sdk.AccAddress{addr} } // ValidateBasic does a sanity check on the provided data. -func (msg *MsgInitializeController) Validate() error { +func (msg *MsgRegisterController) Validate() error { + 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 } diff --git a/x/did/types/perms.go b/x/did/types/perms.go new file mode 100644 index 000000000..a05a1b0d4 --- /dev/null +++ b/x/did/types/perms.go @@ -0,0 +1,53 @@ +package types + +import "gopkg.in/macaroon-bakery.v2/bakery/checkers" + +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, + } +) + +func ResolvePermissionScope(scope string) (PermissionScope, bool) { + uriToPrefix := make(map[string]string) + for _, scope := range PermissionScopeStrings { + uriToPrefix["https://example.com/auth/"+scope] = scope + } + PermissionNamespace := checkers.NewNamespace(uriToPrefix) + + prefix, ok := PermissionNamespace.Resolve("https://example.com/auth/" + scope) + if !ok { + return 0, false + } + permScope, ok := StringToPermissionScope[prefix] + return permScope, ok +} diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index dc64b90fd..c820c2b90 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -111,24 +111,23 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } -// QueryExistsRequest is the request type for the Query/Exists RPC method. -type QueryExistsRequest struct { - Kind string `protobuf:"bytes,1,opt,name=kind,proto3" json:"kind,omitempty"` - Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` +// QueryAccountsRequest is the request type for the Query/Exists RPC method. +type QueryAccountsRequest struct { + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } -func (m *QueryExistsRequest) Reset() { *m = QueryExistsRequest{} } -func (m *QueryExistsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryExistsRequest) ProtoMessage() {} -func (*QueryExistsRequest) Descriptor() ([]byte, []int) { +func (m *QueryAccountsRequest) Reset() { *m = QueryAccountsRequest{} } +func (m *QueryAccountsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsRequest) ProtoMessage() {} +func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae1fa9bb626e2869, []int{2} } -func (m *QueryExistsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryExistsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryExistsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAccountsRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -138,49 +137,42 @@ func (m *QueryExistsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryExistsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryExistsRequest.Merge(m, src) +func (m *QueryAccountsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsRequest.Merge(m, src) } -func (m *QueryExistsRequest) XXX_Size() int { +func (m *QueryAccountsRequest) XXX_Size() int { return m.Size() } -func (m *QueryExistsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryExistsRequest.DiscardUnknown(m) +func (m *QueryAccountsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryExistsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryAccountsRequest proto.InternalMessageInfo -func (m *QueryExistsRequest) GetKind() string { +func (m *QueryAccountsRequest) GetDid() string { if m != nil { - return m.Kind + return m.Did } return "" } -func (m *QueryExistsRequest) GetValue() string { - if m != nil { - return m.Value - } - return "" -} - -// QueryExistsResponse is the response type for the Query/Exists RPC method. -type QueryExistsResponse struct { +// QueryAccountsResponse is the response type for the Query/Exists RPC method. +type QueryAccountsResponse struct { Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` } -func (m *QueryExistsResponse) Reset() { *m = QueryExistsResponse{} } -func (m *QueryExistsResponse) String() string { return proto.CompactTextString(m) } -func (*QueryExistsResponse) ProtoMessage() {} -func (*QueryExistsResponse) Descriptor() ([]byte, []int) { +func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } +func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryAccountsResponse) ProtoMessage() {} +func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ae1fa9bb626e2869, []int{3} } -func (m *QueryExistsResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryExistsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryAccountsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryExistsResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryAccountsResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -190,35 +182,231 @@ func (m *QueryExistsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryExistsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryExistsResponse.Merge(m, src) +func (m *QueryAccountsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryAccountsResponse.Merge(m, src) } -func (m *QueryExistsResponse) XXX_Size() int { +func (m *QueryAccountsResponse) XXX_Size() int { return m.Size() } -func (m *QueryExistsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryExistsResponse.DiscardUnknown(m) +func (m *QueryAccountsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryAccountsResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryExistsResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryAccountsResponse proto.InternalMessageInfo -func (m *QueryExistsResponse) GetExists() bool { +func (m *QueryAccountsResponse) GetExists() bool { if m != nil { return m.Exists } return false } +// QueryCredentialsRequest is the request type for the Query/Exists RPC method. +type QueryCredentialsRequest struct { + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` +} + +func (m *QueryCredentialsRequest) Reset() { *m = QueryCredentialsRequest{} } +func (m *QueryCredentialsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryCredentialsRequest) ProtoMessage() {} +func (*QueryCredentialsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{4} +} +func (m *QueryCredentialsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCredentialsRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCredentialsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCredentialsRequest.Merge(m, src) +} +func (m *QueryCredentialsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryCredentialsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCredentialsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCredentialsRequest proto.InternalMessageInfo + +func (m *QueryCredentialsRequest) GetDid() string { + if m != nil { + return m.Did + } + return "" +} + +func (m *QueryCredentialsRequest) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +// QueryCredentialsResponse is the response type for the Query/Exists RPC method. +type QueryCredentialsResponse struct { + Credentials map[string][]byte `protobuf:"bytes,1,rep,name=credentials,proto3" json:"credentials,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *QueryCredentialsResponse) Reset() { *m = QueryCredentialsResponse{} } +func (m *QueryCredentialsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryCredentialsResponse) ProtoMessage() {} +func (*QueryCredentialsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{5} +} +func (m *QueryCredentialsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryCredentialsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryCredentialsResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryCredentialsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryCredentialsResponse.Merge(m, src) +} +func (m *QueryCredentialsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryCredentialsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryCredentialsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryCredentialsResponse proto.InternalMessageInfo + +func (m *QueryCredentialsResponse) GetCredentials() map[string][]byte { + if m != nil { + return m.Credentials + } + return nil +} + +// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. +type QueryIdentitiesRequest struct { + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` +} + +func (m *QueryIdentitiesRequest) Reset() { *m = QueryIdentitiesRequest{} } +func (m *QueryIdentitiesRequest) String() string { return proto.CompactTextString(m) } +func (*QueryIdentitiesRequest) ProtoMessage() {} +func (*QueryIdentitiesRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{6} +} +func (m *QueryIdentitiesRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIdentitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIdentitiesRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryIdentitiesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIdentitiesRequest.Merge(m, src) +} +func (m *QueryIdentitiesRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryIdentitiesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIdentitiesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIdentitiesRequest proto.InternalMessageInfo + +func (m *QueryIdentitiesRequest) GetDid() string { + if m != nil { + return m.Did + } + return "" +} + +// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. +type QueryIdentitiesResponse struct { + Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` + VerificationMethod []*VerificationMethod `protobuf:"bytes,2,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"` +} + +func (m *QueryIdentitiesResponse) Reset() { *m = QueryIdentitiesResponse{} } +func (m *QueryIdentitiesResponse) String() string { return proto.CompactTextString(m) } +func (*QueryIdentitiesResponse) ProtoMessage() {} +func (*QueryIdentitiesResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{7} +} +func (m *QueryIdentitiesResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryIdentitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryIdentitiesResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryIdentitiesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryIdentitiesResponse.Merge(m, src) +} +func (m *QueryIdentitiesResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryIdentitiesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryIdentitiesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryIdentitiesResponse proto.InternalMessageInfo + +func (m *QueryIdentitiesResponse) GetExists() bool { + if m != nil { + return m.Exists + } + return false +} + +func (m *QueryIdentitiesResponse) GetVerificationMethod() []*VerificationMethod { + if m != nil { + return m.VerificationMethod + } + return nil +} + // QueryResolveRequest is the request type for the Query/Resolve RPC method. type QueryResolveRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` } func (m *QueryResolveRequest) Reset() { *m = QueryResolveRequest{} } func (m *QueryResolveRequest) String() string { return proto.CompactTextString(m) } func (*QueryResolveRequest) ProtoMessage() {} func (*QueryResolveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{4} + return fileDescriptor_ae1fa9bb626e2869, []int{8} } func (m *QueryResolveRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -247,9 +435,9 @@ func (m *QueryResolveRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryResolveRequest proto.InternalMessageInfo -func (m *QueryResolveRequest) GetId() string { +func (m *QueryResolveRequest) GetDid() string { if m != nil { - return m.Id + return m.Did } return "" } @@ -257,14 +445,14 @@ func (m *QueryResolveRequest) GetId() string { // QueryResolveResponse is the response type for the Query/Resolve RPC method. type QueryResolveResponse struct { // document is the DID document - Document string `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` + Document *Document `protobuf:"bytes,1,opt,name=document,proto3" json:"document,omitempty"` } func (m *QueryResolveResponse) Reset() { *m = QueryResolveResponse{} } func (m *QueryResolveResponse) String() string { return proto.CompactTextString(m) } func (*QueryResolveResponse) ProtoMessage() {} func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{5} + return fileDescriptor_ae1fa9bb626e2869, []int{9} } func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -293,30 +481,30 @@ func (m *QueryResolveResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryResolveResponse proto.InternalMessageInfo -func (m *QueryResolveResponse) GetDocument() string { +func (m *QueryResolveResponse) GetDocument() *Document { if m != nil { return m.Document } - return "" + return nil } -// QueryLoginOptionsRequest is the request type for the Query/LoginOptions RPC method. -type QueryWitnessCredentialRequest struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. +type QueryServiceRequest struct { + Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` } -func (m *QueryWitnessCredentialRequest) Reset() { *m = QueryWitnessCredentialRequest{} } -func (m *QueryWitnessCredentialRequest) String() string { return proto.CompactTextString(m) } -func (*QueryWitnessCredentialRequest) ProtoMessage() {} -func (*QueryWitnessCredentialRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{6} +func (m *QueryServiceRequest) Reset() { *m = QueryServiceRequest{} } +func (m *QueryServiceRequest) String() string { return proto.CompactTextString(m) } +func (*QueryServiceRequest) ProtoMessage() {} +func (*QueryServiceRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{10} } -func (m *QueryWitnessCredentialRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryServiceRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryWitnessCredentialRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryWitnessCredentialRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryServiceRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -326,43 +514,43 @@ func (m *QueryWitnessCredentialRequest) XXX_Marshal(b []byte, deterministic bool return b[:n], nil } } -func (m *QueryWitnessCredentialRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryWitnessCredentialRequest.Merge(m, src) +func (m *QueryServiceRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryServiceRequest.Merge(m, src) } -func (m *QueryWitnessCredentialRequest) XXX_Size() int { +func (m *QueryServiceRequest) XXX_Size() int { return m.Size() } -func (m *QueryWitnessCredentialRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryWitnessCredentialRequest.DiscardUnknown(m) +func (m *QueryServiceRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryServiceRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryWitnessCredentialRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryServiceRequest proto.InternalMessageInfo -func (m *QueryWitnessCredentialRequest) GetId() string { +func (m *QueryServiceRequest) GetOrigin() string { if m != nil { - return m.Id + return m.Origin } return "" } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. -type QueryWitnessCredentialResponse struct { +type QueryServiceResponse struct { // options is the PublicKeyCredentialAttestationOptions Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` } -func (m *QueryWitnessCredentialResponse) Reset() { *m = QueryWitnessCredentialResponse{} } -func (m *QueryWitnessCredentialResponse) String() string { return proto.CompactTextString(m) } -func (*QueryWitnessCredentialResponse) ProtoMessage() {} -func (*QueryWitnessCredentialResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{7} +func (m *QueryServiceResponse) Reset() { *m = QueryServiceResponse{} } +func (m *QueryServiceResponse) String() string { return proto.CompactTextString(m) } +func (*QueryServiceResponse) ProtoMessage() {} +func (*QueryServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{11} } -func (m *QueryWitnessCredentialResponse) XXX_Unmarshal(b []byte) error { +func (m *QueryServiceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryWitnessCredentialResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryWitnessCredentialResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryServiceResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -372,19 +560,19 @@ func (m *QueryWitnessCredentialResponse) XXX_Marshal(b []byte, deterministic boo return b[:n], nil } } -func (m *QueryWitnessCredentialResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryWitnessCredentialResponse.Merge(m, src) +func (m *QueryServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryServiceResponse.Merge(m, src) } -func (m *QueryWitnessCredentialResponse) XXX_Size() int { +func (m *QueryServiceResponse) XXX_Size() int { return m.Size() } -func (m *QueryWitnessCredentialResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryWitnessCredentialResponse.DiscardUnknown(m) +func (m *QueryServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryServiceResponse.DiscardUnknown(m) } -var xxx_messageInfo_QueryWitnessCredentialResponse proto.InternalMessageInfo +var xxx_messageInfo_QueryServiceResponse proto.InternalMessageInfo -func (m *QueryWitnessCredentialResponse) GetOptions() string { +func (m *QueryServiceResponse) GetOptions() string { if m != nil { return m.Options } @@ -394,47 +582,65 @@ func (m *QueryWitnessCredentialResponse) GetOptions() string { func init() { proto.RegisterType((*QueryParamsRequest)(nil), "did.v1.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "did.v1.QueryParamsResponse") - proto.RegisterType((*QueryExistsRequest)(nil), "did.v1.QueryExistsRequest") - proto.RegisterType((*QueryExistsResponse)(nil), "did.v1.QueryExistsResponse") + proto.RegisterType((*QueryAccountsRequest)(nil), "did.v1.QueryAccountsRequest") + proto.RegisterType((*QueryAccountsResponse)(nil), "did.v1.QueryAccountsResponse") + proto.RegisterType((*QueryCredentialsRequest)(nil), "did.v1.QueryCredentialsRequest") + proto.RegisterType((*QueryCredentialsResponse)(nil), "did.v1.QueryCredentialsResponse") + proto.RegisterMapType((map[string][]byte)(nil), "did.v1.QueryCredentialsResponse.CredentialsEntry") + proto.RegisterType((*QueryIdentitiesRequest)(nil), "did.v1.QueryIdentitiesRequest") + proto.RegisterType((*QueryIdentitiesResponse)(nil), "did.v1.QueryIdentitiesResponse") proto.RegisterType((*QueryResolveRequest)(nil), "did.v1.QueryResolveRequest") proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse") - proto.RegisterType((*QueryWitnessCredentialRequest)(nil), "did.v1.QueryWitnessCredentialRequest") - proto.RegisterType((*QueryWitnessCredentialResponse)(nil), "did.v1.QueryWitnessCredentialResponse") + proto.RegisterType((*QueryServiceRequest)(nil), "did.v1.QueryServiceRequest") + proto.RegisterType((*QueryServiceResponse)(nil), "did.v1.QueryServiceResponse") } func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 459 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcf, 0x6b, 0x13, 0x41, - 0x14, 0xc7, 0xb3, 0x8b, 0x5d, 0xeb, 0x2b, 0x16, 0x32, 0x09, 0x12, 0xb7, 0xed, 0x22, 0x23, 0x2d, - 0x5e, 0xdc, 0xa1, 0xf1, 0x26, 0xea, 0x41, 0xf1, 0xe0, 0x4d, 0x73, 0x50, 0xf0, 0x36, 0xed, 0x3c, - 0xd3, 0xc1, 0x64, 0x66, 0xbb, 0x33, 0x9b, 0x36, 0x88, 0x17, 0x2f, 0x5e, 0x05, 0xff, 0x29, 0x8f, - 0x05, 0x3d, 0x78, 0x94, 0xc4, 0x3f, 0x44, 0xf2, 0x76, 0x56, 0x58, 0xda, 0xd0, 0x5b, 0xde, 0x8f, - 0xef, 0xf7, 0x33, 0xf9, 0x3e, 0x16, 0x98, 0xd2, 0x4a, 0xcc, 0x0e, 0xc5, 0x69, 0x85, 0xe5, 0x3c, - 0x2f, 0x4a, 0xeb, 0x2d, 0x4b, 0x94, 0x56, 0xf9, 0xec, 0x30, 0xdd, 0x1d, 0x5b, 0x3b, 0x9e, 0xa0, - 0x90, 0x85, 0x16, 0xd2, 0x18, 0xeb, 0xa5, 0xd7, 0xd6, 0xb8, 0x7a, 0x2b, 0xed, 0x07, 0xe5, 0x18, - 0x0d, 0x3a, 0x1d, 0xba, 0xbc, 0x0f, 0xec, 0xcd, 0xca, 0xea, 0xb5, 0x2c, 0xe5, 0xd4, 0x8d, 0xf0, - 0xb4, 0x42, 0xe7, 0xf9, 0x53, 0xe8, 0xb5, 0xba, 0xae, 0xb0, 0xc6, 0x21, 0x3b, 0x80, 0xa4, 0xa0, - 0xce, 0x20, 0xba, 0x17, 0x3d, 0xd8, 0x1a, 0x6e, 0xe7, 0x35, 0x39, 0x0f, 0x7b, 0x61, 0xca, 0x9f, - 0x05, 0xd3, 0x97, 0xe7, 0xda, 0xf9, 0xc6, 0x94, 0x31, 0xb8, 0xf1, 0x51, 0x1b, 0x45, 0xda, 0x5b, - 0x23, 0xfa, 0xcd, 0xfa, 0xb0, 0x31, 0x93, 0x93, 0x0a, 0x07, 0x31, 0x35, 0xeb, 0x82, 0x3f, 0x0c, - 0xf8, 0x46, 0x1f, 0xf0, 0x77, 0x20, 0x41, 0xea, 0x90, 0xc5, 0xe6, 0x28, 0x54, 0x7c, 0x3f, 0xac, - 0x8f, 0xd0, 0xd9, 0xc9, 0x0c, 0x1b, 0xde, 0x36, 0xc4, 0xba, 0xa1, 0xc5, 0x5a, 0xf1, 0x21, 0xf4, - 0xdb, 0x6b, 0xc1, 0x36, 0x85, 0x4d, 0x65, 0x8f, 0xab, 0x29, 0x1a, 0x1f, 0xb6, 0xff, 0xd7, 0x5c, - 0xc0, 0x1e, 0x69, 0xde, 0x69, 0x6f, 0xd0, 0xb9, 0x17, 0x25, 0x2a, 0x34, 0x5e, 0xcb, 0xc9, 0x3a, - 0xc8, 0x63, 0xc8, 0xd6, 0x09, 0x02, 0x6e, 0x00, 0x37, 0x6d, 0x41, 0x87, 0x09, 0xb2, 0xa6, 0x1c, - 0xfe, 0x8a, 0x61, 0x83, 0xc4, 0xec, 0x2d, 0x24, 0x75, 0xa4, 0x2c, 0x6d, 0x22, 0xbe, 0x7c, 0xa5, - 0x74, 0xe7, 0xca, 0x59, 0x8d, 0xe1, 0xbd, 0x2f, 0x3f, 0xff, 0x7e, 0x8f, 0x6f, 0xb3, 0x2d, 0xb1, - 0xba, 0x7b, 0x7d, 0x18, 0xa6, 0xa1, 0x1b, 0xfe, 0xfd, 0x2b, 0x7a, 0xd6, 0x07, 0x8d, 0x25, 0x6b, - 0xdb, 0xb4, 0x43, 0x4c, 0x77, 0xaf, 0x1e, 0x06, 0xc8, 0x5d, 0x82, 0xf4, 0x58, 0x97, 0x20, 0x65, - 0x3d, 0x15, 0x9f, 0xb4, 0xfa, 0xcc, 0xbe, 0x46, 0xd0, 0xbd, 0x14, 0x02, 0xdb, 0x6f, 0xd9, 0xad, - 0x4b, 0x35, 0x3d, 0xb8, 0x6e, 0x2d, 0xf0, 0xef, 0x13, 0x7f, 0x8f, 0xed, 0x10, 0x5f, 0x3a, 0x87, - 0xe5, 0x2a, 0x4a, 0x7a, 0x81, 0x38, 0xab, 0x65, 0xcf, 0x9f, 0xfc, 0x58, 0x64, 0xd1, 0xc5, 0x22, - 0x8b, 0xfe, 0x2c, 0xb2, 0xe8, 0xdb, 0x32, 0xeb, 0x5c, 0x2c, 0xb3, 0xce, 0xef, 0x65, 0xd6, 0x79, - 0xcf, 0xc7, 0xda, 0x9f, 0x54, 0x47, 0xf9, 0xb1, 0x9d, 0x0a, 0x6b, 0x9c, 0x35, 0xa5, 0x38, 0x39, - 0x93, 0x73, 0x71, 0x4e, 0x76, 0x7e, 0x5e, 0xa0, 0x3b, 0x4a, 0xe8, 0x3b, 0x79, 0xf4, 0x2f, 0x00, - 0x00, 0xff, 0xff, 0xa6, 0x3a, 0x22, 0xfd, 0x79, 0x03, 0x00, 0x00, + // 665 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x4f, 0xd4, 0x4e, + 0x18, 0xc7, 0xe9, 0xf2, 0x63, 0xe1, 0xf7, 0xac, 0x1a, 0x32, 0x2c, 0xb0, 0x29, 0x50, 0x70, 0x0e, + 0x42, 0x8c, 0x6e, 0x05, 0x2f, 0xc6, 0xa8, 0x89, 0x82, 0x07, 0x4d, 0x4c, 0xb4, 0x24, 0x1c, 0x3c, + 0x59, 0x3a, 0xe3, 0x32, 0x61, 0x99, 0x29, 0xed, 0xb4, 0xd2, 0x10, 0x2e, 0xbe, 0x02, 0x13, 0x5f, + 0x88, 0x6f, 0xc3, 0x23, 0x89, 0x17, 0x8f, 0x06, 0x7c, 0x0b, 0xde, 0xcd, 0xce, 0x4c, 0x77, 0xdb, + 0xb2, 0xc5, 0x5b, 0xe7, 0xf9, 0xf3, 0xfd, 0x3c, 0x33, 0xf3, 0x9d, 0x02, 0x22, 0x8c, 0xb8, 0xe9, + 0xa6, 0x7b, 0x9c, 0xd0, 0x28, 0xeb, 0x86, 0x91, 0x90, 0x02, 0x35, 0x09, 0x23, 0xdd, 0x74, 0xd3, + 0x5e, 0xee, 0x09, 0xd1, 0xeb, 0x53, 0xd7, 0x0f, 0x99, 0xeb, 0x73, 0x2e, 0xa4, 0x2f, 0x99, 0xe0, + 0xb1, 0xae, 0xb2, 0xdb, 0xa6, 0xb3, 0x47, 0x39, 0x8d, 0x59, 0x1e, 0xcd, 0xf5, 0x64, 0x16, 0x52, + 0x13, 0xc3, 0x6d, 0x40, 0xef, 0x06, 0xf2, 0x6f, 0xfd, 0xc8, 0x3f, 0x8a, 0x3d, 0x7a, 0x9c, 0xd0, + 0x58, 0xe2, 0xa7, 0x30, 0x57, 0x8a, 0xc6, 0xa1, 0xe0, 0x31, 0x45, 0x77, 0xa0, 0x19, 0xaa, 0x48, + 0xc7, 0x5a, 0xb3, 0x36, 0x5a, 0x5b, 0xb7, 0xba, 0x7a, 0x9a, 0xae, 0xa9, 0x33, 0x59, 0xbc, 0x01, + 0x6d, 0xd5, 0xfe, 0x3c, 0x08, 0x44, 0xc2, 0x65, 0x2e, 0x8b, 0x66, 0x61, 0x92, 0x30, 0xa2, 0x9a, + 0xff, 0xf7, 0x06, 0x9f, 0xd8, 0x85, 0xf9, 0x4a, 0xa5, 0x41, 0x2d, 0x40, 0x93, 0x9e, 0xb0, 0x58, + 0x6a, 0xd4, 0x8c, 0x67, 0x56, 0x78, 0x1b, 0x16, 0x55, 0xc3, 0x76, 0x44, 0x09, 0xe5, 0x92, 0xf9, + 0xfd, 0x7a, 0xf5, 0x81, 0x88, 0x88, 0x58, 0x8f, 0xf1, 0x4e, 0x43, 0x05, 0xcd, 0x0a, 0x7f, 0xb3, + 0xa0, 0x73, 0x55, 0xc5, 0x90, 0x77, 0xa1, 0x15, 0x8c, 0xc2, 0x1d, 0x6b, 0x6d, 0x72, 0xa3, 0xb5, + 0xb5, 0x99, 0xef, 0xb4, 0xae, 0xad, 0x5b, 0x88, 0xbd, 0xe4, 0x32, 0xca, 0xbc, 0xa2, 0x8a, 0xfd, + 0x0c, 0x66, 0xab, 0x05, 0x83, 0x79, 0x0f, 0x69, 0x96, 0xcf, 0x7b, 0x48, 0x33, 0xd4, 0x86, 0xa9, + 0xd4, 0xef, 0x27, 0x54, 0x8d, 0x7b, 0xc3, 0xd3, 0x8b, 0xc7, 0x8d, 0x47, 0x16, 0xbe, 0x0b, 0x0b, + 0x8a, 0xfc, 0x4a, 0x49, 0x48, 0x46, 0xaf, 0x39, 0xd3, 0x33, 0x73, 0x44, 0xc5, 0xda, 0xeb, 0x4f, + 0x15, 0xbd, 0x06, 0x94, 0xd2, 0x88, 0x7d, 0x64, 0x81, 0xb2, 0xd1, 0x1b, 0x2a, 0x0f, 0x04, 0xe9, + 0x34, 0xd4, 0xd6, 0xed, 0x7c, 0xeb, 0x7b, 0x57, 0x2a, 0xbc, 0x31, 0x5d, 0x78, 0xdd, 0x78, 0xc7, + 0xa3, 0xb1, 0xe8, 0xa7, 0xb4, 0x7e, 0xce, 0x1d, 0xe3, 0x92, 0x61, 0xa1, 0x19, 0xf2, 0x1e, 0xcc, + 0x10, 0x11, 0x24, 0x47, 0x94, 0x4b, 0xe3, 0xb3, 0xd9, 0x7c, 0x84, 0x1d, 0x13, 0xf7, 0x86, 0x15, + 0xf8, 0xbe, 0xc1, 0xed, 0xd2, 0x28, 0x65, 0xc1, 0x10, 0x37, 0xba, 0x7a, 0xab, 0x74, 0xf5, 0x0f, + 0x0c, 0x74, 0x58, 0x6e, 0xa0, 0x1d, 0x98, 0x16, 0xa1, 0x7a, 0x42, 0xa6, 0x21, 0x5f, 0x6e, 0xfd, + 0xf9, 0x0f, 0xa6, 0x54, 0x0b, 0xda, 0x83, 0xa6, 0x36, 0x3a, 0xb2, 0x4b, 0x76, 0x28, 0xbd, 0x1d, + 0x7b, 0x69, 0x6c, 0x4e, 0x63, 0xf0, 0xdc, 0xe7, 0x1f, 0xbf, 0xbf, 0x36, 0x6e, 0xa2, 0x96, 0x3b, + 0x78, 0x8b, 0xfa, 0xb9, 0x20, 0x02, 0x33, 0xb9, 0xff, 0xd1, 0x72, 0xa9, 0xbb, 0xf2, 0x80, 0xec, + 0x95, 0x9a, 0xac, 0x51, 0x5f, 0x52, 0xea, 0xf3, 0x68, 0x4e, 0xa9, 0x9f, 0x12, 0x46, 0xce, 0x5c, + 0x3f, 0x57, 0xce, 0xa0, 0x55, 0xb0, 0x20, 0x5a, 0xad, 0x77, 0xb4, 0x66, 0xad, 0xfd, 0xcb, 0xf2, + 0x78, 0x5d, 0xe1, 0x6e, 0xa3, 0xd5, 0x02, 0xee, 0x54, 0x9f, 0xf3, 0x99, 0x5b, 0x70, 0x3f, 0xea, + 0x03, 0x8c, 0xcc, 0x88, 0x9c, 0x92, 0xf0, 0x15, 0x47, 0xdb, 0xab, 0xb5, 0x79, 0xc3, 0x5d, 0x51, + 0xdc, 0x45, 0x34, 0x5f, 0xe0, 0xb2, 0x91, 0xfe, 0x07, 0x98, 0x36, 0x96, 0x42, 0xe5, 0xbb, 0x28, + 0x3b, 0xd2, 0x5e, 0x1e, 0x9f, 0x34, 0x10, 0x5b, 0x41, 0xda, 0x08, 0x29, 0x48, 0xa4, 0xb3, 0x1a, + 0x86, 0x02, 0x98, 0x36, 0xfe, 0xa9, 0x10, 0xca, 0x26, 0xac, 0x10, 0x2a, 0x96, 0xab, 0x6c, 0x23, + 0xd6, 0xd9, 0xe1, 0x01, 0xbe, 0x78, 0xf2, 0xfd, 0xc2, 0xb1, 0xce, 0x2f, 0x1c, 0xeb, 0xd7, 0x85, + 0x63, 0x7d, 0xb9, 0x74, 0x26, 0xce, 0x2f, 0x9d, 0x89, 0x9f, 0x97, 0xce, 0xc4, 0x7b, 0xdc, 0x63, + 0xf2, 0x20, 0xd9, 0xef, 0x06, 0xe2, 0xc8, 0x15, 0x3c, 0x16, 0x3c, 0x72, 0x0f, 0x3e, 0xf9, 0x99, + 0x7b, 0xa2, 0x84, 0xd4, 0xdf, 0x7d, 0xbf, 0xa9, 0x7e, 0xef, 0x0f, 0xff, 0x06, 0x00, 0x00, 0xff, + 0xff, 0x70, 0x63, 0x8a, 0x47, 0x44, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -451,10 +657,16 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Accounts returns associated wallet accounts with the DID. + Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + // Credentials returns associated credentials with the DID and Service Origin. + Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) + // Identities returns associated identity with the DID. + Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) // Resolve queries the DID document by its id. - ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) - // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) + Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + // Service returns associated ServiceInfo for a given Origin + Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) } type queryClient struct { @@ -474,18 +686,45 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) ResolveIdentifier(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { - out := new(QueryResolveResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/ResolveIdentifier", in, out, opts...) +func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { + out := new(QueryAccountsResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Accounts", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCredentialRequest, opts ...grpc.CallOption) (*QueryWitnessCredentialResponse, error) { - out := new(QueryWitnessCredentialResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/WitnessCredential", in, out, opts...) +func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { + out := new(QueryCredentialsResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Credentials", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) { + out := new(QueryIdentitiesResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Identities", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { + out := new(QueryResolveResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Resolve", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { + out := new(QueryServiceResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Service", in, out, opts...) if err != nil { return nil, err } @@ -496,10 +735,16 @@ func (c *queryClient) WitnessCredential(ctx context.Context, in *QueryWitnessCre type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Accounts returns associated wallet accounts with the DID. + Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + // Credentials returns associated credentials with the DID and Service Origin. + Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) + // Identities returns associated identity with the DID. + Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) // Resolve queries the DID document by its id. - ResolveIdentifier(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) - // LoginOptions queries the PublicKeyCredentialAttestationOptions for starting a login flow. - WitnessCredential(context.Context, *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) + Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) + // Service returns associated ServiceInfo for a given Origin + Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -509,11 +754,20 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) ResolveIdentifier(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ResolveIdentifier not implemented") +func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") } -func (*UnimplementedQueryServer) WitnessCredential(ctx context.Context, req *QueryWitnessCredentialRequest) (*QueryWitnessCredentialResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method WitnessCredential not implemented") +func (*UnimplementedQueryServer) Credentials(ctx context.Context, req *QueryCredentialsRequest) (*QueryCredentialsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Credentials not implemented") +} +func (*UnimplementedQueryServer) Identities(ctx context.Context, req *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Identities not implemented") +} +func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") +} +func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryServiceRequest) (*QueryServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } func RegisterQueryServer(s grpc1.Server, srv QueryServer) { @@ -538,38 +792,92 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_ResolveIdentifier_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryAccountsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Accounts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Query/Accounts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryCredentialsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Credentials(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Query/Credentials", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Credentials(ctx, req.(*QueryCredentialsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Identities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryIdentitiesRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Identities(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Query/Identities", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Identities(ctx, req.(*QueryIdentitiesRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryResolveRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).ResolveIdentifier(ctx, in) + return srv.(QueryServer).Resolve(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Query/ResolveIdentifier", + FullMethod: "/did.v1.Query/Resolve", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ResolveIdentifier(ctx, req.(*QueryResolveRequest)) + return srv.(QueryServer).Resolve(ctx, req.(*QueryResolveRequest)) } return interceptor(ctx, in, info, handler) } -func _Query_WitnessCredential_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryWitnessCredentialRequest) +func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryServiceRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).WitnessCredential(ctx, in) + return srv.(QueryServer).Service(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Query/WitnessCredential", + FullMethod: "/did.v1.Query/Service", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).WitnessCredential(ctx, req.(*QueryWitnessCredentialRequest)) + return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest)) } return interceptor(ctx, in, info, handler) } @@ -583,12 +891,24 @@ var _Query_serviceDesc = grpc.ServiceDesc{ Handler: _Query_Params_Handler, }, { - MethodName: "ResolveIdentifier", - Handler: _Query_ResolveIdentifier_Handler, + MethodName: "Accounts", + Handler: _Query_Accounts_Handler, }, { - MethodName: "WitnessCredential", - Handler: _Query_WitnessCredential_Handler, + MethodName: "Credentials", + Handler: _Query_Credentials_Handler, + }, + { + MethodName: "Identities", + Handler: _Query_Identities_Handler, + }, + { + MethodName: "Resolve", + Handler: _Query_Resolve_Handler, + }, + { + MethodName: "Service", + Handler: _Query_Service_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -653,7 +973,7 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryExistsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -663,34 +983,27 @@ func (m *QueryExistsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryExistsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryExistsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Value) > 0 { - i -= len(m.Value) - copy(dAtA[i:], m.Value) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Value))) - i-- - dAtA[i] = 0x12 - } - if len(m.Kind) > 0 { - i -= len(m.Kind) - copy(dAtA[i:], m.Kind) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Kind))) + if len(m.Did) > 0 { + i -= len(m.Did) + copy(dAtA[i:], m.Did) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryExistsResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryAccountsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -700,12 +1013,12 @@ func (m *QueryExistsResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryExistsResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryAccountsResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryExistsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -723,6 +1036,164 @@ func (m *QueryExistsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryCredentialsRequest) 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 *QueryCredentialsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCredentialsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(m.Did) > 0 { + i -= len(m.Did) + copy(dAtA[i:], m.Did) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryCredentialsResponse) 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 *QueryCredentialsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryCredentialsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Credentials) > 0 { + for k := range m.Credentials { + v := m.Credentials[k] + baseI := i + if len(v) > 0 { + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintQuery(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + } + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintQuery(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryIdentitiesRequest) 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 *QueryIdentitiesRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIdentitiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Did) > 0 { + i -= len(m.Did) + copy(dAtA[i:], m.Did) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryIdentitiesResponse) 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 *QueryIdentitiesResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryIdentitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VerificationMethod) > 0 { + for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if m.Exists { + i-- + if m.Exists { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *QueryResolveRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -743,10 +1214,10 @@ func (m *QueryResolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + if len(m.Did) > 0 { + i -= len(m.Did) + copy(dAtA[i:], m.Did) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) i-- dAtA[i] = 0xa } @@ -773,17 +1244,22 @@ func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Document) > 0 { - i -= len(m.Document) - copy(dAtA[i:], m.Document) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Document))) + if m.Document != nil { + { + size, err := m.Document.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryWitnessCredentialRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryServiceRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -793,27 +1269,27 @@ func (m *QueryWitnessCredentialRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryWitnessCredentialRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryServiceRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryWitnessCredentialRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Id))) + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *QueryWitnessCredentialResponse) Marshal() (dAtA []byte, err error) { +func (m *QueryServiceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -823,12 +1299,12 @@ func (m *QueryWitnessCredentialResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryWitnessCredentialResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryServiceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryWitnessCredentialResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -876,24 +1352,20 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func (m *QueryExistsRequest) Size() (n int) { +func (m *QueryAccountsRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Kind) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Value) + l = len(m.Did) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryExistsResponse) Size() (n int) { +func (m *QueryAccountsResponse) Size() (n int) { if m == nil { return 0 } @@ -905,13 +1377,82 @@ func (m *QueryExistsResponse) Size() (n int) { return n } +func (m *QueryCredentialsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Did) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryCredentialsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.Credentials) > 0 { + for k, v := range m.Credentials { + _ = k + _ = v + l = 0 + if len(v) > 0 { + l = 1 + len(v) + sovQuery(uint64(len(v))) + } + mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l + n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) + } + } + return n +} + +func (m *QueryIdentitiesRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Did) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryIdentitiesResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Exists { + n += 2 + } + if len(m.VerificationMethod) > 0 { + for _, e := range m.VerificationMethod { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + return n +} + func (m *QueryResolveRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Id) + l = len(m.Did) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -924,27 +1465,27 @@ func (m *QueryResolveResponse) Size() (n int) { } var l int _ = l - l = len(m.Document) - if l > 0 { + if m.Document != nil { + l = m.Document.Size() n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryWitnessCredentialRequest) Size() (n int) { +func (m *QueryServiceRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Id) + l = len(m.Origin) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } return n } -func (m *QueryWitnessCredentialResponse) Size() (n int) { +func (m *QueryServiceResponse) Size() (n int) { if m == nil { return 0 } @@ -1099,7 +1640,7 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryExistsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1122,15 +1663,15 @@ func (m *QueryExistsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryExistsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountsRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryExistsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1158,39 +1699,7 @@ func (m *QueryExistsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Kind = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Value", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Value = string(dAtA[iNdEx:postIndex]) + m.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1213,7 +1722,7 @@ func (m *QueryExistsRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryExistsResponse) Unmarshal(dAtA []byte) error { +func (m *QueryAccountsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1236,10 +1745,10 @@ func (m *QueryExistsResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryExistsResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryAccountsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryExistsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryAccountsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1283,6 +1792,484 @@ func (m *QueryExistsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryCredentialsRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCredentialsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCredentialsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryCredentialsResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryCredentialsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryCredentialsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Credentials == nil { + m.Credentials = make(map[string][]byte) + } + var mapkey string + mapvalue := []byte{} + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + 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 ErrInvalidLengthQuery + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthQuery + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return ErrInvalidLengthQuery + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return ErrInvalidLengthQuery + } + if postbytesIndex > l { + return io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Credentials[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIdentitiesRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryIdentitiesRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIdentitiesRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryIdentitiesResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryIdentitiesResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryIdentitiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exists = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VerificationMethod = append(m.VerificationMethod, &VerificationMethod{}) + if err := m.VerificationMethod[len(m.VerificationMethod)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1314,7 +2301,7 @@ func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1342,7 +2329,7 @@ func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Did = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1398,7 +2385,7 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Document", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowQuery @@ -1408,23 +2395,27 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthQuery } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthQuery } if postIndex > l { return io.ErrUnexpectedEOF } - m.Document = string(dAtA[iNdEx:postIndex]) + if m.Document == nil { + m.Document = &Document{} + } + if err := m.Document.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -1447,7 +2438,7 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryWitnessCredentialRequest) Unmarshal(dAtA []byte) error { +func (m *QueryServiceRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1470,15 +2461,15 @@ func (m *QueryWitnessCredentialRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryWitnessCredentialRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryServiceRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryWitnessCredentialRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1506,7 +2497,7 @@ func (m *QueryWitnessCredentialRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1529,7 +2520,7 @@ func (m *QueryWitnessCredentialRequest) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryWitnessCredentialResponse) Unmarshal(dAtA []byte) error { +func (m *QueryServiceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1552,10 +2543,10 @@ func (m *QueryWitnessCredentialResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryWitnessCredentialResponse: wiretype end group for non-group") + return fmt.Errorf("proto: QueryServiceResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryWitnessCredentialResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: diff --git a/x/did/types/query.pb.gw.go b/x/did/types/query.pb.gw.go index eddb7e149..5a8f31c40 100644 --- a/x/did/types/query.pb.gw.go +++ b/x/did/types/query.pb.gw.go @@ -51,7 +51,191 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } -func request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { +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 @@ -62,23 +246,23 @@ func request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["did"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") } - protoReq.Id, err = runtime.String(val) + protoReq.Did, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) } - msg, err := client.ResolveIdentifier(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Resolve(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_ResolveIdentifier_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_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 @@ -89,24 +273,24 @@ func local_request_Query_ResolveIdentifier_0(ctx context.Context, marshaler runt _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["did"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") } - protoReq.Id, err = runtime.String(val) + protoReq.Did, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) } - msg, err := server.ResolveIdentifier(ctx, &protoReq) + msg, err := server.Resolve(ctx, &protoReq) return msg, metadata, err } -func request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryWitnessCredentialRequest +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 ( @@ -116,24 +300,24 @@ func request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["origin"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") } - protoReq.Id, err = runtime.String(val) + protoReq.Origin, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) } - msg, err := client.WitnessCredential(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + msg, err := client.Service(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } -func local_request_Query_WitnessCredential_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryWitnessCredentialRequest +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 ( @@ -143,18 +327,18 @@ func local_request_Query_WitnessCredential_0(ctx context.Context, marshaler runt _ = err ) - val, ok = pathParams["id"] + val, ok = pathParams["origin"] if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "id") + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") } - protoReq.Id, err = runtime.String(val) + protoReq.Origin, err = runtime.String(val) if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "id", err) + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) } - msg, err := server.WitnessCredential(ctx, &protoReq) + msg, err := server.Service(ctx, &protoReq) return msg, metadata, err } @@ -188,7 +372,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_ResolveIdentifier_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()) defer cancel() var stream runtime.ServerTransportStream @@ -199,7 +383,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_ResolveIdentifier_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()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -207,11 +391,11 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_ResolveIdentifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_WitnessCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() var stream runtime.ServerTransportStream @@ -222,7 +406,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := local_request_Query_WitnessCredential_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()) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { @@ -230,7 +414,76 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } - forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + 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()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Identities_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Resolve_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Resolve_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Service_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -295,7 +548,7 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_ResolveIdentifier_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()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -304,18 +557,18 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_ResolveIdentifier_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Accounts_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_ResolveIdentifier_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + forward_Query_Accounts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) - mux.Handle("GET", pattern_Query_WitnessCredential_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + mux.Handle("GET", pattern_Query_Credentials_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) @@ -324,14 +577,74 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - resp, md, err := request_Query_WitnessCredential_0(rctx, inboundMarshaler, client, req, pathParams) + resp, md, err := request_Query_Credentials_0(rctx, inboundMarshaler, client, req, pathParams) ctx = runtime.NewServerMetadataContext(ctx, md) if err != nil { runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) return } - forward_Query_WitnessCredential_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + 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()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Identities_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Resolve_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Resolve_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Service_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Service_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Service_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) }) @@ -341,15 +654,27 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1}, []string{"did", "params"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ResolveIdentifier_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "resolve", "id"}, "", 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_WitnessCredential_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"did", "assertion", "id", "witness"}, "", 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 ( forward_Query_Params_0 = runtime.ForwardResponseMessage - forward_Query_ResolveIdentifier_0 = runtime.ForwardResponseMessage + forward_Query_Accounts_0 = runtime.ForwardResponseMessage - forward_Query_WitnessCredential_0 = runtime.ForwardResponseMessage + forward_Query_Credentials_0 = runtime.ForwardResponseMessage + + forward_Query_Identities_0 = runtime.ForwardResponseMessage + + forward_Query_Resolve_0 = runtime.ForwardResponseMessage + + forward_Query_Service_0 = runtime.ForwardResponseMessage ) diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index 02b7b8441..7acc6adfb 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -29,8 +29,8 @@ type Aliases struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Origin is the Alias provider Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` - // Handle is the user defined alias - Handle string `protobuf:"bytes,3,opt,name=handle,proto3" json:"handle,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 @@ -84,9 +84,9 @@ func (m *Aliases) GetOrigin() string { return "" } -func (m *Aliases) GetHandle() string { +func (m *Aliases) GetSubject() string { if m != nil { - return m.Handle + return m.Subject } return "" } @@ -466,10 +466,14 @@ type Service struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` - // The service endpoint - ServiceEndpoint string `protobuf:"bytes,3,opt,name=service_endpoint,json=serviceEndpoint,proto3" json:"service_endpoint,omitempty"` // The controller DID of the service - ControllerDid string `protobuf:"bytes,4,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + 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 *Service) Reset() { *m = Service{} } @@ -519,13 +523,6 @@ func (m *Service) GetServiceType() string { return "" } -func (m *Service) GetServiceEndpoint() string { - if m != nil { - return m.ServiceEndpoint - } - return "" -} - func (m *Service) GetControllerDid() string { if m != nil { return m.ControllerDid @@ -533,6 +530,27 @@ func (m *Service) GetControllerDid() string { return "" } +func (m *Service) GetOriginUri() string { + if m != nil { + return m.OriginUri + } + return "" +} + +func (m *Service) GetServiceEndpoints() map[string]string { + if m != nil { + return m.ServiceEndpoints + } + return nil +} + +func (m *Service) GetScopes() []PermissionScope { + if m != nil { + return m.Scopes + } + return nil +} + func init() { proto.RegisterType((*Aliases)(nil), "did.v1.Aliases") proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") @@ -542,55 +560,61 @@ func init() { 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) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 685 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x94, 0x3f, 0x6f, 0x13, 0x4d, - 0x10, 0xc6, 0x73, 0x3e, 0xff, 0x1d, 0xdb, 0x89, 0xb5, 0x8a, 0xf2, 0xde, 0x6b, 0xc0, 0x18, 0xa3, - 0x48, 0xa1, 0xb1, 0x09, 0x34, 0x28, 0xa1, 0xc0, 0x24, 0x29, 0x00, 0x45, 0x42, 0x86, 0x8a, 0xc6, - 0x5a, 0x7b, 0x37, 0xf6, 0xe2, 0xf3, 0xee, 0x69, 0x77, 0xed, 0xe4, 0x3a, 0x7a, 0x24, 0x44, 0x41, - 0x9d, 0x96, 0x92, 0xaf, 0x41, 0x19, 0x89, 0x86, 0x12, 0x25, 0xdf, 0x80, 0x4f, 0x80, 0xf6, 0xf6, - 0x1c, 0x1f, 0x76, 0x00, 0x21, 0xba, 0xec, 0x33, 0x33, 0x99, 0xdf, 0x3c, 0x33, 0x3e, 0x40, 0x84, - 0x91, 0xd6, 0x74, 0xbb, 0xa5, 0x34, 0xd6, 0xb4, 0x19, 0x48, 0xa1, 0x05, 0xca, 0x12, 0x46, 0x9a, - 0xd3, 0xed, 0xea, 0x7f, 0x7d, 0xa1, 0xc6, 0x42, 0xb5, 0x84, 0x1c, 0x9b, 0x14, 0x21, 0xc7, 0x36, - 0xa1, 0xba, 0x1e, 0x17, 0x0d, 0x28, 0xa7, 0x8a, 0x29, 0xab, 0x36, 0x3e, 0x3a, 0x90, 0x6b, 0xfb, - 0x0c, 0x2b, 0xaa, 0xd0, 0x2a, 0xa4, 0x18, 0xf1, 0x9c, 0xba, 0xb3, 0x55, 0xe8, 0xa4, 0x18, 0x41, - 0x1b, 0x90, 0x15, 0x92, 0x0d, 0x18, 0xf7, 0x52, 0x91, 0x16, 0xbf, 0x8c, 0x3e, 0xc4, 0x9c, 0xf8, - 0xd4, 0x73, 0xad, 0x6e, 0x5f, 0xa8, 0x06, 0xd0, 0x17, 0x5c, 0x4b, 0xe1, 0xfb, 0x54, 0x7a, 0xe9, - 0x28, 0x96, 0x50, 0x4c, 0x9c, 0x9e, 0x04, 0x4c, 0x62, 0xcd, 0x04, 0xf7, 0x32, 0x75, 0x67, 0x2b, - 0xdd, 0x49, 0x28, 0x3b, 0xd7, 0xbf, 0x9f, 0x7e, 0x79, 0xe7, 0x6e, 0x40, 0xda, 0x70, 0xa0, 0xd2, - 0xac, 0x4b, 0xc5, 0xf1, 0x1c, 0xcf, 0x69, 0xbc, 0x49, 0x41, 0xa1, 0xad, 0x14, 0x95, 0x26, 0x77, - 0x89, 0xf5, 0x7f, 0xc8, 0x8f, 0x68, 0xd8, 0xd5, 0x61, 0x40, 0x63, 0xda, 0xdc, 0x88, 0x86, 0x2f, - 0xc3, 0xc0, 0x62, 0x49, 0x4a, 0x28, 0xd7, 0x0c, 0xfb, 0x11, 0x72, 0xa9, 0x93, 0x50, 0xd0, 0x2e, - 0xe4, 0xc7, 0x54, 0x63, 0x82, 0x35, 0xf6, 0xd2, 0x75, 0x77, 0xab, 0x78, 0xef, 0x66, 0xd3, 0x9a, - 0xd9, 0xbc, 0xec, 0xd7, 0x3c, 0x8c, 0x33, 0x0e, 0xb8, 0x96, 0x61, 0xe7, 0xb2, 0x60, 0x61, 0xe6, - 0xcc, 0xe2, 0xcc, 0xd5, 0x5d, 0x28, 0xff, 0x54, 0x8a, 0x2a, 0xe0, 0x8e, 0x68, 0x18, 0x93, 0x9b, - 0x3f, 0xd1, 0x3a, 0x64, 0xa6, 0xd8, 0x9f, 0xcc, 0xb8, 0xed, 0x63, 0x27, 0xf5, 0xc0, 0xd9, 0x59, - 0x8d, 0x0c, 0xc9, 0x5b, 0x43, 0xbc, 0x54, 0xe3, 0x83, 0x03, 0xc5, 0xb6, 0xd6, 0xd4, 0xec, 0xfd, - 0x2f, 0x4d, 0xb8, 0x6c, 0xe2, 0x26, 0x9a, 0x18, 0x35, 0x90, 0x42, 0x1c, 0xc5, 0xcb, 0xb2, 0x8f, - 0x3f, 0xcd, 0xb4, 0x80, 0xe5, 0x36, 0x3e, 0x39, 0x00, 0x7b, 0xf3, 0x35, 0x2f, 0x52, 0x55, 0xc0, - 0x25, 0x06, 0xdf, 0x4e, 0x4c, 0x18, 0x41, 0x77, 0x61, 0x3d, 0x98, 0xf4, 0x7c, 0xd6, 0xef, 0x1a, - 0xdc, 0xf1, 0xc4, 0xd7, 0xac, 0x87, 0xd5, 0x8c, 0x0d, 0xd9, 0xd8, 0x33, 0x1a, 0x1e, 0xce, 0x22, - 0xe8, 0x1a, 0x14, 0xa6, 0x78, 0xe2, 0xeb, 0x6e, 0x9f, 0x91, 0x18, 0x36, 0x1f, 0x09, 0x7b, 0x8c, - 0xa0, 0x3a, 0x14, 0x8f, 0x18, 0x1f, 0x50, 0x19, 0x48, 0xc6, 0x75, 0x04, 0x5c, 0xea, 0x24, 0xa5, - 0x05, 0xe2, 0x74, 0xe3, 0xad, 0x0b, 0xb0, 0x4f, 0x7d, 0x3a, 0xb8, 0xda, 0xc7, 0x65, 0xe2, 0x1b, - 0x00, 0xfd, 0x21, 0x66, 0xdc, 0x7a, 0x6b, 0x39, 0x0b, 0x91, 0x12, 0xb9, 0x7b, 0x1b, 0xca, 0x36, - 0x8c, 0x09, 0x91, 0x54, 0xa9, 0x18, 0xb1, 0x14, 0x89, 0x6d, 0xab, 0xa1, 0x4d, 0x58, 0x9d, 0x9b, - 0xd8, 0x35, 0x0d, 0xac, 0xb5, 0xe5, 0xb9, 0xba, 0xff, 0x1b, 0x73, 0xb2, 0xbf, 0x34, 0xe7, 0x10, - 0xd6, 0x12, 0x15, 0xaf, 0x8f, 0x47, 0xca, 0xcb, 0x45, 0x77, 0xbc, 0x39, 0xbb, 0xe3, 0xf9, 0xac, - 0xcd, 0xe7, 0xb3, 0xfa, 0xa7, 0xc7, 0x23, 0x65, 0xaf, 0xb9, 0x1c, 0x24, 0xb5, 0x78, 0x56, 0xce, - 0xa9, 0xdf, 0x65, 0xc4, 0xcb, 0x47, 0x3f, 0xd3, 0x42, 0xac, 0x3c, 0x21, 0xd5, 0x47, 0x80, 0x96, - 0xff, 0xc7, 0x3f, 0x9c, 0x75, 0xa6, 0x71, 0xea, 0x40, 0xee, 0x05, 0x95, 0x53, 0xd6, 0xa7, 0x4b, - 0xab, 0xb8, 0x05, 0x25, 0x65, 0x43, 0xc9, 0xb3, 0x2e, 0xc6, 0x5a, 0x64, 0xfe, 0x1d, 0xa8, 0xcc, - 0x52, 0x28, 0x27, 0x81, 0x30, 0x37, 0x60, 0x37, 0xb4, 0x16, 0xeb, 0x07, 0xb1, 0x7c, 0xc5, 0x0a, - 0xd2, 0x57, 0xac, 0x60, 0x01, 0x30, 0xfb, 0xf8, 0xe1, 0xe7, 0xf3, 0x9a, 0x73, 0x76, 0x5e, 0x73, - 0xbe, 0x9d, 0xd7, 0x9c, 0xf7, 0x17, 0xb5, 0x95, 0xb3, 0x8b, 0xda, 0xca, 0xd7, 0x8b, 0xda, 0xca, - 0xab, 0xc6, 0x80, 0xe9, 0xe1, 0xa4, 0xd7, 0xec, 0x8b, 0x71, 0x4b, 0x70, 0x25, 0xb8, 0x6c, 0x0d, - 0x8f, 0x71, 0xd8, 0x3a, 0x69, 0x99, 0xaf, 0xad, 0x21, 0x56, 0xbd, 0x6c, 0xf4, 0xa5, 0xbd, 0xff, - 0x23, 0x00, 0x00, 0xff, 0xff, 0x12, 0x6f, 0x94, 0xba, 0xb6, 0x05, 0x00, 0x00, + // 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 *Aliases) Marshal() (dAtA []byte, err error) { @@ -625,10 +649,10 @@ func (m *Aliases) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.Handle) > 0 { - i -= len(m.Handle) - copy(dAtA[i:], m.Handle) - i = encodeVarintState(dAtA, i, uint64(len(m.Handle))) + 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 } @@ -944,18 +968,55 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + 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] = 0x22 - } - if len(m.ServiceEndpoint) > 0 { - i -= len(m.ServiceEndpoint) - copy(dAtA[i:], m.ServiceEndpoint) - i = encodeVarintState(dAtA, i, uint64(len(m.ServiceEndpoint))) - i-- dAtA[i] = 0x1a } if len(m.ServiceType) > 0 { @@ -1000,7 +1061,7 @@ func (m *Aliases) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.Handle) + l = len(m.Subject) if l > 0 { n += 1 + l + sovState(uint64(l)) } @@ -1163,14 +1224,29 @@ func (m *Service) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ServiceEndpoint) - if l > 0 { - n += 1 + l + sovState(uint64(l)) - } l = len(m.ControllerDid) if l > 0 { n += 1 + l + sovState(uint64(l)) } + l = len(m.OriginUri) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + if len(m.ServiceEndpoints) > 0 { + for k, v := range m.ServiceEndpoints { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovState(uint64(len(k))) + 1 + len(v) + sovState(uint64(len(v))) + n += mapEntrySize + 1 + sovState(uint64(mapEntrySize)) + } + } + if len(m.Scopes) > 0 { + l = 0 + for _, e := range m.Scopes { + l += sovState(uint64(e)) + } + n += 1 + sovState(uint64(l)) + l + } return n } @@ -1275,7 +1351,7 @@ func (m *Aliases) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Handle", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1303,7 +1379,7 @@ func (m *Aliases) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Handle = string(dAtA[iNdEx:postIndex]) + m.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -2588,38 +2664,6 @@ func (m *Service) Unmarshal(dAtA []byte) error { m.ServiceType = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoint", 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.ServiceEndpoint = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType) } @@ -2651,6 +2695,234 @@ func (m *Service) Unmarshal(dAtA []byte) error { } m.ControllerDid = string(dAtA[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: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 90965a275..7ea9d4544 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -129,127 +129,8 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgInitializeController is the message type for the InitializeController RPC. -type MsgInitializeController struct { - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // Assertions is the list of assertions to initialize the controller with. - Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` -} - -func (m *MsgInitializeController) Reset() { *m = MsgInitializeController{} } -func (m *MsgInitializeController) String() string { return proto.CompactTextString(m) } -func (*MsgInitializeController) ProtoMessage() {} -func (*MsgInitializeController) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{2} -} -func (m *MsgInitializeController) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgInitializeController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgInitializeController.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgInitializeController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgInitializeController.Merge(m, src) -} -func (m *MsgInitializeController) XXX_Size() int { - return m.Size() -} -func (m *MsgInitializeController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgInitializeController.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgInitializeController proto.InternalMessageInfo - -func (m *MsgInitializeController) GetAuthority() string { - if m != nil { - return m.Authority - } - return "" -} - -func (m *MsgInitializeController) GetAssertions() [][]byte { - if m != nil { - return m.Assertions - } - return nil -} - -func (m *MsgInitializeController) GetKeyshares() [][]byte { - if m != nil { - return m.Keyshares - } - return nil -} - -func (m *MsgInitializeController) GetVerifications() [][]byte { - if m != nil { - return m.Verifications - } - return nil -} - -// MsgInitializeControllerResponse is the response type for the InitializeController RPC. -type MsgInitializeControllerResponse struct { - // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *MsgInitializeControllerResponse) Reset() { *m = MsgInitializeControllerResponse{} } -func (m *MsgInitializeControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgInitializeControllerResponse) ProtoMessage() {} -func (*MsgInitializeControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{3} -} -func (m *MsgInitializeControllerResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MsgInitializeControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MsgInitializeControllerResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *MsgInitializeControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgInitializeControllerResponse.Merge(m, src) -} -func (m *MsgInitializeControllerResponse) XXX_Size() int { - return m.Size() -} -func (m *MsgInitializeControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgInitializeControllerResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_MsgInitializeControllerResponse proto.InternalMessageInfo - -func (m *MsgInitializeControllerResponse) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - // MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticateController struct { +type MsgAuthenticate struct { // authority is the address of the governance account. Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Controller is the address of the controller to authenticate. @@ -260,18 +141,18 @@ type MsgAuthenticateController struct { Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` } -func (m *MsgAuthenticateController) Reset() { *m = MsgAuthenticateController{} } -func (m *MsgAuthenticateController) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticateController) ProtoMessage() {} -func (*MsgAuthenticateController) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{4} +func (m *MsgAuthenticate) Reset() { *m = MsgAuthenticate{} } +func (m *MsgAuthenticate) String() string { return proto.CompactTextString(m) } +func (*MsgAuthenticate) ProtoMessage() {} +func (*MsgAuthenticate) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{2} } -func (m *MsgAuthenticateController) XXX_Unmarshal(b []byte) error { +func (m *MsgAuthenticate) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthenticateController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAuthenticate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthenticateController.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAuthenticate.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -281,62 +162,62 @@ func (m *MsgAuthenticateController) XXX_Marshal(b []byte, deterministic bool) ([ return b[:n], nil } } -func (m *MsgAuthenticateController) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticateController.Merge(m, src) +func (m *MsgAuthenticate) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthenticate.Merge(m, src) } -func (m *MsgAuthenticateController) XXX_Size() int { +func (m *MsgAuthenticate) XXX_Size() int { return m.Size() } -func (m *MsgAuthenticateController) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticateController.DiscardUnknown(m) +func (m *MsgAuthenticate) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthenticate.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthenticateController proto.InternalMessageInfo +var xxx_messageInfo_MsgAuthenticate proto.InternalMessageInfo -func (m *MsgAuthenticateController) GetAuthority() string { +func (m *MsgAuthenticate) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgAuthenticateController) GetController() string { +func (m *MsgAuthenticate) GetController() string { if m != nil { return m.Controller } return "" } -func (m *MsgAuthenticateController) GetAddress() string { +func (m *MsgAuthenticate) GetAddress() string { if m != nil { return m.Address } return "" } -func (m *MsgAuthenticateController) GetOrigin() string { +func (m *MsgAuthenticate) GetOrigin() string { if m != nil { return m.Origin } return "" } -// MsgAuthenticateControllerResponse is the response type for the Authenticate RPC. -type MsgAuthenticateControllerResponse struct { +// MsgAuthenticateResponse is the response type for the Authenticate RPC. +type MsgAuthenticateResponse struct { } -func (m *MsgAuthenticateControllerResponse) Reset() { *m = MsgAuthenticateControllerResponse{} } -func (m *MsgAuthenticateControllerResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticateControllerResponse) ProtoMessage() {} -func (*MsgAuthenticateControllerResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{5} +func (m *MsgAuthenticateResponse) Reset() { *m = MsgAuthenticateResponse{} } +func (m *MsgAuthenticateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAuthenticateResponse) ProtoMessage() {} +func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{3} } -func (m *MsgAuthenticateControllerResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAuthenticateResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthenticateControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthenticateControllerResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAuthenticateResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -346,64 +227,551 @@ func (m *MsgAuthenticateControllerResponse) XXX_Marshal(b []byte, deterministic return b[:n], nil } } -func (m *MsgAuthenticateControllerResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticateControllerResponse.Merge(m, src) +func (m *MsgAuthenticateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthenticateResponse.Merge(m, src) } -func (m *MsgAuthenticateControllerResponse) XXX_Size() int { +func (m *MsgAuthenticateResponse) XXX_Size() int { return m.Size() } -func (m *MsgAuthenticateControllerResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticateControllerResponse.DiscardUnknown(m) +func (m *MsgAuthenticateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthenticateResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthenticateControllerResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAuthenticateResponse proto.InternalMessageInfo + +// MsgProveWitness is the message type for the ProveWitness RPC. +type MsgProveWitness struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // property is key to prove. + Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` + // Witness Value is the bytes of the witness. + Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` +} + +func (m *MsgProveWitness) Reset() { *m = MsgProveWitness{} } +func (m *MsgProveWitness) String() string { return proto.CompactTextString(m) } +func (*MsgProveWitness) ProtoMessage() {} +func (*MsgProveWitness) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{4} +} +func (m *MsgProveWitness) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgProveWitness) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgProveWitness.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgProveWitness) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProveWitness.Merge(m, src) +} +func (m *MsgProveWitness) XXX_Size() int { + return m.Size() +} +func (m *MsgProveWitness) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProveWitness.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgProveWitness proto.InternalMessageInfo + +func (m *MsgProveWitness) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgProveWitness) GetProperty() string { + if m != nil { + return m.Property + } + return "" +} + +func (m *MsgProveWitness) GetWitness() []byte { + if m != nil { + return m.Witness + } + return nil +} + +// MsgProveWitnessResponse is the response type for the ProveWitness RPC. +type MsgProveWitnessResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` +} + +func (m *MsgProveWitnessResponse) Reset() { *m = MsgProveWitnessResponse{} } +func (m *MsgProveWitnessResponse) String() string { return proto.CompactTextString(m) } +func (*MsgProveWitnessResponse) ProtoMessage() {} +func (*MsgProveWitnessResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{5} +} +func (m *MsgProveWitnessResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgProveWitnessResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgProveWitnessResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgProveWitnessResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgProveWitnessResponse.Merge(m, src) +} +func (m *MsgProveWitnessResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgProveWitnessResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgProveWitnessResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgProveWitnessResponse proto.InternalMessageInfo + +func (m *MsgProveWitnessResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *MsgProveWitnessResponse) GetProperty() string { + if m != nil { + return m.Property + } + return "" +} + +// MsgSyncVault is the message type for the SyncVault RPC. +type MsgSyncVault struct { + // controller is the address of the controller to sync. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // cid is the IPFS content identifier. + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + // Macroon is the public token to authenticate the operation. + Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` +} + +func (m *MsgSyncVault) Reset() { *m = MsgSyncVault{} } +func (m *MsgSyncVault) String() string { return proto.CompactTextString(m) } +func (*MsgSyncVault) ProtoMessage() {} +func (*MsgSyncVault) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{6} +} +func (m *MsgSyncVault) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSyncVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSyncVault.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSyncVault) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSyncVault.Merge(m, src) +} +func (m *MsgSyncVault) XXX_Size() int { + return m.Size() +} +func (m *MsgSyncVault) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSyncVault.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSyncVault proto.InternalMessageInfo + +func (m *MsgSyncVault) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgSyncVault) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *MsgSyncVault) GetMacron() []byte { + if m != nil { + return m.Macron + } + return nil +} + +// MsgSyncVaultResponse is the response type for the SyncVault RPC. +type MsgSyncVaultResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgSyncVaultResponse) Reset() { *m = MsgSyncVaultResponse{} } +func (m *MsgSyncVaultResponse) String() string { return proto.CompactTextString(m) } +func (*MsgSyncVaultResponse) ProtoMessage() {} +func (*MsgSyncVaultResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{7} +} +func (m *MsgSyncVaultResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgSyncVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgSyncVaultResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgSyncVaultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgSyncVaultResponse.Merge(m, src) +} +func (m *MsgSyncVaultResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgSyncVaultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgSyncVaultResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgSyncVaultResponse proto.InternalMessageInfo + +func (m *MsgSyncVaultResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +// MsgRegisterController is the message type for the InitializeController RPC. +type MsgRegisterController struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Assertions is the list of assertions to initialize the controller with. + Assertions [][]byte `protobuf:"bytes,2,rep,name=assertions,proto3" json:"assertions,omitempty"` + // Keyshares is the list of keyshares to initialize the controller with. + Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` + // Verifications is the list of verifications to initialize the controller with. + Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` +} + +func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} } +func (m *MsgRegisterController) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterController) ProtoMessage() {} +func (*MsgRegisterController) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{8} +} +func (m *MsgRegisterController) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterController) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterController.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterController) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterController.Merge(m, src) +} +func (m *MsgRegisterController) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterController) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterController.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterController proto.InternalMessageInfo + +func (m *MsgRegisterController) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRegisterController) GetAssertions() [][]byte { + if m != nil { + return m.Assertions + } + return nil +} + +func (m *MsgRegisterController) GetKeyshares() [][]byte { + if m != nil { + return m.Keyshares + } + return nil +} + +func (m *MsgRegisterController) GetVerifications() [][]byte { + if m != nil { + return m.Verifications + } + return nil +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +type MsgRegisterControllerResponse struct { + // Controller is the address of the initialized controller. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Accounts are a Address Map and Supported coin Denoms for the controller + Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (m *MsgRegisterControllerResponse) Reset() { *m = MsgRegisterControllerResponse{} } +func (m *MsgRegisterControllerResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterControllerResponse) ProtoMessage() {} +func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{9} +} +func (m *MsgRegisterControllerResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterControllerResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterControllerResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterControllerResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterControllerResponse.Merge(m, src) +} +func (m *MsgRegisterControllerResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterControllerResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterControllerResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterControllerResponse proto.InternalMessageInfo + +func (m *MsgRegisterControllerResponse) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgRegisterControllerResponse) GetAccounts() map[string]string { + if m != nil { + return m.Accounts + } + return nil +} + +// MsgRegisterService is the message type for the RegisterService RPC. +type MsgRegisterService struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // origin is the origin of the request in wildcard form. + OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // PermissionScope is the scope of the service. + Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` +} + +func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} } +func (m *MsgRegisterService) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterService) ProtoMessage() {} +func (*MsgRegisterService) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{10} +} +func (m *MsgRegisterService) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterService) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterService.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterService) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterService.Merge(m, src) +} +func (m *MsgRegisterService) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterService) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterService.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterService proto.InternalMessageInfo + +func (m *MsgRegisterService) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgRegisterService) GetOriginUri() string { + if m != nil { + return m.OriginUri + } + return "" +} + +func (m *MsgRegisterService) GetScopes() []PermissionScope { + if m != nil { + return m.Scopes + } + return nil +} + +// MsgRegisterServiceResponse is the response type for the RegisterService RPC. +type MsgRegisterServiceResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (m *MsgRegisterServiceResponse) Reset() { *m = MsgRegisterServiceResponse{} } +func (m *MsgRegisterServiceResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterServiceResponse) ProtoMessage() {} +func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{11} +} +func (m *MsgRegisterServiceResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterServiceResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterServiceResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgRegisterServiceResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterServiceResponse.Merge(m, src) +} +func (m *MsgRegisterServiceResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterServiceResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterServiceResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterServiceResponse proto.InternalMessageInfo + +func (m *MsgRegisterServiceResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} func init() { proto.RegisterType((*MsgUpdateParams)(nil), "did.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "did.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgInitializeController)(nil), "did.v1.MsgInitializeController") - proto.RegisterType((*MsgInitializeControllerResponse)(nil), "did.v1.MsgInitializeControllerResponse") - proto.RegisterType((*MsgAuthenticateController)(nil), "did.v1.MsgAuthenticateController") - proto.RegisterType((*MsgAuthenticateControllerResponse)(nil), "did.v1.MsgAuthenticateControllerResponse") + proto.RegisterType((*MsgAuthenticate)(nil), "did.v1.MsgAuthenticate") + proto.RegisterType((*MsgAuthenticateResponse)(nil), "did.v1.MsgAuthenticateResponse") + proto.RegisterType((*MsgProveWitness)(nil), "did.v1.MsgProveWitness") + proto.RegisterType((*MsgProveWitnessResponse)(nil), "did.v1.MsgProveWitnessResponse") + proto.RegisterType((*MsgSyncVault)(nil), "did.v1.MsgSyncVault") + proto.RegisterType((*MsgSyncVaultResponse)(nil), "did.v1.MsgSyncVaultResponse") + proto.RegisterType((*MsgRegisterController)(nil), "did.v1.MsgRegisterController") + proto.RegisterType((*MsgRegisterControllerResponse)(nil), "did.v1.MsgRegisterControllerResponse") + proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterControllerResponse.AccountsEntry") + proto.RegisterType((*MsgRegisterService)(nil), "did.v1.MsgRegisterService") + proto.RegisterType((*MsgRegisterServiceResponse)(nil), "did.v1.MsgRegisterServiceResponse") } func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 525 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xc1, 0x6b, 0x13, 0x4f, - 0x14, 0xce, 0x26, 0xf9, 0xe5, 0x47, 0x9e, 0xb5, 0x85, 0xa1, 0x34, 0x9b, 0x45, 0x36, 0x6d, 0x14, - 0x8c, 0x45, 0xb3, 0x34, 0x82, 0x88, 0x78, 0x69, 0xbc, 0xe8, 0x21, 0x20, 0x2b, 0x5e, 0x14, 0x94, - 0x69, 0x76, 0x3a, 0x19, 0x4c, 0x66, 0xc2, 0xbc, 0x49, 0x6c, 0x3c, 0x89, 0x17, 0xaf, 0xfe, 0x05, - 0xfe, 0x0d, 0x3d, 0xf8, 0x2f, 0x08, 0x3d, 0x16, 0x4f, 0x9e, 0x44, 0x92, 0x43, 0xf1, 0xbf, 0x90, - 0xdd, 0xcd, 0x26, 0x9b, 0xb6, 0x21, 0x22, 0xde, 0x76, 0xde, 0xf7, 0xbd, 0x6f, 0xbf, 0xef, 0xcd, - 0x63, 0x60, 0x23, 0x10, 0x81, 0x37, 0xdc, 0xf3, 0xcc, 0x51, 0xbd, 0xaf, 0x95, 0x51, 0xa4, 0x10, - 0x88, 0xa0, 0x3e, 0xdc, 0x73, 0x4a, 0x6d, 0x85, 0x3d, 0x85, 0x5e, 0x0f, 0x79, 0x88, 0xf7, 0x90, - 0xc7, 0x04, 0x67, 0x73, 0xda, 0xc1, 0x99, 0x64, 0x28, 0x30, 0xa9, 0x72, 0xc5, 0x55, 0xf4, 0xe9, - 0x85, 0x5f, 0xd3, 0x6a, 0x39, 0x16, 0x79, 0x1d, 0x03, 0xf1, 0x21, 0x86, 0xaa, 0x1f, 0x2d, 0xd8, - 0x68, 0x21, 0x7f, 0xde, 0x0f, 0xa8, 0x61, 0x4f, 0xa9, 0xa6, 0x3d, 0x24, 0xf7, 0xa0, 0x48, 0x07, - 0xa6, 0xa3, 0xb4, 0x30, 0x23, 0xdb, 0xda, 0xb6, 0x6a, 0xc5, 0xa6, 0xfd, 0xed, 0xcb, 0x9d, 0xcd, - 0x69, 0xe3, 0x7e, 0x10, 0x68, 0x86, 0xf8, 0xcc, 0x68, 0x21, 0xb9, 0x3f, 0xa7, 0x92, 0xdb, 0x50, - 0xe8, 0x47, 0x0a, 0x76, 0x76, 0xdb, 0xaa, 0x5d, 0x69, 0xac, 0xd7, 0xe3, 0x10, 0xf5, 0x58, 0xb7, - 0x99, 0x3f, 0xf9, 0x51, 0xc9, 0xf8, 0x53, 0xce, 0x83, 0xf5, 0x0f, 0x67, 0xc7, 0xbb, 0xf3, 0xee, - 0x6a, 0x19, 0x4a, 0xe7, 0x8c, 0xf8, 0x0c, 0xfb, 0x4a, 0x22, 0xab, 0x7e, 0xb5, 0x22, 0xec, 0x89, - 0x14, 0x46, 0xd0, 0xae, 0x78, 0xc7, 0x1e, 0x29, 0x69, 0xb4, 0xea, 0x76, 0x99, 0xfe, 0x6b, 0xb3, - 0x2e, 0x00, 0x45, 0x64, 0xda, 0x08, 0x25, 0x43, 0xc3, 0xb9, 0xda, 0x9a, 0x9f, 0xaa, 0x90, 0x6b, - 0x50, 0x7c, 0xc3, 0x46, 0xd8, 0xa1, 0x9a, 0xa1, 0x9d, 0x8b, 0xe0, 0x79, 0x81, 0xdc, 0x80, 0xab, - 0x43, 0xa6, 0xc5, 0xa1, 0x68, 0xd3, 0x58, 0x20, 0x1f, 0x31, 0x16, 0x8b, 0x17, 0x22, 0xbe, 0x84, - 0xca, 0x92, 0x18, 0x49, 0x54, 0x72, 0x1f, 0xa0, 0x3d, 0xab, 0xae, 0xcc, 0x93, 0xe2, 0x56, 0x7f, - 0x59, 0x50, 0x6e, 0x21, 0xdf, 0x1f, 0x98, 0x0e, 0x93, 0x26, 0xf4, 0xf0, 0x2f, 0xc6, 0xb4, 0xe8, - 0x27, 0xfb, 0xe7, 0x7e, 0x48, 0x03, 0xfe, 0xa7, 0x31, 0x68, 0xe7, 0x56, 0xb4, 0x25, 0x44, 0xb2, - 0x05, 0x05, 0xa5, 0x05, 0x17, 0xd2, 0xce, 0x87, 0x2d, 0xfe, 0xf4, 0x74, 0x61, 0x90, 0xd7, 0x61, - 0x67, 0x69, 0xd4, 0x64, 0x94, 0x8d, 0xcf, 0x59, 0xc8, 0xb5, 0x90, 0x93, 0xc7, 0xb0, 0xb6, 0xb0, - 0xde, 0xa5, 0x64, 0x2d, 0xcf, 0xad, 0x9b, 0x53, 0x59, 0x02, 0xcc, 0x2e, 0xe7, 0x15, 0x10, 0x9f, - 0x71, 0x81, 0x86, 0xe9, 0xd4, 0x68, 0xd3, 0x6d, 0x97, 0xdd, 0xad, 0x73, 0x73, 0x05, 0x61, 0xa6, - 0x7f, 0x08, 0x5b, 0x4b, 0xae, 0x6f, 0x27, 0x25, 0x71, 0x39, 0xc5, 0xb9, 0xb5, 0x92, 0x92, 0xfc, - 0xc7, 0xf9, 0xef, 0xfd, 0xd9, 0xf1, 0xae, 0xd5, 0x7c, 0x78, 0x32, 0x76, 0xad, 0xd3, 0xb1, 0x6b, - 0xfd, 0x1c, 0xbb, 0xd6, 0xa7, 0x89, 0x9b, 0x39, 0x9d, 0xb8, 0x99, 0xef, 0x13, 0x37, 0xf3, 0xa2, - 0xca, 0x85, 0xe9, 0x0c, 0x0e, 0xea, 0x6d, 0xd5, 0xf3, 0x94, 0x44, 0x25, 0xb5, 0xd7, 0x79, 0x4b, - 0x47, 0xde, 0x91, 0x17, 0xbe, 0x3a, 0x66, 0xd4, 0x67, 0x78, 0x50, 0x88, 0x1e, 0x90, 0xbb, 0xbf, - 0x03, 0x00, 0x00, 0xff, 0xff, 0x74, 0x50, 0x71, 0x32, 0xbb, 0x04, 0x00, 0x00, + // 797 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x41, 0x6f, 0xe3, 0x44, + 0x14, 0x8e, 0x37, 0xdd, 0x6c, 0xf3, 0x36, 0xdb, 0x20, 0x2b, 0x90, 0xac, 0xb5, 0xcd, 0x56, 0x16, + 0x48, 0x55, 0x05, 0x31, 0x4d, 0xa5, 0xaa, 0x2a, 0x48, 0xa8, 0x45, 0x48, 0xbd, 0x44, 0x2d, 0x8e, + 0x0a, 0x52, 0x2f, 0x95, 0x6b, 0x0f, 0xce, 0xa8, 0xf1, 0x8c, 0x35, 0x33, 0x4e, 0x9b, 0x1b, 0x82, + 0x03, 0x47, 0xf8, 0x21, 0x1c, 0x7a, 0xe0, 0x1f, 0x70, 0xe9, 0xb1, 0xe2, 0x84, 0x38, 0x00, 0x6a, + 0x0f, 0xfd, 0x1b, 0x68, 0x3c, 0x13, 0xc7, 0x69, 0xd2, 0x94, 0xcd, 0x6d, 0xde, 0xfb, 0xde, 0xfb, + 0xe6, 0x7d, 0x7e, 0x6f, 0x5e, 0x02, 0xd5, 0x00, 0x07, 0xce, 0x60, 0xd3, 0x11, 0x97, 0xad, 0x98, + 0x51, 0x41, 0xcd, 0x52, 0x80, 0x83, 0xd6, 0x60, 0xd3, 0xaa, 0xfb, 0x94, 0x47, 0x94, 0x3b, 0x11, + 0x0f, 0x25, 0x1e, 0xf1, 0x50, 0x05, 0x58, 0xa6, 0xce, 0x40, 0x24, 0x89, 0xb8, 0xf6, 0xd5, 0xb4, + 0x2f, 0x44, 0x04, 0x71, 0x9c, 0x79, 0x43, 0x1a, 0xd2, 0xf4, 0xe8, 0xc8, 0x93, 0xf6, 0xbe, 0x56, + 0xc4, 0xa7, 0x0a, 0x50, 0x86, 0x82, 0xec, 0x9f, 0x0c, 0xa8, 0x76, 0x78, 0x78, 0x1c, 0x07, 0x9e, + 0x40, 0x47, 0x1e, 0xf3, 0x22, 0x6e, 0x6e, 0x43, 0xd9, 0x4b, 0x44, 0x8f, 0x32, 0x2c, 0x86, 0x0d, + 0x63, 0xcd, 0x58, 0x2f, 0xef, 0x37, 0xfe, 0xf8, 0xed, 0x93, 0x9a, 0x4e, 0xdc, 0x0b, 0x02, 0x86, + 0x38, 0xef, 0x0a, 0x86, 0x49, 0xe8, 0x8e, 0x43, 0xcd, 0x8f, 0xa1, 0x14, 0xa7, 0x0c, 0x8d, 0x67, + 0x6b, 0xc6, 0xfa, 0xcb, 0xf6, 0x4a, 0x4b, 0x09, 0x6b, 0x29, 0xde, 0xfd, 0xa5, 0xeb, 0xbf, 0xdf, + 0x16, 0x5c, 0x1d, 0xb3, 0xbb, 0xf2, 0xc3, 0xfd, 0xd5, 0xc6, 0x38, 0xdb, 0x7e, 0x0d, 0xf5, 0x07, + 0x85, 0xb8, 0x88, 0xc7, 0x94, 0x70, 0x64, 0xff, 0xa3, 0x8a, 0xdc, 0x4b, 0x44, 0x0f, 0x11, 0x81, + 0x7d, 0x4f, 0xa0, 0x85, 0x8b, 0xdc, 0x01, 0xf0, 0x29, 0x11, 0x8c, 0xf6, 0xfb, 0x88, 0xa5, 0x85, + 0xce, 0x4b, 0xcc, 0xc5, 0x9a, 0x6d, 0x78, 0xe1, 0x29, 0xb0, 0x51, 0x7c, 0x22, 0x6d, 0x14, 0x68, + 0x7e, 0x00, 0x25, 0xca, 0x70, 0x88, 0x49, 0x63, 0x49, 0xa6, 0xb8, 0xda, 0x7a, 0x44, 0x7c, 0x5e, + 0x60, 0x26, 0xfe, 0x67, 0x25, 0xfe, 0x88, 0xd1, 0x01, 0xfa, 0x16, 0x0b, 0x22, 0x69, 0x17, 0x15, + 0x6f, 0xc1, 0x72, 0xcc, 0x68, 0x8c, 0x98, 0x18, 0x2a, 0xe9, 0x6e, 0x66, 0x9b, 0x0d, 0x78, 0x71, + 0xa1, 0xe8, 0x53, 0x79, 0x15, 0x77, 0x64, 0x4e, 0x15, 0x7b, 0x98, 0x16, 0x9b, 0x2f, 0x68, 0x54, + 0xac, 0x24, 0xe1, 0x89, 0xef, 0x4b, 0x12, 0x59, 0xd6, 0xb2, 0x3b, 0x32, 0xe7, 0x5d, 0x6d, 0xff, + 0x68, 0x40, 0xa5, 0xc3, 0xc3, 0xee, 0x90, 0xf8, 0xdf, 0x78, 0x49, 0x5f, 0x3c, 0x68, 0x92, 0xf1, + 0x0e, 0x4d, 0x7a, 0x0f, 0x8a, 0x3e, 0x0e, 0xf4, 0x0d, 0xf2, 0x28, 0x5b, 0x10, 0x79, 0x3e, 0xa3, + 0x44, 0xcb, 0xd2, 0xd6, 0x6e, 0x55, 0xaa, 0xca, 0xa5, 0xda, 0x9f, 0x42, 0x2d, 0x5f, 0xc4, 0xd3, + 0x9a, 0xec, 0xdf, 0x0d, 0x78, 0xbf, 0xc3, 0x43, 0x17, 0x85, 0x98, 0x0b, 0xc4, 0xbe, 0x1c, 0x97, + 0xb1, 0x68, 0x83, 0x9a, 0x00, 0x1e, 0xe7, 0x88, 0x09, 0x4c, 0x89, 0x7c, 0x46, 0xc5, 0xf5, 0x8a, + 0x9b, 0xf3, 0x98, 0x6f, 0xa0, 0x7c, 0x8e, 0x86, 0xbc, 0xe7, 0x31, 0x24, 0xdb, 0x24, 0xe1, 0xb1, + 0xc3, 0xfc, 0x10, 0x5e, 0x0d, 0x10, 0xc3, 0xdf, 0xc9, 0x01, 0x4a, 0x09, 0x96, 0xd2, 0x88, 0x49, + 0xe7, 0x54, 0x3b, 0xef, 0x0d, 0x58, 0x9d, 0xa9, 0x22, 0xfb, 0x02, 0x8b, 0xb7, 0xe3, 0x10, 0x96, + 0x3d, 0xdf, 0xa7, 0x09, 0x11, 0x4a, 0xcd, 0xcb, 0xf6, 0xd6, 0x68, 0x29, 0xcc, 0xbd, 0xb2, 0xb5, + 0xa7, 0xb3, 0xbe, 0x22, 0x82, 0x0d, 0xdd, 0x8c, 0xc4, 0xfa, 0x0c, 0x5e, 0x4d, 0x40, 0xb2, 0xe1, + 0xe7, 0x48, 0x7f, 0x63, 0x57, 0x1e, 0xcd, 0x1a, 0x3c, 0x1f, 0x78, 0xfd, 0x04, 0xe9, 0x21, 0x50, + 0xc6, 0xee, 0xb3, 0x1d, 0xc3, 0xfe, 0xd5, 0x00, 0x33, 0x77, 0x6d, 0x17, 0xb1, 0x01, 0xf6, 0x17, + 0x5f, 0x25, 0xab, 0x00, 0xea, 0x39, 0x9f, 0x26, 0x0c, 0xeb, 0xdb, 0xca, 0xca, 0x73, 0xcc, 0xb0, + 0xe9, 0x40, 0x89, 0xfb, 0x34, 0xd6, 0x8d, 0x5a, 0x69, 0xd7, 0xb3, 0x75, 0x88, 0x58, 0x84, 0x39, + 0xc7, 0x94, 0x74, 0x25, 0xee, 0xea, 0xb0, 0xa9, 0xc6, 0x6c, 0x83, 0x35, 0x5d, 0xed, 0xd3, 0x63, + 0xd9, 0xfe, 0xab, 0x08, 0xc5, 0x0e, 0x0f, 0xcd, 0x03, 0xa8, 0x4c, 0xec, 0xf5, 0x7a, 0xee, 0xd3, + 0xe7, 0x01, 0xeb, 0xed, 0x23, 0x40, 0x76, 0xd7, 0x01, 0x54, 0x26, 0x96, 0x6f, 0x9e, 0x29, 0x0f, + 0x4c, 0x30, 0xcd, 0xda, 0x66, 0x92, 0x69, 0x62, 0x93, 0xe5, 0x99, 0xf2, 0xc0, 0x04, 0xd3, 0xcc, + 0x55, 0xf3, 0x05, 0x94, 0xc7, 0x0b, 0xa3, 0x96, 0x8b, 0xce, 0xbc, 0xd6, 0x9b, 0x59, 0xde, 0x8c, + 0xe0, 0x04, 0xcc, 0x19, 0x2f, 0x77, 0x75, 0xee, 0x7c, 0x5a, 0x1f, 0xfd, 0xaf, 0xf1, 0x35, 0xbf, + 0x86, 0xea, 0xc3, 0x29, 0xb3, 0x66, 0x64, 0x6a, 0xcc, 0xb2, 0x1f, 0xc7, 0x46, 0x94, 0xd6, 0xf3, + 0xef, 0xef, 0xaf, 0x36, 0x8c, 0xfd, 0xcf, 0xaf, 0x6f, 0x9b, 0xc6, 0xcd, 0x6d, 0xd3, 0xf8, 0xf7, + 0xb6, 0x69, 0xfc, 0x72, 0xd7, 0x2c, 0xdc, 0xdc, 0x35, 0x0b, 0x7f, 0xde, 0x35, 0x0b, 0x27, 0x76, + 0x88, 0x45, 0x2f, 0x39, 0x6b, 0xf9, 0x34, 0x72, 0x28, 0xe1, 0x94, 0x30, 0xa7, 0x77, 0xe1, 0x0d, + 0x9d, 0x4b, 0x47, 0xfe, 0x55, 0x10, 0xc3, 0x18, 0xf1, 0xb3, 0x52, 0xfa, 0xab, 0xbf, 0xf5, 0x5f, + 0x00, 0x00, 0x00, 0xff, 0xff, 0xd0, 0x69, 0xc4, 0x75, 0x84, 0x08, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -422,10 +790,16 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) + // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. + ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) + // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) + 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(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) } type msgClient struct { @@ -445,8 +819,35 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeController, opts ...grpc.CallOption) (*MsgInitializeControllerResponse, error) { - out := new(MsgInitializeControllerResponse) +func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { + out := new(MsgAuthenticateResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/Authenticate", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) { + out := new(MsgProveWitnessResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/ProveWitness", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) { + out := new(MsgSyncVaultResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/SyncVault", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) { + out := new(MsgRegisterControllerResponse) err := c.cc.Invoke(ctx, "/did.v1.Msg/RegisterController", in, out, opts...) if err != nil { return nil, err @@ -454,9 +855,9 @@ func (c *msgClient) RegisterController(ctx context.Context, in *MsgInitializeCon return out, nil } -func (c *msgClient) AuthenticateController(ctx context.Context, in *MsgAuthenticateController, opts ...grpc.CallOption) (*MsgAuthenticateControllerResponse, error) { - out := new(MsgAuthenticateControllerResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/AuthenticateController", in, out, opts...) +func (c *msgClient) RegisterService(ctx context.Context, in *MsgRegisterService, opts ...grpc.CallOption) (*MsgRegisterServiceResponse, error) { + out := new(MsgRegisterServiceResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/RegisterService", in, out, opts...) if err != nil { return nil, err } @@ -469,10 +870,16 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) + // Authenticate asserts the given controller is the owner of the given address. + Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) + // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. + ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) + // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. + SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - RegisterController(context.Context, *MsgInitializeController) (*MsgInitializeControllerResponse, error) - // AuthenticateController asserts the given controller is the owner of the given address. - AuthenticateController(context.Context, *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, 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(context.Context, *MsgRegisterService) (*MsgRegisterServiceResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -482,11 +889,20 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgInitializeController) (*MsgInitializeControllerResponse, error) { +func (*UnimplementedMsgServer) Authenticate(ctx context.Context, req *MsgAuthenticate) (*MsgAuthenticateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") +} +func (*UnimplementedMsgServer) ProveWitness(ctx context.Context, req *MsgProveWitness) (*MsgProveWitnessResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented") +} +func (*UnimplementedMsgServer) SyncVault(ctx context.Context, req *MsgSyncVault) (*MsgSyncVaultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") +} +func (*UnimplementedMsgServer) RegisterController(ctx context.Context, req *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } -func (*UnimplementedMsgServer) AuthenticateController(ctx context.Context, req *MsgAuthenticateController) (*MsgAuthenticateControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method AuthenticateController not implemented") +func (*UnimplementedMsgServer) RegisterService(ctx context.Context, req *MsgRegisterService) (*MsgRegisterServiceResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterService not implemented") } func RegisterMsgServer(s grpc1.Server, srv MsgServer) { @@ -511,8 +927,62 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthenticate) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Authenticate(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Msg/Authenticate", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgProveWitness) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ProveWitness(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Msg/ProveWitness", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_SyncVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgSyncVault) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).SyncVault(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Msg/SyncVault", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).SyncVault(ctx, req.(*MsgSyncVault)) + } + return interceptor(ctx, in, info, handler) +} + func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgInitializeController) + in := new(MsgRegisterController) if err := dec(in); err != nil { return nil, err } @@ -524,25 +994,25 @@ func _Msg_RegisterController_Handler(srv interface{}, ctx context.Context, dec f FullMethod: "/did.v1.Msg/RegisterController", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterController(ctx, req.(*MsgInitializeController)) + return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController)) } return interceptor(ctx, in, info, handler) } -func _Msg_AuthenticateController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticateController) +func _Msg_RegisterService_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterService) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).AuthenticateController(ctx, in) + return srv.(MsgServer).RegisterService(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/AuthenticateController", + FullMethod: "/did.v1.Msg/RegisterService", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).AuthenticateController(ctx, req.(*MsgAuthenticateController)) + return srv.(MsgServer).RegisterService(ctx, req.(*MsgRegisterService)) } return interceptor(ctx, in, info, handler) } @@ -555,13 +1025,25 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "Authenticate", + Handler: _Msg_Authenticate_Handler, + }, + { + MethodName: "ProveWitness", + Handler: _Msg_ProveWitness_Handler, + }, + { + MethodName: "SyncVault", + Handler: _Msg_SyncVault_Handler, + }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, }, { - MethodName: "AuthenticateController", - Handler: _Msg_AuthenticateController_Handler, + MethodName: "RegisterService", + Handler: _Msg_RegisterService_Handler, }, }, Streams: []grpc.StreamDesc{}, @@ -631,7 +1113,7 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgInitializeController) Marshal() (dAtA []byte, err error) { +func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -641,12 +1123,247 @@ func (m *MsgInitializeController) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgInitializeController) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAuthenticate) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgInitializeController) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x22 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgAuthenticateResponse) 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 *MsgAuthenticateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAuthenticateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgProveWitness) 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 *MsgProveWitness) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgProveWitness) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Witness) > 0 { + i -= len(m.Witness) + copy(dAtA[i:], m.Witness) + i = encodeVarintTx(dAtA, i, uint64(len(m.Witness))) + i-- + dAtA[i] = 0x1a + } + if len(m.Property) > 0 { + i -= len(m.Property) + copy(dAtA[i:], m.Property) + i = encodeVarintTx(dAtA, i, uint64(len(m.Property))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgProveWitnessResponse) 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 *MsgProveWitnessResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgProveWitnessResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Property) > 0 { + i -= len(m.Property) + copy(dAtA[i:], m.Property) + i = encodeVarintTx(dAtA, i, uint64(len(m.Property))) + i-- + dAtA[i] = 0x12 + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgSyncVault) 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 *MsgSyncVault) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSyncVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Macron) > 0 { + i -= len(m.Macron) + copy(dAtA[i:], m.Macron) + i = encodeVarintTx(dAtA, i, uint64(len(m.Macron))) + i-- + dAtA[i] = 0x1a + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0x12 + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgSyncVaultResponse) 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 *MsgSyncVaultResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgSyncVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterController) 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 *MsgRegisterController) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterController) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -688,7 +1405,7 @@ func (m *MsgInitializeController) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgInitializeControllerResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterControllerResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -698,16 +1415,35 @@ func (m *MsgInitializeControllerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgInitializeControllerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterControllerResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgInitializeControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Accounts) > 0 { + for k := range m.Accounts { + v := m.Accounts[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintTx(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTx(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTx(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x12 + } + } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) @@ -718,7 +1454,7 @@ func (m *MsgInitializeControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int return len(dAtA) - i, nil } -func (m *MsgAuthenticateController) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterService) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -728,34 +1464,38 @@ func (m *MsgAuthenticateController) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthenticateController) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterService) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthenticateController) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if len(m.Scopes) > 0 { + dAtA3 := make([]byte, len(m.Scopes)*10) + var j2 int + for _, num := range m.Scopes { + for num >= 1<<7 { + dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j2++ + } + dAtA3[j2] = uint8(num) + j2++ + } + i -= j2 + copy(dAtA[i:], dAtA3[:j2]) + i = encodeVarintTx(dAtA, i, uint64(j2)) i-- dAtA[i] = 0x1a } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + if len(m.OriginUri) > 0 { + i -= len(m.OriginUri) + copy(dAtA[i:], m.OriginUri) + i = encodeVarintTx(dAtA, i, uint64(len(m.OriginUri))) i-- dAtA[i] = 0x12 } @@ -769,7 +1509,7 @@ func (m *MsgAuthenticateController) MarshalToSizedBuffer(dAtA []byte) (int, erro return len(dAtA) - i, nil } -func (m *MsgAuthenticateControllerResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgRegisterServiceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -779,16 +1519,26 @@ func (m *MsgAuthenticateControllerResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthenticateControllerResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgRegisterServiceResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthenticateControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgRegisterServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } return len(dAtA) - i, nil } @@ -827,7 +1577,111 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgInitializeController) Size() (n int) { +func (m *MsgAuthenticate) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAuthenticateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgProveWitness) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Property) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Witness) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgProveWitnessResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success { + n += 2 + } + l = len(m.Property) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSyncVault) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Macron) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgSyncVaultResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success { + n += 2 + } + return n +} + +func (m *MsgRegisterController) Size() (n int) { if m == nil { return 0 } @@ -858,7 +1712,7 @@ func (m *MsgInitializeController) Size() (n int) { return n } -func (m *MsgInitializeControllerResponse) Size() (n int) { +func (m *MsgRegisterControllerResponse) Size() (n int) { if m == nil { return 0 } @@ -868,10 +1722,18 @@ func (m *MsgInitializeControllerResponse) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if len(m.Accounts) > 0 { + for k, v := range m.Accounts { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTx(uint64(len(k))) + 1 + len(v) + sovTx(uint64(len(v))) + n += mapEntrySize + 1 + sovTx(uint64(mapEntrySize)) + } + } return n } -func (m *MsgAuthenticateController) Size() (n int) { +func (m *MsgRegisterService) Size() (n int) { if m == nil { return 0 } @@ -881,27 +1743,29 @@ func (m *MsgAuthenticateController) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Controller) + l = len(m.OriginUri) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) + if len(m.Scopes) > 0 { + l = 0 + for _, e := range m.Scopes { + l += sovTx(uint64(e)) + } + n += 1 + sovTx(uint64(l)) + l } return n } -func (m *MsgAuthenticateControllerResponse) Size() (n int) { +func (m *MsgRegisterServiceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + if m.Success { + n += 2 + } return n } @@ -1076,7 +1940,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgInitializeController) Unmarshal(dAtA []byte) error { +func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1099,270 +1963,10 @@ func (m *MsgInitializeController) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgInitializeController: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInitializeController: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Assertions = append(m.Assertions, make([]byte, postIndex-iNdEx)) - copy(m.Assertions[len(m.Assertions)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) - copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) - copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgInitializeControllerResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgInitializeControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgInitializeControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTx(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTx - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *MsgAuthenticateController) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: MsgAuthenticateController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticateController: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1514,7 +2118,7 @@ func (m *MsgAuthenticateController) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1537,10 +2141,10 @@ func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthenticateControllerResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticateControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { default: @@ -1564,6 +2168,1114 @@ func (m *MsgAuthenticateControllerResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgProveWitness) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgProveWitness: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgProveWitness: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Property = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Witness = append(m.Witness[:0], dAtA[iNdEx:postIndex]...) + if m.Witness == nil { + m.Witness = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgProveWitnessResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgProveWitnessResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgProveWitnessResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Property", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Property = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSyncVault: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSyncVault: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Macron = append(m.Macron[:0], dAtA[iNdEx:postIndex]...) + if m.Macron == nil { + m.Macron = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgSyncVaultResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgSyncVaultResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgSyncVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterController: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterController: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Assertions", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Assertions = append(m.Assertions, make([]byte, postIndex-iNdEx)) + copy(m.Assertions[len(m.Assertions)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) + copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) + copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterControllerResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Accounts == nil { + m.Accounts = 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 ErrIntOverflowTx + } + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTx + } + 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 ErrIntOverflowTx + } + 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 ErrInvalidLengthTx + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + m.Accounts[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType == 0 { + var v PermissionScope + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + 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 ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + 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 ErrIntOverflowTx + } + 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: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterServiceResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterServiceResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/did/types/types.go b/x/did/types/types.go new file mode 100644 index 000000000..777f908ff --- /dev/null +++ b/x/did/types/types.go @@ -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 +} diff --git a/x/did/types/types.pb.go b/x/did/types/types.pb.go index 002d96be2..3329dca2e 100644 --- a/x/did/types/types.pb.go +++ b/x/did/types/types.pb.go @@ -4,6 +4,7 @@ package types import ( + encoding_binary "encoding/binary" fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" @@ -25,28 +26,36 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// BaseDocument defines a DID document -type BaseDocument struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` - Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` +// AssetInfo defines the asset info +type AssetInfo struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` + OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` + OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` + Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` + Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` + ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` + CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` + IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` + IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` + IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` + IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` } -func (m *BaseDocument) Reset() { *m = BaseDocument{} } -func (m *BaseDocument) String() string { return proto.CompactTextString(m) } -func (*BaseDocument) ProtoMessage() {} -func (*BaseDocument) Descriptor() ([]byte, []int) { +func (m *AssetInfo) Reset() { *m = AssetInfo{} } +func (m *AssetInfo) String() string { return proto.CompactTextString(m) } +func (*AssetInfo) ProtoMessage() {} +func (*AssetInfo) Descriptor() ([]byte, []int) { return fileDescriptor_e3176cd2dbe76ac1, []int{0} } -func (m *BaseDocument) XXX_Unmarshal(b []byte) error { +func (m *AssetInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *BaseDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *AssetInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_BaseDocument.Marshal(b, m, deterministic) + return xxx_messageInfo_AssetInfo.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -56,60 +65,740 @@ func (m *BaseDocument) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) return b[:n], nil } } -func (m *BaseDocument) XXX_Merge(src proto.Message) { - xxx_messageInfo_BaseDocument.Merge(m, src) +func (m *AssetInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_AssetInfo.Merge(m, src) } -func (m *BaseDocument) XXX_Size() int { +func (m *AssetInfo) XXX_Size() int { return m.Size() } -func (m *BaseDocument) XXX_DiscardUnknown() { - xxx_messageInfo_BaseDocument.DiscardUnknown(m) +func (m *AssetInfo) XXX_DiscardUnknown() { + xxx_messageInfo_AssetInfo.DiscardUnknown(m) } -var xxx_messageInfo_BaseDocument proto.InternalMessageInfo +var xxx_messageInfo_AssetInfo proto.InternalMessageInfo -func (m *BaseDocument) GetId() string { +func (m *AssetInfo) GetId() string { if m != nil { return m.Id } return "" } -func (m *BaseDocument) GetVerificationMethods() []*VerificationMethod { +func (m *AssetInfo) GetDenom() string { + if m != nil { + return m.Denom + } + return "" +} + +func (m *AssetInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *AssetInfo) GetAssetType() string { + if m != nil { + return m.AssetType + } + return "" +} + +func (m *AssetInfo) GetOriginChain() string { + if m != nil { + return m.OriginChain + } + return "" +} + +func (m *AssetInfo) GetOriginDenom() string { + if m != nil { + return m.OriginDenom + } + return "" +} + +func (m *AssetInfo) GetDecimals() int32 { + if m != nil { + return m.Decimals + } + return 0 +} + +func (m *AssetInfo) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *AssetInfo) GetImageUrl() string { + if m != nil { + return m.ImageUrl + } + return "" +} + +func (m *AssetInfo) GetCoingeckoId() string { + if m != nil { + return m.CoingeckoId + } + return "" +} + +func (m *AssetInfo) GetIsEnabled() bool { + if m != nil { + return m.IsEnabled + } + return false +} + +func (m *AssetInfo) GetIbcPath() string { + if m != nil { + return m.IbcPath + } + return "" +} + +func (m *AssetInfo) GetIbcChannel() string { + if m != nil { + return m.IbcChannel + } + return "" +} + +func (m *AssetInfo) GetIbcPort() string { + if m != nil { + return m.IbcPort + } + return "" +} + +// ChainInfo defines the chain info +type ChainInfo struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` + GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` + GrpcEndpoints []*Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` + RestEndpoints []*Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` + Explorer *ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeInfo *FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` +} + +func (m *ChainInfo) Reset() { *m = ChainInfo{} } +func (m *ChainInfo) String() string { return proto.CompactTextString(m) } +func (*ChainInfo) ProtoMessage() {} +func (*ChainInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{1} +} +func (m *ChainInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ChainInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ChainInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ChainInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ChainInfo.Merge(m, src) +} +func (m *ChainInfo) XXX_Size() int { + return m.Size() +} +func (m *ChainInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ChainInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ChainInfo proto.InternalMessageInfo + +func (m *ChainInfo) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ChainInfo) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +func (m *ChainInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ChainInfo) GetSymbol() string { + if m != nil { + return m.Symbol + } + return "" +} + +func (m *ChainInfo) GetBech32Prefix() string { + if m != nil { + return m.Bech32Prefix + } + return "" +} + +func (m *ChainInfo) GetGenesisTime() string { + if m != nil { + return m.GenesisTime + } + return "" +} + +func (m *ChainInfo) GetGrpcEndpoints() []*Endpoint { + if m != nil { + return m.GrpcEndpoints + } + return nil +} + +func (m *ChainInfo) GetRestEndpoints() []*Endpoint { + if m != nil { + return m.RestEndpoints + } + return nil +} + +func (m *ChainInfo) GetExplorer() *ExplorerInfo { + if m != nil { + return m.Explorer + } + return nil +} + +func (m *ChainInfo) GetFeeInfo() *FeeInfo { + if m != nil { + return m.FeeInfo + } + return nil +} + +// Credential defines a WebAuthn credential +type Credential struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` + CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` + AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` + DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` + Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (m *Credential) Reset() { *m = Credential{} } +func (m *Credential) String() string { return proto.CompactTextString(m) } +func (*Credential) ProtoMessage() {} +func (*Credential) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{2} +} +func (m *Credential) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Credential.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Credential) XXX_Merge(src proto.Message) { + xxx_messageInfo_Credential.Merge(m, src) +} +func (m *Credential) XXX_Size() int { + return m.Size() +} +func (m *Credential) XXX_DiscardUnknown() { + xxx_messageInfo_Credential.DiscardUnknown(m) +} + +var xxx_messageInfo_Credential proto.InternalMessageInfo + +func (m *Credential) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Credential) GetCredentialType() string { + if m != nil { + return m.CredentialType + } + return "" +} + +func (m *Credential) GetCredentialId() []byte { + if m != nil { + return m.CredentialId + } + return nil +} + +func (m *Credential) GetTransport() []string { + if m != nil { + return m.Transport + } + return nil +} + +func (m *Credential) GetAttestationType() string { + if m != nil { + return m.AttestationType + } + return "" +} + +func (m *Credential) GetDisplayName() string { + if m != nil { + return m.DisplayName + } + return "" +} + +func (m *Credential) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +// Document defines a DID document +type Document struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` + Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` + AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` + CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` + CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` +} + +func (m *Document) Reset() { *m = Document{} } +func (m *Document) String() string { return proto.CompactTextString(m) } +func (*Document) ProtoMessage() {} +func (*Document) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{3} +} +func (m *Document) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Document.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Document) XXX_Merge(src proto.Message) { + xxx_messageInfo_Document.Merge(m, src) +} +func (m *Document) XXX_Size() int { + return m.Size() +} +func (m *Document) XXX_DiscardUnknown() { + xxx_messageInfo_Document.DiscardUnknown(m) +} + +var xxx_messageInfo_Document proto.InternalMessageInfo + +func (m *Document) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Document) GetVerificationMethods() []*VerificationMethod { if m != nil { return m.VerificationMethods } return nil } -func (m *BaseDocument) GetAuthentication() []string { +func (m *Document) GetAuthentication() []string { if m != nil { return m.Authentication } return nil } -func (m *BaseDocument) GetAssertionMethod() []string { +func (m *Document) GetAssertionMethod() []string { if m != nil { return m.AssertionMethod } return nil } -func (m *BaseDocument) GetCapabilityDelegation() []string { +func (m *Document) GetCapabilityDelegation() []string { if m != nil { return m.CapabilityDelegation } return nil } -func (m *BaseDocument) GetCapabilityInvocation() []string { +func (m *Document) GetCapabilityInvocation() []string { if m != nil { return m.CapabilityInvocation } return nil } +// Endpoint defines an endpoint +type Endpoint struct { + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` +} + +func (m *Endpoint) Reset() { *m = Endpoint{} } +func (m *Endpoint) String() string { return proto.CompactTextString(m) } +func (*Endpoint) ProtoMessage() {} +func (*Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{4} +} +func (m *Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Endpoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_Endpoint.Merge(m, src) +} +func (m *Endpoint) XXX_Size() int { + return m.Size() +} +func (m *Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_Endpoint proto.InternalMessageInfo + +func (m *Endpoint) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *Endpoint) GetIsPrimary() bool { + if m != nil { + return m.IsPrimary + } + return false +} + +// ExplorerInfo defines the explorer info +type ExplorerInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *ExplorerInfo) Reset() { *m = ExplorerInfo{} } +func (m *ExplorerInfo) String() string { return proto.CompactTextString(m) } +func (*ExplorerInfo) ProtoMessage() {} +func (*ExplorerInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{5} +} +func (m *ExplorerInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ExplorerInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ExplorerInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ExplorerInfo.Merge(m, src) +} +func (m *ExplorerInfo) XXX_Size() int { + return m.Size() +} +func (m *ExplorerInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ExplorerInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ExplorerInfo proto.InternalMessageInfo + +func (m *ExplorerInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ExplorerInfo) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +// FeeInfo defines a fee info +type FeeInfo struct { + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` + InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` + IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` + GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` +} + +func (m *FeeInfo) Reset() { *m = FeeInfo{} } +func (m *FeeInfo) String() string { return proto.CompactTextString(m) } +func (*FeeInfo) ProtoMessage() {} +func (*FeeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{6} +} +func (m *FeeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FeeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeInfo.Merge(m, src) +} +func (m *FeeInfo) XXX_Size() int { + return m.Size() +} +func (m *FeeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_FeeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeInfo proto.InternalMessageInfo + +func (m *FeeInfo) GetBaseDenom() string { + if m != nil { + return m.BaseDenom + } + return "" +} + +func (m *FeeInfo) GetFeeRates() []string { + if m != nil { + return m.FeeRates + } + return nil +} + +func (m *FeeInfo) GetInitGasLimit() int32 { + if m != nil { + return m.InitGasLimit + } + return 0 +} + +func (m *FeeInfo) GetIsSimulable() bool { + if m != nil { + return m.IsSimulable + } + return false +} + +func (m *FeeInfo) GetGasMultiply() float64 { + if m != nil { + return m.GasMultiply + } + return 0 +} + +// Identity defines an associated profile for a did subject +type Identity struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` + VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` +} + +func (m *Identity) Reset() { *m = Identity{} } +func (m *Identity) String() string { return proto.CompactTextString(m) } +func (*Identity) ProtoMessage() {} +func (*Identity) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{7} +} +func (m *Identity) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Identity.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Identity) XXX_Merge(src proto.Message) { + xxx_messageInfo_Identity.Merge(m, src) +} +func (m *Identity) XXX_Size() int { + return m.Size() +} +func (m *Identity) XXX_DiscardUnknown() { + xxx_messageInfo_Identity.DiscardUnknown(m) +} + +var xxx_messageInfo_Identity proto.InternalMessageInfo + +func (m *Identity) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Identity) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *Identity) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *Identity) GetCredentials() []*Credential { + if m != nil { + return m.Credentials + } + return nil +} + +func (m *Identity) GetVerificationMethods() []*VerificationMethod { + if m != nil { + return m.VerificationMethods + } + return nil +} + +// PubKey defines a public key for a did +type PubKey struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` + KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` + Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` +} + +func (m *PubKey) Reset() { *m = PubKey{} } +func (m *PubKey) String() string { return proto.CompactTextString(m) } +func (*PubKey) ProtoMessage() {} +func (*PubKey) Descriptor() ([]byte, []int) { + return fileDescriptor_e3176cd2dbe76ac1, []int{8} +} +func (m *PubKey) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_PubKey.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *PubKey) XXX_Merge(src proto.Message) { + xxx_messageInfo_PubKey.Merge(m, src) +} +func (m *PubKey) XXX_Size() int { + return m.Size() +} +func (m *PubKey) XXX_DiscardUnknown() { + xxx_messageInfo_PubKey.DiscardUnknown(m) +} + +var xxx_messageInfo_PubKey proto.InternalMessageInfo + +func (m *PubKey) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *PubKey) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *PubKey) GetKeyType() string { + if m != nil { + return m.KeyType + } + return "" +} + +func (m *PubKey) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + // VerificationMethod defines a verification method type VerificationMethod struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -124,7 +813,7 @@ func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } func (*VerificationMethod) ProtoMessage() {} func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{1} + return fileDescriptor_e3176cd2dbe76ac1, []int{9} } func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -182,7 +871,15 @@ func (m *VerificationMethod) GetPublicKeyJwks() map[string]string { } func init() { - proto.RegisterType((*BaseDocument)(nil), "did.v1.BaseDocument") + proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") + proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") + proto.RegisterType((*Credential)(nil), "did.v1.Credential") + proto.RegisterType((*Document)(nil), "did.v1.Document") + proto.RegisterType((*Endpoint)(nil), "did.v1.Endpoint") + proto.RegisterType((*ExplorerInfo)(nil), "did.v1.ExplorerInfo") + proto.RegisterType((*FeeInfo)(nil), "did.v1.FeeInfo") + proto.RegisterType((*Identity)(nil), "did.v1.Identity") + proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") proto.RegisterMapType((map[string]string)(nil), "did.v1.VerificationMethod.PublicKeyJwksEntry") } @@ -190,39 +887,81 @@ func init() { func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) } var fileDescriptor_e3176cd2dbe76ac1 = []byte{ - // 449 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x92, 0xc1, 0x6e, 0xd3, 0x40, - 0x10, 0x86, 0x63, 0x87, 0x16, 0xba, 0x85, 0xb6, 0x5a, 0x8c, 0x30, 0x39, 0x58, 0x51, 0x0e, 0x28, - 0x1c, 0xb0, 0x69, 0x7b, 0x41, 0x88, 0x03, 0xaa, 0xca, 0x01, 0x50, 0x24, 0x14, 0x09, 0x0e, 0x5c, - 0xac, 0xb5, 0x3d, 0x38, 0x4b, 0xec, 0x5d, 0xcb, 0xb3, 0x76, 0xf0, 0x53, 0xc0, 0x73, 0xf0, 0x24, - 0x1c, 0x7b, 0xe4, 0x88, 0x92, 0x17, 0x41, 0xd9, 0x75, 0x82, 0x95, 0xa8, 0xb7, 0xd9, 0xff, 0xff, - 0x66, 0x76, 0x66, 0x34, 0x84, 0x26, 0x3c, 0x09, 0xea, 0xf3, 0x40, 0x35, 0x05, 0xa0, 0x5f, 0x94, - 0x52, 0x49, 0x7a, 0x98, 0xf0, 0xc4, 0xaf, 0xcf, 0x07, 0x8f, 0x63, 0x89, 0xb9, 0xc4, 0x20, 0xc7, - 0x74, 0x8d, 0xe4, 0x98, 0x1a, 0x60, 0xe0, 0xb4, 0x49, 0x29, 0x08, 0x40, 0x8e, 0x1b, 0x35, 0x95, - 0xa9, 0xd4, 0x61, 0xb0, 0x8e, 0x5a, 0xf5, 0x89, 0x29, 0x12, 0x1a, 0xc3, 0x3c, 0x8c, 0x35, 0xfa, - 0x65, 0x93, 0xfb, 0x57, 0x0c, 0xe1, 0x5a, 0xc6, 0x55, 0x0e, 0x42, 0xd1, 0x13, 0x62, 0xf3, 0xc4, - 0xb5, 0x86, 0xd6, 0xf8, 0x68, 0x6a, 0xf3, 0x84, 0x4e, 0x88, 0x53, 0x43, 0xc9, 0xbf, 0xf2, 0x98, - 0x29, 0x2e, 0x45, 0x98, 0x83, 0x9a, 0xc9, 0x04, 0x5d, 0x7b, 0xd8, 0x1f, 0x1f, 0x5f, 0x0c, 0x7c, - 0xd3, 0xa7, 0xff, 0xb9, 0xc3, 0x4c, 0x34, 0x32, 0x7d, 0x58, 0xef, 0x69, 0x48, 0x9f, 0x92, 0x13, - 0x56, 0xa9, 0x19, 0x08, 0xd5, 0x1a, 0xee, 0x9d, 0x61, 0x7f, 0x7c, 0x34, 0xdd, 0x51, 0xe9, 0x33, - 0x72, 0xc6, 0x10, 0xa1, 0xec, 0xfc, 0xe9, 0x1e, 0x68, 0xf2, 0x74, 0xab, 0x9b, 0x9a, 0xf4, 0x92, - 0x3c, 0x8a, 0x59, 0xc1, 0x22, 0x9e, 0x71, 0xd5, 0x84, 0x09, 0x64, 0x90, 0x9a, 0xca, 0x77, 0x35, - 0xef, 0xfc, 0x37, 0xaf, 0xb7, 0xde, 0x4e, 0x12, 0x17, 0xb5, 0x6c, 0xdb, 0xb9, 0xb7, 0x9b, 0xf4, - 0x6e, 0xeb, 0x8d, 0x7e, 0xd8, 0x84, 0xee, 0x0f, 0xba, 0xb7, 0x32, 0x8f, 0x90, 0x58, 0x0a, 0x55, - 0xca, 0x2c, 0x83, 0xd2, 0xb5, 0xb5, 0xde, 0x51, 0xe8, 0x0b, 0xe2, 0x14, 0x55, 0x94, 0xf1, 0x38, - 0x9c, 0x43, 0x13, 0xe6, 0x55, 0xa6, 0x78, 0xc4, 0x10, 0xdc, 0xbe, 0x26, 0xa9, 0xf1, 0x3e, 0x40, - 0x33, 0xd9, 0x38, 0xf4, 0x13, 0x39, 0xed, 0x64, 0x7c, 0x5b, 0xcc, 0x51, 0xaf, 0xed, 0xf8, 0xe2, - 0xf9, 0xed, 0xfb, 0xf7, 0x3f, 0x6e, 0xea, 0xbc, 0x5f, 0xcc, 0xf1, 0xad, 0x50, 0x65, 0x33, 0x7d, - 0x50, 0x74, 0xb5, 0xc1, 0x1b, 0x42, 0xf7, 0x21, 0x7a, 0x46, 0xfa, 0x73, 0x68, 0xda, 0x79, 0xd6, - 0x21, 0x75, 0xc8, 0x41, 0xcd, 0xb2, 0x0a, 0xda, 0x59, 0xcc, 0xe3, 0x95, 0xfd, 0xd2, 0xba, 0x7a, - 0xfd, 0x7b, 0xe9, 0x59, 0x37, 0x4b, 0xcf, 0xfa, 0xbb, 0xf4, 0xac, 0x9f, 0x2b, 0xaf, 0x77, 0xb3, - 0xf2, 0x7a, 0x7f, 0x56, 0x5e, 0xef, 0xcb, 0x28, 0xe5, 0x6a, 0x56, 0x45, 0x7e, 0x2c, 0xf3, 0x40, - 0x0a, 0x94, 0xa2, 0x0c, 0x66, 0x0b, 0xd6, 0x04, 0xdf, 0x83, 0xf5, 0xe1, 0xea, 0x53, 0x8f, 0x0e, - 0xf5, 0x0d, 0x5e, 0xfe, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x30, 0x32, 0xf6, 0x01, 0x03, 0x00, - 0x00, + // 1133 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xcd, 0x72, 0xe3, 0x44, + 0x10, 0x8e, 0xec, 0x38, 0x96, 0xda, 0x8e, 0x93, 0x1a, 0x0c, 0x28, 0x59, 0x30, 0xc1, 0x4b, 0x41, + 0xa0, 0x0a, 0x7b, 0x37, 0xd9, 0x2a, 0x28, 0xe0, 0x00, 0x24, 0x81, 0x32, 0x4b, 0xa8, 0x94, 0xd8, + 0xe5, 0xc0, 0x45, 0x35, 0x92, 0xc6, 0xf2, 0xac, 0x25, 0x8d, 0x4a, 0x33, 0x76, 0xa2, 0xa7, 0x80, + 0x67, 0xe0, 0xc0, 0x9d, 0xb7, 0xe0, 0xb8, 0x47, 0xb8, 0x51, 0xc9, 0x3b, 0x70, 0xe0, 0x44, 0xcd, + 0x8c, 0x24, 0x2b, 0x31, 0xb9, 0x70, 0x9b, 0xfe, 0xba, 0x7b, 0x7e, 0xfa, 0xfb, 0xba, 0x6b, 0x00, + 0x05, 0x34, 0x18, 0x2f, 0x1f, 0x8f, 0x45, 0x9e, 0x12, 0x3e, 0x4a, 0x33, 0x26, 0x18, 0xda, 0x0a, + 0x68, 0x30, 0x5a, 0x3e, 0xde, 0x7f, 0xdd, 0x67, 0x3c, 0x66, 0x7c, 0x1c, 0xf3, 0x50, 0x86, 0xc4, + 0x3c, 0xd4, 0x01, 0xfb, 0xfd, 0x90, 0x85, 0x4c, 0x2d, 0xc7, 0x72, 0x55, 0xa0, 0x7b, 0x3a, 0xdc, + 0xd5, 0x0e, 0x6d, 0x68, 0xd7, 0xf0, 0x97, 0x26, 0x58, 0x5f, 0x70, 0x4e, 0xc4, 0x24, 0x99, 0x32, + 0xd4, 0x83, 0x06, 0x0d, 0x6c, 0xe3, 0xc0, 0x38, 0xb4, 0x9c, 0x06, 0x0d, 0x50, 0x1f, 0x5a, 0x01, + 0x49, 0x58, 0x6c, 0x37, 0x14, 0xa4, 0x0d, 0xf4, 0x1a, 0x6c, 0xf1, 0x3c, 0xf6, 0x58, 0x64, 0x37, + 0x15, 0x5c, 0x58, 0xe8, 0x4d, 0x00, 0x2c, 0xb7, 0x72, 0xe5, 0x95, 0xed, 0x4d, 0xe5, 0xb3, 0x14, + 0xf2, 0x2c, 0x4f, 0x09, 0x7a, 0x1b, 0xba, 0x2c, 0xa3, 0x21, 0x4d, 0x5c, 0x7f, 0x86, 0x69, 0x62, + 0xb7, 0x54, 0x40, 0x47, 0x63, 0x27, 0x12, 0xaa, 0x85, 0xe8, 0x63, 0xb7, 0xea, 0x21, 0xa7, 0xea, + 0xf0, 0x7d, 0x30, 0x03, 0xe2, 0xd3, 0x18, 0x47, 0xdc, 0x6e, 0x1f, 0x18, 0x87, 0x2d, 0xa7, 0xb2, + 0xd1, 0x01, 0x74, 0x02, 0xc2, 0xfd, 0x8c, 0xa6, 0x82, 0xb2, 0xc4, 0x36, 0x75, 0x76, 0x0d, 0x42, + 0x0f, 0xc0, 0xa2, 0x31, 0x0e, 0x89, 0xbb, 0xc8, 0x22, 0xdb, 0x52, 0x7e, 0x53, 0x01, 0xcf, 0xb3, + 0x48, 0x9e, 0xee, 0x33, 0x9a, 0x84, 0xc4, 0x9f, 0x33, 0x97, 0x06, 0x36, 0xe8, 0xfc, 0x0a, 0x9b, + 0x04, 0xf2, 0x89, 0x94, 0xbb, 0x24, 0xc1, 0x5e, 0x44, 0x02, 0xbb, 0x73, 0x60, 0x1c, 0x9a, 0x8e, + 0x45, 0xf9, 0x99, 0x06, 0xd0, 0x1e, 0x98, 0xd4, 0xf3, 0xdd, 0x14, 0x8b, 0x99, 0xdd, 0x55, 0xd9, + 0x6d, 0xea, 0xf9, 0x17, 0x58, 0xcc, 0xd0, 0x5b, 0xd0, 0x91, 0x2e, 0x7f, 0x86, 0x93, 0x84, 0x44, + 0xf6, 0xb6, 0xf2, 0x02, 0xf5, 0xfc, 0x13, 0x8d, 0x54, 0xb9, 0x2c, 0x13, 0x76, 0x6f, 0x95, 0xcb, + 0x32, 0x31, 0xfc, 0xa7, 0x01, 0x96, 0x2a, 0xd0, 0x7f, 0x92, 0xb4, 0x07, 0xa6, 0x2a, 0xa8, 0xbc, + 0xb2, 0xe6, 0xa9, 0xad, 0xec, 0x49, 0x80, 0x10, 0x6c, 0x26, 0x38, 0x26, 0x05, 0x4f, 0x6a, 0x5d, + 0x63, 0x6f, 0xf3, 0x16, 0x7b, 0x0f, 0x61, 0xdb, 0x23, 0xfe, 0xec, 0xf8, 0xc8, 0x4d, 0x33, 0x32, + 0xa5, 0x57, 0x05, 0x3f, 0x5d, 0x0d, 0x5e, 0x28, 0x4c, 0x96, 0x28, 0x24, 0x09, 0xe1, 0x94, 0xbb, + 0x82, 0xc6, 0xa4, 0x24, 0xa8, 0xc0, 0x9e, 0xd1, 0x98, 0xa0, 0x8f, 0xa0, 0x17, 0x66, 0xa9, 0xef, + 0x92, 0x24, 0x48, 0x19, 0x4d, 0x84, 0xa4, 0xa9, 0x79, 0xd8, 0x39, 0xda, 0x1d, 0x69, 0xf1, 0x8e, + 0xce, 0x0a, 0x87, 0xb3, 0x2d, 0xe3, 0x4a, 0x8b, 0xcb, 0xc4, 0x8c, 0x70, 0x51, 0x4b, 0x34, 0xef, + 0x4b, 0x94, 0x71, 0xab, 0xc4, 0x47, 0x60, 0x92, 0xab, 0x34, 0x62, 0x19, 0xc9, 0x14, 0xa7, 0x9d, + 0xa3, 0x7e, 0x95, 0x52, 0xe0, 0xb2, 0x70, 0x4e, 0x15, 0x85, 0x3e, 0x00, 0x73, 0x4a, 0x88, 0x4b, + 0x93, 0x29, 0x53, 0x2c, 0x77, 0x8e, 0x76, 0xca, 0x8c, 0xaf, 0x08, 0x51, 0xc1, 0xed, 0xa9, 0x5e, + 0x0c, 0xff, 0x36, 0x00, 0x4e, 0x32, 0x12, 0x90, 0x44, 0x50, 0x1c, 0xad, 0x55, 0xff, 0x3d, 0xd8, + 0xf1, 0x2b, 0xaf, 0x56, 0xbe, 0x26, 0xa1, 0xb7, 0x82, 0x95, 0xfc, 0x1f, 0xc2, 0x76, 0x2d, 0x90, + 0x06, 0x8a, 0x94, 0xae, 0xd3, 0x5d, 0x81, 0x93, 0x00, 0xbd, 0x01, 0x96, 0xc8, 0x70, 0xc2, 0x95, + 0x0a, 0x36, 0x0f, 0x9a, 0xb2, 0x83, 0x2a, 0x00, 0xbd, 0x0f, 0xbb, 0x58, 0x08, 0xc2, 0x05, 0x96, + 0x62, 0xd6, 0x87, 0x69, 0x96, 0x76, 0x6a, 0x78, 0xd9, 0x6c, 0x01, 0xe5, 0x69, 0x84, 0x73, 0x57, + 0x29, 0xa0, 0x20, 0xaa, 0xc0, 0xbe, 0x93, 0x42, 0x18, 0x00, 0xf8, 0x2c, 0x11, 0x19, 0x8b, 0x22, + 0x92, 0xa9, 0x5e, 0xb2, 0x9c, 0x1a, 0x32, 0xfc, 0xb5, 0x01, 0xe6, 0x29, 0xf3, 0x17, 0x31, 0x49, + 0xc4, 0xda, 0xb3, 0xcf, 0xa1, 0xbf, 0x24, 0x19, 0x9d, 0x52, 0x5f, 0xdf, 0x25, 0x26, 0x62, 0xc6, + 0x02, 0x6e, 0x37, 0x14, 0x65, 0xfb, 0x65, 0x35, 0x7f, 0xa8, 0xc5, 0x9c, 0xab, 0x10, 0xe7, 0x95, + 0xe5, 0x1a, 0xc6, 0xd1, 0xbb, 0xd0, 0xc3, 0x0b, 0x31, 0x93, 0x75, 0xd0, 0x8e, 0xe2, 0xf1, 0x77, + 0x50, 0x55, 0x01, 0xce, 0x49, 0x56, 0x3b, 0xd3, 0x6e, 0xa9, 0xc8, 0x9d, 0x0a, 0xd7, 0x7b, 0xa2, + 0x63, 0x78, 0xd5, 0xc7, 0x29, 0xf6, 0x68, 0x44, 0x45, 0xee, 0x06, 0x24, 0x22, 0xa1, 0xde, 0xb9, + 0xad, 0xe2, 0xfb, 0x2b, 0xe7, 0x69, 0xe5, 0xbb, 0x93, 0x44, 0x93, 0x25, 0x2b, 0xae, 0x63, 0xde, + 0x4d, 0x9a, 0x54, 0xbe, 0xe1, 0xa7, 0x60, 0x96, 0x62, 0x44, 0xbb, 0xd0, 0x94, 0xa3, 0x45, 0x17, + 0x4a, 0x2e, 0x8b, 0x91, 0x91, 0x66, 0x34, 0xc6, 0x59, 0xae, 0xb4, 0xa1, 0x46, 0xc6, 0x85, 0x06, + 0x86, 0x4f, 0xa0, 0x5b, 0x17, 0x69, 0xd5, 0xb2, 0x46, 0xad, 0x65, 0x8b, 0x4d, 0x1b, 0xd5, 0xa6, + 0xc3, 0xdf, 0x0c, 0x68, 0x17, 0x4a, 0x95, 0x07, 0x78, 0x98, 0x93, 0x62, 0x64, 0xea, 0x3c, 0x4b, + 0x22, 0x7a, 0x60, 0x3e, 0x00, 0x4b, 0x6a, 0x3d, 0xc3, 0x82, 0x68, 0x7a, 0x2c, 0x47, 0x8a, 0xdf, + 0x91, 0x36, 0x7a, 0x07, 0x7a, 0x34, 0xa1, 0xc2, 0x0d, 0x31, 0x77, 0x23, 0x1a, 0x53, 0xa1, 0x54, + 0xd9, 0x72, 0xba, 0x12, 0xfd, 0x1a, 0xf3, 0x6f, 0x25, 0x26, 0xc5, 0x44, 0xb9, 0xcb, 0x69, 0xbc, + 0x88, 0xe4, 0x9c, 0x53, 0x83, 0xc3, 0x74, 0x3a, 0x94, 0x7f, 0x5f, 0x42, 0x6a, 0x30, 0x60, 0xee, + 0xc6, 0x8b, 0x48, 0xd0, 0x34, 0xca, 0x95, 0x2c, 0x0d, 0xa7, 0x13, 0x62, 0x7e, 0x5e, 0x40, 0xc3, + 0x3f, 0x0d, 0x30, 0x27, 0x4a, 0xea, 0x22, 0x5f, 0xd3, 0x93, 0x0d, 0x6d, 0xbe, 0xf0, 0x5e, 0x10, + 0x5f, 0x94, 0x33, 0xac, 0x30, 0xef, 0xc8, 0xb4, 0x79, 0x57, 0xa6, 0xe8, 0x09, 0x74, 0x56, 0x2d, + 0xc4, 0x95, 0x6e, 0x3a, 0x47, 0xa8, 0x14, 0xe0, 0xaa, 0x73, 0x9d, 0x7a, 0xd8, 0xbd, 0xfa, 0x6d, + 0xfd, 0x2f, 0xfd, 0x0e, 0x09, 0x6c, 0x5d, 0x2c, 0xbc, 0xa7, 0x64, 0xfd, 0x61, 0xbb, 0xd0, 0x9c, + 0x13, 0xcd, 0x7b, 0xd7, 0x91, 0x4b, 0x39, 0xaf, 0xe7, 0x24, 0xd7, 0xdd, 0xab, 0x9f, 0xd3, 0x9e, + 0x93, 0x5c, 0x75, 0xed, 0xed, 0xb7, 0x6e, 0xae, 0xb5, 0xe4, 0x4f, 0x0d, 0x40, 0xeb, 0x57, 0x5a, + 0x3b, 0xf3, 0xf6, 0x36, 0x8d, 0xb5, 0x92, 0x3d, 0x82, 0x7e, 0xba, 0xf0, 0x22, 0xea, 0xbb, 0xf2, + 0x22, 0x8a, 0x33, 0xa9, 0x97, 0xe2, 0x36, 0x48, 0xfb, 0x9e, 0x92, 0xfc, 0xbc, 0xf4, 0xa0, 0xe7, + 0xb0, 0x53, 0xcb, 0x78, 0x71, 0x39, 0x2f, 0x0b, 0xfd, 0xe1, 0xfd, 0x95, 0x1a, 0x5d, 0x94, 0xfb, + 0x7c, 0x73, 0x39, 0xe7, 0x67, 0x89, 0xc8, 0x72, 0x67, 0x3b, 0xad, 0x63, 0xfb, 0x9f, 0x03, 0x5a, + 0x0f, 0x2a, 0x4b, 0x56, 0xf4, 0x90, 0x2c, 0x59, 0x1f, 0x5a, 0x4b, 0x1c, 0x2d, 0xca, 0xd1, 0xaa, + 0x8d, 0x4f, 0x1a, 0x1f, 0x1b, 0x5f, 0x7e, 0xf6, 0xfb, 0xf5, 0xc0, 0x78, 0x79, 0x3d, 0x30, 0xfe, + 0xba, 0x1e, 0x18, 0x3f, 0xdf, 0x0c, 0x36, 0x5e, 0xde, 0x0c, 0x36, 0xfe, 0xb8, 0x19, 0x6c, 0xfc, + 0x38, 0x0c, 0xa9, 0x98, 0x2d, 0xbc, 0x91, 0xcf, 0xe2, 0x31, 0x4b, 0x38, 0x4b, 0xb2, 0xf1, 0xec, + 0x12, 0xe7, 0xe3, 0xab, 0xb1, 0xfc, 0x58, 0xa9, 0x5f, 0x95, 0xb7, 0xa5, 0x3e, 0x41, 0xc7, 0xff, + 0x06, 0x00, 0x00, 0xff, 0xff, 0x81, 0xc0, 0xc2, 0xed, 0x6c, 0x09, 0x00, 0x00, } -func (m *BaseDocument) Marshal() (dAtA []byte, err error) { +func (m *AssetInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -232,12 +971,325 @@ func (m *BaseDocument) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *BaseDocument) MarshalTo(dAtA []byte) (int, error) { +func (m *AssetInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *BaseDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.IbcPort) > 0 { + i -= len(m.IbcPort) + copy(dAtA[i:], m.IbcPort) + i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPort))) + i-- + dAtA[i] = 0x72 + } + if len(m.IbcChannel) > 0 { + i -= len(m.IbcChannel) + copy(dAtA[i:], m.IbcChannel) + i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcChannel))) + i-- + dAtA[i] = 0x6a + } + if len(m.IbcPath) > 0 { + i -= len(m.IbcPath) + copy(dAtA[i:], m.IbcPath) + i = encodeVarintTypes(dAtA, i, uint64(len(m.IbcPath))) + i-- + dAtA[i] = 0x62 + } + if m.IsEnabled { + i-- + if m.IsEnabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x58 + } + if len(m.CoingeckoId) > 0 { + i -= len(m.CoingeckoId) + copy(dAtA[i:], m.CoingeckoId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CoingeckoId))) + i-- + dAtA[i] = 0x52 + } + if len(m.ImageUrl) > 0 { + i -= len(m.ImageUrl) + copy(dAtA[i:], m.ImageUrl) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ImageUrl))) + i-- + dAtA[i] = 0x4a + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x42 + } + if m.Decimals != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Decimals)) + i-- + dAtA[i] = 0x38 + } + if len(m.OriginDenom) > 0 { + i -= len(m.OriginDenom) + copy(dAtA[i:], m.OriginDenom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginDenom))) + i-- + dAtA[i] = 0x32 + } + if len(m.OriginChain) > 0 { + i -= len(m.OriginChain) + copy(dAtA[i:], m.OriginChain) + i = encodeVarintTypes(dAtA, i, uint64(len(m.OriginChain))) + i-- + dAtA[i] = 0x2a + } + if len(m.AssetType) > 0 { + i -= len(m.AssetType) + copy(dAtA[i:], m.AssetType) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AssetType))) + i-- + dAtA[i] = 0x22 + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x1a + } + if len(m.Denom) > 0 { + i -= len(m.Denom) + copy(dAtA[i:], m.Denom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Denom))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ChainInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ChainInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.FeeInfo != nil { + { + size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x52 + } + if m.Explorer != nil { + { + size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x4a + } + if len(m.RestEndpoints) > 0 { + for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } + } + if len(m.GrpcEndpoints) > 0 { + for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + } + if len(m.GenesisTime) > 0 { + i -= len(m.GenesisTime) + copy(dAtA[i:], m.GenesisTime) + i = encodeVarintTypes(dAtA, i, uint64(len(m.GenesisTime))) + i-- + dAtA[i] = 0x32 + } + if len(m.Bech32Prefix) > 0 { + i -= len(m.Bech32Prefix) + copy(dAtA[i:], m.Bech32Prefix) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Bech32Prefix))) + i-- + dAtA[i] = 0x2a + } + if len(m.Symbol) > 0 { + i -= len(m.Symbol) + copy(dAtA[i:], m.Symbol) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Symbol))) + i-- + dAtA[i] = 0x22 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x1a + } + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Credential) 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 *Credential) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Credential) 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 = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x3a + } + if len(m.DisplayName) > 0 { + i -= len(m.DisplayName) + copy(dAtA[i:], m.DisplayName) + i = encodeVarintTypes(dAtA, i, uint64(len(m.DisplayName))) + i-- + dAtA[i] = 0x32 + } + if len(m.AttestationType) > 0 { + i -= len(m.AttestationType) + copy(dAtA[i:], m.AttestationType) + i = encodeVarintTypes(dAtA, i, uint64(len(m.AttestationType))) + i-- + dAtA[i] = 0x2a + } + if len(m.Transport) > 0 { + for iNdEx := len(m.Transport) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Transport[iNdEx]) + copy(dAtA[i:], m.Transport[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Transport[iNdEx]))) + i-- + dAtA[i] = 0x22 + } + } + if len(m.CredentialId) > 0 { + i -= len(m.CredentialId) + copy(dAtA[i:], m.CredentialId) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialId))) + i-- + dAtA[i] = 0x1a + } + if len(m.CredentialType) > 0 { + i -= len(m.CredentialType) + copy(dAtA[i:], m.CredentialType) + i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialType))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Document) 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 *Document) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -302,6 +1354,266 @@ func (m *BaseDocument) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Endpoint) 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 *Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsPrimary { + i-- + if m.IsPrimary { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ExplorerInfo) 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 *ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Url) > 0 { + i -= len(m.Url) + copy(dAtA[i:], m.Url) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Url))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FeeInfo) 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 *FeeInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.GasMultiply != 0 { + i -= 8 + encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.GasMultiply)))) + i-- + dAtA[i] = 0x29 + } + if m.IsSimulable { + i-- + if m.IsSimulable { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 + } + if m.InitGasLimit != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.InitGasLimit)) + i-- + dAtA[i] = 0x18 + } + if len(m.FeeRates) > 0 { + for iNdEx := len(m.FeeRates) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.FeeRates[iNdEx]) + copy(dAtA[i:], m.FeeRates[iNdEx]) + i = encodeVarintTypes(dAtA, i, uint64(len(m.FeeRates[iNdEx]))) + i-- + dAtA[i] = 0x12 + } + } + if len(m.BaseDenom) > 0 { + i -= len(m.BaseDenom) + copy(dAtA[i:], m.BaseDenom) + i = encodeVarintTypes(dAtA, i, uint64(len(m.BaseDenom))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Identity) 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 *Identity) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Identity) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.VerificationMethods) > 0 { + for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + } + if len(m.Credentials) > 0 { + for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTypes(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x1a + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PubKey) 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 *PubKey) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PubKey) 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 = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x22 + } + if len(m.KeyType) > 0 { + i -= len(m.KeyType) + copy(dAtA[i:], m.KeyType) + i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyType))) + i-- + dAtA[i] = 0x1a + } + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func (m *VerificationMethod) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -376,7 +1688,162 @@ func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *BaseDocument) Size() (n int) { +func (m *AssetInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Denom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.AssetType) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.OriginChain) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.OriginDenom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.Decimals != 0 { + n += 1 + sovTypes(uint64(m.Decimals)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ImageUrl) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CoingeckoId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.IsEnabled { + n += 2 + } + l = len(m.IbcPath) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.IbcChannel) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.IbcPort) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *ChainInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Symbol) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Bech32Prefix) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.GenesisTime) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.GrpcEndpoints) > 0 { + for _, e := range m.GrpcEndpoints { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.RestEndpoints) > 0 { + for _, e := range m.RestEndpoints { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.Explorer != nil { + l = m.Explorer.Size() + n += 1 + l + sovTypes(uint64(l)) + } + if m.FeeInfo != nil { + l = m.FeeInfo.Size() + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Credential) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CredentialType) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.CredentialId) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Transport) > 0 { + for _, s := range m.Transport { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + l = len(m.AttestationType) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.DisplayName) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *Document) Size() (n int) { if m == nil { return 0 } @@ -419,6 +1886,125 @@ func (m *BaseDocument) Size() (n int) { return n } +func (m *Endpoint) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Url) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if m.IsPrimary { + n += 2 + } + return n +} + +func (m *ExplorerInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Url) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + +func (m *FeeInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.BaseDenom) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.FeeRates) > 0 { + for _, s := range m.FeeRates { + l = len(s) + n += 1 + l + sovTypes(uint64(l)) + } + } + if m.InitGasLimit != 0 { + n += 1 + sovTypes(uint64(m.InitGasLimit)) + } + if m.IsSimulable { + n += 2 + } + if m.GasMultiply != 0 { + n += 9 + } + return n +} + +func (m *Identity) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + if len(m.Credentials) > 0 { + for _, e := range m.Credentials { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + if len(m.VerificationMethods) > 0 { + for _, e := range m.VerificationMethods { + l = e.Size() + n += 1 + l + sovTypes(uint64(l)) + } + } + return n +} + +func (m *PubKey) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Key) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.KeyType) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTypes(uint64(l)) + } + return n +} + func (m *VerificationMethod) Size() (n int) { if m == nil { return 0 @@ -454,7 +2040,7 @@ func sovTypes(x uint64) (n int) { func sozTypes(x uint64) (n int) { return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *BaseDocument) Unmarshal(dAtA []byte) error { +func (m *AssetInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -477,10 +2063,1141 @@ func (m *BaseDocument) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: BaseDocument: wiretype end group for non-group") + return fmt.Errorf("proto: AssetInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: BaseDocument: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: AssetInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Denom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AssetType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginChain = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.OriginDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) + } + m.Decimals = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Decimals |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ImageUrl = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CoingeckoId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 11: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsEnabled = bool(v != 0) + case 12: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcPath = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 13: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcChannel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 14: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.IbcPort = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ChainInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ChainInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ChainInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Symbol", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Symbol = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GenesisTime = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GrpcEndpoints = append(m.GrpcEndpoints, &Endpoint{}) + if err := m.GrpcEndpoints[len(m.GrpcEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.RestEndpoints = append(m.RestEndpoints, &Endpoint{}) + if err := m.RestEndpoints[len(m.RestEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Explorer == nil { + m.Explorer = &ExplorerInfo{} + } + if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.FeeInfo == nil { + m.FeeInfo = &FeeInfo{} + } + if err := m.FeeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Credential) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Credential: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if m.CredentialId == nil { + m.CredentialId = []byte{} + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Transport = append(m.Transport, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AttestationType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DisplayName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Document) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Document: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -698,6 +3415,780 @@ func (m *BaseDocument) Unmarshal(dAtA []byte) error { } return nil } +func (m *Endpoint) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Endpoint: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsPrimary", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsPrimary = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ExplorerInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ExplorerInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Url", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Url = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FeeInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FeeInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field BaseDenom", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.BaseDenom = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FeeRates", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FeeRates = append(m.FeeRates, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field InitGasLimit", wireType) + } + m.InitGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.InitGasLimit |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsSimulable", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsSimulable = bool(v != 0) + case 5: + if wireType != 1 { + return fmt.Errorf("proto: wrong wireType = %d for field GasMultiply", wireType) + } + var v uint64 + if (iNdEx + 8) > l { + return io.ErrUnexpectedEOF + } + v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:])) + iNdEx += 8 + m.GasMultiply = float64(math.Float64frombits(v)) + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Identity) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Identity: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + 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 ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Credentials = append(m.Credentials, &Credential{}) + if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) + if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *PubKey) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: PubKey: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTypes + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.KeyType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTypes + } + 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 ErrInvalidLengthTypes + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTypes + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTypes(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTypes + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *VerificationMethod) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 From 861fbf501d91811a4097f4d6f1381764de91407e Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Wed, 21 Aug 2024 14:53:03 -0400 Subject: [PATCH 2/6] fix: Add service to database when registering --- .air.toml | 72 ------------------------------------------ Dockerfile | 2 +- devbox.json | 5 +-- go.mod | 3 -- go.sum | 30 ------------------ mprocs.yaml | 19 +++++++++++ x/did/keeper/server.go | 17 ++++++---- x/did/types/perms.go | 17 ---------- 8 files changed, 33 insertions(+), 132 deletions(-) delete mode 100644 .air.toml create mode 100644 mprocs.yaml diff --git a/.air.toml b/.air.toml deleted file mode 100644 index afd174c32..000000000 --- a/.air.toml +++ /dev/null @@ -1,72 +0,0 @@ -root = "." -testdata_dir = "testdata" -tmp_dir = "tmp" - -[build] -# Array of commands to run before each build -pre_cmd = ["task templ"] -# Just plain old shell command. You could use `make` as well. -cmd = "go build -o ./tmp/vltd ./cmd/vltd" -# Array of commands to run after ^C -bin = "tmp/vltd" -# Watch these filename extensions. -include_ext = ["go", "proto", "templ"] -# Ignore these filename extensions or directories. -exclude_dir = ["api", "crypto", "pkl", "scripts", "tmp", ".github"] -# Watch these directories if you specified. -include_dir = ["pkg", "x", "internal", ".github"] -# Watch these files. -include_file = [] -# Exclude files. -exclude_file = [] -# Exclude specific regular expressions. -exclude_regex = ["_test\\.go"] -# Exclude unchanged files. -exclude_unchanged = true -# Follow symlink for directories -follow_symlink = true -# This log file places in your tmp_dir. -log = "air.log" -# Poll files for changes instead of using fsnotify. -poll = false -# Poll interval (defaults to the minimum interval of 500ms). -poll_interval = 500 # ms -# It's not necessary to trigger build each time file changes if it's too frequent. -delay = 0 # ms -# Stop running old binary when build errors occur. -stop_on_error = true -# Send Interrupt signal before killing process (windows does not support this feature) -send_interrupt = false -# Delay after sending Interrupt signal -kill_delay = 500 # nanosecond -# Rerun binary or not -rerun = false -# Delay after each execution -rerun_delay = 500 - -[log] -# Show log time -time = false -# Only show main log (silences watcher, build, runner) -main_only = false - -[color] -# Customize each part's color. If no color found, use the raw app log. -main = "magenta" -watcher = "cyan" -build = "yellow" -runner = "green" - -[misc] -# Delete tmp directory on exit -clean_on_exit = true - -[screen] -clear_on_rebuild = true -keep_scroll = true - -# Enable live-reloading on the browser. -[proxy] -enabled = true -proxy_port = 8090 -app_port = 8080 diff --git a/Dockerfile b/Dockerfile index d17589a92..ad5656eaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,6 @@ RUN apk add --no-cache curl make bash jq sed WORKDIR /opt # rest server, tendermint p2p, tendermint rpc -EXPOSE 1317 26656 26657 +EXPOSE 1317 26656 26657 6060 CMD ["/usr/bin/sonrd", "version"] diff --git a/devbox.json b/devbox.json index 00c605fbd..0fb9ac051 100644 --- a/devbox.json +++ b/devbox.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": ["golangci-lint@latest", "go@1.21", "air@latest"], + "packages": ["mprocs@latest", "go@1.21"], "env": { "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH" @@ -10,7 +10,8 @@ "install": ["make install"], "proto": ["make proto-gen"], "build": ["go build -o ./bin/sonrd ./cmd/sonrd"], - "testnet": ["make sh-testnet"] + "testnet": ["make sh-testnet"], + "serve": ["mprocs"] } } } diff --git a/go.mod b/go.mod index 10bba71dc..06a70b71c 100644 --- a/go.mod +++ b/go.mod @@ -70,7 +70,6 @@ require ( google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 - gopkg.in/macaroon-bakery.v2 v2.3.0 ) require ( @@ -305,9 +304,7 @@ require ( google.golang.org/api v0.169.0 // indirect google.golang.org/genproto v0.0.0-20240227224415-6ceb2ff114de // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20240617180043-68d350f18fd4 // indirect - gopkg.in/errgo.v1 v1.0.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/macaroon.v2 v2.1.0 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect gotest.tools/v3 v3.5.1 // indirect diff --git a/go.sum b/go.sum index 4ba2f4eec..b962d0444 100644 --- a/go.sum +++ b/go.sum @@ -1110,10 +1110,6 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk= github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY= -github.com/frankban/quicktest v1.0.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k= -github.com/frankban/quicktest v1.1.0/go.mod h1:R98jIehRai+d1/3Hv2//jOVCTJhW1VBavT6B6CuGq2k= -github.com/frankban/quicktest v1.2.2/go.mod h1:Qh/WofXFeiAFII1aEBu529AtJo6Zg2VHscnEsbBnJ20= -github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= @@ -1159,7 +1155,6 @@ github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY= github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-macaroon-bakery/macaroonpb v1.0.0/go.mod h1:UzrGOcbiwTXISFP2XDLDPjfhMINZa+fX/7A2lMd31zc= github.com/go-pdf/fpdf v0.5.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-pdf/fpdf v0.6.0/go.mod h1:HzcnA+A23uwogo0tp9yU+l3V+KXhiESpt1PMayhOh5M= github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4= @@ -1250,7 +1245,6 @@ github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= -github.com/google/go-cmp v0.2.1-0.20190312032427-6f77996f0c42/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -1563,12 +1557,6 @@ github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1 github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/juju/mgotest v1.0.1/go.mod h1:vTaDufYul+Ps8D7bgseHjq87X8eu0ivlKLp9mVc/Bfc= -github.com/juju/postgrestest v1.1.0/go.mod h1:/n17Y2T6iFozzXwSCO0JYJ5gSiz2caEtSwAjh/uLXDM= -github.com/juju/qthttptest v0.0.1/go.mod h1://LCf/Ls22/rPw2u1yWukUJvYtfPY4nYpWUl2uZhryo= -github.com/juju/schema v1.0.0/go.mod h1:Y+ThzXpUJ0E7NYYocAbuvJ7vTivXfrof/IfRPq/0abI= -github.com/juju/webbrowser v0.0.0-20160309143629-54b8c57083b4/go.mod h1:G6PCelgkM6cuvyD10iYJsjLBsSadVXtJ+nBxFAxE2BU= -github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8IZAc4RVcycCCAKdM= github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= @@ -1609,8 +1597,6 @@ github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= github.com/leodido/go-urn v1.2.1/go.mod h1:zt4jvISO2HfUBqxjfIshjdMTYS56ZS/qv49ictyFfxY= -github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/lib/pq v1.3.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6cdF0Y8= @@ -1900,7 +1886,6 @@ github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGn github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= -github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc= @@ -2123,9 +2108,7 @@ go4.org v0.0.0-20200411211856-f5505b9728dd/go.mod h1:CIiUVy99QCPfoE13bO4EZaz5GZM go4.org v0.0.0-20230225012048-214862532bf5 h1:nifaUDeh+rPaBCMPMQHZmvJf+QdpLFnuQPwx+LxVmtc= go4.org v0.0.0-20230225012048-214862532bf5/go.mod h1:F57wTi5Lrj6WLyswp5EYV1ncrEbFGHD4hhz6S1ZYeaU= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= -golang.org/x/crypto v0.0.0-20180723164146-c126467f60eb/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190404164418-38d8ce5564a5/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -2220,7 +2203,6 @@ golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/net v0.0.0-20150829230318-ea47fc708ee3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2362,7 +2344,6 @@ golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2525,7 +2506,6 @@ golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= @@ -2950,20 +2930,10 @@ gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= gopkg.in/cheggaaa/pb.v1 v1.0.27/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= -gopkg.in/errgo.v1 v1.0.0/go.mod h1:CxwszS/Xz1C49Ucd2i6Zil5UToP1EmyrFhKaMVbg1mk= -gopkg.in/errgo.v1 v1.0.1 h1:oQFRXzZ7CkBGdm1XZm/EbQYaYNNEElNBOd09M6cqNso= -gopkg.in/errgo.v1 v1.0.1/go.mod h1:3NjfXwocQRYAPTq4/fzX+CwUhPRcR/azYRhj8G+LqMo= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= -gopkg.in/httprequest.v1 v1.2.0/go.mod h1:T61ZUaJLpMnzvoJDO03ZD8yRXD4nZzBeDoW5e9sffjg= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/juju/environschema.v1 v1.0.0/go.mod h1:WTgU3KXKCVoO9bMmG/4KHzoaRvLeoxfjArpgd1MGWFA= -gopkg.in/macaroon-bakery.v2 v2.3.0 h1:b40knPgPTke1QLTE8BSYeH7+R/hiIozB1A8CTLYN0Ic= -gopkg.in/macaroon-bakery.v2 v2.3.0/go.mod h1:/8YhtPARXeRzbpEPLmRB66+gQE8/pzBBkWwg7Vz/guc= -gopkg.in/macaroon.v2 v2.1.0 h1:HZcsjBCzq9t0eBPMKqTN/uSN6JOm78ZJ2INbqcBQOUI= -gopkg.in/macaroon.v2 v2.1.0/go.mod h1:OUb+TQP/OP0WOerC2Jp/3CwhIKyIa9kQjuc7H24e6/o= -gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA= gopkg.in/square/go-jose.v2 v2.5.1 h1:7odma5RETjNHWJnR32wx8t+Io4djHE1PqxCFx3iiZ2w= gopkg.in/square/go-jose.v2 v2.5.1/go.mod h1:M9dMgbHiYLoDGQrXy7OpJDJWiKiU//h+vD76mk0e1AI= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= diff --git a/mprocs.yaml b/mprocs.yaml new file mode 100644 index 000000000..8eea9f91f --- /dev/null +++ b/mprocs.yaml @@ -0,0 +1,19 @@ +# General +hide_keymap_window: true +proc_list_width: 18 +keymap_procs: + : { c: toggle-focus } + : { c: toggle-focus } + : { c: toggle-focus } + : null +keymap_term: + reset: true + : { c: toggle-focus } # Processes +procs: + (editor): + cmd: ["nvim"] + : + shell: "gex" + autorestart: true + : + shell: "make sh-testnet" diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index b0d9c84de..9538e3013 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -45,20 +45,23 @@ func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegi 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, - } - ms.k.OrmDB.ServiceTable().Insert(ctx, &svc) return &types.MsgRegisterControllerResponse{}, nil } // RegisterService implements types.MsgServer. -func (ms msgServer) RegisterService(ctx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) { +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) + + 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 } diff --git a/x/did/types/perms.go b/x/did/types/perms.go index a05a1b0d4..fdfb39d10 100644 --- a/x/did/types/perms.go +++ b/x/did/types/perms.go @@ -1,7 +1,5 @@ package types -import "gopkg.in/macaroon-bakery.v2/bakery/checkers" - var ( PermissionScopeStrings = [...]string{ "profile.name", @@ -36,18 +34,3 @@ var ( "PERMISSION_SCOPE_ADMIN_VALIDATOR": PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR, } ) - -func ResolvePermissionScope(scope string) (PermissionScope, bool) { - uriToPrefix := make(map[string]string) - for _, scope := range PermissionScopeStrings { - uriToPrefix["https://example.com/auth/"+scope] = scope - } - PermissionNamespace := checkers.NewNamespace(uriToPrefix) - - prefix, ok := PermissionNamespace.Resolve("https://example.com/auth/" + scope) - if !ok { - return 0, false - } - permScope, ok := StringToPermissionScope[prefix] - return permScope, ok -} From 564b9f1152bc5b546788188b35c654b7bdb2ed2e Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Wed, 21 Aug 2024 15:08:34 -0400 Subject: [PATCH 3/6] fix: Update proc_list_width in mprocs.yaml --- mprocs.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mprocs.yaml b/mprocs.yaml index 8eea9f91f..0e52f45a7 100644 --- a/mprocs.yaml +++ b/mprocs.yaml @@ -1,6 +1,6 @@ # General hide_keymap_window: true -proc_list_width: 18 +proc_list_width: 20 keymap_procs: : { c: toggle-focus } : { c: toggle-focus } @@ -10,10 +10,10 @@ keymap_term: reset: true : { c: toggle-focus } # Processes procs: - (editor): + ⬓ editor: cmd: ["nvim"] - : + ⎋ gex: shell: "gex" autorestart: true - : + ⎋ sonr: shell: "make sh-testnet" From ca96fa1deb9bb049a94701742bfd81404b222750 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Thu, 22 Aug 2024 10:06:31 -0400 Subject: [PATCH 4/6] build: Add Docker Compose configuration --- client/go.mod | 3 --- docker-compose.yaml | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 3 deletions(-) delete mode 100644 client/go.mod create mode 100644 docker-compose.yaml diff --git a/client/go.mod b/client/go.mod deleted file mode 100644 index a07a4b514..000000000 --- a/client/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module client - -go 1.22.0 diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 000000000..eee0423b5 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,18 @@ +version: "3" + +services: + sonr: + build: . + environment: + - SECRET_VAR + - REDIS_HOST + - REDIS_PASSWORD + depends_on: + - ipfs + + ipfs: + build: . + environment: + - SECRET_VAR + - REDIS_HOST + - REDIS_PASSWORD From a827602fa5162b3bd3dbc28416b7f70c7b903efe Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 26 Aug 2024 10:37:03 -0400 Subject: [PATCH 5/6] master --- Dockerfile | 2 +- devbox.json | 12 +++++++----- mprocs.yaml | 19 ------------------- 3 files changed, 8 insertions(+), 25 deletions(-) delete mode 100644 mprocs.yaml diff --git a/Dockerfile b/Dockerfile index ad5656eaf..7a53e42de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,4 +41,4 @@ WORKDIR /opt # rest server, tendermint p2p, tendermint rpc EXPOSE 1317 26656 26657 6060 -CMD ["/usr/bin/sonrd", "version"] +ENTRYPOINT ["/usr/bin/sonrd"] diff --git a/devbox.json b/devbox.json index 0fb9ac051..a542b85f0 100644 --- a/devbox.json +++ b/devbox.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": ["mprocs@latest", "go@1.21"], + "packages": ["go@1.21"], "env": { "GOPATH": "$HOME/go", "PATH": "$HOME/go/bin:$PATH" @@ -8,10 +8,12 @@ "shell": { "scripts": { "install": ["make install"], - "proto": ["make proto-gen"], - "build": ["go build -o ./bin/sonrd ./cmd/sonrd"], - "testnet": ["make sh-testnet"], - "serve": ["mprocs"] + "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"] } } } diff --git a/mprocs.yaml b/mprocs.yaml deleted file mode 100644 index 0e52f45a7..000000000 --- a/mprocs.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# General -hide_keymap_window: true -proc_list_width: 20 -keymap_procs: - : { c: toggle-focus } - : { c: toggle-focus } - : { c: toggle-focus } - : null -keymap_term: - reset: true - : { c: toggle-focus } # Processes -procs: - ⬓ editor: - cmd: ["nvim"] - ⎋ gex: - shell: "gex" - autorestart: true - ⎋ sonr: - shell: "make sh-testnet" From a929e61d0124096042d9255761a789c105093479 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 26 Aug 2024 19:38:08 -0400 Subject: [PATCH 6/6] chore: Remove unused configuration files --- .cz.toml | 7 --- .goreleaser.yaml | 111 -------------------------------------------- docker-compose.yaml | 18 ------- 3 files changed, 136 deletions(-) delete mode 100644 .cz.toml delete mode 100644 .goreleaser.yaml delete mode 100644 docker-compose.yaml diff --git a/.cz.toml b/.cz.toml deleted file mode 100644 index 50372f0f5..000000000 --- a/.cz.toml +++ /dev/null @@ -1,7 +0,0 @@ -[tool.commitizen] -name = "cz_conventional_commits" -tag_format = "$version" -version_scheme = "semver" -version = "0.6.0" -update_changelog_on_bump = true -major_version_zero = true diff --git a/.goreleaser.yaml b/.goreleaser.yaml deleted file mode 100644 index 8af7bea23..000000000 --- a/.goreleaser.yaml +++ /dev/null @@ -1,111 +0,0 @@ -project_name: core - -release: - github: - owner: di-dao - name: core - name_template: "{{.Tag}}" - -# Only uncomment os, arch, and targets if you are NOT using cosmwasm / wasm-light-client. -# Windows, 386 (32bit), and ARM are not Wasm compatible. -builds: - - id: core - goos: - - linux - - darwin - # - windows - goarch: - - amd64 - # - arm64 - # - "386" - goarm: - - "6" - gomips: - - hardfloat - goamd64: - - v1 - targets: - - linux_amd64_v1 - # - darwin_amd64_v1 - # - linux_arm64 - # - linux_386 - # - darwin_arm64 - # - windows_amd64_v1 - # - windows_arm64 - # - windows_386 - dir: . - main: ./cmd/sonrd - binary: sonrd - builder: go - gobinary: go - command: build - ldflags: - - -s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser -archives: - - id: default - name_template: '{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ with .Arm }}v{{ . }}{{ end }}{{ with .Mips }}_{{ . }}{{ end }}{{ if not (eq .Amd64 "v1") }}{{ .Amd64 }}{{ end }}' - format: tar.gz - files: - - src: license* - - src: LICENSE* - - src: readme* - - src: README* - - src: changelog* - - src: CHANGELOG* -snapshot: - name_template: "{{ .Version }}-SNAPSHOT-{{ .ShortCommit }}" -checksum: - name_template: "{{ .ProjectName }}_{{ .Version }}_checksums.txt" - algorithm: sha256 -dist: dist -env_files: - github_token: ~/.config/goreleaser/github_token - gitlab_token: ~/.config/goreleaser/gitlab_token - gitea_token: ~/.config/goreleaser/gitea_token -source: - name_template: "{{ .ProjectName }}-{{ .Version }}" - format: tar.gz -gomod: - gobinary: go -announce: - twitter: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - mastodon: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - server: "" - reddit: - title_template: "{{ .ProjectName }} {{ .Tag }} is out!" - url_template: "{{ .ReleaseURL }}" - slack: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - username: GoReleaser - discord: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - author: GoReleaser - color: "3888754" - icon_url: https://goreleaser.com/static/avatar.png - teams: - title_template: "{{ .ProjectName }} {{ .Tag }} is out!" - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - color: "#2D313E" - icon_url: https://goreleaser.com/static/avatar.png - smtp: - subject_template: "{{ .ProjectName }} {{ .Tag }} is out!" - body_template: "You can view details from: {{ .ReleaseURL }}" - mattermost: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - title_template: "{{ .ProjectName }} {{ .Tag }} is out!" - username: GoReleaser - linkedin: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - telegram: - message_template: "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}" - webhook: - message_template: '{ "message": "{{ .ProjectName }} {{ .Tag }} is out! Check it out at {{ .ReleaseURL }}"}' - content_type: application/json; charset=utf-8 -git: - tag_sort: -version:refname -github_urls: - download: https://github.com -gitlab_urls: - download: https://gitlab.com diff --git a/docker-compose.yaml b/docker-compose.yaml deleted file mode 100644 index eee0423b5..000000000 --- a/docker-compose.yaml +++ /dev/null @@ -1,18 +0,0 @@ -version: "3" - -services: - sonr: - build: . - environment: - - SECRET_VAR - - REDIS_HOST - - REDIS_PASSWORD - depends_on: - - ipfs - - ipfs: - build: . - environment: - - SECRET_VAR - - REDIS_HOST - - REDIS_PASSWORD