From 2c1cf56e3c5e0143004d47582932b5239699c414 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Wed, 18 Sep 2024 02:22:17 -0400 Subject: [PATCH] feature/driver indexed db (#14) * fix: update commitizen version * feat: add WASM build tags to db actions * feat: Update all actions to follow `AddAsset` for error handling * feat: remove database dependency in dwn and motr commands * feat: add basic info form to registration view * feat: implement basic browser navigation component * refactor: move database related files to middleware * fix: remove unused test command * fix: update source directory for buf-publish workflow * feat: embed dwn config data * feat: add Sync RPC to query service * refactor: rename package to for better organization * feat: add new javascript exception handling for server requests * refactor: move dwn.wasm to embed directory * refactor: move server files to a new directory * refactor: move session related code to client package * refactor: Update dwn.wasm build path * refactor: move dwn wasm build to vfs * feat: introduce config loading middleware * feat: introduce DWN config and address JSON * refactor: move dwn wasm build output to embed directory * feat: introduce config and IndexedDB model * refactor: move DWN config file generation to vfs * refactor: move config package to * feat: add Sonr.ID IPFS gateway proxy * feat: add SWT data structure * feat: update index.html to use Sonr styles and scripts * feat(dwn): remove index.html server endpoint * feat: add Navigator API for web credential management --- .air.toml | 1 + Makefile | 2 +- api/did/v1/query.pulsar.go | 3368 +++++------------ api/did/v1/query_grpc.pb.go | 201 +- api/did/v1/tx.pulsar.go | 1304 +------ api/did/v1/tx_grpc.pb.go | 39 - config/dwn/Config.pkl.go | 14 + config/dwn/Dwn.pkl.go | 37 + config/dwn/IPFS.pkl.go | 8 + config/dwn/IndexedDB.pkl.go | 8 + config/dwn/Sonr.pkl.go | 12 + config/dwn/init.pkl.go | 12 + config/pkl/dwn.pkl | 62 + config/pkl/orm.pkl | 228 +- config/pkl/txns.pkl | 10 +- devbox.json | 1 + go.mod | 2 +- go.sum | 4 +- internal/dwn/dwn.go | 48 +- .../{elements => front/blocks}/alert.templ | 2 +- .../{elements => front/blocks}/alert_templ.go | 6 +- .../blocks}/animation.templ | 2 +- .../blocks}/animation_templ.go | 2 +- .../{elements => front/blocks}/badge.templ | 2 +- .../{elements => front/blocks}/badge_templ.go | 2 +- .../elements.go => front/blocks/blocks.go} | 2 +- .../blocks}/breadcrumbs.templ | 2 +- .../blocks}/breadcrumbs_templ.go | 6 +- .../{elements => front/blocks}/button.templ | 2 +- .../blocks}/button_templ.go | 18 +- .../dwn/{elements => front/blocks}/card.templ | 2 +- .../{elements => front/blocks}/card_templ.go | 4 +- .../{elements => front/blocks}/fonts.templ | 2 +- .../{elements => front/blocks}/fonts_templ.go | 18 +- .../{elements => front/blocks}/global.templ | 2 +- .../blocks}/global_templ.go | 4 +- .../{elements => front/blocks}/icons.templ | 2 +- .../{elements => front/blocks}/icons_templ.go | 2 +- .../{elements => front/blocks}/inputs.templ | 2 +- .../blocks}/inputs_templ.go | 8 +- .../{elements => front/blocks}/panel.templ | 2 +- .../{elements => front/blocks}/panel_templ.go | 2 +- .../{elements => front/blocks}/radios.templ | 2 +- .../blocks}/radios_templ.go | 2 +- .../{elements => front/blocks}/sizes.templ | 2 +- .../{elements => front/blocks}/sizes_templ.go | 2 +- .../dwn/{elements => front/blocks}/tabs.templ | 2 +- .../{elements => front/blocks}/tabs_templ.go | 2 +- internal/dwn/{ => front}/islands/forms.go | 0 .../dwn/{ => front}/islands/register.templ | 0 .../dwn/{ => front}/islands/register_templ.go | 0 internal/dwn/front/routes.go | 14 + internal/dwn/front/views/home.templ | 29 + internal/dwn/{ => front}/views/home_templ.go | 22 +- internal/dwn/front/views/login.templ | 25 + internal/dwn/{ => front}/views/login_templ.go | 20 +- internal/dwn/front/views/openid.templ | 19 + .../dwn/{ => front}/views/openid_templ.go | 10 +- internal/dwn/{ => front}/views/profile.templ | 10 +- .../dwn/{ => front}/views/profile_templ.go | 10 +- internal/dwn/front/views/register.templ | 26 + .../dwn/{ => front}/views/register_templ.go | 20 +- internal/dwn/{ => front}/views/views.go | 0 internal/dwn/handlers/openid.go | 46 - internal/dwn/handlers/routes.go | 23 + .../handlers/{webauth.go => state/auth.go} | 2 +- internal/dwn/handlers/state/openid.go | 23 + internal/dwn/handlers/sync/manifest.go | 1 + internal/dwn/handlers/sync/wellknown.go | 1 + internal/dwn/middleware/browser.go | 19 +- internal/dwn/middleware/client.go | 3 - .../dwn/middleware/{ => client}/headers.go | 2 +- internal/dwn/middleware/client/session.go | 51 + internal/dwn/middleware/client/token.go | 51 + internal/dwn/middleware/credentials.go | 6 - internal/dwn/middleware/jsexc/credentials.go | 72 + .../dwn/middleware/{ => jsexc}/database.go | 2 +- .../dwn/middleware/{ => jsexc}/notifier.go | 2 +- .../dwn/{wasm => middleware/jsexc}/request.go | 2 +- .../{wasm => middleware/jsexc}/response.go | 2 +- .../dwn/{wasm => middleware/jsexc}/serve.go | 2 +- internal/dwn/middleware/jsexc/storage.go | 12 + .../dwn/middleware/{authz.go => server.go} | 57 +- internal/dwn/middleware/session.go | 66 - internal/dwn/middleware/storage.go | 8 - internal/dwn/models/Account.pkl.go | 14 - internal/dwn/models/Asset.pkl.go | 16 - internal/dwn/models/Chain.pkl.go | 12 - internal/dwn/models/Credential.pkl.go | 36 - internal/dwn/models/DiscoveryDocument.pkl.go | 34 - internal/dwn/models/Keyshare.pkl.go | 12 - internal/dwn/models/Permission.pkl.go | 16 - internal/dwn/models/Profile.pkl.go | 20 - internal/dwn/models/Property.pkl.go | 14 - internal/dwn/models/orm.go | 29 - internal/dwn/views/home.templ | 29 - internal/dwn/views/login.templ | 25 - internal/dwn/views/openid.templ | 19 - internal/dwn/views/register.templ | 26 - internal/dwn/wasm/main.go | 20 + internal/vfs/{dwn.wasm => app.wasm} | Bin 10330402 -> 10315949 bytes internal/vfs/assemble.go | 20 - internal/vfs/embed.go | 44 +- internal/vfs/index.html | 42 + internal/vfs/models/Account.pkl.go | 20 + internal/vfs/models/Asset.pkl.go | 16 + internal/vfs/models/Chain.pkl.go | 14 + internal/vfs/models/Credential.pkl.go | 36 + internal/vfs/models/Grant.pkl.go | 20 + internal/vfs/models/Keyshare.pkl.go | 14 + internal/{dwn => vfs}/models/Models.pkl.go | 0 internal/vfs/models/Profile.pkl.go | 20 + internal/vfs/models/PublicKey.pkl.go | 6 + internal/{dwn => vfs}/models/init.pkl.go | 7 +- internal/vfs/sw.js | 17 +- internal/{dwn => vfs}/txns/Msg.pkl.go | 0 .../txns/MsgDidAllocateVault.pkl.go | 0 .../{dwn => vfs}/txns/MsgDidAuthorize.pkl.go | 0 .../txns/MsgDidProveWitness.pkl.go | 0 .../txns/MsgDidRegisterController.pkl.go | 0 .../txns/MsgDidRegisterService.pkl.go | 0 .../{dwn => vfs}/txns/MsgDidSyncVault.pkl.go | 0 .../txns/MsgDidUpdateParams.pkl.go | 0 .../{dwn => vfs}/txns/MsgGovDeposit.pkl.go | 0 .../txns/MsgGovSubmitProposal.pkl.go | 0 internal/{dwn => vfs}/txns/MsgGovVote.pkl.go | 0 .../txns/MsgGroupCreateGroup.pkl.go | 0 .../txns/MsgGroupSubmitProposal.pkl.go | 0 .../{dwn => vfs}/txns/MsgGroupVote.pkl.go | 0 .../txns/MsgStakingBeginRedelegate.pkl.go | 0 .../txns/MsgStakingCreateValidator.pkl.go | 0 .../txns/MsgStakingDelegate.pkl.go | 0 .../txns/MsgStakingUndelegate.pkl.go | 0 internal/{dwn => vfs}/txns/Proposal.pkl.go | 0 internal/vfs/txns/SWT.pkl.go | 16 + internal/{dwn => vfs}/txns/TxBody.pkl.go | 0 internal/{dwn => vfs}/txns/Txns.pkl.go | 0 internal/{dwn => vfs}/txns/init.pkl.go | 1 + proto/did/v1/query.proto | 51 +- proto/did/v1/tx.proto | 19 - web/main.go | 43 +- x/did/builder/openid.go | 45 +- x/did/builder/signer.go | 59 - x/did/builder/vault.go | 1 + x/did/keeper/ipfs.go | 13 +- x/did/keeper/querier.go | 25 +- x/did/keeper/server.go | 8 - x/did/types/query.pb.go | 1443 ++----- x/did/types/query.pb.gw.go | 487 +-- x/did/types/tx.pb.go | 544 +-- 150 files changed, 2819 insertions(+), 6661 deletions(-) create mode 100644 config/dwn/Config.pkl.go create mode 100644 config/dwn/Dwn.pkl.go create mode 100644 config/dwn/IPFS.pkl.go create mode 100644 config/dwn/IndexedDB.pkl.go create mode 100644 config/dwn/Sonr.pkl.go create mode 100644 config/dwn/init.pkl.go create mode 100644 config/pkl/dwn.pkl rename internal/dwn/{elements => front/blocks}/alert.templ (99%) rename internal/dwn/{elements => front/blocks}/alert_templ.go (97%) rename internal/dwn/{elements => front/blocks}/animation.templ (92%) rename internal/dwn/{elements => front/blocks}/animation_templ.go (98%) rename internal/dwn/{elements => front/blocks}/badge.templ (99%) rename internal/dwn/{elements => front/blocks}/badge_templ.go (99%) rename internal/dwn/{elements/elements.go => front/blocks/blocks.go} (98%) rename internal/dwn/{elements => front/blocks}/breadcrumbs.templ (99%) rename internal/dwn/{elements => front/blocks}/breadcrumbs_templ.go (98%) rename internal/dwn/{elements => front/blocks}/button.templ (99%) rename internal/dwn/{elements => front/blocks}/button_templ.go (97%) rename internal/dwn/{elements => front/blocks}/card.templ (99%) rename internal/dwn/{elements => front/blocks}/card_templ.go (98%) rename internal/dwn/{elements => front/blocks}/fonts.templ (98%) rename internal/dwn/{elements => front/blocks}/fonts_templ.go (96%) rename internal/dwn/{elements => front/blocks}/global.templ (98%) rename internal/dwn/{elements => front/blocks}/global_templ.go (99%) rename internal/dwn/{elements => front/blocks}/icons.templ (99%) rename internal/dwn/{elements => front/blocks}/icons_templ.go (99%) rename internal/dwn/{elements => front/blocks}/inputs.templ (99%) rename internal/dwn/{elements => front/blocks}/inputs_templ.go (96%) rename internal/dwn/{elements => front/blocks}/panel.templ (82%) rename internal/dwn/{elements => front/blocks}/panel_templ.go (98%) rename internal/dwn/{elements => front/blocks}/radios.templ (98%) rename internal/dwn/{elements => front/blocks}/radios_templ.go (99%) rename internal/dwn/{elements => front/blocks}/sizes.templ (98%) rename internal/dwn/{elements => front/blocks}/sizes_templ.go (98%) rename internal/dwn/{elements => front/blocks}/tabs.templ (99%) rename internal/dwn/{elements => front/blocks}/tabs_templ.go (99%) rename internal/dwn/{ => front}/islands/forms.go (100%) rename internal/dwn/{ => front}/islands/register.templ (100%) rename internal/dwn/{ => front}/islands/register_templ.go (100%) create mode 100644 internal/dwn/front/routes.go create mode 100644 internal/dwn/front/views/home.templ rename internal/dwn/{ => front}/views/home_templ.go (81%) create mode 100644 internal/dwn/front/views/login.templ rename internal/dwn/{ => front}/views/login_templ.go (82%) create mode 100644 internal/dwn/front/views/openid.templ rename internal/dwn/{ => front}/views/openid_templ.go (84%) rename internal/dwn/{ => front}/views/profile.templ (50%) rename internal/dwn/{ => front}/views/profile_templ.go (85%) create mode 100644 internal/dwn/front/views/register.templ rename internal/dwn/{ => front}/views/register_templ.go (83%) rename internal/dwn/{ => front}/views/views.go (100%) delete mode 100644 internal/dwn/handlers/openid.go create mode 100644 internal/dwn/handlers/routes.go rename internal/dwn/handlers/{webauth.go => state/auth.go} (98%) create mode 100644 internal/dwn/handlers/state/openid.go create mode 100644 internal/dwn/handlers/sync/manifest.go create mode 100644 internal/dwn/handlers/sync/wellknown.go delete mode 100644 internal/dwn/middleware/client.go rename internal/dwn/middleware/{ => client}/headers.go (99%) create mode 100644 internal/dwn/middleware/client/session.go create mode 100644 internal/dwn/middleware/client/token.go delete mode 100644 internal/dwn/middleware/credentials.go create mode 100644 internal/dwn/middleware/jsexc/credentials.go rename internal/dwn/middleware/{ => jsexc}/database.go (99%) rename internal/dwn/middleware/{ => jsexc}/notifier.go (82%) rename internal/dwn/{wasm => middleware/jsexc}/request.go (98%) rename internal/dwn/{wasm => middleware/jsexc}/response.go (98%) rename internal/dwn/{wasm => middleware/jsexc}/serve.go (98%) create mode 100644 internal/dwn/middleware/jsexc/storage.go rename internal/dwn/middleware/{authz.go => server.go} (54%) delete mode 100644 internal/dwn/middleware/session.go delete mode 100644 internal/dwn/middleware/storage.go delete mode 100644 internal/dwn/models/Account.pkl.go delete mode 100644 internal/dwn/models/Asset.pkl.go delete mode 100644 internal/dwn/models/Chain.pkl.go delete mode 100644 internal/dwn/models/Credential.pkl.go delete mode 100644 internal/dwn/models/DiscoveryDocument.pkl.go delete mode 100644 internal/dwn/models/Keyshare.pkl.go delete mode 100644 internal/dwn/models/Permission.pkl.go delete mode 100644 internal/dwn/models/Profile.pkl.go delete mode 100644 internal/dwn/models/Property.pkl.go delete mode 100644 internal/dwn/models/orm.go delete mode 100644 internal/dwn/views/home.templ delete mode 100644 internal/dwn/views/login.templ delete mode 100644 internal/dwn/views/openid.templ delete mode 100644 internal/dwn/views/register.templ create mode 100644 internal/dwn/wasm/main.go rename internal/vfs/{dwn.wasm => app.wasm} (68%) delete mode 100644 internal/vfs/assemble.go create mode 100644 internal/vfs/index.html create mode 100644 internal/vfs/models/Account.pkl.go create mode 100644 internal/vfs/models/Asset.pkl.go create mode 100644 internal/vfs/models/Chain.pkl.go create mode 100644 internal/vfs/models/Credential.pkl.go create mode 100644 internal/vfs/models/Grant.pkl.go create mode 100644 internal/vfs/models/Keyshare.pkl.go rename internal/{dwn => vfs}/models/Models.pkl.go (100%) create mode 100644 internal/vfs/models/Profile.pkl.go create mode 100644 internal/vfs/models/PublicKey.pkl.go rename internal/{dwn => vfs}/models/init.pkl.go (72%) rename internal/{dwn => vfs}/txns/Msg.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidAllocateVault.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidAuthorize.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidProveWitness.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidRegisterController.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidRegisterService.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidSyncVault.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgDidUpdateParams.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgGovDeposit.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgGovSubmitProposal.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgGovVote.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgGroupCreateGroup.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgGroupSubmitProposal.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgGroupVote.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgStakingBeginRedelegate.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgStakingCreateValidator.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgStakingDelegate.pkl.go (100%) rename internal/{dwn => vfs}/txns/MsgStakingUndelegate.pkl.go (100%) rename internal/{dwn => vfs}/txns/Proposal.pkl.go (100%) create mode 100644 internal/vfs/txns/SWT.pkl.go rename internal/{dwn => vfs}/txns/TxBody.pkl.go (100%) rename internal/{dwn => vfs}/txns/Txns.pkl.go (100%) rename internal/{dwn => vfs}/txns/init.pkl.go (97%) delete mode 100644 x/did/builder/signer.go create mode 100644 x/did/builder/vault.go diff --git a/.air.toml b/.air.toml index 1fc4c2ec2..ac07e232c 100644 --- a/.air.toml +++ b/.air.toml @@ -16,6 +16,7 @@ include_ext = ["go", "templ", "html", "pkl", "js", "mjs"] include_file = [ "wrangler.toml", "Dockerfile", + "Makefile", ".goreleaser.yaml", "go.mod", "devbox.json", diff --git a/Makefile b/Makefile index 5fae273d2..a2a79a24e 100644 --- a/Makefile +++ b/Makefile @@ -303,7 +303,7 @@ sh-testnet: mod-tidy dwn: @echo "(dwn) Building dwn.wasm -> IPFS Vault" - GOOS=js GOARCH=wasm go build -o ./internal/vfs/dwn.wasm ./internal/dwn/dwn.go + GOOS=js GOARCH=wasm go build -o ./internal/vfs/app.wasm ./internal/dwn/wasm/main.go motr: @echo "(web) Building app.wasm -> Deploy to Cloudflare Workers" diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 4c44ed090..372c5c3e9 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -10,7 +10,6 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" - sort "sort" sync "sync" ) @@ -1693,2052 +1692,6 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } -var _ protoreflect.List = (*_QueryParamsAssetsResponse_1_list)(nil) - -type _QueryParamsAssetsResponse_1_list struct { - list *[]*AssetInfo -} - -func (x *_QueryParamsAssetsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryParamsAssetsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryParamsAssetsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AssetInfo) - (*x.list)[i] = concreteValue -} - -func (x *_QueryParamsAssetsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*AssetInfo) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryParamsAssetsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(AssetInfo) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsAssetsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryParamsAssetsResponse_1_list) NewElement() protoreflect.Value { - v := new(AssetInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsAssetsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryParamsAssetsResponse protoreflect.MessageDescriptor - fd_QueryParamsAssetsResponse_assets protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsAssetsResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsAssetsResponse") - fd_QueryParamsAssetsResponse_assets = md_QueryParamsAssetsResponse.Fields().ByName("assets") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsAssetsResponse)(nil) - -type fastReflection_QueryParamsAssetsResponse QueryParamsAssetsResponse - -func (x *QueryParamsAssetsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsAssetsResponse)(x) -} - -func (x *QueryParamsAssetsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_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_QueryParamsAssetsResponse_messageType fastReflection_QueryParamsAssetsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsAssetsResponse_messageType{} - -type fastReflection_QueryParamsAssetsResponse_messageType struct{} - -func (x fastReflection_QueryParamsAssetsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsAssetsResponse)(nil) -} -func (x fastReflection_QueryParamsAssetsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsAssetsResponse) -} -func (x fastReflection_QueryParamsAssetsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsAssetsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsAssetsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsAssetsResponse -} - -// 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_QueryParamsAssetsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsAssetsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsAssetsResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsAssetsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsAssetsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsAssetsResponse)(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_QueryParamsAssetsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Assets) != 0 { - value := protoreflect.ValueOfList(&_QueryParamsAssetsResponse_1_list{list: &x.Assets}) - if !f(fd_QueryParamsAssetsResponse_assets, 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_QueryParamsAssetsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - return len(x.Assets) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse 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_QueryParamsAssetsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - x.Assets = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse 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_QueryParamsAssetsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - if len(x.Assets) == 0 { - return protoreflect.ValueOfList(&_QueryParamsAssetsResponse_1_list{}) - } - listValue := &_QueryParamsAssetsResponse_1_list{list: &x.Assets} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse 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_QueryParamsAssetsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - lv := value.List() - clv := lv.(*_QueryParamsAssetsResponse_1_list) - x.Assets = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse 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_QueryParamsAssetsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - if x.Assets == nil { - x.Assets = []*AssetInfo{} - } - value := &_QueryParamsAssetsResponse_1_list{list: &x.Assets} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse 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_QueryParamsAssetsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsAssetsResponse.assets": - list := []*AssetInfo{} - return protoreflect.ValueOfList(&_QueryParamsAssetsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsAssetsResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsAssetsResponse 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_QueryParamsAssetsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsAssetsResponse", 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_QueryParamsAssetsResponse) 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_QueryParamsAssetsResponse) 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_QueryParamsAssetsResponse) 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_QueryParamsAssetsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsAssetsResponse) - 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.Assets) > 0 { - for _, e := range x.Assets { - 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().(*QueryParamsAssetsResponse) - 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.Assets) > 0 { - for iNdEx := len(x.Assets) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Assets[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] = 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().(*QueryParamsAssetsResponse) - 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: QueryParamsAssetsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsAssetsResponse: 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 Assets", 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.Assets = append(x.Assets, &AssetInfo{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Assets[len(x.Assets)-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_QueryParamsByAssetResponse protoreflect.MessageDescriptor - fd_QueryParamsByAssetResponse_asset protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsByAssetResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsByAssetResponse") - fd_QueryParamsByAssetResponse_asset = md_QueryParamsByAssetResponse.Fields().ByName("asset") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsByAssetResponse)(nil) - -type fastReflection_QueryParamsByAssetResponse QueryParamsByAssetResponse - -func (x *QueryParamsByAssetResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsByAssetResponse)(x) -} - -func (x *QueryParamsByAssetResponse) 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_QueryParamsByAssetResponse_messageType fastReflection_QueryParamsByAssetResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsByAssetResponse_messageType{} - -type fastReflection_QueryParamsByAssetResponse_messageType struct{} - -func (x fastReflection_QueryParamsByAssetResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsByAssetResponse)(nil) -} -func (x fastReflection_QueryParamsByAssetResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsByAssetResponse) -} -func (x fastReflection_QueryParamsByAssetResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByAssetResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsByAssetResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByAssetResponse -} - -// 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_QueryParamsByAssetResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsByAssetResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsByAssetResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsByAssetResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsByAssetResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsByAssetResponse)(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_QueryParamsByAssetResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Asset != nil { - value := protoreflect.ValueOfMessage(x.Asset.ProtoReflect()) - if !f(fd_QueryParamsByAssetResponse_asset, 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_QueryParamsByAssetResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - return x.Asset != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse 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_QueryParamsByAssetResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - x.Asset = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse 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_QueryParamsByAssetResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - value := x.Asset - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse 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_QueryParamsByAssetResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - x.Asset = value.Message().Interface().(*AssetInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse 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_QueryParamsByAssetResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - if x.Asset == nil { - x.Asset = new(AssetInfo) - } - return protoreflect.ValueOfMessage(x.Asset.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse 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_QueryParamsByAssetResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsByAssetResponse.asset": - m := new(AssetInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByAssetResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByAssetResponse 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_QueryParamsByAssetResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsByAssetResponse", 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_QueryParamsByAssetResponse) 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_QueryParamsByAssetResponse) 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_QueryParamsByAssetResponse) 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_QueryParamsByAssetResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsByAssetResponse) - 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.Asset != nil { - l = options.Size(x.Asset) - 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().(*QueryParamsByAssetResponse) - 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.Asset != nil { - encoded, err := options.Marshal(x.Asset) - 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 - } - 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().(*QueryParamsByAssetResponse) - 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: QueryParamsByAssetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsByAssetResponse: 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 Asset", 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.Asset == nil { - x.Asset = &AssetInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Asset); 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.Map = (*_QueryParamsKeysResponse_1_map)(nil) - -type _QueryParamsKeysResponse_1_map struct { - m *map[string]*KeyInfo -} - -func (x *_QueryParamsKeysResponse_1_map) Len() int { - if x.m == nil { - return 0 - } - return len(*x.m) -} - -func (x *_QueryParamsKeysResponse_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.ValueOfMessage(v.ProtoReflect()) - if !f(mapKey, mapValue) { - break - } - } -} - -func (x *_QueryParamsKeysResponse_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 *_QueryParamsKeysResponse_1_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_QueryParamsKeysResponse_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.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsKeysResponse_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.Message() - concreteValue := valueUnwrapped.Interface().(*KeyInfo) - (*x.m)[concreteKey] = concreteValue -} - -func (x *_QueryParamsKeysResponse_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if ok { - return protoreflect.ValueOfMessage(v.ProtoReflect()) - } - newValue := new(KeyInfo) - (*x.m)[concreteKey] = newValue - return protoreflect.ValueOfMessage(newValue.ProtoReflect()) -} - -func (x *_QueryParamsKeysResponse_1_map) NewValue() protoreflect.Value { - v := new(KeyInfo) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryParamsKeysResponse_1_map) IsValid() bool { - return x.m != nil -} - -var ( - md_QueryParamsKeysResponse protoreflect.MessageDescriptor - fd_QueryParamsKeysResponse_keys protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsKeysResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsKeysResponse") - fd_QueryParamsKeysResponse_keys = md_QueryParamsKeysResponse.Fields().ByName("keys") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsKeysResponse)(nil) - -type fastReflection_QueryParamsKeysResponse QueryParamsKeysResponse - -func (x *QueryParamsKeysResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsKeysResponse)(x) -} - -func (x *QueryParamsKeysResponse) 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_QueryParamsKeysResponse_messageType fastReflection_QueryParamsKeysResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsKeysResponse_messageType{} - -type fastReflection_QueryParamsKeysResponse_messageType struct{} - -func (x fastReflection_QueryParamsKeysResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsKeysResponse)(nil) -} -func (x fastReflection_QueryParamsKeysResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsKeysResponse) -} -func (x fastReflection_QueryParamsKeysResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsKeysResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsKeysResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsKeysResponse -} - -// 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_QueryParamsKeysResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsKeysResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsKeysResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsKeysResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsKeysResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsKeysResponse)(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_QueryParamsKeysResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Keys) != 0 { - value := protoreflect.ValueOfMap(&_QueryParamsKeysResponse_1_map{m: &x.Keys}) - if !f(fd_QueryParamsKeysResponse_keys, 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_QueryParamsKeysResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - return len(x.Keys) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse 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_QueryParamsKeysResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - x.Keys = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse 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_QueryParamsKeysResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - if len(x.Keys) == 0 { - return protoreflect.ValueOfMap(&_QueryParamsKeysResponse_1_map{}) - } - mapValue := &_QueryParamsKeysResponse_1_map{m: &x.Keys} - return protoreflect.ValueOfMap(mapValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse 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_QueryParamsKeysResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - mv := value.Map() - cmv := mv.(*_QueryParamsKeysResponse_1_map) - x.Keys = *cmv.m - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse 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_QueryParamsKeysResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - if x.Keys == nil { - x.Keys = make(map[string]*KeyInfo) - } - value := &_QueryParamsKeysResponse_1_map{m: &x.Keys} - return protoreflect.ValueOfMap(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse 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_QueryParamsKeysResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsKeysResponse.keys": - m := make(map[string]*KeyInfo) - return protoreflect.ValueOfMap(&_QueryParamsKeysResponse_1_map{m: &m}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsKeysResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsKeysResponse 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_QueryParamsKeysResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsKeysResponse", 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_QueryParamsKeysResponse) 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_QueryParamsKeysResponse) 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_QueryParamsKeysResponse) 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_QueryParamsKeysResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsKeysResponse) - 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.Keys) > 0 { - SiZeMaP := func(k string, v *KeyInfo) { - l := 0 - if v != nil { - l = options.Size(v) - } - l += 1 + runtime.Sov(uint64(l)) - 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.Keys)) - for k := range x.Keys { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Keys[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Keys { - 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().(*QueryParamsKeysResponse) - 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.Keys) > 0 { - MaRsHaLmAp := func(k string, v *KeyInfo) (protoiface.MarshalOutput, error) { - baseI := i - encoded, err := options.Marshal(v) - 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 - 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 { - keysForKeys := make([]string, 0, len(x.Keys)) - for k := range x.Keys { - keysForKeys = append(keysForKeys, string(k)) - } - sort.Slice(keysForKeys, func(i, j int) bool { - return keysForKeys[i] < keysForKeys[j] - }) - for iNdEx := len(keysForKeys) - 1; iNdEx >= 0; iNdEx-- { - v := x.Keys[string(keysForKeys[iNdEx])] - out, err := MaRsHaLmAp(keysForKeys[iNdEx], v) - if err != nil { - return out, err - } - } - } else { - for k := range x.Keys { - v := x.Keys[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().(*QueryParamsKeysResponse) - 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: QueryParamsKeysResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsKeysResponse: 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 Keys", 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.Keys == nil { - x.Keys = make(map[string]*KeyInfo) - } - var mapkey string - var mapvalue *KeyInfo - 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 mapmsglen 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++ - mapmsglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if mapmsglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postmsgIndex := iNdEx + mapmsglen - if postmsgIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postmsgIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = &KeyInfo{} - if err := options.Unmarshal(dAtA[iNdEx:postmsgIndex], mapvalue); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postmsgIndex - } 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.Keys[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_QueryParamsByKeyResponse protoreflect.MessageDescriptor - fd_QueryParamsByKeyResponse_key protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryParamsByKeyResponse = File_did_v1_query_proto.Messages().ByName("QueryParamsByKeyResponse") - fd_QueryParamsByKeyResponse_key = md_QueryParamsByKeyResponse.Fields().ByName("key") -} - -var _ protoreflect.Message = (*fastReflection_QueryParamsByKeyResponse)(nil) - -type fastReflection_QueryParamsByKeyResponse QueryParamsByKeyResponse - -func (x *QueryParamsByKeyResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsByKeyResponse)(x) -} - -func (x *QueryParamsByKeyResponse) 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_QueryParamsByKeyResponse_messageType fastReflection_QueryParamsByKeyResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsByKeyResponse_messageType{} - -type fastReflection_QueryParamsByKeyResponse_messageType struct{} - -func (x fastReflection_QueryParamsByKeyResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsByKeyResponse)(nil) -} -func (x fastReflection_QueryParamsByKeyResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsByKeyResponse) -} -func (x fastReflection_QueryParamsByKeyResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByKeyResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryParamsByKeyResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsByKeyResponse -} - -// 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_QueryParamsByKeyResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsByKeyResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsByKeyResponse) New() protoreflect.Message { - return new(fastReflection_QueryParamsByKeyResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsByKeyResponse) Interface() protoreflect.ProtoMessage { - return (*QueryParamsByKeyResponse)(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_QueryParamsByKeyResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Key != nil { - value := protoreflect.ValueOfMessage(x.Key.ProtoReflect()) - if !f(fd_QueryParamsByKeyResponse_key, 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_QueryParamsByKeyResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - return x.Key != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse 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_QueryParamsByKeyResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - x.Key = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse 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_QueryParamsByKeyResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - value := x.Key - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse 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_QueryParamsByKeyResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - x.Key = value.Message().Interface().(*KeyInfo) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse 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_QueryParamsByKeyResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - if x.Key == nil { - x.Key = new(KeyInfo) - } - return protoreflect.ValueOfMessage(x.Key.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse 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_QueryParamsByKeyResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryParamsByKeyResponse.key": - m := new(KeyInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsByKeyResponse")) - } - panic(fmt.Errorf("message did.v1.QueryParamsByKeyResponse 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_QueryParamsByKeyResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsByKeyResponse", 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_QueryParamsByKeyResponse) 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_QueryParamsByKeyResponse) 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_QueryParamsByKeyResponse) 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_QueryParamsByKeyResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsByKeyResponse) - 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.Key != nil { - l = options.Size(x.Key) - 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().(*QueryParamsByKeyResponse) - 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.Key != nil { - encoded, err := options.Marshal(x.Key) - 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 - } - 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().(*QueryParamsByKeyResponse) - 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: QueryParamsByKeyResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsByKeyResponse: 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 Key", 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.Key == nil { - x.Key = &KeyInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Key); 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_QueryResolveResponse protoreflect.MessageDescriptor fd_QueryResolveResponse_document protoreflect.FieldDescriptor @@ -3759,7 +1712,7 @@ func (x *QueryResolveResponse) ProtoReflect() protoreflect.Message { } func (x *QueryResolveResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[7] + mi := &file_did_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4198,7 +2151,7 @@ func (x *QueryServiceResponse) ProtoReflect() protoreflect.Message { } func (x *QueryServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[8] + mi := &file_did_v1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4727,6 +2680,836 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_SyncRequest protoreflect.MessageDescriptor + fd_SyncRequest_did protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_SyncRequest = File_did_v1_query_proto.Messages().ByName("SyncRequest") + fd_SyncRequest_did = md_SyncRequest.Fields().ByName("did") +} + +var _ protoreflect.Message = (*fastReflection_SyncRequest)(nil) + +type fastReflection_SyncRequest SyncRequest + +func (x *SyncRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncRequest)(x) +} + +func (x *SyncRequest) 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_SyncRequest_messageType fastReflection_SyncRequest_messageType +var _ protoreflect.MessageType = fastReflection_SyncRequest_messageType{} + +type fastReflection_SyncRequest_messageType struct{} + +func (x fastReflection_SyncRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncRequest)(nil) +} +func (x fastReflection_SyncRequest_messageType) New() protoreflect.Message { + return new(fastReflection_SyncRequest) +} +func (x fastReflection_SyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SyncRequest) Descriptor() protoreflect.MessageDescriptor { + return md_SyncRequest +} + +// 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_SyncRequest) Type() protoreflect.MessageType { + return _fastReflection_SyncRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SyncRequest) New() protoreflect.Message { + return new(fastReflection_SyncRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { + return (*SyncRequest)(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_SyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_SyncRequest_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_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.SyncRequest.did": + return x.Did != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) + } + panic(fmt.Errorf("message did.v1.SyncRequest 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_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.SyncRequest.did": + x.Did = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) + } + panic(fmt.Errorf("message did.v1.SyncRequest 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_SyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.SyncRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) + } + panic(fmt.Errorf("message did.v1.SyncRequest 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_SyncRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.SyncRequest.did": + x.Did = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) + } + panic(fmt.Errorf("message did.v1.SyncRequest 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_SyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.SyncRequest.did": + panic(fmt.Errorf("field did of message did.v1.SyncRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) + } + panic(fmt.Errorf("message did.v1.SyncRequest 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_SyncRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.SyncRequest.did": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncRequest")) + } + panic(fmt.Errorf("message did.v1.SyncRequest 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_SyncRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.SyncRequest", 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_SyncRequest) 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_SyncRequest) 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_SyncRequest) 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_SyncRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SyncRequest) + 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().(*SyncRequest) + 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().(*SyncRequest) + 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: SyncRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: 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 ( + md_SyncResponse protoreflect.MessageDescriptor + fd_SyncResponse_success protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_SyncResponse = File_did_v1_query_proto.Messages().ByName("SyncResponse") + fd_SyncResponse_success = md_SyncResponse.Fields().ByName("success") +} + +var _ protoreflect.Message = (*fastReflection_SyncResponse)(nil) + +type fastReflection_SyncResponse SyncResponse + +func (x *SyncResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncResponse)(x) +} + +func (x *SyncResponse) 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_SyncResponse_messageType fastReflection_SyncResponse_messageType +var _ protoreflect.MessageType = fastReflection_SyncResponse_messageType{} + +type fastReflection_SyncResponse_messageType struct{} + +func (x fastReflection_SyncResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncResponse)(nil) +} +func (x fastReflection_SyncResponse_messageType) New() protoreflect.Message { + return new(fastReflection_SyncResponse) +} +func (x fastReflection_SyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SyncResponse) Descriptor() protoreflect.MessageDescriptor { + return md_SyncResponse +} + +// 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_SyncResponse) Type() protoreflect.MessageType { + return _fastReflection_SyncResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SyncResponse) New() protoreflect.Message { + return new(fastReflection_SyncResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { + return (*SyncResponse)(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_SyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_SyncResponse_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_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + return x.Success != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse 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_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + x.Success = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse 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_SyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.SyncResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse 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_SyncResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + x.Success = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse 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_SyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + panic(fmt.Errorf("field success of message did.v1.SyncResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse 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_SyncResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.SyncResponse.success": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.SyncResponse")) + } + panic(fmt.Errorf("message did.v1.SyncResponse 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_SyncResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.SyncResponse", 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_SyncResponse) 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_SyncResponse) 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_SyncResponse) 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_SyncResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SyncResponse) + 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().(*SyncResponse) + 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().(*SyncResponse) + 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: SyncResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: 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 @@ -4897,146 +3680,6 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } -type QueryParamsAssetsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Assets []*AssetInfo `protobuf:"bytes,1,rep,name=assets,proto3" json:"assets,omitempty"` -} - -func (x *QueryParamsAssetsResponse) Reset() { - *x = QueryParamsAssetsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsAssetsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsAssetsResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsAssetsResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsAssetsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryParamsAssetsResponse) GetAssets() []*AssetInfo { - if x != nil { - return x.Assets - } - return nil -} - -type QueryParamsByAssetResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Asset *AssetInfo `protobuf:"bytes,1,opt,name=asset,proto3" json:"asset,omitempty"` -} - -func (x *QueryParamsByAssetResponse) Reset() { - *x = QueryParamsByAssetResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsByAssetResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsByAssetResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsByAssetResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsByAssetResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryParamsByAssetResponse) GetAsset() *AssetInfo { - if x != nil { - return x.Asset - } - return nil -} - -type QueryParamsKeysResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Keys map[string]*KeyInfo `protobuf:"bytes,1,rep,name=keys,proto3" json:"keys,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (x *QueryParamsKeysResponse) Reset() { - *x = QueryParamsKeysResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsKeysResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsKeysResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsKeysResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsKeysResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{5} -} - -func (x *QueryParamsKeysResponse) GetKeys() map[string]*KeyInfo { - if x != nil { - return x.Keys - } - return nil -} - -type QueryParamsByKeyResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Key *KeyInfo `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` -} - -func (x *QueryParamsByKeyResponse) Reset() { - *x = QueryParamsByKeyResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryParamsByKeyResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryParamsByKeyResponse) ProtoMessage() {} - -// Deprecated: Use QueryParamsByKeyResponse.ProtoReflect.Descriptor instead. -func (*QueryParamsByKeyResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryParamsByKeyResponse) GetKey() *KeyInfo { - if x != nil { - return x.Key - } - return nil -} - // QueryResolveResponse is the response type for the Query/Resolve RPC method. type QueryResolveResponse struct { state protoimpl.MessageState @@ -5050,7 +3693,7 @@ type QueryResolveResponse struct { func (x *QueryResolveResponse) Reset() { *x = QueryResolveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[7] + mi := &file_did_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5064,7 +3707,7 @@ func (*QueryResolveResponse) ProtoMessage() {} // Deprecated: Use QueryResolveResponse.ProtoReflect.Descriptor instead. func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{7} + return file_did_v1_query_proto_rawDescGZIP(), []int{3} } func (x *QueryResolveResponse) GetDocument() *Document { @@ -5089,7 +3732,7 @@ type QueryServiceResponse struct { func (x *QueryServiceResponse) Reset() { *x = QueryServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[8] + mi := &file_did_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5103,7 +3746,7 @@ func (*QueryServiceResponse) ProtoMessage() {} // Deprecated: Use QueryServiceResponse.ProtoReflect.Descriptor instead. func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{8} + return file_did_v1_query_proto_rawDescGZIP(), []int{4} } func (x *QueryServiceResponse) GetExisting() bool { @@ -5127,6 +3770,78 @@ func (x *QueryServiceResponse) GetTxtRecord() string { return "" } +// SyncRequest is the request type for the Sync RPC method. +type SyncRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` +} + +func (x *SyncRequest) Reset() { + *x = SyncRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncRequest) ProtoMessage() {} + +// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. +func (*SyncRequest) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{5} +} + +func (x *SyncRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +// SyncResponse is the response type for the Sync RPC method. +type SyncResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` +} + +func (x *SyncResponse) Reset() { + *x = SyncResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncResponse) ProtoMessage() {} + +// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. +func (*SyncResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *SyncResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + var File_did_v1_query_proto protoreflect.FileDescriptor var file_did_v1_query_proto_rawDesc = []byte{ @@ -5155,84 +3870,45 @@ var file_did_v1_query_proto_rawDesc = []byte{ 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, 0x46, - 0x0a, 0x19, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x06, 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, 0x06, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x22, 0x45, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x27, 0x0a, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x61, 0x73, 0x73, 0x65, 0x74, 0x22, 0xa2, 0x01, - 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4b, 0x65, 0x79, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x04, 0x6b, 0x65, 0x79, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x4b, 0x65, 0x79, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x1a, 0x48, 0x0a, 0x09, 0x4b, 0x65, 0x79, 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, 0x25, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, - 0x38, 0x01, 0x22, 0x3d, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x03, 0x6b, 0x65, - 0x79, 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, 0x80, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x07, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, - 0x78, 0x74, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x09, 0x74, 0x78, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x32, 0x8c, 0x05, 0x0a, 0x05, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x5f, 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x41, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x10, 0x12, 0x0e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x61, 0x73, 0x73, - 0x65, 0x74, 0x73, 0x12, 0x69, 0x0a, 0x0d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x79, 0x41, - 0x73, 0x73, 0x65, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, - 0x79, 0x41, 0x73, 0x73, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x12, 0x16, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x2f, 0x7b, 0x61, 0x73, 0x73, 0x65, 0x74, 0x7d, 0x12, 0x59, - 0x0a, 0x0a, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x14, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0x14, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0e, 0x12, 0x0c, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x61, 0x0a, 0x0b, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x42, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x2f, 0x6b, 0x65, 0x79, 0x73, 0x2f, 0x7b, 0x6b, 0x65, 0x79, 0x7d, 0x12, 0x51, 0x0a, 0x07, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x12, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, - 0x58, 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x19, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 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, 0x80, 0x01, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, + 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x08, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x12, 0x2d, 0x0a, 0x07, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, + 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x78, 0x74, 0x5f, + 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x78, + 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x22, 0x1f, 0x0a, 0x0b, 0x53, 0x79, 0x6e, 0x63, 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, 0x28, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, + 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, 0xc4, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x4c, 0x0a, 0x06, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x0f, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x09, 0x12, 0x07, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, + 0x75, 0x65, 0x72, 0x79, 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, 0x12, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x58, 0x0a, + 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x19, 0x82, 0xd3, + 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x12, 0x40, 0x0a, 0x04, 0x53, 0x79, 0x6e, 0x63, 0x12, + 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, + 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x0d, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x07, 0x22, 0x05, 0x2f, 0x73, 0x79, 0x6e, 0x63, 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, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, @@ -5255,54 +3931,38 @@ 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, 10) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryRequest)(nil), // 0: did.v1.QueryRequest - (*QueryResponse)(nil), // 1: did.v1.QueryResponse - (*QueryParamsResponse)(nil), // 2: did.v1.QueryParamsResponse - (*QueryParamsAssetsResponse)(nil), // 3: did.v1.QueryParamsAssetsResponse - (*QueryParamsByAssetResponse)(nil), // 4: did.v1.QueryParamsByAssetResponse - (*QueryParamsKeysResponse)(nil), // 5: did.v1.QueryParamsKeysResponse - (*QueryParamsByKeyResponse)(nil), // 6: did.v1.QueryParamsByKeyResponse - (*QueryResolveResponse)(nil), // 7: did.v1.QueryResolveResponse - (*QueryServiceResponse)(nil), // 8: did.v1.QueryServiceResponse - nil, // 9: did.v1.QueryParamsKeysResponse.KeysEntry - (*Document)(nil), // 10: did.v1.Document - (*Params)(nil), // 11: did.v1.Params - (*AssetInfo)(nil), // 12: did.v1.AssetInfo - (*KeyInfo)(nil), // 13: did.v1.KeyInfo - (*ServiceInfo)(nil), // 14: did.v1.ServiceInfo + (*QueryRequest)(nil), // 0: did.v1.QueryRequest + (*QueryResponse)(nil), // 1: did.v1.QueryResponse + (*QueryParamsResponse)(nil), // 2: did.v1.QueryParamsResponse + (*QueryResolveResponse)(nil), // 3: did.v1.QueryResolveResponse + (*QueryServiceResponse)(nil), // 4: did.v1.QueryServiceResponse + (*SyncRequest)(nil), // 5: did.v1.SyncRequest + (*SyncResponse)(nil), // 6: did.v1.SyncResponse + (*Document)(nil), // 7: did.v1.Document + (*Params)(nil), // 8: did.v1.Params + (*ServiceInfo)(nil), // 9: did.v1.ServiceInfo } var file_did_v1_query_proto_depIdxs = []int32{ - 10, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document - 11, // 1: did.v1.QueryResponse.params:type_name -> did.v1.Params - 11, // 2: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 12, // 3: did.v1.QueryParamsAssetsResponse.assets:type_name -> did.v1.AssetInfo - 12, // 4: did.v1.QueryParamsByAssetResponse.asset:type_name -> did.v1.AssetInfo - 9, // 5: did.v1.QueryParamsKeysResponse.keys:type_name -> did.v1.QueryParamsKeysResponse.KeysEntry - 13, // 6: did.v1.QueryParamsByKeyResponse.key:type_name -> did.v1.KeyInfo - 10, // 7: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document - 14, // 8: did.v1.QueryServiceResponse.service:type_name -> did.v1.ServiceInfo - 13, // 9: did.v1.QueryParamsKeysResponse.KeysEntry.value:type_name -> did.v1.KeyInfo - 0, // 10: did.v1.Query.Params:input_type -> did.v1.QueryRequest - 0, // 11: did.v1.Query.ParamsAssets:input_type -> did.v1.QueryRequest - 0, // 12: did.v1.Query.ParamsByAsset:input_type -> did.v1.QueryRequest - 0, // 13: did.v1.Query.ParamsKeys:input_type -> did.v1.QueryRequest - 0, // 14: did.v1.Query.ParamsByKey:input_type -> did.v1.QueryRequest - 0, // 15: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest - 0, // 16: did.v1.Query.Service:input_type -> did.v1.QueryRequest - 2, // 17: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 3, // 18: did.v1.Query.ParamsAssets:output_type -> did.v1.QueryParamsAssetsResponse - 4, // 19: did.v1.Query.ParamsByAsset:output_type -> did.v1.QueryParamsByAssetResponse - 5, // 20: did.v1.Query.ParamsKeys:output_type -> did.v1.QueryParamsKeysResponse - 6, // 21: did.v1.Query.ParamsByKey:output_type -> did.v1.QueryParamsByKeyResponse - 7, // 22: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse - 8, // 23: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse - 17, // [17:24] is the sub-list for method output_type - 10, // [10:17] is the sub-list for method input_type - 10, // [10:10] is the sub-list for extension type_name - 10, // [10:10] is the sub-list for extension extendee - 0, // [0:10] is the sub-list for field type_name + 7, // 0: did.v1.QueryResponse.document:type_name -> did.v1.Document + 8, // 1: did.v1.QueryResponse.params:type_name -> did.v1.Params + 8, // 2: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params + 7, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document + 9, // 4: did.v1.QueryServiceResponse.service:type_name -> did.v1.ServiceInfo + 0, // 5: did.v1.Query.Params:input_type -> did.v1.QueryRequest + 0, // 6: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest + 0, // 7: did.v1.Query.Service:input_type -> did.v1.QueryRequest + 5, // 8: did.v1.Query.Sync:input_type -> did.v1.SyncRequest + 2, // 9: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse + 3, // 10: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse + 4, // 11: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse + 6, // 12: did.v1.Query.Sync:output_type -> did.v1.SyncResponse + 9, // [9:13] is the sub-list for method output_type + 5, // [5:9] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_did_v1_query_proto_init() } @@ -5350,54 +4010,6 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsAssetsResponse); 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[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsByAssetResponse); 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[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsKeysResponse); 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[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsByKeyResponse); 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[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResolveResponse); i { case 0: return &v.state @@ -5409,7 +4021,7 @@ func file_did_v1_query_proto_init() { return nil } } - file_did_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryServiceResponse); i { case 0: return &v.state @@ -5421,6 +4033,30 @@ func file_did_v1_query_proto_init() { return nil } } + file_did_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncRequest); 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[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncResponse); 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{ @@ -5428,7 +4064,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/query_grpc.pb.go b/api/did/v1/query_grpc.pb.go index 4ff3a46c7..c5be5104b 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -19,13 +19,10 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/did.v1.Query/Params" - Query_ParamsAssets_FullMethodName = "/did.v1.Query/ParamsAssets" - Query_ParamsByAsset_FullMethodName = "/did.v1.Query/ParamsByAsset" - Query_ParamsKeys_FullMethodName = "/did.v1.Query/ParamsKeys" - Query_ParamsByKey_FullMethodName = "/did.v1.Query/ParamsByKey" - Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" - Query_Service_FullMethodName = "/did.v1.Query/Service" + Query_Params_FullMethodName = "/did.v1.Query/Params" + Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" + Query_Service_FullMethodName = "/did.v1.Query/Service" + Query_Sync_FullMethodName = "/did.v1.Query/Sync" ) // QueryClient is the client API for Query service. @@ -34,20 +31,14 @@ const ( type QueryClient interface { // Params queries all parameters of the module. Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) - // ParamsAssets queries all parameters of the module. - ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsAssetsResponse, error) - // Params queries all parameters of the module. - ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByAssetResponse, error) - // ParamsKeys queries all parameters of the module. - ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsKeysResponse, error) - // Params queries all parameters of the module. - ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByKeyResponse, error) // Resolve queries the DID document by its id. Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) // Service returns associated ServiceInfo for a given Origin // if the servie is not found, a fingerprint is generated to be used // as a TXT record in DNS. v=sonr, o=origin, p=protocol Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + // Sync queries the DID document by its id. And returns the required PKL information + Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) } type queryClient struct { @@ -67,42 +58,6 @@ func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc return out, nil } -func (c *queryClient) ParamsAssets(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsAssetsResponse, error) { - out := new(QueryParamsAssetsResponse) - err := c.cc.Invoke(ctx, Query_ParamsAssets_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsByAsset(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByAssetResponse, error) { - out := new(QueryParamsByAssetResponse) - err := c.cc.Invoke(ctx, Query_ParamsByAsset_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsKeys(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsKeysResponse, error) { - out := new(QueryParamsKeysResponse) - err := c.cc.Invoke(ctx, Query_ParamsKeys_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) ParamsByKey(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsByKeyResponse, error) { - out := new(QueryParamsByKeyResponse) - err := c.cc.Invoke(ctx, Query_ParamsByKey_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { out := new(QueryResolveResponse) err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...) @@ -121,26 +76,29 @@ func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grp return out, nil } +func (c *queryClient) Sync(ctx context.Context, in *SyncRequest, opts ...grpc.CallOption) (*SyncResponse, error) { + out := new(SyncResponse) + err := c.cc.Invoke(ctx, Query_Sync_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { // Params queries all parameters of the module. Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) - // ParamsAssets queries all parameters of the module. - ParamsAssets(context.Context, *QueryRequest) (*QueryParamsAssetsResponse, error) - // Params queries all parameters of the module. - ParamsByAsset(context.Context, *QueryRequest) (*QueryParamsByAssetResponse, error) - // ParamsKeys queries all parameters of the module. - ParamsKeys(context.Context, *QueryRequest) (*QueryParamsKeysResponse, error) - // Params queries all parameters of the module. - ParamsByKey(context.Context, *QueryRequest) (*QueryParamsByKeyResponse, error) // Resolve queries the DID document by its id. Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) // Service returns associated ServiceInfo for a given Origin // if the servie is not found, a fingerprint is generated to be used // as a TXT record in DNS. v=sonr, o=origin, p=protocol Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) + // Sync queries the DID document by its id. And returns the required PKL information + Sync(context.Context, *SyncRequest) (*SyncResponse, error) mustEmbedUnimplementedQueryServer() } @@ -151,24 +109,15 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) ParamsAssets(context.Context, *QueryRequest) (*QueryParamsAssetsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsAssets not implemented") -} -func (UnimplementedQueryServer) ParamsByAsset(context.Context, *QueryRequest) (*QueryParamsByAssetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsByAsset not implemented") -} -func (UnimplementedQueryServer) ParamsKeys(context.Context, *QueryRequest) (*QueryParamsKeysResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsKeys not implemented") -} -func (UnimplementedQueryServer) ParamsByKey(context.Context, *QueryRequest) (*QueryParamsByKeyResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ParamsByKey not implemented") -} func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } +func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -200,78 +149,6 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } -func _Query_ParamsAssets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsAssets(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsAssets_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsAssets(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsByAsset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsByAsset(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsByAsset_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsByAsset(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsKeys_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsKeys(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsKeys_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsKeys(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_ParamsByKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).ParamsByKey(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_ParamsByKey_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).ParamsByKey(ctx, req.(*QueryRequest)) - } - return interceptor(ctx, in, info, handler) -} - func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(QueryRequest) if err := dec(in); err != nil { @@ -308,6 +185,24 @@ func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(inter return interceptor(ctx, in, info, handler) } +func _Query_Sync_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Sync(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Sync_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -319,22 +214,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, - { - MethodName: "ParamsAssets", - Handler: _Query_ParamsAssets_Handler, - }, - { - MethodName: "ParamsByAsset", - Handler: _Query_ParamsByAsset_Handler, - }, - { - MethodName: "ParamsKeys", - Handler: _Query_ParamsKeys_Handler, - }, - { - MethodName: "ParamsByKey", - Handler: _Query_ParamsByKey_Handler, - }, { MethodName: "Resolve", Handler: _Query_Resolve_Handler, @@ -343,6 +222,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Service", Handler: _Query_Service_Handler, }, + { + MethodName: "Sync", + Handler: _Query_Sync_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "did/v1/query.proto", diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index 7e422af3d..2d19f43c1 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -2069,900 +2069,6 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met } } -var ( - md_MsgSyncController protoreflect.MessageDescriptor - fd_MsgSyncController_controller protoreflect.FieldDescriptor - fd_MsgSyncController_token protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgSyncController = File_did_v1_tx_proto.Messages().ByName("MsgSyncController") - fd_MsgSyncController_controller = md_MsgSyncController.Fields().ByName("controller") - fd_MsgSyncController_token = md_MsgSyncController.Fields().ByName("token") -} - -var _ protoreflect.Message = (*fastReflection_MsgSyncController)(nil) - -type fastReflection_MsgSyncController MsgSyncController - -func (x *MsgSyncController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncController)(x) -} - -func (x *MsgSyncController) 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_MsgSyncController_messageType fastReflection_MsgSyncController_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncController_messageType{} - -type fastReflection_MsgSyncController_messageType struct{} - -func (x fastReflection_MsgSyncController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncController)(nil) -} -func (x fastReflection_MsgSyncController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncController) -} -func (x fastReflection_MsgSyncController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncController -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSyncController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncController -} - -// 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_MsgSyncController) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncController_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncController) New() protoreflect.Message { - return new(fastReflection_MsgSyncController) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncController) Interface() protoreflect.ProtoMessage { - return (*MsgSyncController)(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_MsgSyncController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgSyncController_controller, value) { - return - } - } - if x.Token != "" { - value := protoreflect.ValueOfString(x.Token) - if !f(fd_MsgSyncController_token, 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_MsgSyncController) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - return x.Controller != "" - case "did.v1.MsgSyncController.token": - return x.Token != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncController) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - x.Controller = "" - case "did.v1.MsgSyncController.token": - x.Token = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgSyncController.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncController.token": - value := x.Token - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - x.Controller = value.Interface().(string) - case "did.v1.MsgSyncController.token": - x.Token = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgSyncController is not mutable")) - case "did.v1.MsgSyncController.token": - panic(fmt.Errorf("field token of message did.v1.MsgSyncController is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncController.controller": - return protoreflect.ValueOfString("") - case "did.v1.MsgSyncController.token": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncController")) - } - panic(fmt.Errorf("message did.v1.MsgSyncController 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_MsgSyncController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncController", 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_MsgSyncController) 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_MsgSyncController) 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_MsgSyncController) 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_MsgSyncController) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncController) - 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.Token) - 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().(*MsgSyncController) - 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.Token) > 0 { - i -= len(x.Token) - copy(dAtA[i:], x.Token) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Token))) - i-- - dAtA[i] = 0x1a - } - 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().(*MsgSyncController) - 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: MsgSyncController: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncController: 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 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token = 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_MsgSyncControllerResponse protoreflect.MessageDescriptor - fd_MsgSyncControllerResponse_success protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_tx_proto_init() - md_MsgSyncControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgSyncControllerResponse") - fd_MsgSyncControllerResponse_success = md_MsgSyncControllerResponse.Fields().ByName("success") -} - -var _ protoreflect.Message = (*fastReflection_MsgSyncControllerResponse)(nil) - -type fastReflection_MsgSyncControllerResponse MsgSyncControllerResponse - -func (x *MsgSyncControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSyncControllerResponse)(x) -} - -func (x *MsgSyncControllerResponse) 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_MsgSyncControllerResponse_messageType fastReflection_MsgSyncControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgSyncControllerResponse_messageType{} - -type fastReflection_MsgSyncControllerResponse_messageType struct{} - -func (x fastReflection_MsgSyncControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSyncControllerResponse)(nil) -} -func (x fastReflection_MsgSyncControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSyncControllerResponse) -} -func (x fastReflection_MsgSyncControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncControllerResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSyncControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSyncControllerResponse -} - -// 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_MsgSyncControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgSyncControllerResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSyncControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgSyncControllerResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSyncControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgSyncControllerResponse)(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_MsgSyncControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Success != false { - value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgSyncControllerResponse_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_MsgSyncControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - return x.Success != false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncControllerResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - x.Success = false - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - value := x.Success - return protoreflect.ValueOfBool(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - x.Success = value.Bool() - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgSyncControllerResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.MsgSyncControllerResponse.success": - return protoreflect.ValueOfBool(false) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncControllerResponse")) - } - panic(fmt.Errorf("message did.v1.MsgSyncControllerResponse 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_MsgSyncControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgSyncControllerResponse", 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_MsgSyncControllerResponse) 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_MsgSyncControllerResponse) 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_MsgSyncControllerResponse) 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_MsgSyncControllerResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSyncControllerResponse) - 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().(*MsgSyncControllerResponse) - 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().(*MsgSyncControllerResponse) - 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: MsgSyncControllerResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSyncControllerResponse: 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 { @@ -3127,7 +2233,7 @@ func (x *MsgRegisterController) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[6] + mi := &file_did_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3861,7 +2967,7 @@ func (x *MsgRegisterControllerResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[7] + mi := &file_did_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4559,7 +3665,7 @@ func (x *MsgAuthorizeService) ProtoReflect() protoreflect.Message { } func (x *MsgAuthorizeService) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[8] + mi := &file_did_v1_tx_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5182,7 +4288,7 @@ func (x *MsgAuthorizeServiceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgAuthorizeServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[9] + mi := &file_did_v1_tx_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5656,7 +4762,7 @@ func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[10] + mi := &file_did_v1_tx_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6155,7 +5261,7 @@ func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[11] + mi := &file_did_v1_tx_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6826,88 +5932,6 @@ func (x *MsgAllocateVaultResponse) GetLocalhost() bool { return false } -// MsgSyncController is the message type for the SyncController RPC. -type MsgSyncController 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"` - // Token is the public token to authenticate the operation. - Token string `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` -} - -func (x *MsgSyncController) Reset() { - *x = MsgSyncController{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSyncController) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSyncController) ProtoMessage() {} - -// Deprecated: Use MsgSyncController.ProtoReflect.Descriptor instead. -func (*MsgSyncController) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgSyncController) GetController() string { - if x != nil { - return x.Controller - } - return "" -} - -func (x *MsgSyncController) GetToken() string { - if x != nil { - return x.Token - } - return "" -} - -// MsgSyncControllerResponse is the response type for the SyncController RPC. -type MsgSyncControllerResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` -} - -func (x *MsgSyncControllerResponse) Reset() { - *x = MsgSyncControllerResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSyncControllerResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSyncControllerResponse) ProtoMessage() {} - -// Deprecated: Use MsgSyncControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgSyncControllerResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *MsgSyncControllerResponse) 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 @@ -6927,7 +5951,7 @@ type MsgRegisterController struct { func (x *MsgRegisterController) Reset() { *x = MsgRegisterController{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[6] + mi := &file_did_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6941,7 +5965,7 @@ func (*MsgRegisterController) ProtoMessage() {} // Deprecated: Use MsgRegisterController.ProtoReflect.Descriptor instead. func (*MsgRegisterController) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{6} + return file_did_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgRegisterController) GetAuthority() string { @@ -6989,7 +6013,7 @@ type MsgRegisterControllerResponse struct { func (x *MsgRegisterControllerResponse) Reset() { *x = MsgRegisterControllerResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[7] + mi := &file_did_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7003,7 +6027,7 @@ func (*MsgRegisterControllerResponse) ProtoMessage() {} // Deprecated: Use MsgRegisterControllerResponse.ProtoReflect.Descriptor instead. func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{7} + return file_did_v1_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgRegisterControllerResponse) GetSuccess() bool { @@ -7046,7 +6070,7 @@ type MsgAuthorizeService struct { func (x *MsgAuthorizeService) Reset() { *x = MsgAuthorizeService{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[8] + mi := &file_did_v1_tx_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7060,7 +6084,7 @@ func (*MsgAuthorizeService) ProtoMessage() {} // Deprecated: Use MsgAuthorizeService.ProtoReflect.Descriptor instead. func (*MsgAuthorizeService) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{8} + return file_did_v1_tx_proto_rawDescGZIP(), []int{6} } func (x *MsgAuthorizeService) GetController() string { @@ -7104,7 +6128,7 @@ type MsgAuthorizeServiceResponse struct { func (x *MsgAuthorizeServiceResponse) Reset() { *x = MsgAuthorizeServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[9] + mi := &file_did_v1_tx_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7118,7 +6142,7 @@ func (*MsgAuthorizeServiceResponse) ProtoMessage() {} // Deprecated: Use MsgAuthorizeServiceResponse.ProtoReflect.Descriptor instead. func (*MsgAuthorizeServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{9} + return file_did_v1_tx_proto_rawDescGZIP(), []int{7} } func (x *MsgAuthorizeServiceResponse) GetSuccess() bool { @@ -7150,7 +6174,7 @@ type MsgRegisterService struct { func (x *MsgRegisterService) Reset() { *x = MsgRegisterService{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[10] + mi := &file_did_v1_tx_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7164,7 +6188,7 @@ func (*MsgRegisterService) ProtoMessage() {} // Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. func (*MsgRegisterService) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{10} + return file_did_v1_tx_proto_rawDescGZIP(), []int{8} } func (x *MsgRegisterService) GetController() string { @@ -7194,7 +6218,7 @@ type MsgRegisterServiceResponse struct { func (x *MsgRegisterServiceResponse) Reset() { *x = MsgRegisterServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[11] + mi := &file_did_v1_tx_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7208,7 +6232,7 @@ func (*MsgRegisterServiceResponse) ProtoMessage() {} // Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{11} + return file_did_v1_tx_proto_rawDescGZIP(), []int{9} } func (x *MsgRegisterServiceResponse) GetSuccess() bool { @@ -7267,117 +6291,101 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 0x6e, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 0x22, 0x74, 0x0a, 0x11, 0x4d, - 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 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, 0x14, 0x0a, 0x05, 0x74, 0x6f, - 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, - 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x22, 0x35, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 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, 0x81, - 0x02, 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, 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, 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, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x52, 0x09, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x68, 0x6f, 0x73, 0x74, 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, 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, 0xbb, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 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, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a, 0x06, - 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, - 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, - 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x22, 0x4d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, - 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, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, - 0x8a, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 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, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, - 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 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, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xf8, 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, 0x54, 0x0a, 0x10, 0x41, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, + 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, 0x81, 0x02, 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, 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, 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, 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x18, 0x03, 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, 0xbb, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 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, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, + 0x2b, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 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, 0x12, 0x14, 0x0a, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, + 0x65, 0x6e, 0x22, 0x8a, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 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, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x0f, + 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, + 0x48, 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, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x32, 0xa8, 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, 0x54, 0x0a, 0x10, 0x41, + 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x23, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x23, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, - 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, - 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a, 0x0e, 0x53, - 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x19, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x21, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x65, 0x72, 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, 0x73, 0x6f, - 0x6e, 0x72, 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, + 0x7a, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, + 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x20, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, + 0x65, 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, 0x73, 0x6f, 0x6e, 0x72, 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 ( @@ -7392,44 +6400,40 @@ 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, 13) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_did_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse (*MsgAllocateVault)(nil), // 2: did.v1.MsgAllocateVault (*MsgAllocateVaultResponse)(nil), // 3: did.v1.MsgAllocateVaultResponse - (*MsgSyncController)(nil), // 4: did.v1.MsgSyncController - (*MsgSyncControllerResponse)(nil), // 5: did.v1.MsgSyncControllerResponse - (*MsgRegisterController)(nil), // 6: did.v1.MsgRegisterController - (*MsgRegisterControllerResponse)(nil), // 7: did.v1.MsgRegisterControllerResponse - (*MsgAuthorizeService)(nil), // 8: did.v1.MsgAuthorizeService - (*MsgAuthorizeServiceResponse)(nil), // 9: did.v1.MsgAuthorizeServiceResponse - (*MsgRegisterService)(nil), // 10: did.v1.MsgRegisterService - (*MsgRegisterServiceResponse)(nil), // 11: did.v1.MsgRegisterServiceResponse - nil, // 12: did.v1.MsgRegisterControllerResponse.AccountsEntry - (*Params)(nil), // 13: did.v1.Params - (*Permissions)(nil), // 14: did.v1.Permissions - (*Service)(nil), // 15: did.v1.Service + (*MsgRegisterController)(nil), // 4: did.v1.MsgRegisterController + (*MsgRegisterControllerResponse)(nil), // 5: did.v1.MsgRegisterControllerResponse + (*MsgAuthorizeService)(nil), // 6: did.v1.MsgAuthorizeService + (*MsgAuthorizeServiceResponse)(nil), // 7: did.v1.MsgAuthorizeServiceResponse + (*MsgRegisterService)(nil), // 8: did.v1.MsgRegisterService + (*MsgRegisterServiceResponse)(nil), // 9: did.v1.MsgRegisterServiceResponse + nil, // 10: did.v1.MsgRegisterControllerResponse.AccountsEntry + (*Params)(nil), // 11: did.v1.Params + (*Permissions)(nil), // 12: did.v1.Permissions + (*Service)(nil), // 13: did.v1.Service } var file_did_v1_tx_proto_depIdxs = []int32{ - 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.MsgAuthorizeService.scopes:type_name -> did.v1.Permissions - 15, // 3: did.v1.MsgRegisterService.service:type_name -> did.v1.Service + 11, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 10, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry + 12, // 2: did.v1.MsgAuthorizeService.scopes:type_name -> did.v1.Permissions + 13, // 3: did.v1.MsgRegisterService.service:type_name -> did.v1.Service 0, // 4: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 8, // 5: did.v1.Msg.AuthorizeService:input_type -> did.v1.MsgAuthorizeService + 6, // 5: did.v1.Msg.AuthorizeService:input_type -> did.v1.MsgAuthorizeService 2, // 6: did.v1.Msg.AllocateVault:input_type -> did.v1.MsgAllocateVault - 4, // 7: did.v1.Msg.SyncController:input_type -> did.v1.MsgSyncController - 6, // 8: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController - 10, // 9: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService - 1, // 10: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 9, // 11: did.v1.Msg.AuthorizeService:output_type -> did.v1.MsgAuthorizeServiceResponse - 3, // 12: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse - 5, // 13: did.v1.Msg.SyncController:output_type -> did.v1.MsgSyncControllerResponse - 7, // 14: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse - 11, // 15: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse - 10, // [10:16] is the sub-list for method output_type - 4, // [4:10] is the sub-list for method input_type + 4, // 7: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController + 8, // 8: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService + 1, // 9: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 7, // 10: did.v1.Msg.AuthorizeService:output_type -> did.v1.MsgAuthorizeServiceResponse + 3, // 11: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse + 5, // 12: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse + 9, // 13: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse + 9, // [9:14] is the sub-list for method output_type + 4, // [4:9] 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 @@ -7492,30 +6496,6 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSyncController); 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[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSyncControllerResponse); 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.(*MsgRegisterController); i { case 0: return &v.state @@ -7527,7 +6507,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterControllerResponse); i { case 0: return &v.state @@ -7539,7 +6519,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAuthorizeService); i { case 0: return &v.state @@ -7551,7 +6531,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAuthorizeServiceResponse); i { case 0: return &v.state @@ -7563,7 +6543,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterService); i { case 0: return &v.state @@ -7575,7 +6555,7 @@ func file_did_v1_tx_proto_init() { return nil } } - file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterServiceResponse); i { case 0: return &v.state @@ -7594,7 +6574,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 11, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index d7f85dee2..8ce8e0729 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -22,7 +22,6 @@ const ( Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" Msg_AuthorizeService_FullMethodName = "/did.v1.Msg/AuthorizeService" Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault" - Msg_SyncController_FullMethodName = "/did.v1.Msg/SyncController" Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService" ) @@ -40,8 +39,6 @@ type MsgClient interface { // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. // this operation is called by services initiating a controller registration. AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(ctx context.Context, in *MsgRegisterController, opts ...grpc.CallOption) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -83,15 +80,6 @@ func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opt return out, nil } -func (c *msgClient) SyncController(ctx context.Context, in *MsgSyncController, opts ...grpc.CallOption) (*MsgSyncControllerResponse, error) { - out := new(MsgSyncControllerResponse) - err := c.cc.Invoke(ctx, Msg_SyncController_FullMethodName, in, out, opts...) - 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...) @@ -123,8 +111,6 @@ type MsgServer interface { // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. // this operation is called by services initiating a controller registration. AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) - // SyncController synchronizes the controller with the Vault Motr DWN WASM Wallet. - SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. @@ -145,9 +131,6 @@ func (UnimplementedMsgServer) AuthorizeService(context.Context, *MsgAuthorizeSer func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } -func (UnimplementedMsgServer) SyncController(context.Context, *MsgSyncController) (*MsgSyncControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method SyncController not implemented") -} func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") } @@ -221,24 +204,6 @@ func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(i return interceptor(ctx, in, info, handler) } -func _Msg_SyncController_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgSyncController) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(MsgServer).SyncController(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Msg_SyncController_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).SyncController(ctx, req.(*MsgSyncController)) - } - 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(MsgRegisterController) if err := dec(in); err != nil { @@ -294,10 +259,6 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "AllocateVault", Handler: _Msg_AllocateVault_Handler, }, - { - MethodName: "SyncController", - Handler: _Msg_SyncController_Handler, - }, { MethodName: "RegisterController", Handler: _Msg_RegisterController_Handler, diff --git a/config/dwn/Config.pkl.go b/config/dwn/Config.pkl.go new file mode 100644 index 000000000..f492485ba --- /dev/null +++ b/config/dwn/Config.pkl.go @@ -0,0 +1,14 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type Config struct { + Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"` + + Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"` + + Keyshare *string `pkl:"keyshare" json:"keyshare,omitempty"` + + Address *string `pkl:"address" json:"address,omitempty"` + + Vault *IndexedDB `pkl:"vault" json:"vault,omitempty"` +} diff --git a/config/dwn/Dwn.pkl.go b/config/dwn/Dwn.pkl.go new file mode 100644 index 000000000..3dcb752ea --- /dev/null +++ b/config/dwn/Dwn.pkl.go @@ -0,0 +1,37 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +import ( + "context" + + "github.com/apple/pkl-go/pkl" +) + +type Dwn struct { + Config any `pkl:"config"` +} + +// LoadFromPath loads the pkl module at the given path and evaluates it into a Dwn +func LoadFromPath(ctx context.Context, path string) (ret *Dwn, err error) { + evaluator, err := pkl.NewEvaluator(ctx, pkl.PreconfiguredOptions) + if err != nil { + return nil, err + } + defer func() { + cerr := evaluator.Close() + if err == nil { + err = cerr + } + }() + ret, err = Load(ctx, evaluator, pkl.FileSource(path)) + return ret, err +} + +// Load loads the pkl module at the given source and evaluates it with the given evaluator into a Dwn +func Load(ctx context.Context, evaluator pkl.Evaluator, source *pkl.ModuleSource) (*Dwn, error) { + var ret Dwn + if err := evaluator.EvaluateModule(ctx, source, &ret); err != nil { + return nil, err + } + return &ret, nil +} diff --git a/config/dwn/IPFS.pkl.go b/config/dwn/IPFS.pkl.go new file mode 100644 index 000000000..7f2add580 --- /dev/null +++ b/config/dwn/IPFS.pkl.go @@ -0,0 +1,8 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type IPFS struct { + ApiUrl string `pkl:"apiUrl"` + + GatewayUrl string `pkl:"gatewayUrl"` +} diff --git a/config/dwn/IndexedDB.pkl.go b/config/dwn/IndexedDB.pkl.go new file mode 100644 index 000000000..8ee09f1c9 --- /dev/null +++ b/config/dwn/IndexedDB.pkl.go @@ -0,0 +1,8 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type IndexedDB struct { + Name string `pkl:"name"` + + Version int `pkl:"version"` +} diff --git a/config/dwn/Sonr.pkl.go b/config/dwn/Sonr.pkl.go new file mode 100644 index 000000000..4a342bf40 --- /dev/null +++ b/config/dwn/Sonr.pkl.go @@ -0,0 +1,12 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +type Sonr struct { + ApiUrl string `pkl:"apiUrl"` + + GrpcUrl string `pkl:"grpcUrl"` + + RpcUrl string `pkl:"rpcUrl"` + + WebSocketUrl string `pkl:"webSocketUrl"` +} diff --git a/config/dwn/init.pkl.go b/config/dwn/init.pkl.go new file mode 100644 index 000000000..074eb42f1 --- /dev/null +++ b/config/dwn/init.pkl.go @@ -0,0 +1,12 @@ +// Code generated from Pkl module `dwn`. DO NOT EDIT. +package dwn + +import "github.com/apple/pkl-go/pkl" + +func init() { + pkl.RegisterMapping("dwn", Dwn{}) + pkl.RegisterMapping("dwn#Config", Config{}) + pkl.RegisterMapping("dwn#IPFS", IPFS{}) + pkl.RegisterMapping("dwn#Sonr", Sonr{}) + pkl.RegisterMapping("dwn#IndexedDB", IndexedDB{}) +} diff --git a/config/pkl/dwn.pkl b/config/pkl/dwn.pkl new file mode 100644 index 000000000..78dfe6864 --- /dev/null +++ b/config/pkl/dwn.pkl @@ -0,0 +1,62 @@ +@go.Package { name = "github.com/onsonr/sonr/config/dwn" } + +module dwn + +import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" + +typealias JSON = String + +class JsonField extends go.Field { + structTags { + ["json"] = "%{name},omitempty" + } +} + +class Config { + @JsonField + ipfs: IPFS + + @JsonField + sonr: Sonr + + @JsonField + keyshare: JSON? + + @JsonField + address: String? + + @JsonField + vault: IndexedDB +} + +class IndexedDB { + name: String = "vault" + version: Int = 1 +} + +class IPFS { + apiUrl: String + gatewayUrl: String +} + +class Sonr { + apiUrl: String + grpcUrl: String + rpcUrl: String + webSocketUrl: String +} + + +config = new Config { + ipfs = new IPFS { + apiUrl = "https://api.sonr-ipfs.land" + gatewayUrl = "https://ipfs.sonr.land" + } + + sonr = new Sonr { + apiUrl = "https://api.sonr.land" + grpcUrl = "https://grpc.sonr.land" + rpcUrl = "https://rpc.sonr.land" + webSocketUrl = "wss://rpc.sonr.land/ws" + } +} diff --git a/config/pkl/orm.pkl b/config/pkl/orm.pkl index 7fd200663..67eeb7ac1 100644 --- a/config/pkl/orm.pkl +++ b/config/pkl/orm.pkl @@ -1,64 +1,56 @@ -@go.Package { name = "github.com/onsonr/sonr/internal/dwn/models" } +@go.Package { name = "github.com/onsonr/sonr/internal/vfs/models" } module models import "package://pkg.pkl-lang.org/pkl-go/pkl.golang@0.5.0#/go.pkl" +typealias Base58 = String +typealias Base64 = String + +typealias Bech32 = String +typealias Keccak = String + +typealias DID = String +typealias ChainCode = UInt +typealias Scope = String + +typealias Hex = String +typealias UTF8 = String + class PrimaryKey extends go.Field { structTags { - ["gorm"] = "primaryKey,autoIncrement" ["json"] = "%{name},omitempty" ["query"] = "%{name}" } } -class Unique extends go.Field { - structTags { - ["gorm"] = "unique" - ["json"] = "%{name},omitempty" - } -} - -class Default extends go.Field { - defaultValue: String - structTags { - ["gorm"] = "default:%{defaultValue}" - ["json"] = "%{name},omitempty" - } -} - -class NotNull extends go.Field { - structTags { - ["gorm"] = "not null" - } -} - -class ForeignKey extends go.Field { - references: String - structTags { - ["gorm"] = "foreignKey:%{references}" - } -} - class JsonField extends go.Field { structTags { ["json"] = "%{name},omitempty" - ["param"] = "%{name}" } } class Account { @PrimaryKey - id: UInt + id: DID @JsonField name: String @JsonField - address: String + address: Bech32|Keccak|String @JsonField - publicKey: String + publicKey: Base58 + + @JsonField + chainCode: ChainCode + + @JsonField + index: Int + + @JsonField + controller: Bech32 @JsonField createdAt: String? @@ -66,7 +58,7 @@ class Account { class Asset { @PrimaryKey - id: UInt + id: DID @JsonField name: String @@ -78,7 +70,7 @@ class Asset { decimals: Int @JsonField - chainId: Int? + chainCode: ChainCode @JsonField createdAt: String? @@ -86,7 +78,7 @@ class Asset { class Chain { @PrimaryKey - id: UInt + id: DID @JsonField name: String @@ -94,19 +86,22 @@ class Chain { @JsonField networkId: String + @JsonField + chainCode: ChainCode + @JsonField createdAt: String? } class Credential { @PrimaryKey - id: UInt + id: DID @JsonField subject: String @JsonField - controller: String + controller: Bech32 @JsonField attestationType: String @@ -115,13 +110,13 @@ class Credential { origin: String @JsonField - credentialId: String + credentialId: Base64 @JsonField - publicKey: String + publicKey: Base64 @JsonField - transport: String + transport: List @JsonField signCount: UInt @@ -148,6 +143,54 @@ class Credential { updatedAt: String? } +class Grant { + @PrimaryKey + id: UInt + + @JsonField + subject: String + + @JsonField + controller: Bech32 + + @JsonField + origin: String + + @JsonField + token: String + + @JsonField + scopes: List + + @JsonField + createdAt: String? + + @JsonField + updatedAt: String? +} + +class Keyshare { + @PrimaryKey + id: DID + + @JsonField + data: Base64 + + @JsonField + role: Int + + @JsonField + createdAt: String? + + @JsonField + lastRefreshed: String? +} + +class PublicKey { + @PrimaryKey + id: DID +} + class Profile { @PrimaryKey id: String @@ -156,7 +199,7 @@ class Profile { subject: String @JsonField - controller: String + controller: Bech32 @JsonField originUri: String? @@ -174,103 +217,4 @@ class Profile { updatedAt: String? } -class Property { - @PrimaryKey - id: UInt - @JsonField - profileId: String - - @JsonField - key: String - - @JsonField - accumulator: String - - @JsonField - propertyKey: String -} - -class Keyshare { - @PrimaryKey - id: UInt - - @JsonField - data: String - - @JsonField - role: Int - - @JsonField - createdAt: String? -} - -class Permission { - @PrimaryKey - id: UInt - - @JsonField - serviceId: String - - @JsonField - grants: String - - @JsonField - scopes: String - - @JsonField - createdAt: String? - - @JsonField - updatedAt: String? -} - - - - -class DiscoveryDocument { - @JsonField - issuer: String - - @JsonField - authorization_endpoint: String - - @JsonField - token_endpoint: String - - @JsonField - userinfo_endpoint: String - - @JsonField - jwks_uri: String - - @JsonField - registration_endpoint: String - - @JsonField - scopes_supported: List - - @JsonField - response_types_supported: List - - @JsonField - response_modes_supported: List - - @JsonField - subject_types_supported: List - - @JsonField - id_token_signing_alg_values_supported: List - - @JsonField - claims_supported: List - - @JsonField - grant_types_supported: List - - @JsonField - acr_values_supported: List - - @JsonField - token_endpoint_auth_methods_supported: List -} diff --git a/config/pkl/txns.pkl b/config/pkl/txns.pkl index 4fb6a6a90..be21a759e 100644 --- a/config/pkl/txns.pkl +++ b/config/pkl/txns.pkl @@ -1,4 +1,4 @@ -@go.Package { name = "github.com/onsonr/sonr/internal/dwn/txns" } +@go.Package { name = "github.com/onsonr/sonr/internal/vfs/txns" } module txns @@ -25,6 +25,14 @@ class Proposal { description: String } +class SWT { + origin: String + location: String + identifier: String + scopes: List + properties: Map + expiryBlock: Int +} /// Gov module messages class MsgGovSubmitProposal extends Msg { diff --git a/devbox.json b/devbox.json index 1ad00b6b1..7abcfca3c 100644 --- a/devbox.json +++ b/devbox.json @@ -37,6 +37,7 @@ "make proto-gen" ], "gen:pkl": [ + "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/dwn.pkl", "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/orm.pkl", "go run github.com/apple/pkl-go/cmd/pkl-gen-go ./config/pkl/txns.pkl" ], diff --git a/go.mod b/go.mod index a09260af8..47f23303a 100644 --- a/go.mod +++ b/go.mod @@ -74,7 +74,7 @@ require ( github.com/labstack/echo/v4 v4.10.2 github.com/mr-tron/base58 v1.2.0 github.com/nlepage/go-js-promise v1.0.0 - github.com/onsonr/crypto v1.30.0 + github.com/onsonr/crypto v1.31.0 github.com/segmentio/ksuid v1.0.4 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 diff --git a/go.sum b/go.sum index 1d2d642ef..b7f3c9e9a 100644 --- a/go.sum +++ b/go.sum @@ -1851,8 +1851,8 @@ github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7J github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.33.1 h1:dsYjIxxSR755MDmKVsaFQTE22ChNBcuuTWgkUDSubOk= github.com/onsi/gomega v1.33.1/go.mod h1:U4R44UsT+9eLIaYRB2a5qajjtQYn0hauxvRm16AVYg0= -github.com/onsonr/crypto v1.30.0 h1:1zSKy/zZR0r1iT7d6bwy6/EiiWKNIb7ZhdoRp1tLirU= -github.com/onsonr/crypto v1.30.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0= +github.com/onsonr/crypto v1.31.0 h1:kI5oNIQ84bOfICqJBIxJxPguEPfLPe+kUD6x2QHZTa4= +github.com/onsonr/crypto v1.31.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= diff --git a/internal/dwn/dwn.go b/internal/dwn/dwn.go index cc45a6e10..843cc6bf3 100644 --- a/internal/dwn/dwn.go +++ b/internal/dwn/dwn.go @@ -1,47 +1,17 @@ -//go:build js && wasm -// +build js,wasm - -package main +package dwn import ( "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/internal/dwn/wasm" - - svc "github.com/onsonr/sonr/internal/dwn/handlers" - mdw "github.com/onsonr/sonr/internal/dwn/middleware" - "github.com/onsonr/sonr/internal/dwn/views" + "github.com/onsonr/sonr/internal/dwn/front" + "github.com/onsonr/sonr/internal/dwn/handlers" + "github.com/onsonr/sonr/internal/dwn/middleware" ) -func main() { - e := New() - wasm.Serve(e) -} - -func registerFrontend(e *echo.Echo) { - // Add Public Pages - e.GET("/", views.HomeView) - e.GET("/login", views.LoginView) - e.POST("/login/:identifier", svc.HandleCredentialAssertion) - e.GET("/register", views.RegisterView) - e.POST("/register/:subject", svc.HandleCredentialCreation) - e.POST("/register/:subject/check", svc.CheckSubjectIsValid) - e.GET("/profile", views.ProfileView) -} - -func registerOpenID(g *echo.Group) { - // Add Authenticated Pages - g.Use(mdw.MacaroonMiddleware("test", "test")) - g.GET("/", views.AuthorizeView) - g.GET("/discovery", svc.GetDiscovery) - g.GET("/jwks", svc.GetJWKS) - g.GET("/token", svc.GetToken) - g.POST("/:origin/grant/:subject", svc.GrantAuthorization) -} - -func New() *echo.Echo { +// NewServer creates a new dwn server using echo +func NewServer() *echo.Echo { e := echo.New() - e.Use(mdw.UseSession) - registerFrontend(e) - registerOpenID(e.Group("/authorize")) + e.Use(middleware.UseSession) + front.RegisterViews(e) + handlers.RegisterState(e) return e } diff --git a/internal/dwn/elements/alert.templ b/internal/dwn/front/blocks/alert.templ similarity index 99% rename from internal/dwn/elements/alert.templ rename to internal/dwn/front/blocks/alert.templ index 89f977aea..cc3d580a7 100644 --- a/internal/dwn/elements/alert.templ +++ b/internal/dwn/front/blocks/alert.templ @@ -1,4 +1,4 @@ -package elements +package blocks func Alert(variant Variant, icon Icon, title, message string) templ.Component { return alertElement(variant.Attributes(), title, message, icon.Render()) diff --git a/internal/dwn/elements/alert_templ.go b/internal/dwn/front/blocks/alert_templ.go similarity index 97% rename from internal/dwn/elements/alert_templ.go rename to internal/dwn/front/blocks/alert_templ.go index 92de98b39..8f0ef422d 100644 --- a/internal/dwn/elements/alert_templ.go +++ b/internal/dwn/front/blocks/alert_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.771 -package elements +package blocks //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -53,7 +53,7 @@ func alertElement(attrs templ.Attributes, title, message string, icon templ.Comp var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/dwn/elements/alert.templ`, Line: 10, Col: 66} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/dwn/front/blocks/alert.templ`, Line: 10, Col: 66} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -66,7 +66,7 @@ func alertElement(attrs templ.Attributes, title, message string, icon templ.Comp var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(message) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/dwn/elements/alert.templ`, Line: 11, Col: 43} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `internal/dwn/front/blocks/alert.templ`, Line: 11, Col: 43} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { diff --git a/internal/dwn/elements/animation.templ b/internal/dwn/front/blocks/animation.templ similarity index 92% rename from internal/dwn/elements/animation.templ rename to internal/dwn/front/blocks/animation.templ index 9d7f988ff..8ad519edd 100644 --- a/internal/dwn/elements/animation.templ +++ b/internal/dwn/front/blocks/animation.templ @@ -1,4 +1,4 @@ -package elements +package blocks templ Animation() { diff --git a/internal/dwn/elements/animation_templ.go b/internal/dwn/front/blocks/animation_templ.go similarity index 98% rename from internal/dwn/elements/animation_templ.go rename to internal/dwn/front/blocks/animation_templ.go index facdbf620..65fb99e26 100644 --- a/internal/dwn/elements/animation_templ.go +++ b/internal/dwn/front/blocks/animation_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.771 -package elements +package blocks //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/dwn/elements/badge.templ b/internal/dwn/front/blocks/badge.templ similarity index 99% rename from internal/dwn/elements/badge.templ rename to internal/dwn/front/blocks/badge.templ index af512f4ac..a8ac1584e 100644 --- a/internal/dwn/elements/badge.templ +++ b/internal/dwn/front/blocks/badge.templ @@ -1,4 +1,4 @@ -package elements +package blocks templ PoweredBySonr() {
diff --git a/internal/dwn/elements/badge_templ.go b/internal/dwn/front/blocks/badge_templ.go similarity index 99% rename from internal/dwn/elements/badge_templ.go rename to internal/dwn/front/blocks/badge_templ.go index 7d70a6e32..335ca7cc4 100644 --- a/internal/dwn/elements/badge_templ.go +++ b/internal/dwn/front/blocks/badge_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.771 -package elements +package blocks //lint:file-ignore SA4006 This context is only used if a nested component is present. diff --git a/internal/dwn/elements/elements.go b/internal/dwn/front/blocks/blocks.go similarity index 98% rename from internal/dwn/elements/elements.go rename to internal/dwn/front/blocks/blocks.go index a923c57c7..098e91dcf 100644 --- a/internal/dwn/elements/elements.go +++ b/internal/dwn/front/blocks/blocks.go @@ -1,4 +1,4 @@ -package elements +package blocks import ( "strings" diff --git a/internal/dwn/elements/breadcrumbs.templ b/internal/dwn/front/blocks/breadcrumbs.templ similarity index 99% rename from internal/dwn/elements/breadcrumbs.templ rename to internal/dwn/front/blocks/breadcrumbs.templ index 45eed0d78..86c7b8718 100644 --- a/internal/dwn/elements/breadcrumbs.templ +++ b/internal/dwn/front/blocks/breadcrumbs.templ @@ -1,4 +1,4 @@ -package elements +package blocks templ Breadcrumbs() {