diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 000000000..daf54b777 --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,15 @@ +FROM jetpackio/devbox:latest + +# Installing your devbox project +WORKDIR /code +USER root:root +RUN mkdir -p /code && chown ${DEVBOX_USER}:${DEVBOX_USER} /code +USER ${DEVBOX_USER}:${DEVBOX_USER} +COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.json devbox.json +COPY --chown=${DEVBOX_USER}:${DEVBOX_USER} devbox.lock devbox.lock + + + +RUN devbox run -- echo "Installed Packages." + +RUN devbox shellenv --init-hook >> ~/.profile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 000000000..705e87a92 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,21 @@ +{ + "name": "Devbox Remote Container", + "build": { + "dockerfile": "./Dockerfile", + "context": ".." + }, + "features": { + "ghcr.io/devcontainers/features/sshd:1": { + "version": "latest" + } + }, + "customizations": { + "vscode": { + "settings": {}, + "extensions": [ + "jetpack-io.devbox" + ] + } + }, + "remoteUser": "devbox" +} diff --git a/Makefile b/Makefile index 89a8bc5ae..cdbba0064 100644 --- a/Makefile +++ b/Makefile @@ -296,6 +296,10 @@ sh-testnet: mod-tidy .PHONY: templ-gen pkl-gen +assets-gen: + @echo "(assets) Generating gateway cloudflare workers assets" + go run github.com/syumai/workers/cmd/workers-assets-gen -mode=go -o ./cmd/hway/build + templ-gen: @echo "(templ) Generating templ files" templ generate @@ -306,34 +310,6 @@ pkl-gen: go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/ORM.pkl go run github.com/apple/pkl-go/cmd/pkl-gen-go ./pkl/Txns.pkl - - -############################################################################### -### motr, hway & nebula ### -############################################################################### - -.PHONY: motr-build hway-build nebula-build - -nebula-build: - @echo "(ui) Building nebula" - cd pkg/nebula && bun install && bun run build - -motr-build: nebula-build templ-gen pkl-gen - @echo "(dwn) Building motr.wasm -> Service Worker IPFS Vault" - GOOS=js GOARCH=wasm go build -o ./pkg/dwn/app.wasm ./cmd/motr/main.go - -hway-build: nebula-build templ-gen - @echo "(hway) Building Highway gateway" - GOOS=js GOARCH=wasm go build -o ./cmd/hway/build/app.wasm ./cmd/hway/main.go - -hway-dev: - @echo "(hway) Serving Highway gateway" - bunx wrangler dev - -hway-deploy: - @echo "(hway) Deploying Highway gateway" - bunx wrangler deploy - ############################################################################### ### help ### ############################################################################### diff --git a/README.md b/README.md index 17b863811..d34fd4492 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,23 @@ -
- # `sonr` - Sonr Chain +
+ [![Go Reference](https://pkg.go.dev/badge/github.com/onsonr/sonr.svg)](https://pkg.go.dev/github.com/onsonr/sonr) ![GitHub commit activity](https://img.shields.io/github/commit-activity/w/onsonr/sonr) ![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/onsonr/sonr) [![Static Badge](https://img.shields.io/badge/homepage-sonr.io-blue?style=flat-square)](https://sonr.io) - [![Go Report Card](https://goreportcard.com/badge/github.com/onsonr/sonr)](https://goreportcard.com/report/github.com/onsonr/sonr) [![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=sonrhq_sonr&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr) -
-
+ + +## Overview Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-to-peer identity and asset management system that leverages DID documents, Webauthn, and IPFS—providing users with a secure, portable decentralized identity. -
+## Stats -## Components - -### `sonrd` - -The main blockchain node that runs the `sonr` chain. It is responsible for maintaining the state of the chain, including IPFS based vaults, and did documents. - -### `vault` - -The `vault` is a wasm module that is compiled and deployed to IPFS on behalf of the user. It is responsible for storing and retrieving encrypted data. - -- SQLite Database backend -- Encryption via admonition -- Authentication via webauthn -- Authorization via Macroons -- HTTP API +![Alt](https://repobeats.axiom.co/api/embed/8d0b17e889942889c5b6e632da09bd597efd84c4.svg "Repobeats analytics image") ## Acknowledgements diff --git a/Taskfile.yml b/Taskfile.yml new file mode 100644 index 000000000..e6110bd56 --- /dev/null +++ b/Taskfile.yml @@ -0,0 +1,39 @@ +version: "3" + +vars: + ROOT_DIR: + sh: pwd + +tasks: + hway:build: + dir: cmd/hway + env: + GOOS: js + GOARCH: wasm + cmds: + - go build -o build/app.wasm main.go + + hway:dev: + dir: cmd/hway + cmds: + - bunx wrangler dev + + hway:deploy: + dir: cmd/hway + cmds: + - bunx wrangler deploy + + motr:build: + dir: internal/dwn + env: + GOOS: js + GOARCH: wasm + cmds: + - go build -o app.wasm wasm/main.go + + nebula:build: + dir: pkg/nebula + cmds: + - bun install + - bun run deps.mjs + - bunx tailwindcss -i ./global/styles/globals.css -o ./assets/css/styles.css diff --git a/api/did/module/v1/module.pulsar.go b/api/did/module/v1/module.pulsar.go index 2b23de2d5..56d217580 100644 --- a/api/did/module/v1/module.pulsar.go +++ b/api/did/module/v1/module.pulsar.go @@ -104,9 +104,9 @@ func (x *fastReflection_Module) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -120,9 +120,9 @@ func (x *fastReflection_Module) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -136,9 +136,9 @@ func (x *fastReflection_Module) Get(descriptor protoreflect.FieldDescriptor) pro switch descriptor.FullName() { default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", descriptor.FullName())) } } @@ -156,9 +156,9 @@ func (x *fastReflection_Module) Set(fd protoreflect.FieldDescriptor, value proto switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -176,9 +176,9 @@ func (x *fastReflection_Module) Mutable(fd protoreflect.FieldDescriptor) protore switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -189,9 +189,9 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.sonr.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.module.v1.Module does not contain field %s", fd.FullName())) } } @@ -201,7 +201,7 @@ func (x *fastReflection_Module) NewField(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Module) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.did.module.v1.Module", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.module.v1.Module", d.FullName())) } panic("unreachable") } @@ -414,29 +414,24 @@ var File_did_module_v1_module_proto protoreflect.FileDescriptor var file_did_module_v1_module_proto_rawDesc = []byte{ 0x0a, 0x1a, 0x64, 0x69, 0x64, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, - 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6f, 0x6e, - 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, - 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, - 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, 0x06, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, 0x16, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, - 0x6f, 0x6e, 0x72, 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, - 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, - 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 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, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, - 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x44, 0x4d, 0xaa, 0x02, - 0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x44, 0x69, 0x64, - 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x4f, 0x6e, 0x73, - 0x6f, 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, - 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x5c, - 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, - 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, - 0x1d, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x44, - 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x64, 0x69, + 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x20, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, + 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x28, 0x0a, + 0x06, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x1e, 0xba, 0xc0, 0x96, 0xda, 0x01, 0x18, 0x0a, + 0x16, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, + 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xa9, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, + 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 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, 0x6d, 0x6f, 0x64, + 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x76, 0x31, 0xa2, + 0x02, 0x03, 0x44, 0x4d, 0x58, 0xaa, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x2e, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0d, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x19, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, + 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0f, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, + 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -453,7 +448,7 @@ func file_did_module_v1_module_proto_rawDescGZIP() []byte { var file_did_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_did_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: onsonr.sonr.did.module.v1.Module + (*Module)(nil), // 0: did.module.v1.Module } var file_did_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index a26c4a58e..d3bc3c940 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -9,6 +9,163 @@ import ( ormerrors "cosmossdk.io/orm/types/ormerrors" ) +type AssertionTable interface { + Insert(ctx context.Context, assertion *Assertion) error + Update(ctx context.Context, assertion *Assertion) error + Save(ctx context.Context, assertion *Assertion) error + Delete(ctx context.Context, assertion *Assertion) error + Has(ctx context.Context, did string) (found bool, err error) + // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + Get(ctx context.Context, did string) (*Assertion, error) + HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) + // GetByControllerSubject returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerSubject(ctx context.Context, controller string, subject string) (*Assertion, error) + List(ctx context.Context, prefixKey AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) + ListRange(ctx context.Context, from, to AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) + DeleteBy(ctx context.Context, prefixKey AssertionIndexKey) error + DeleteRange(ctx context.Context, from, to AssertionIndexKey) error + + doNotImplement() +} + +type AssertionIterator struct { + ormtable.Iterator +} + +func (i AssertionIterator) Value() (*Assertion, error) { + var assertion Assertion + err := i.UnmarshalMessage(&assertion) + return &assertion, err +} + +type AssertionIndexKey interface { + id() uint32 + values() []interface{} + assertionIndexKey() +} + +// primary key starting index.. +type AssertionPrimaryKey = AssertionDidIndexKey + +type AssertionDidIndexKey struct { + vs []interface{} +} + +func (x AssertionDidIndexKey) id() uint32 { return 0 } +func (x AssertionDidIndexKey) values() []interface{} { return x.vs } +func (x AssertionDidIndexKey) assertionIndexKey() {} + +func (this AssertionDidIndexKey) WithDid(did string) AssertionDidIndexKey { + this.vs = []interface{}{did} + return this +} + +type AssertionControllerSubjectIndexKey struct { + vs []interface{} +} + +func (x AssertionControllerSubjectIndexKey) id() uint32 { return 1 } +func (x AssertionControllerSubjectIndexKey) values() []interface{} { return x.vs } +func (x AssertionControllerSubjectIndexKey) assertionIndexKey() {} + +func (this AssertionControllerSubjectIndexKey) WithController(controller string) AssertionControllerSubjectIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this AssertionControllerSubjectIndexKey) WithControllerSubject(controller string, subject string) AssertionControllerSubjectIndexKey { + this.vs = []interface{}{controller, subject} + return this +} + +type assertionTable struct { + table ormtable.Table +} + +func (this assertionTable) Insert(ctx context.Context, assertion *Assertion) error { + return this.table.Insert(ctx, assertion) +} + +func (this assertionTable) Update(ctx context.Context, assertion *Assertion) error { + return this.table.Update(ctx, assertion) +} + +func (this assertionTable) Save(ctx context.Context, assertion *Assertion) error { + return this.table.Save(ctx, assertion) +} + +func (this assertionTable) Delete(ctx context.Context, assertion *Assertion) error { + return this.table.Delete(ctx, assertion) +} + +func (this assertionTable) Has(ctx context.Context, did string) (found bool, err error) { + return this.table.PrimaryKey().Has(ctx, did) +} + +func (this assertionTable) Get(ctx context.Context, did string) (*Assertion, error) { + var assertion Assertion + found, err := this.table.PrimaryKey().Get(ctx, &assertion, did) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &assertion, nil +} + +func (this assertionTable) HasByControllerSubject(ctx context.Context, controller string, subject string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + controller, + subject, + ) +} + +func (this assertionTable) GetByControllerSubject(ctx context.Context, controller string, subject string) (*Assertion, error) { + var assertion Assertion + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &assertion, + controller, + subject, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &assertion, nil +} + +func (this assertionTable) List(ctx context.Context, prefixKey AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) { + it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) + return AssertionIterator{it}, err +} + +func (this assertionTable) ListRange(ctx context.Context, from, to AssertionIndexKey, opts ...ormlist.Option) (AssertionIterator, error) { + it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) + return AssertionIterator{it}, err +} + +func (this assertionTable) DeleteBy(ctx context.Context, prefixKey AssertionIndexKey) error { + return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) +} + +func (this assertionTable) DeleteRange(ctx context.Context, from, to AssertionIndexKey) error { + return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) +} + +func (this assertionTable) doNotImplement() {} + +var _ AssertionTable = assertionTable{} + +func NewAssertionTable(db ormtable.Schema) (AssertionTable, error) { + table := db.GetTable(&Assertion{}) + if table == nil { + return nil, ormerrors.TableNotFound.Wrap(string((&Assertion{}).ProtoReflect().Descriptor().FullName())) + } + return assertionTable{table}, nil +} + type AuthenticationTable interface { Insert(ctx context.Context, authentication *Authentication) error Update(ctx context.Context, authentication *Authentication) error @@ -692,6 +849,7 @@ func NewVerificationTable(db ormtable.Schema) (VerificationTable, error) { } type StateStore interface { + AssertionTable() AssertionTable AuthenticationTable() AuthenticationTable ControllerTable() ControllerTable VerificationTable() VerificationTable @@ -700,11 +858,16 @@ type StateStore interface { } type stateStore struct { + assertion AssertionTable authentication AuthenticationTable controller ControllerTable verification VerificationTable } +func (x stateStore) AssertionTable() AssertionTable { + return x.assertion +} + func (x stateStore) AuthenticationTable() AuthenticationTable { return x.authentication } @@ -722,6 +885,11 @@ func (stateStore) doNotImplement() {} var _ StateStore = stateStore{} func NewStateStore(db ormtable.Schema) (StateStore, error) { + assertionTable, err := NewAssertionTable(db) + if err != nil { + return nil, err + } + authenticationTable, err := NewAuthenticationTable(db) if err != nil { return nil, err @@ -738,6 +906,7 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { } return stateStore{ + assertionTable, authenticationTable, controllerTable, verificationTable, diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 226591a1d..bd595c3a5 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -14,6 +14,1051 @@ import ( sync "sync" ) +var _ protoreflect.Map = (*_Assertion_6_map)(nil) + +type _Assertion_6_map struct { + m *map[string][]byte +} + +func (x *_Assertion_6_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_Assertion_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfBytes(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_Assertion_6_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 *_Assertion_6_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_Assertion_6_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfBytes(v) +} + +func (x *_Assertion_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.Bytes() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_Assertion_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_Assertion_6_map) NewValue() protoreflect.Value { + var v []byte + return protoreflect.ValueOfBytes(v) +} + +func (x *_Assertion_6_map) IsValid() bool { + return x.m != nil +} + +var ( + md_Assertion protoreflect.MessageDescriptor + fd_Assertion_did protoreflect.FieldDescriptor + fd_Assertion_controller protoreflect.FieldDescriptor + fd_Assertion_subject protoreflect.FieldDescriptor + fd_Assertion_public_key protoreflect.FieldDescriptor + fd_Assertion_assertion_type protoreflect.FieldDescriptor + fd_Assertion_accumulator protoreflect.FieldDescriptor + fd_Assertion_creation_block protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_state_proto_init() + md_Assertion = File_did_v1_state_proto.Messages().ByName("Assertion") + fd_Assertion_did = md_Assertion.Fields().ByName("did") + fd_Assertion_controller = md_Assertion.Fields().ByName("controller") + fd_Assertion_subject = md_Assertion.Fields().ByName("subject") + fd_Assertion_public_key = md_Assertion.Fields().ByName("public_key") + fd_Assertion_assertion_type = md_Assertion.Fields().ByName("assertion_type") + fd_Assertion_accumulator = md_Assertion.Fields().ByName("accumulator") + fd_Assertion_creation_block = md_Assertion.Fields().ByName("creation_block") +} + +var _ protoreflect.Message = (*fastReflection_Assertion)(nil) + +type fastReflection_Assertion Assertion + +func (x *Assertion) ProtoReflect() protoreflect.Message { + return (*fastReflection_Assertion)(x) +} + +func (x *Assertion) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_state_proto_msgTypes[0] + 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_Assertion_messageType fastReflection_Assertion_messageType +var _ protoreflect.MessageType = fastReflection_Assertion_messageType{} + +type fastReflection_Assertion_messageType struct{} + +func (x fastReflection_Assertion_messageType) Zero() protoreflect.Message { + return (*fastReflection_Assertion)(nil) +} +func (x fastReflection_Assertion_messageType) New() protoreflect.Message { + return new(fastReflection_Assertion) +} +func (x fastReflection_Assertion_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Assertion +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Assertion) Descriptor() protoreflect.MessageDescriptor { + return md_Assertion +} + +// 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_Assertion) Type() protoreflect.MessageType { + return _fastReflection_Assertion_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Assertion) New() protoreflect.Message { + return new(fastReflection_Assertion) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Assertion) Interface() protoreflect.ProtoMessage { + return (*Assertion)(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_Assertion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_Assertion_did, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Assertion_controller, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Assertion_subject, value) { + return + } + } + if x.PublicKey != nil { + value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + if !f(fd_Assertion_public_key, value) { + return + } + } + if x.AssertionType != "" { + value := protoreflect.ValueOfString(x.AssertionType) + if !f(fd_Assertion_assertion_type, value) { + return + } + } + if len(x.Accumulator) != 0 { + value := protoreflect.ValueOfMap(&_Assertion_6_map{m: &x.Accumulator}) + if !f(fd_Assertion_accumulator, value) { + return + } + } + if x.CreationBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.CreationBlock) + if !f(fd_Assertion_creation_block, 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_Assertion) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Assertion.did": + return x.Did != "" + case "did.v1.Assertion.controller": + return x.Controller != "" + case "did.v1.Assertion.subject": + return x.Subject != "" + case "did.v1.Assertion.public_key": + return x.PublicKey != nil + case "did.v1.Assertion.assertion_type": + return x.AssertionType != "" + case "did.v1.Assertion.accumulator": + return len(x.Accumulator) != 0 + case "did.v1.Assertion.creation_block": + return x.CreationBlock != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + } + panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Assertion.did": + x.Did = "" + case "did.v1.Assertion.controller": + x.Controller = "" + case "did.v1.Assertion.subject": + x.Subject = "" + case "did.v1.Assertion.public_key": + x.PublicKey = nil + case "did.v1.Assertion.assertion_type": + x.AssertionType = "" + case "did.v1.Assertion.accumulator": + x.Accumulator = nil + case "did.v1.Assertion.creation_block": + x.CreationBlock = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + } + panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Assertion.did": + value := x.Did + return protoreflect.ValueOfString(value) + case "did.v1.Assertion.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.Assertion.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.Assertion.public_key": + value := x.PublicKey + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Assertion.assertion_type": + value := x.AssertionType + return protoreflect.ValueOfString(value) + case "did.v1.Assertion.accumulator": + if len(x.Accumulator) == 0 { + return protoreflect.ValueOfMap(&_Assertion_6_map{}) + } + mapValue := &_Assertion_6_map{m: &x.Accumulator} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.Assertion.creation_block": + value := x.CreationBlock + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + } + panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Assertion.did": + x.Did = value.Interface().(string) + case "did.v1.Assertion.controller": + x.Controller = value.Interface().(string) + case "did.v1.Assertion.subject": + x.Subject = value.Interface().(string) + case "did.v1.Assertion.public_key": + x.PublicKey = value.Message().Interface().(*PubKey) + case "did.v1.Assertion.assertion_type": + x.AssertionType = value.Interface().(string) + case "did.v1.Assertion.accumulator": + mv := value.Map() + cmv := mv.(*_Assertion_6_map) + x.Accumulator = *cmv.m + case "did.v1.Assertion.creation_block": + x.CreationBlock = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + } + panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Assertion.public_key": + if x.PublicKey == nil { + x.PublicKey = new(PubKey) + } + return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.Assertion.accumulator": + if x.Accumulator == nil { + x.Accumulator = make(map[string][]byte) + } + value := &_Assertion_6_map{m: &x.Accumulator} + return protoreflect.ValueOfMap(value) + case "did.v1.Assertion.did": + panic(fmt.Errorf("field did of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.controller": + panic(fmt.Errorf("field controller of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.subject": + panic(fmt.Errorf("field subject of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.assertion_type": + panic(fmt.Errorf("field assertion_type of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.creation_block": + panic(fmt.Errorf("field creation_block of message did.v1.Assertion is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + } + panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Assertion.did": + return protoreflect.ValueOfString("") + case "did.v1.Assertion.controller": + return protoreflect.ValueOfString("") + case "did.v1.Assertion.subject": + return protoreflect.ValueOfString("") + case "did.v1.Assertion.public_key": + m := new(PubKey) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Assertion.assertion_type": + return protoreflect.ValueOfString("") + case "did.v1.Assertion.accumulator": + m := make(map[string][]byte) + return protoreflect.ValueOfMap(&_Assertion_6_map{m: &m}) + case "did.v1.Assertion.creation_block": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) + } + panic(fmt.Errorf("message did.v1.Assertion 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_Assertion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Assertion", 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_Assertion) 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_Assertion) 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_Assertion) 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_Assertion) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Assertion) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Did) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.PublicKey != nil { + l = options.Size(x.PublicKey) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AssertionType) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Accumulator) > 0 { + SiZeMaP := func(k string, v []byte) { + l = 1 + len(v) + runtime.Sov(uint64(len(v))) + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) + } + if options.Deterministic { + sortme := make([]string, 0, len(x.Accumulator)) + for k := range x.Accumulator { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.Accumulator[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.Accumulator { + SiZeMaP(k, v) + } + } + } + if x.CreationBlock != 0 { + n += 1 + runtime.Sov(uint64(x.CreationBlock)) + } + 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().(*Assertion) + 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.CreationBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.CreationBlock)) + i-- + dAtA[i] = 0x38 + } + if len(x.Accumulator) > 0 { + MaRsHaLmAp := func(k string, v []byte) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x32 + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForAccumulator := make([]string, 0, len(x.Accumulator)) + for k := range x.Accumulator { + keysForAccumulator = append(keysForAccumulator, string(k)) + } + sort.Slice(keysForAccumulator, func(i, j int) bool { + return keysForAccumulator[i] < keysForAccumulator[j] + }) + for iNdEx := len(keysForAccumulator) - 1; iNdEx >= 0; iNdEx-- { + v := x.Accumulator[string(keysForAccumulator[iNdEx])] + out, err := MaRsHaLmAp(keysForAccumulator[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.Accumulator { + v := x.Accumulator[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } + } + } + } + if len(x.AssertionType) > 0 { + i -= len(x.AssertionType) + copy(dAtA[i:], x.AssertionType) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionType))) + i-- + dAtA[i] = 0x2a + } + if x.PublicKey != nil { + encoded, err := options.Marshal(x.PublicKey) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + 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] = 0x12 + } + if len(x.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Assertion) + 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: Assertion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Assertion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", 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.PublicKey == nil { + x.PublicKey = &PubKey{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.PublicKey); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssertionType", 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.AssertionType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulator", 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.Accumulator == nil { + x.Accumulator = make(map[string][]byte) + } + var mapkey string + var mapvalue []byte + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapkey |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var mapbyteLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + mapbyteLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intMapbyteLen := int(mapbyteLen) + if intMapbyteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postbytesIndex := iNdEx + intMapbyteLen + if postbytesIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postbytesIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = make([]byte, mapbyteLen) + copy(mapvalue, dAtA[iNdEx:postbytesIndex]) + iNdEx = postbytesIndex + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + x.Accumulator[mapkey] = mapvalue + iNdEx = postIndex + case 7: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CreationBlock", wireType) + } + x.CreationBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.CreationBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 = (*_Authentication_6_map)(nil) type _Authentication_6_map struct { @@ -128,7 +1173,7 @@ func (x *Authentication) ProtoReflect() protoreflect.Message { } func (x *Authentication) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[0] + mi := &file_did_v1_state_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1095,7 +2140,7 @@ func (x *Controller) ProtoReflect() protoreflect.Message { } func (x *Controller) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[1] + mi := &file_did_v1_state_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2076,7 +3121,7 @@ func (x *Verification) ProtoReflect() protoreflect.Message { } func (x *Verification) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_state_proto_msgTypes[2] + mi := &file_did_v1_state_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3142,6 +4187,96 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type Assertion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // The unique identifier of the assertion + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + // The authentication of the DID + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Origin of the authentication + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + // PubKey is the verification method + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // AssertionType is the assertion type + AssertionType string `protobuf:"bytes,5,opt,name=assertion_type,json=assertionType,proto3" json:"assertion_type,omitempty"` + // Metadata of the authentication + Accumulator map[string][]byte `protobuf:"bytes,6,rep,name=accumulator,proto3" json:"accumulator,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // CreationBlock is the block number of the creation of the authentication + CreationBlock int64 `protobuf:"varint,7,opt,name=creation_block,json=creationBlock,proto3" json:"creation_block,omitempty"` +} + +func (x *Assertion) Reset() { + *x = Assertion{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_state_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Assertion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Assertion) ProtoMessage() {} + +// Deprecated: Use Assertion.ProtoReflect.Descriptor instead. +func (*Assertion) Descriptor() ([]byte, []int) { + return file_did_v1_state_proto_rawDescGZIP(), []int{0} +} + +func (x *Assertion) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +func (x *Assertion) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Assertion) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *Assertion) GetPublicKey() *PubKey { + if x != nil { + return x.PublicKey + } + return nil +} + +func (x *Assertion) GetAssertionType() string { + if x != nil { + return x.AssertionType + } + return "" +} + +func (x *Assertion) GetAccumulator() map[string][]byte { + if x != nil { + return x.Accumulator + } + return nil +} + +func (x *Assertion) GetCreationBlock() int64 { + if x != nil { + return x.CreationBlock + } + return 0 +} + type Authentication struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -3166,7 +4301,7 @@ type Authentication struct { func (x *Authentication) Reset() { *x = Authentication{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[0] + mi := &file_did_v1_state_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3180,7 +4315,7 @@ func (*Authentication) ProtoMessage() {} // Deprecated: Use Authentication.ProtoReflect.Descriptor instead. func (*Authentication) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{0} + return file_did_v1_state_proto_rawDescGZIP(), []int{1} } func (x *Authentication) GetDid() string { @@ -3261,7 +4396,7 @@ type Controller struct { func (x *Controller) Reset() { *x = Controller{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[1] + mi := &file_did_v1_state_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3275,7 +4410,7 @@ func (*Controller) ProtoMessage() {} // Deprecated: Use Controller.ProtoReflect.Descriptor instead. func (*Controller) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{1} + return file_did_v1_state_proto_rawDescGZIP(), []int{2} } func (x *Controller) GetNumber() uint64 { @@ -3370,7 +4505,7 @@ type Verification struct { func (x *Verification) Reset() { *x = Verification{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_state_proto_msgTypes[2] + mi := &file_did_v1_state_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3384,7 +4519,7 @@ func (*Verification) ProtoMessage() {} // Deprecated: Use Verification.ProtoReflect.Descriptor instead. func (*Verification) Descriptor() ([]byte, []int) { - return file_did_v1_state_proto_rawDescGZIP(), []int{2} + return file_did_v1_state_proto_rawDescGZIP(), []int{3} } func (x *Verification) GetDid() string { @@ -3457,97 +4592,121 @@ var file_did_v1_state_proto_rawDesc = []byte{ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6f, 0x72, 0x6d, 0x2f, 0x76, 0x31, 0x2f, 0x6f, 0x72, 0x6d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x81, 0x03, 0x0a, 0x0e, - 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, - 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, - 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, - 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x40, - 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x24, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x85, 0x03, 0x0a, 0x09, + 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x25, 0x0a, 0x0e, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x61, 0x73, + 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x44, 0x0a, 0x0b, 0x61, + 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, + 0x72, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, + 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3e, 0x0a, 0x10, 0x41, 0x63, 0x63, 0x75, + 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x23, + 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, + 0x01, 0x18, 0x01, 0x22, 0x81, 0x03, 0x0a, 0x0e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, + 0x79, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, + 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, + 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0xf2, 0x9e, + 0xd3, 0x8e, 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x12, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x02, 0x22, 0x88, 0x03, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, + 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x6f, 0x6e, 0x72, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x62, 0x74, 0x63, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, + 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, + 0x63, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x73, 0x56, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x63, + 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, - 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x29, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x23, 0x0a, 0x05, 0x0a, 0x03, - 0x64, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x18, 0x01, 0x22, - 0x88, 0x03, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, - 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x06, - 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x6f, 0x6e, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x65, - 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0a, 0x65, 0x74, 0x68, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, - 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x62, 0x74, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2d, 0x0a, - 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, - 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x0a, 0x06, - 0x6b, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6b, 0x73, - 0x56, 0x61, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x64, 0x5f, 0x62, - 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x63, 0x6c, 0x61, 0x69, - 0x6d, 0x65, 0x64, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, - 0x59, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x53, 0x0a, 0x0a, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, - 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0c, 0x73, 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x62, 0x74, - 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x03, 0x18, 0x01, 0x12, 0x09, 0x0a, - 0x03, 0x64, 0x69, 0x64, 0x10, 0x04, 0x18, 0x01, 0x18, 0x02, 0x22, 0x84, 0x04, 0x0a, 0x0c, 0x56, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, - 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, - 0x0a, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x09, 0x64, 0x69, 0x64, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, - 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, - 0x73, 0x75, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, - 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, - 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x0a, - 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, - 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, - 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, - 0x6b, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x71, - 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6b, 0x0a, 0x05, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x0e, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, - 0x01, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x1c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x2c, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, 0x01, 0x12, 0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, - 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, - 0x04, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 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, + 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x3a, 0x59, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x53, 0x0a, + 0x0a, 0x0a, 0x06, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x10, 0x01, 0x12, 0x12, 0x0a, 0x0c, 0x73, + 0x6f, 0x6e, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, + 0x11, 0x0a, 0x0b, 0x65, 0x74, 0x68, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x02, + 0x18, 0x01, 0x12, 0x11, 0x0a, 0x0b, 0x62, 0x74, 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x10, 0x03, 0x18, 0x01, 0x12, 0x09, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x10, 0x04, 0x18, 0x01, + 0x18, 0x03, 0x22, 0x84, 0x04, 0x0a, 0x0c, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x69, 0x64, 0x4d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x2b, 0x0a, 0x11, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x10, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, + 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x71, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x6b, 0x0a, 0x05, + 0x0a, 0x03, 0x64, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x2c, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x10, 0x01, 0x18, 0x01, 0x12, 0x22, 0x0a, 0x1c, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x64, 0x69, 0x64, 0x5f, 0x6d, 0x65, + 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x10, 0x02, 0x18, 0x01, 0x12, + 0x26, 0x0a, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x2c, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x69, 0x73, 0x73, + 0x75, 0x65, 0x72, 0x10, 0x03, 0x18, 0x01, 0x18, 0x04, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, + 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 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 ( @@ -3562,26 +4721,30 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { return file_did_v1_state_proto_rawDescData } -var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 5) +var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Authentication)(nil), // 0: did.v1.Authentication - (*Controller)(nil), // 1: did.v1.Controller - (*Verification)(nil), // 2: did.v1.Verification - nil, // 3: did.v1.Authentication.MetadataEntry - nil, // 4: did.v1.Verification.MetadataEntry - (*PubKey)(nil), // 5: did.v1.PubKey + (*Assertion)(nil), // 0: did.v1.Assertion + (*Authentication)(nil), // 1: did.v1.Authentication + (*Controller)(nil), // 2: did.v1.Controller + (*Verification)(nil), // 3: did.v1.Verification + nil, // 4: did.v1.Assertion.AccumulatorEntry + nil, // 5: did.v1.Authentication.MetadataEntry + nil, // 6: did.v1.Verification.MetadataEntry + (*PubKey)(nil), // 7: did.v1.PubKey } var file_did_v1_state_proto_depIdxs = []int32{ - 5, // 0: did.v1.Authentication.public_key:type_name -> did.v1.PubKey - 3, // 1: did.v1.Authentication.metadata:type_name -> did.v1.Authentication.MetadataEntry - 5, // 2: did.v1.Controller.public_key:type_name -> did.v1.PubKey - 5, // 3: did.v1.Verification.public_key:type_name -> did.v1.PubKey - 4, // 4: did.v1.Verification.metadata:type_name -> did.v1.Verification.MetadataEntry - 5, // [5:5] is the sub-list for method output_type - 5, // [5:5] 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 + 7, // 0: did.v1.Assertion.public_key:type_name -> did.v1.PubKey + 4, // 1: did.v1.Assertion.accumulator:type_name -> did.v1.Assertion.AccumulatorEntry + 7, // 2: did.v1.Authentication.public_key:type_name -> did.v1.PubKey + 5, // 3: did.v1.Authentication.metadata:type_name -> did.v1.Authentication.MetadataEntry + 7, // 4: did.v1.Controller.public_key:type_name -> did.v1.PubKey + 7, // 5: did.v1.Verification.public_key:type_name -> did.v1.PubKey + 6, // 6: did.v1.Verification.metadata:type_name -> did.v1.Verification.MetadataEntry + 7, // [7:7] is the sub-list for method output_type + 7, // [7:7] is the sub-list for method input_type + 7, // [7:7] is the sub-list for extension type_name + 7, // [7:7] is the sub-list for extension extendee + 0, // [0:7] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -3592,7 +4755,7 @@ func file_did_v1_state_proto_init() { file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_state_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Authentication); i { + switch v := v.(*Assertion); i { case 0: return &v.state case 1: @@ -3604,7 +4767,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Controller); i { + switch v := v.(*Authentication); i { case 0: return &v.state case 1: @@ -3616,6 +4779,18 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Controller); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_state_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Verification); i { case 0: return &v.state @@ -3634,7 +4809,7 @@ func file_did_v1_state_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_state_proto_rawDesc, NumEnums: 0, - NumMessages: 5, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index c6daa20b1..d74584bec 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -17,25 +17,33 @@ import ( ) var ( - md_MsgRegisterController protoreflect.MessageDescriptor - fd_MsgRegisterController_authority protoreflect.FieldDescriptor + md_MsgLinkAuthentication protoreflect.MessageDescriptor + fd_MsgLinkAuthentication_controller protoreflect.FieldDescriptor + fd_MsgLinkAuthentication_subject protoreflect.FieldDescriptor + fd_MsgLinkAuthentication_assertion protoreflect.FieldDescriptor + fd_MsgLinkAuthentication_credential_id protoreflect.FieldDescriptor + fd_MsgLinkAuthentication_macaroon_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgRegisterController = File_did_v1_tx_proto.Messages().ByName("MsgRegisterController") - fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") + md_MsgLinkAuthentication = File_did_v1_tx_proto.Messages().ByName("MsgLinkAuthentication") + fd_MsgLinkAuthentication_controller = md_MsgLinkAuthentication.Fields().ByName("controller") + fd_MsgLinkAuthentication_subject = md_MsgLinkAuthentication.Fields().ByName("subject") + fd_MsgLinkAuthentication_assertion = md_MsgLinkAuthentication.Fields().ByName("assertion") + fd_MsgLinkAuthentication_credential_id = md_MsgLinkAuthentication.Fields().ByName("credential_id") + fd_MsgLinkAuthentication_macaroon_token = md_MsgLinkAuthentication.Fields().ByName("macaroon_token") } -var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) +var _ protoreflect.Message = (*fastReflection_MsgLinkAuthentication)(nil) -type fastReflection_MsgRegisterController MsgRegisterController +type fastReflection_MsgLinkAuthentication MsgLinkAuthentication -func (x *MsgRegisterController) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterController)(x) +func (x *MsgLinkAuthentication) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLinkAuthentication)(x) } -func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { +func (x *MsgLinkAuthentication) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -47,43 +55,43 @@ func (x *MsgRegisterController) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgRegisterController_messageType fastReflection_MsgRegisterController_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterController_messageType{} +var _fastReflection_MsgLinkAuthentication_messageType fastReflection_MsgLinkAuthentication_messageType +var _ protoreflect.MessageType = fastReflection_MsgLinkAuthentication_messageType{} -type fastReflection_MsgRegisterController_messageType struct{} +type fastReflection_MsgLinkAuthentication_messageType struct{} -func (x fastReflection_MsgRegisterController_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterController)(nil) +func (x fastReflection_MsgLinkAuthentication_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLinkAuthentication)(nil) } -func (x fastReflection_MsgRegisterController_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterController) +func (x fastReflection_MsgLinkAuthentication_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLinkAuthentication) } -func (x fastReflection_MsgRegisterController_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterController +func (x fastReflection_MsgLinkAuthentication_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAuthentication } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgRegisterController) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterController +func (x *fastReflection_MsgLinkAuthentication) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAuthentication } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterController) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterController_messageType +func (x *fastReflection_MsgLinkAuthentication) Type() protoreflect.MessageType { + return _fastReflection_MsgLinkAuthentication_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterController) New() protoreflect.Message { - return new(fastReflection_MsgRegisterController) +func (x *fastReflection_MsgLinkAuthentication) New() protoreflect.Message { + return new(fastReflection_MsgLinkAuthentication) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterController) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterController)(x) +func (x *fastReflection_MsgLinkAuthentication) Interface() protoreflect.ProtoMessage { + return (*MsgLinkAuthentication)(x) } // Range iterates over every populated field in an undefined order, @@ -91,10 +99,34 @@ func (x *fastReflection_MsgRegisterController) Interface() protoreflect.ProtoMes // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgRegisterController_authority, value) { +func (x *fastReflection_MsgLinkAuthentication) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgLinkAuthentication_controller, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_MsgLinkAuthentication_subject, value) { + return + } + } + if x.Assertion != "" { + value := protoreflect.ValueOfString(x.Assertion) + if !f(fd_MsgLinkAuthentication_assertion, value) { + return + } + } + if len(x.CredentialId) != 0 { + value := protoreflect.ValueOfBytes(x.CredentialId) + if !f(fd_MsgLinkAuthentication_credential_id, value) { + return + } + } + if x.MacaroonToken != "" { + value := protoreflect.ValueOfString(x.MacaroonToken) + if !f(fd_MsgLinkAuthentication_macaroon_token, value) { return } } @@ -111,15 +143,23 @@ func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDe // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgLinkAuthentication) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": - return x.Authority != "" + case "did.v1.MsgLinkAuthentication.controller": + return x.Controller != "" + case "did.v1.MsgLinkAuthentication.subject": + return x.Subject != "" + case "did.v1.MsgLinkAuthentication.assertion": + return x.Assertion != "" + case "did.v1.MsgLinkAuthentication.credential_id": + return len(x.CredentialId) != 0 + case "did.v1.MsgLinkAuthentication.macaroon_token": + return x.MacaroonToken != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthentication")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthentication does not contain field %s", fd.FullName())) } } @@ -129,15 +169,23 @@ func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescript // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgLinkAuthentication) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": - x.Authority = "" + case "did.v1.MsgLinkAuthentication.controller": + x.Controller = "" + case "did.v1.MsgLinkAuthentication.subject": + x.Subject = "" + case "did.v1.MsgLinkAuthentication.assertion": + x.Assertion = "" + case "did.v1.MsgLinkAuthentication.credential_id": + x.CredentialId = nil + case "did.v1.MsgLinkAuthentication.macaroon_token": + x.MacaroonToken = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthentication")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthentication does not contain field %s", fd.FullName())) } } @@ -147,16 +195,28 @@ func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescri // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgLinkAuthentication) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgRegisterController.authority": - value := x.Authority + case "did.v1.MsgLinkAuthentication.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgLinkAuthentication.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.MsgLinkAuthentication.assertion": + value := x.Assertion + return protoreflect.ValueOfString(value) + case "did.v1.MsgLinkAuthentication.credential_id": + value := x.CredentialId + return protoreflect.ValueOfBytes(value) + case "did.v1.MsgLinkAuthentication.macaroon_token": + value := x.MacaroonToken return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthentication")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthentication does not contain field %s", descriptor.FullName())) } } @@ -170,15 +230,23 @@ func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.Field // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgLinkAuthentication) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": - x.Authority = value.Interface().(string) + case "did.v1.MsgLinkAuthentication.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgLinkAuthentication.subject": + x.Subject = value.Interface().(string) + case "did.v1.MsgLinkAuthentication.assertion": + x.Assertion = value.Interface().(string) + case "did.v1.MsgLinkAuthentication.credential_id": + x.CredentialId = value.Bytes() + case "did.v1.MsgLinkAuthentication.macaroon_token": + x.MacaroonToken = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthentication")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthentication does not contain field %s", fd.FullName())) } } @@ -192,40 +260,56 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgLinkAuthentication) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) + case "did.v1.MsgLinkAuthentication.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgLinkAuthentication is not mutable")) + case "did.v1.MsgLinkAuthentication.subject": + panic(fmt.Errorf("field subject of message did.v1.MsgLinkAuthentication is not mutable")) + case "did.v1.MsgLinkAuthentication.assertion": + panic(fmt.Errorf("field assertion of message did.v1.MsgLinkAuthentication is not mutable")) + case "did.v1.MsgLinkAuthentication.credential_id": + panic(fmt.Errorf("field credential_id of message did.v1.MsgLinkAuthentication is not mutable")) + case "did.v1.MsgLinkAuthentication.macaroon_token": + panic(fmt.Errorf("field macaroon_token of message did.v1.MsgLinkAuthentication is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthentication")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthentication does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgLinkAuthentication) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterController.authority": + case "did.v1.MsgLinkAuthentication.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgLinkAuthentication.subject": + return protoreflect.ValueOfString("") + case "did.v1.MsgLinkAuthentication.assertion": + return protoreflect.ValueOfString("") + case "did.v1.MsgLinkAuthentication.credential_id": + return protoreflect.ValueOfBytes(nil) + case "did.v1.MsgLinkAuthentication.macaroon_token": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthentication")) } - panic(fmt.Errorf("message did.v1.MsgRegisterController does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthentication does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterController) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgLinkAuthentication) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterController", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgLinkAuthentication", d.FullName())) } panic("unreachable") } @@ -233,7 +317,7 @@ func (x *fastReflection_MsgRegisterController) WhichOneof(d protoreflect.OneofDe // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterController) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgLinkAuthentication) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -244,7 +328,7 @@ func (x *fastReflection_MsgRegisterController) GetUnknown() protoreflect.RawFiel // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterController) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgLinkAuthentication) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -256,7 +340,7 @@ func (x *fastReflection_MsgRegisterController) SetUnknown(fields protoreflect.Ra // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterController) IsValid() bool { +func (x *fastReflection_MsgLinkAuthentication) IsValid() bool { return x != nil } @@ -266,9 +350,9 @@ func (x *fastReflection_MsgRegisterController) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgLinkAuthentication) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterController) + x := input.Message.Interface().(*MsgLinkAuthentication) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -280,7 +364,23 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method var n int var l int _ = l - l = len(x.Authority) + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Assertion) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.CredentialId) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MacaroonToken) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -294,7 +394,7 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterController) + x := input.Message.Interface().(*MsgLinkAuthentication) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -313,10 +413,38 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + if len(x.MacaroonToken) > 0 { + i -= len(x.MacaroonToken) + copy(dAtA[i:], x.MacaroonToken) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MacaroonToken))) + i-- + dAtA[i] = 0x2a + } + if len(x.CredentialId) > 0 { + i -= len(x.CredentialId) + copy(dAtA[i:], x.CredentialId) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialId))) + i-- + dAtA[i] = 0x22 + } + if len(x.Assertion) > 0 { + i -= len(x.Assertion) + copy(dAtA[i:], x.Assertion) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertion))) + i-- + dAtA[i] = 0x1a + } + if len(x.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) i-- dAtA[i] = 0xa } @@ -331,7 +459,7 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterController) + x := input.Message.Interface().(*MsgLinkAuthentication) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -363,15 +491,15 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLinkAuthentication: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterController: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLinkAuthentication: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + 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 { @@ -399,7 +527,137 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Authority = string(dAtA[iNdEx:postIndex]) + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assertion", 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.Assertion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.CredentialId = append(x.CredentialId[:0], dAtA[iNdEx:postIndex]...) + if x.CredentialId == nil { + x.CredentialId = []byte{} + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MacaroonToken", 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.MacaroonToken = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -437,27 +695,27 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } var ( - md_MsgRegisterControllerResponse protoreflect.MessageDescriptor - fd_MsgRegisterControllerResponse_success protoreflect.FieldDescriptor - fd_MsgRegisterControllerResponse_controller protoreflect.FieldDescriptor + md_MsgLinkAuthenticationResponse protoreflect.MessageDescriptor + fd_MsgLinkAuthenticationResponse_success protoreflect.FieldDescriptor + fd_MsgLinkAuthenticationResponse_did protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgRegisterControllerResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterControllerResponse") - fd_MsgRegisterControllerResponse_success = md_MsgRegisterControllerResponse.Fields().ByName("success") - fd_MsgRegisterControllerResponse_controller = md_MsgRegisterControllerResponse.Fields().ByName("controller") + md_MsgLinkAuthenticationResponse = File_did_v1_tx_proto.Messages().ByName("MsgLinkAuthenticationResponse") + fd_MsgLinkAuthenticationResponse_success = md_MsgLinkAuthenticationResponse.Fields().ByName("success") + fd_MsgLinkAuthenticationResponse_did = md_MsgLinkAuthenticationResponse.Fields().ByName("did") } -var _ protoreflect.Message = (*fastReflection_MsgRegisterControllerResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgLinkAuthenticationResponse)(nil) -type fastReflection_MsgRegisterControllerResponse MsgRegisterControllerResponse +type fastReflection_MsgLinkAuthenticationResponse MsgLinkAuthenticationResponse -func (x *MsgRegisterControllerResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgRegisterControllerResponse)(x) +func (x *MsgLinkAuthenticationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLinkAuthenticationResponse)(x) } -func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgLinkAuthenticationResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -469,43 +727,43 @@ func (x *MsgRegisterControllerResponse) slowProtoReflect() protoreflect.Message return mi.MessageOf(x) } -var _fastReflection_MsgRegisterControllerResponse_messageType fastReflection_MsgRegisterControllerResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgRegisterControllerResponse_messageType{} +var _fastReflection_MsgLinkAuthenticationResponse_messageType fastReflection_MsgLinkAuthenticationResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgLinkAuthenticationResponse_messageType{} -type fastReflection_MsgRegisterControllerResponse_messageType struct{} +type fastReflection_MsgLinkAuthenticationResponse_messageType struct{} -func (x fastReflection_MsgRegisterControllerResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgRegisterControllerResponse)(nil) +func (x fastReflection_MsgLinkAuthenticationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLinkAuthenticationResponse)(nil) } -func (x fastReflection_MsgRegisterControllerResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgRegisterControllerResponse) +func (x fastReflection_MsgLinkAuthenticationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLinkAuthenticationResponse) } -func (x fastReflection_MsgRegisterControllerResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterControllerResponse +func (x fastReflection_MsgLinkAuthenticationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAuthenticationResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgRegisterControllerResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgRegisterControllerResponse +func (x *fastReflection_MsgLinkAuthenticationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAuthenticationResponse } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgRegisterControllerResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgRegisterControllerResponse_messageType +func (x *fastReflection_MsgLinkAuthenticationResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgLinkAuthenticationResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgRegisterControllerResponse) New() protoreflect.Message { - return new(fastReflection_MsgRegisterControllerResponse) +func (x *fastReflection_MsgLinkAuthenticationResponse) New() protoreflect.Message { + return new(fastReflection_MsgLinkAuthenticationResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgRegisterControllerResponse) Interface() protoreflect.ProtoMessage { - return (*MsgRegisterControllerResponse)(x) +func (x *fastReflection_MsgLinkAuthenticationResponse) Interface() protoreflect.ProtoMessage { + return (*MsgLinkAuthenticationResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -513,16 +771,16 @@ func (x *fastReflection_MsgRegisterControllerResponse) Interface() protoreflect. // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgLinkAuthenticationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_MsgRegisterControllerResponse_success, value) { + if !f(fd_MsgLinkAuthenticationResponse_success, value) { return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgRegisterControllerResponse_controller, value) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_MsgLinkAuthenticationResponse_did, value) { return } } @@ -539,17 +797,17 @@ func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgRegisterControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgLinkAuthenticationResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.success": + case "did.v1.MsgLinkAuthenticationResponse.success": return x.Success != false - case "did.v1.MsgRegisterControllerResponse.controller": - return x.Controller != "" + case "did.v1.MsgLinkAuthenticationResponse.did": + return x.Did != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthenticationResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthenticationResponse does not contain field %s", fd.FullName())) } } @@ -559,17 +817,17 @@ func (x *fastReflection_MsgRegisterControllerResponse) Has(fd protoreflect.Field // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgLinkAuthenticationResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.success": + case "did.v1.MsgLinkAuthenticationResponse.success": x.Success = false - case "did.v1.MsgRegisterControllerResponse.controller": - x.Controller = "" + case "did.v1.MsgLinkAuthenticationResponse.did": + x.Did = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthenticationResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthenticationResponse does not contain field %s", fd.FullName())) } } @@ -579,19 +837,19 @@ func (x *fastReflection_MsgRegisterControllerResponse) Clear(fd protoreflect.Fie // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgRegisterControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgLinkAuthenticationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgRegisterControllerResponse.success": + case "did.v1.MsgLinkAuthenticationResponse.success": value := x.Success return protoreflect.ValueOfBool(value) - case "did.v1.MsgRegisterControllerResponse.controller": - value := x.Controller + case "did.v1.MsgLinkAuthenticationResponse.did": + value := x.Did return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthenticationResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthenticationResponse does not contain field %s", descriptor.FullName())) } } @@ -605,17 +863,17 @@ func (x *fastReflection_MsgRegisterControllerResponse) Get(descriptor protorefle // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgLinkAuthenticationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.success": + case "did.v1.MsgLinkAuthenticationResponse.success": x.Success = value.Bool() - case "did.v1.MsgRegisterControllerResponse.controller": - x.Controller = value.Interface().(string) + case "did.v1.MsgLinkAuthenticationResponse.did": + x.Did = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthenticationResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthenticationResponse does not contain field %s", fd.FullName())) } } @@ -629,44 +887,44 @@ func (x *fastReflection_MsgRegisterControllerResponse) Set(fd protoreflect.Field // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgLinkAuthenticationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.success": - panic(fmt.Errorf("field success of message did.v1.MsgRegisterControllerResponse is not mutable")) - case "did.v1.MsgRegisterControllerResponse.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgRegisterControllerResponse is not mutable")) + case "did.v1.MsgLinkAuthenticationResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgLinkAuthenticationResponse is not mutable")) + case "did.v1.MsgLinkAuthenticationResponse.did": + panic(fmt.Errorf("field did of message did.v1.MsgLinkAuthenticationResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthenticationResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthenticationResponse does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgRegisterControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgLinkAuthenticationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterControllerResponse.success": + case "did.v1.MsgLinkAuthenticationResponse.success": return protoreflect.ValueOfBool(false) - case "did.v1.MsgRegisterControllerResponse.controller": + case "did.v1.MsgLinkAuthenticationResponse.did": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAuthenticationResponse")) } - panic(fmt.Errorf("message did.v1.MsgRegisterControllerResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgLinkAuthenticationResponse does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgRegisterControllerResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgLinkAuthenticationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgRegisterControllerResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgLinkAuthenticationResponse", d.FullName())) } panic("unreachable") } @@ -674,7 +932,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) WhichOneof(d protoreflect // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgRegisterControllerResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgLinkAuthenticationResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -685,7 +943,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) GetUnknown() protoreflect // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgRegisterControllerResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgLinkAuthenticationResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -697,7 +955,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) SetUnknown(fields protore // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_MsgRegisterControllerResponse) IsValid() bool { +func (x *fastReflection_MsgLinkAuthenticationResponse) IsValid() bool { return x != nil } @@ -707,9 +965,9 @@ func (x *fastReflection_MsgRegisterControllerResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgLinkAuthenticationResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgRegisterControllerResponse) + x := input.Message.Interface().(*MsgLinkAuthenticationResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -724,7 +982,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac if x.Success { n += 2 } - l = len(x.Controller) + l = len(x.Did) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -738,7 +996,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterControllerResponse) + x := input.Message.Interface().(*MsgLinkAuthenticationResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -757,10 +1015,10 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Controller) > 0 { - i -= len(x.Controller) - copy(dAtA[i:], x.Controller) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + 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] = 0x12 } @@ -785,7 +1043,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgRegisterControllerResponse) + x := input.Message.Interface().(*MsgLinkAuthenticationResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -817,10 +1075,10 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLinkAuthenticationResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgRegisterControllerResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLinkAuthenticationResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -844,6 +1102,522 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } x.Success = bool(v != 0) case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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_MsgLinkAssertion protoreflect.MessageDescriptor + fd_MsgLinkAssertion_controller protoreflect.FieldDescriptor + fd_MsgLinkAssertion_subject protoreflect.FieldDescriptor + fd_MsgLinkAssertion_assertion protoreflect.FieldDescriptor + fd_MsgLinkAssertion_macaroon_token protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgLinkAssertion = File_did_v1_tx_proto.Messages().ByName("MsgLinkAssertion") + fd_MsgLinkAssertion_controller = md_MsgLinkAssertion.Fields().ByName("controller") + fd_MsgLinkAssertion_subject = md_MsgLinkAssertion.Fields().ByName("subject") + fd_MsgLinkAssertion_assertion = md_MsgLinkAssertion.Fields().ByName("assertion") + fd_MsgLinkAssertion_macaroon_token = md_MsgLinkAssertion.Fields().ByName("macaroon_token") +} + +var _ protoreflect.Message = (*fastReflection_MsgLinkAssertion)(nil) + +type fastReflection_MsgLinkAssertion MsgLinkAssertion + +func (x *MsgLinkAssertion) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLinkAssertion)(x) +} + +func (x *MsgLinkAssertion) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLinkAssertion_messageType fastReflection_MsgLinkAssertion_messageType +var _ protoreflect.MessageType = fastReflection_MsgLinkAssertion_messageType{} + +type fastReflection_MsgLinkAssertion_messageType struct{} + +func (x fastReflection_MsgLinkAssertion_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLinkAssertion)(nil) +} +func (x fastReflection_MsgLinkAssertion_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLinkAssertion) +} +func (x fastReflection_MsgLinkAssertion_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAssertion +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLinkAssertion) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAssertion +} + +// 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_MsgLinkAssertion) Type() protoreflect.MessageType { + return _fastReflection_MsgLinkAssertion_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLinkAssertion) New() protoreflect.Message { + return new(fastReflection_MsgLinkAssertion) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLinkAssertion) Interface() protoreflect.ProtoMessage { + return (*MsgLinkAssertion)(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_MsgLinkAssertion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgLinkAssertion_controller, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_MsgLinkAssertion_subject, value) { + return + } + } + if x.Assertion != "" { + value := protoreflect.ValueOfString(x.Assertion) + if !f(fd_MsgLinkAssertion_assertion, value) { + return + } + } + if x.MacaroonToken != "" { + value := protoreflect.ValueOfString(x.MacaroonToken) + if !f(fd_MsgLinkAssertion_macaroon_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_MsgLinkAssertion) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgLinkAssertion.controller": + return x.Controller != "" + case "did.v1.MsgLinkAssertion.subject": + return x.Subject != "" + case "did.v1.MsgLinkAssertion.assertion": + return x.Assertion != "" + case "did.v1.MsgLinkAssertion.macaroon_token": + return x.MacaroonToken != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertion 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_MsgLinkAssertion) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgLinkAssertion.controller": + x.Controller = "" + case "did.v1.MsgLinkAssertion.subject": + x.Subject = "" + case "did.v1.MsgLinkAssertion.assertion": + x.Assertion = "" + case "did.v1.MsgLinkAssertion.macaroon_token": + x.MacaroonToken = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertion 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_MsgLinkAssertion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgLinkAssertion.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgLinkAssertion.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.MsgLinkAssertion.assertion": + value := x.Assertion + return protoreflect.ValueOfString(value) + case "did.v1.MsgLinkAssertion.macaroon_token": + value := x.MacaroonToken + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertion 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_MsgLinkAssertion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgLinkAssertion.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgLinkAssertion.subject": + x.Subject = value.Interface().(string) + case "did.v1.MsgLinkAssertion.assertion": + x.Assertion = value.Interface().(string) + case "did.v1.MsgLinkAssertion.macaroon_token": + x.MacaroonToken = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertion 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_MsgLinkAssertion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgLinkAssertion.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgLinkAssertion is not mutable")) + case "did.v1.MsgLinkAssertion.subject": + panic(fmt.Errorf("field subject of message did.v1.MsgLinkAssertion is not mutable")) + case "did.v1.MsgLinkAssertion.assertion": + panic(fmt.Errorf("field assertion of message did.v1.MsgLinkAssertion is not mutable")) + case "did.v1.MsgLinkAssertion.macaroon_token": + panic(fmt.Errorf("field macaroon_token of message did.v1.MsgLinkAssertion is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertion 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_MsgLinkAssertion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgLinkAssertion.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgLinkAssertion.subject": + return protoreflect.ValueOfString("") + case "did.v1.MsgLinkAssertion.assertion": + return protoreflect.ValueOfString("") + case "did.v1.MsgLinkAssertion.macaroon_token": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertion 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_MsgLinkAssertion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgLinkAssertion", 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_MsgLinkAssertion) 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_MsgLinkAssertion) 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_MsgLinkAssertion) 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_MsgLinkAssertion) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLinkAssertion) + 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.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Assertion) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MacaroonToken) + 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().(*MsgLinkAssertion) + 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.MacaroonToken) > 0 { + i -= len(x.MacaroonToken) + copy(dAtA[i:], x.MacaroonToken) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MacaroonToken))) + i-- + dAtA[i] = 0x22 + } + if len(x.Assertion) > 0 { + i -= len(x.Assertion) + copy(dAtA[i:], x.Assertion) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Assertion))) + i-- + dAtA[i] = 0x1a + } + if len(x.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(x.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().(*MsgLinkAssertion) + 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: MsgLinkAssertion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLinkAssertion: 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) } @@ -875,6 +1649,576 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Assertion", 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.Assertion = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MacaroonToken", 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.MacaroonToken = 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_MsgLinkAssertionResponse protoreflect.MessageDescriptor + fd_MsgLinkAssertionResponse_success protoreflect.FieldDescriptor + fd_MsgLinkAssertionResponse_did protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgLinkAssertionResponse = File_did_v1_tx_proto.Messages().ByName("MsgLinkAssertionResponse") + fd_MsgLinkAssertionResponse_success = md_MsgLinkAssertionResponse.Fields().ByName("success") + fd_MsgLinkAssertionResponse_did = md_MsgLinkAssertionResponse.Fields().ByName("did") +} + +var _ protoreflect.Message = (*fastReflection_MsgLinkAssertionResponse)(nil) + +type fastReflection_MsgLinkAssertionResponse MsgLinkAssertionResponse + +func (x *MsgLinkAssertionResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgLinkAssertionResponse)(x) +} + +func (x *MsgLinkAssertionResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgLinkAssertionResponse_messageType fastReflection_MsgLinkAssertionResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgLinkAssertionResponse_messageType{} + +type fastReflection_MsgLinkAssertionResponse_messageType struct{} + +func (x fastReflection_MsgLinkAssertionResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgLinkAssertionResponse)(nil) +} +func (x fastReflection_MsgLinkAssertionResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgLinkAssertionResponse) +} +func (x fastReflection_MsgLinkAssertionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAssertionResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgLinkAssertionResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgLinkAssertionResponse +} + +// 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_MsgLinkAssertionResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgLinkAssertionResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgLinkAssertionResponse) New() protoreflect.Message { + return new(fastReflection_MsgLinkAssertionResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgLinkAssertionResponse) Interface() protoreflect.ProtoMessage { + return (*MsgLinkAssertionResponse)(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_MsgLinkAssertionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgLinkAssertionResponse_success, value) { + return + } + } + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_MsgLinkAssertionResponse_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_MsgLinkAssertionResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgLinkAssertionResponse.success": + return x.Success != false + case "did.v1.MsgLinkAssertionResponse.did": + return x.Did != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertionResponse 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_MsgLinkAssertionResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgLinkAssertionResponse.success": + x.Success = false + case "did.v1.MsgLinkAssertionResponse.did": + x.Did = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertionResponse 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_MsgLinkAssertionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgLinkAssertionResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.MsgLinkAssertionResponse.did": + value := x.Did + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertionResponse 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_MsgLinkAssertionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgLinkAssertionResponse.success": + x.Success = value.Bool() + case "did.v1.MsgLinkAssertionResponse.did": + x.Did = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertionResponse 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_MsgLinkAssertionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgLinkAssertionResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgLinkAssertionResponse is not mutable")) + case "did.v1.MsgLinkAssertionResponse.did": + panic(fmt.Errorf("field did of message did.v1.MsgLinkAssertionResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertionResponse 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_MsgLinkAssertionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgLinkAssertionResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.MsgLinkAssertionResponse.did": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgLinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgLinkAssertionResponse 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_MsgLinkAssertionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgLinkAssertionResponse", 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_MsgLinkAssertionResponse) 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_MsgLinkAssertionResponse) 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_MsgLinkAssertionResponse) 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_MsgLinkAssertionResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgLinkAssertionResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + l = len(x.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().(*MsgLinkAssertionResponse) + 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] = 0x12 + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgLinkAssertionResponse) + 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: MsgLinkAssertionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgLinkAssertionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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:]) @@ -1016,7 +2360,7 @@ func (x *MsgExecuteTx) ProtoReflect() protoreflect.Message { } func (x *MsgExecuteTx) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[2] + mi := &file_did_v1_tx_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1722,7 +3066,7 @@ func (x *MsgExecuteTxResponse) ProtoReflect() protoreflect.Message { } func (x *MsgExecuteTxResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[3] + mi := &file_did_v1_tx_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2174,6 +3518,2050 @@ func (x *fastReflection_MsgExecuteTxResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_MsgUnlinkAssertion protoreflect.MessageDescriptor + fd_MsgUnlinkAssertion_controller protoreflect.FieldDescriptor + fd_MsgUnlinkAssertion_assertion_did protoreflect.FieldDescriptor + fd_MsgUnlinkAssertion_macaroon_token protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgUnlinkAssertion = File_did_v1_tx_proto.Messages().ByName("MsgUnlinkAssertion") + fd_MsgUnlinkAssertion_controller = md_MsgUnlinkAssertion.Fields().ByName("controller") + fd_MsgUnlinkAssertion_assertion_did = md_MsgUnlinkAssertion.Fields().ByName("assertion_did") + fd_MsgUnlinkAssertion_macaroon_token = md_MsgUnlinkAssertion.Fields().ByName("macaroon_token") +} + +var _ protoreflect.Message = (*fastReflection_MsgUnlinkAssertion)(nil) + +type fastReflection_MsgUnlinkAssertion MsgUnlinkAssertion + +func (x *MsgUnlinkAssertion) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUnlinkAssertion)(x) +} + +func (x *MsgUnlinkAssertion) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUnlinkAssertion_messageType fastReflection_MsgUnlinkAssertion_messageType +var _ protoreflect.MessageType = fastReflection_MsgUnlinkAssertion_messageType{} + +type fastReflection_MsgUnlinkAssertion_messageType struct{} + +func (x fastReflection_MsgUnlinkAssertion_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUnlinkAssertion)(nil) +} +func (x fastReflection_MsgUnlinkAssertion_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAssertion) +} +func (x fastReflection_MsgUnlinkAssertion_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAssertion +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUnlinkAssertion) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAssertion +} + +// 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_MsgUnlinkAssertion) Type() protoreflect.MessageType { + return _fastReflection_MsgUnlinkAssertion_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUnlinkAssertion) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAssertion) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUnlinkAssertion) Interface() protoreflect.ProtoMessage { + return (*MsgUnlinkAssertion)(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_MsgUnlinkAssertion) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgUnlinkAssertion_controller, value) { + return + } + } + if x.AssertionDid != "" { + value := protoreflect.ValueOfString(x.AssertionDid) + if !f(fd_MsgUnlinkAssertion_assertion_did, value) { + return + } + } + if x.MacaroonToken != "" { + value := protoreflect.ValueOfString(x.MacaroonToken) + if !f(fd_MsgUnlinkAssertion_macaroon_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_MsgUnlinkAssertion) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertion.controller": + return x.Controller != "" + case "did.v1.MsgUnlinkAssertion.assertion_did": + return x.AssertionDid != "" + case "did.v1.MsgUnlinkAssertion.macaroon_token": + return x.MacaroonToken != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertion 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_MsgUnlinkAssertion) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertion.controller": + x.Controller = "" + case "did.v1.MsgUnlinkAssertion.assertion_did": + x.AssertionDid = "" + case "did.v1.MsgUnlinkAssertion.macaroon_token": + x.MacaroonToken = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertion 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_MsgUnlinkAssertion) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgUnlinkAssertion.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgUnlinkAssertion.assertion_did": + value := x.AssertionDid + return protoreflect.ValueOfString(value) + case "did.v1.MsgUnlinkAssertion.macaroon_token": + value := x.MacaroonToken + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertion 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_MsgUnlinkAssertion) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertion.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgUnlinkAssertion.assertion_did": + x.AssertionDid = value.Interface().(string) + case "did.v1.MsgUnlinkAssertion.macaroon_token": + x.MacaroonToken = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertion 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_MsgUnlinkAssertion) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertion.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgUnlinkAssertion is not mutable")) + case "did.v1.MsgUnlinkAssertion.assertion_did": + panic(fmt.Errorf("field assertion_did of message did.v1.MsgUnlinkAssertion is not mutable")) + case "did.v1.MsgUnlinkAssertion.macaroon_token": + panic(fmt.Errorf("field macaroon_token of message did.v1.MsgUnlinkAssertion is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertion 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_MsgUnlinkAssertion) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertion.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgUnlinkAssertion.assertion_did": + return protoreflect.ValueOfString("") + case "did.v1.MsgUnlinkAssertion.macaroon_token": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertion")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertion 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_MsgUnlinkAssertion) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUnlinkAssertion", 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_MsgUnlinkAssertion) 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_MsgUnlinkAssertion) 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_MsgUnlinkAssertion) 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_MsgUnlinkAssertion) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUnlinkAssertion) + 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.AssertionDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MacaroonToken) + 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().(*MsgUnlinkAssertion) + 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.MacaroonToken) > 0 { + i -= len(x.MacaroonToken) + copy(dAtA[i:], x.MacaroonToken) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MacaroonToken))) + i-- + dAtA[i] = 0x1a + } + if len(x.AssertionDid) > 0 { + i -= len(x.AssertionDid) + copy(dAtA[i:], x.AssertionDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssertionDid))) + i-- + dAtA[i] = 0x12 + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUnlinkAssertion) + 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: MsgUnlinkAssertion: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlinkAssertion: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssertionDid", 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.AssertionDid = 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 MacaroonToken", 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.MacaroonToken = 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_MsgUnlinkAssertionResponse protoreflect.MessageDescriptor + fd_MsgUnlinkAssertionResponse_success protoreflect.FieldDescriptor + fd_MsgUnlinkAssertionResponse_did protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgUnlinkAssertionResponse = File_did_v1_tx_proto.Messages().ByName("MsgUnlinkAssertionResponse") + fd_MsgUnlinkAssertionResponse_success = md_MsgUnlinkAssertionResponse.Fields().ByName("success") + fd_MsgUnlinkAssertionResponse_did = md_MsgUnlinkAssertionResponse.Fields().ByName("did") +} + +var _ protoreflect.Message = (*fastReflection_MsgUnlinkAssertionResponse)(nil) + +type fastReflection_MsgUnlinkAssertionResponse MsgUnlinkAssertionResponse + +func (x *MsgUnlinkAssertionResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUnlinkAssertionResponse)(x) +} + +func (x *MsgUnlinkAssertionResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[7] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUnlinkAssertionResponse_messageType fastReflection_MsgUnlinkAssertionResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUnlinkAssertionResponse_messageType{} + +type fastReflection_MsgUnlinkAssertionResponse_messageType struct{} + +func (x fastReflection_MsgUnlinkAssertionResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUnlinkAssertionResponse)(nil) +} +func (x fastReflection_MsgUnlinkAssertionResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAssertionResponse) +} +func (x fastReflection_MsgUnlinkAssertionResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAssertionResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUnlinkAssertionResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAssertionResponse +} + +// 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_MsgUnlinkAssertionResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUnlinkAssertionResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUnlinkAssertionResponse) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAssertionResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUnlinkAssertionResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUnlinkAssertionResponse)(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_MsgUnlinkAssertionResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgUnlinkAssertionResponse_success, value) { + return + } + } + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_MsgUnlinkAssertionResponse_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_MsgUnlinkAssertionResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertionResponse.success": + return x.Success != false + case "did.v1.MsgUnlinkAssertionResponse.did": + return x.Did != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertionResponse 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_MsgUnlinkAssertionResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertionResponse.success": + x.Success = false + case "did.v1.MsgUnlinkAssertionResponse.did": + x.Did = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertionResponse 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_MsgUnlinkAssertionResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgUnlinkAssertionResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.MsgUnlinkAssertionResponse.did": + value := x.Did + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertionResponse 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_MsgUnlinkAssertionResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertionResponse.success": + x.Success = value.Bool() + case "did.v1.MsgUnlinkAssertionResponse.did": + x.Did = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertionResponse 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_MsgUnlinkAssertionResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertionResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgUnlinkAssertionResponse is not mutable")) + case "did.v1.MsgUnlinkAssertionResponse.did": + panic(fmt.Errorf("field did of message did.v1.MsgUnlinkAssertionResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertionResponse 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_MsgUnlinkAssertionResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAssertionResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.MsgUnlinkAssertionResponse.did": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAssertionResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAssertionResponse 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_MsgUnlinkAssertionResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUnlinkAssertionResponse", 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_MsgUnlinkAssertionResponse) 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_MsgUnlinkAssertionResponse) 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_MsgUnlinkAssertionResponse) 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_MsgUnlinkAssertionResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUnlinkAssertionResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + l = len(x.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().(*MsgUnlinkAssertionResponse) + 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] = 0x12 + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUnlinkAssertionResponse) + 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: MsgUnlinkAssertionResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlinkAssertionResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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_MsgUnlinkAuthentication protoreflect.MessageDescriptor + fd_MsgUnlinkAuthentication_controller protoreflect.FieldDescriptor + fd_MsgUnlinkAuthentication_authentication_did protoreflect.FieldDescriptor + fd_MsgUnlinkAuthentication_macaroon_token protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgUnlinkAuthentication = File_did_v1_tx_proto.Messages().ByName("MsgUnlinkAuthentication") + fd_MsgUnlinkAuthentication_controller = md_MsgUnlinkAuthentication.Fields().ByName("controller") + fd_MsgUnlinkAuthentication_authentication_did = md_MsgUnlinkAuthentication.Fields().ByName("authentication_did") + fd_MsgUnlinkAuthentication_macaroon_token = md_MsgUnlinkAuthentication.Fields().ByName("macaroon_token") +} + +var _ protoreflect.Message = (*fastReflection_MsgUnlinkAuthentication)(nil) + +type fastReflection_MsgUnlinkAuthentication MsgUnlinkAuthentication + +func (x *MsgUnlinkAuthentication) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUnlinkAuthentication)(x) +} + +func (x *MsgUnlinkAuthentication) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUnlinkAuthentication_messageType fastReflection_MsgUnlinkAuthentication_messageType +var _ protoreflect.MessageType = fastReflection_MsgUnlinkAuthentication_messageType{} + +type fastReflection_MsgUnlinkAuthentication_messageType struct{} + +func (x fastReflection_MsgUnlinkAuthentication_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUnlinkAuthentication)(nil) +} +func (x fastReflection_MsgUnlinkAuthentication_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAuthentication) +} +func (x fastReflection_MsgUnlinkAuthentication_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAuthentication +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUnlinkAuthentication) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAuthentication +} + +// 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_MsgUnlinkAuthentication) Type() protoreflect.MessageType { + return _fastReflection_MsgUnlinkAuthentication_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUnlinkAuthentication) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAuthentication) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUnlinkAuthentication) Interface() protoreflect.ProtoMessage { + return (*MsgUnlinkAuthentication)(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_MsgUnlinkAuthentication) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgUnlinkAuthentication_controller, value) { + return + } + } + if x.AuthenticationDid != "" { + value := protoreflect.ValueOfString(x.AuthenticationDid) + if !f(fd_MsgUnlinkAuthentication_authentication_did, value) { + return + } + } + if x.MacaroonToken != "" { + value := protoreflect.ValueOfString(x.MacaroonToken) + if !f(fd_MsgUnlinkAuthentication_macaroon_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_MsgUnlinkAuthentication) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthentication.controller": + return x.Controller != "" + case "did.v1.MsgUnlinkAuthentication.authentication_did": + return x.AuthenticationDid != "" + case "did.v1.MsgUnlinkAuthentication.macaroon_token": + return x.MacaroonToken != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthentication")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthentication 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_MsgUnlinkAuthentication) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthentication.controller": + x.Controller = "" + case "did.v1.MsgUnlinkAuthentication.authentication_did": + x.AuthenticationDid = "" + case "did.v1.MsgUnlinkAuthentication.macaroon_token": + x.MacaroonToken = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthentication")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthentication 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_MsgUnlinkAuthentication) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgUnlinkAuthentication.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgUnlinkAuthentication.authentication_did": + value := x.AuthenticationDid + return protoreflect.ValueOfString(value) + case "did.v1.MsgUnlinkAuthentication.macaroon_token": + value := x.MacaroonToken + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthentication")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthentication 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_MsgUnlinkAuthentication) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthentication.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgUnlinkAuthentication.authentication_did": + x.AuthenticationDid = value.Interface().(string) + case "did.v1.MsgUnlinkAuthentication.macaroon_token": + x.MacaroonToken = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthentication")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthentication 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_MsgUnlinkAuthentication) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthentication.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgUnlinkAuthentication is not mutable")) + case "did.v1.MsgUnlinkAuthentication.authentication_did": + panic(fmt.Errorf("field authentication_did of message did.v1.MsgUnlinkAuthentication is not mutable")) + case "did.v1.MsgUnlinkAuthentication.macaroon_token": + panic(fmt.Errorf("field macaroon_token of message did.v1.MsgUnlinkAuthentication is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthentication")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthentication 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_MsgUnlinkAuthentication) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthentication.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgUnlinkAuthentication.authentication_did": + return protoreflect.ValueOfString("") + case "did.v1.MsgUnlinkAuthentication.macaroon_token": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthentication")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthentication 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_MsgUnlinkAuthentication) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUnlinkAuthentication", 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_MsgUnlinkAuthentication) 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_MsgUnlinkAuthentication) 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_MsgUnlinkAuthentication) 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_MsgUnlinkAuthentication) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUnlinkAuthentication) + 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.AuthenticationDid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MacaroonToken) + 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().(*MsgUnlinkAuthentication) + 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.MacaroonToken) > 0 { + i -= len(x.MacaroonToken) + copy(dAtA[i:], x.MacaroonToken) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MacaroonToken))) + i-- + dAtA[i] = 0x1a + } + if len(x.AuthenticationDid) > 0 { + i -= len(x.AuthenticationDid) + copy(dAtA[i:], x.AuthenticationDid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthenticationDid))) + i-- + dAtA[i] = 0x12 + } + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUnlinkAuthentication) + 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: MsgUnlinkAuthentication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlinkAuthentication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AuthenticationDid", 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.AuthenticationDid = 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 MacaroonToken", 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.MacaroonToken = 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_MsgUnlinkAuthenticationResponse protoreflect.MessageDescriptor + fd_MsgUnlinkAuthenticationResponse_success protoreflect.FieldDescriptor + fd_MsgUnlinkAuthenticationResponse_did protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgUnlinkAuthenticationResponse = File_did_v1_tx_proto.Messages().ByName("MsgUnlinkAuthenticationResponse") + fd_MsgUnlinkAuthenticationResponse_success = md_MsgUnlinkAuthenticationResponse.Fields().ByName("success") + fd_MsgUnlinkAuthenticationResponse_did = md_MsgUnlinkAuthenticationResponse.Fields().ByName("did") +} + +var _ protoreflect.Message = (*fastReflection_MsgUnlinkAuthenticationResponse)(nil) + +type fastReflection_MsgUnlinkAuthenticationResponse MsgUnlinkAuthenticationResponse + +func (x *MsgUnlinkAuthenticationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUnlinkAuthenticationResponse)(x) +} + +func (x *MsgUnlinkAuthenticationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUnlinkAuthenticationResponse_messageType fastReflection_MsgUnlinkAuthenticationResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUnlinkAuthenticationResponse_messageType{} + +type fastReflection_MsgUnlinkAuthenticationResponse_messageType struct{} + +func (x fastReflection_MsgUnlinkAuthenticationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUnlinkAuthenticationResponse)(nil) +} +func (x fastReflection_MsgUnlinkAuthenticationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAuthenticationResponse) +} +func (x fastReflection_MsgUnlinkAuthenticationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAuthenticationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUnlinkAuthenticationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUnlinkAuthenticationResponse +} + +// 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_MsgUnlinkAuthenticationResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUnlinkAuthenticationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUnlinkAuthenticationResponse) New() protoreflect.Message { + return new(fastReflection_MsgUnlinkAuthenticationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUnlinkAuthenticationResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUnlinkAuthenticationResponse)(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_MsgUnlinkAuthenticationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgUnlinkAuthenticationResponse_success, value) { + return + } + } + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_MsgUnlinkAuthenticationResponse_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_MsgUnlinkAuthenticationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthenticationResponse.success": + return x.Success != false + case "did.v1.MsgUnlinkAuthenticationResponse.did": + return x.Did != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthenticationResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthenticationResponse 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_MsgUnlinkAuthenticationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthenticationResponse.success": + x.Success = false + case "did.v1.MsgUnlinkAuthenticationResponse.did": + x.Did = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthenticationResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthenticationResponse 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_MsgUnlinkAuthenticationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgUnlinkAuthenticationResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.MsgUnlinkAuthenticationResponse.did": + value := x.Did + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthenticationResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthenticationResponse 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_MsgUnlinkAuthenticationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthenticationResponse.success": + x.Success = value.Bool() + case "did.v1.MsgUnlinkAuthenticationResponse.did": + x.Did = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthenticationResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthenticationResponse 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_MsgUnlinkAuthenticationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthenticationResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgUnlinkAuthenticationResponse is not mutable")) + case "did.v1.MsgUnlinkAuthenticationResponse.did": + panic(fmt.Errorf("field did of message did.v1.MsgUnlinkAuthenticationResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthenticationResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthenticationResponse 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_MsgUnlinkAuthenticationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgUnlinkAuthenticationResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.MsgUnlinkAuthenticationResponse.did": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUnlinkAuthenticationResponse")) + } + panic(fmt.Errorf("message did.v1.MsgUnlinkAuthenticationResponse 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_MsgUnlinkAuthenticationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgUnlinkAuthenticationResponse", 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_MsgUnlinkAuthenticationResponse) 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_MsgUnlinkAuthenticationResponse) 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_MsgUnlinkAuthenticationResponse) 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_MsgUnlinkAuthenticationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUnlinkAuthenticationResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + l = len(x.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().(*MsgUnlinkAuthenticationResponse) + 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] = 0x12 + } + if x.Success { + i-- + if x.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUnlinkAuthenticationResponse) + 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: MsgUnlinkAuthenticationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUnlinkAuthenticationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor @@ -2198,7 +5586,7 @@ func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[4] + mi := &file_did_v1_tx_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2755,7 +6143,7 @@ func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { } func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[5] + mi := &file_did_v1_tx_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3106,18 +6494,26 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgRegisterController is the message type for the InitializeController RPC. -type MsgRegisterController struct { +// MsgLinkAuthentication is the message type for the LinkAuthentication RPC. +type MsgLinkAuthentication struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Subject is the subject of the authentication. + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // Assertion is the assertion of the authentication. + Assertion string `protobuf:"bytes,3,opt,name=assertion,proto3" json:"assertion,omitempty"` + // Authentication is the authentication of the authentication. + CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + // token is the macron token to authenticate the operation. + MacaroonToken string `protobuf:"bytes,5,opt,name=macaroon_token,json=macaroonToken,proto3" json:"macaroon_token,omitempty"` } -func (x *MsgRegisterController) Reset() { - *x = MsgRegisterController{} +func (x *MsgLinkAuthentication) Reset() { + *x = MsgLinkAuthentication{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3125,27 +6521,55 @@ func (x *MsgRegisterController) Reset() { } } -func (x *MsgRegisterController) String() string { +func (x *MsgLinkAuthentication) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgRegisterController) ProtoMessage() {} +func (*MsgLinkAuthentication) ProtoMessage() {} -// Deprecated: Use MsgRegisterController.ProtoReflect.Descriptor instead. -func (*MsgRegisterController) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgLinkAuthentication.ProtoReflect.Descriptor instead. +func (*MsgLinkAuthentication) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{0} } -func (x *MsgRegisterController) GetAuthority() string { +func (x *MsgLinkAuthentication) GetController() string { if x != nil { - return x.Authority + return x.Controller } return "" } -// MsgRegisterControllerResponse is the response type for the -// InitializeController RPC. -type MsgRegisterControllerResponse struct { +func (x *MsgLinkAuthentication) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *MsgLinkAuthentication) GetAssertion() string { + if x != nil { + return x.Assertion + } + return "" +} + +func (x *MsgLinkAuthentication) GetCredentialId() []byte { + if x != nil { + return x.CredentialId + } + return nil +} + +func (x *MsgLinkAuthentication) GetMacaroonToken() string { + if x != nil { + return x.MacaroonToken + } + return "" +} + +// MsgLinkAuthenticationResponse is the response type for the +// LinkAuthentication RPC. +type MsgLinkAuthenticationResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -3154,11 +6578,11 @@ type MsgRegisterControllerResponse struct { // encrypted. Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // Controller is the address of the initialized controller. - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` } -func (x *MsgRegisterControllerResponse) Reset() { - *x = MsgRegisterControllerResponse{} +func (x *MsgLinkAuthenticationResponse) Reset() { + *x = MsgLinkAuthenticationResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -3166,31 +6590,143 @@ func (x *MsgRegisterControllerResponse) Reset() { } } -func (x *MsgRegisterControllerResponse) String() string { +func (x *MsgLinkAuthenticationResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgRegisterControllerResponse) ProtoMessage() {} +func (*MsgLinkAuthenticationResponse) ProtoMessage() {} -// Deprecated: Use MsgRegisterControllerResponse.ProtoReflect.Descriptor instead. -func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgLinkAuthenticationResponse.ProtoReflect.Descriptor instead. +func (*MsgLinkAuthenticationResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{1} } -func (x *MsgRegisterControllerResponse) GetSuccess() bool { +func (x *MsgLinkAuthenticationResponse) GetSuccess() bool { if x != nil { return x.Success } return false } -func (x *MsgRegisterControllerResponse) GetController() string { +func (x *MsgLinkAuthenticationResponse) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +// MsgLinkAssertion is the message type for the LinkAssertion RPC. +type MsgLinkAssertion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Subject is the subject of the authentication. + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // Assertion is the assertion of the authentication. + Assertion string `protobuf:"bytes,3,opt,name=assertion,proto3" json:"assertion,omitempty"` + // token is the macron token to authenticate the operation. + MacaroonToken string `protobuf:"bytes,4,opt,name=macaroon_token,json=macaroonToken,proto3" json:"macaroon_token,omitempty"` +} + +func (x *MsgLinkAssertion) Reset() { + *x = MsgLinkAssertion{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLinkAssertion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLinkAssertion) ProtoMessage() {} + +// Deprecated: Use MsgLinkAssertion.ProtoReflect.Descriptor instead. +func (*MsgLinkAssertion) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgLinkAssertion) GetController() string { if x != nil { return x.Controller } return "" } +func (x *MsgLinkAssertion) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *MsgLinkAssertion) GetAssertion() string { + if x != nil { + return x.Assertion + } + return "" +} + +func (x *MsgLinkAssertion) GetMacaroonToken() string { + if x != nil { + return x.MacaroonToken + } + return "" +} + +// MsgLinkAssertionResponse is the response type for the +// LinkAssertion RPC. +type MsgLinkAssertionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Success returns true if the specified cid is valid and not already + // encrypted. + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + // Controller is the address of the initialized controller. + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` +} + +func (x *MsgLinkAssertionResponse) Reset() { + *x = MsgLinkAssertionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgLinkAssertionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgLinkAssertionResponse) ProtoMessage() {} + +// Deprecated: Use MsgLinkAssertionResponse.ProtoReflect.Descriptor instead. +func (*MsgLinkAssertionResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgLinkAssertionResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgLinkAssertionResponse) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + // MsgExecuteTx is the message type for the ExecuteTx RPC. type MsgExecuteTx struct { state protoimpl.MessageState @@ -3208,7 +6744,7 @@ type MsgExecuteTx struct { func (x *MsgExecuteTx) Reset() { *x = MsgExecuteTx{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[2] + mi := &file_did_v1_tx_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3222,7 +6758,7 @@ func (*MsgExecuteTx) ProtoMessage() {} // Deprecated: Use MsgExecuteTx.ProtoReflect.Descriptor instead. func (*MsgExecuteTx) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{2} + return file_did_v1_tx_proto_rawDescGZIP(), []int{4} } func (x *MsgExecuteTx) GetController() string { @@ -3259,7 +6795,7 @@ type MsgExecuteTxResponse struct { func (x *MsgExecuteTxResponse) Reset() { *x = MsgExecuteTxResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[3] + mi := &file_did_v1_tx_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3273,7 +6809,7 @@ func (*MsgExecuteTxResponse) ProtoMessage() {} // Deprecated: Use MsgExecuteTxResponse.ProtoReflect.Descriptor instead. func (*MsgExecuteTxResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{3} + return file_did_v1_tx_proto_rawDescGZIP(), []int{5} } func (x *MsgExecuteTxResponse) GetSuccess() bool { @@ -3290,6 +6826,212 @@ func (x *MsgExecuteTxResponse) GetTxHash() string { return "" } +// MsgUnlinkAssertion is the message type for the UnlinkAssertion RPC. +type MsgUnlinkAssertion struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Assertion is the assertion of the authentication. + AssertionDid string `protobuf:"bytes,2,opt,name=assertion_did,json=assertionDid,proto3" json:"assertion_did,omitempty"` + // token is the macron token to authenticate the operation. + MacaroonToken string `protobuf:"bytes,3,opt,name=macaroon_token,json=macaroonToken,proto3" json:"macaroon_token,omitempty"` +} + +func (x *MsgUnlinkAssertion) Reset() { + *x = MsgUnlinkAssertion{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUnlinkAssertion) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUnlinkAssertion) ProtoMessage() {} + +// Deprecated: Use MsgUnlinkAssertion.ProtoReflect.Descriptor instead. +func (*MsgUnlinkAssertion) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{6} +} + +func (x *MsgUnlinkAssertion) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgUnlinkAssertion) GetAssertionDid() string { + if x != nil { + return x.AssertionDid + } + return "" +} + +func (x *MsgUnlinkAssertion) GetMacaroonToken() string { + if x != nil { + return x.MacaroonToken + } + return "" +} + +// MsgUnlinkAssertionResponse is the response type for the +// UnlinkAssertion RPC. +type MsgUnlinkAssertionResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Success returns true if the specified cid is valid and not already + // encrypted. + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + // Controller is the address of the initialized controller. + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` +} + +func (x *MsgUnlinkAssertionResponse) Reset() { + *x = MsgUnlinkAssertionResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUnlinkAssertionResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUnlinkAssertionResponse) ProtoMessage() {} + +// Deprecated: Use MsgUnlinkAssertionResponse.ProtoReflect.Descriptor instead. +func (*MsgUnlinkAssertionResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{7} +} + +func (x *MsgUnlinkAssertionResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgUnlinkAssertionResponse) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +// MsgUnlinkAuthentication is the message type for the UnlinkAuthentication RPC. +type MsgUnlinkAuthentication struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + // Subject is the subject of the authentication. + AuthenticationDid string `protobuf:"bytes,2,opt,name=authentication_did,json=authenticationDid,proto3" json:"authentication_did,omitempty"` + // token is the macron token to authenticate the operation. + MacaroonToken string `protobuf:"bytes,3,opt,name=macaroon_token,json=macaroonToken,proto3" json:"macaroon_token,omitempty"` +} + +func (x *MsgUnlinkAuthentication) Reset() { + *x = MsgUnlinkAuthentication{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUnlinkAuthentication) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUnlinkAuthentication) ProtoMessage() {} + +// Deprecated: Use MsgUnlinkAuthentication.ProtoReflect.Descriptor instead. +func (*MsgUnlinkAuthentication) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{8} +} + +func (x *MsgUnlinkAuthentication) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgUnlinkAuthentication) GetAuthenticationDid() string { + if x != nil { + return x.AuthenticationDid + } + return "" +} + +func (x *MsgUnlinkAuthentication) GetMacaroonToken() string { + if x != nil { + return x.MacaroonToken + } + return "" +} + +// MsgUnlinkAuthenticationResponse is the response type for the +// UnlinkAuthentication RPC. +type MsgUnlinkAuthenticationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Success returns true if the specified cid is valid and not already + // encrypted. + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + // Controller is the address of the initialized controller. + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` +} + +func (x *MsgUnlinkAuthenticationResponse) Reset() { + *x = MsgUnlinkAuthenticationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUnlinkAuthenticationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUnlinkAuthenticationResponse) ProtoMessage() {} + +// Deprecated: Use MsgUnlinkAuthenticationResponse.ProtoReflect.Descriptor instead. +func (*MsgUnlinkAuthenticationResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{9} +} + +func (x *MsgUnlinkAuthenticationResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgUnlinkAuthenticationResponse) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + // MsgUpdateParams is the Msg/UpdateParams request type. // // Since: cosmos-sdk 0.47 @@ -3309,7 +7051,7 @@ type MsgUpdateParams struct { func (x *MsgUpdateParams) Reset() { *x = MsgUpdateParams{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[4] + mi := &file_did_v1_tx_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3323,7 +7065,7 @@ func (*MsgUpdateParams) ProtoMessage() {} // Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{4} + return file_did_v1_tx_proto_rawDescGZIP(), []int{10} } func (x *MsgUpdateParams) GetAuthority() string { @@ -3360,7 +7102,7 @@ type MsgUpdateParamsResponse struct { func (x *MsgUpdateParamsResponse) Reset() { *x = MsgUpdateParamsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[5] + mi := &file_did_v1_tx_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -3374,7 +7116,7 @@ func (*MsgUpdateParamsResponse) ProtoMessage() {} // Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{5} + return file_did_v1_tx_proto_rawDescGZIP(), []int{11} } var File_did_v1_tx_proto protoreflect.FileDescriptor @@ -3387,76 +7129,147 @@ var file_did_v1_tx_proto_rawDesc = []byte{ 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x5f, 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, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x73, 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, 0x22, - 0xfd, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, - 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, 0x3e, 0x0a, 0x08, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x54, 0x78, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, - 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, + 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x01, 0x0a, 0x15, 0x4d, 0x73, + 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 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, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, + 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, - 0x6e, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0f, + 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x22, 0x4b, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, + 0xbc, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 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, 0x18, + 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x73, 0x73, + 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, + 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, + 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, + 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x46, + 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, + 0x6f, 0x6e, 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, 0x22, 0xfd, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x45, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x3e, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, + 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, + 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x3b, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, + 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x49, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, + 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, + 0x68, 0x22, 0xab, 0x01, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, + 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 0x23, 0x0a, 0x0d, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, + 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, - 0x49, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, - 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, - 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf3, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x3f, 0x0a, - 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, - 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 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, 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, 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, + 0x48, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 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, 0x22, 0xba, 0x01, 0x0a, 0x17, 0x4d, 0x73, + 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, + 0x2d, 0x0a, 0x12, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x44, 0x69, 0x64, 0x12, 0x25, + 0x0a, 0x0e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x4d, 0x0a, 0x1f, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, + 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 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, 0x22, 0x9d, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, + 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x32, 0xf5, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x3f, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, + 0x75, 0x74, 0x65, 0x54, 0x78, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, 0x78, 0x1a, 0x1c, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x54, + 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x4c, 0x69, 0x6e, + 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, + 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, + 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x25, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x4c, 0x69, 0x6e, 0x6b, 0x41, 0x75, 0x74, 0x68, + 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, + 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, + 0x6e, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, + 0x6c, 0x69, 0x6e, 0x6b, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x60, 0x0a, 0x14, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, 0x41, + 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, 0x6b, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x27, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x6c, 0x69, 0x6e, + 0x6b, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 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, 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 ( @@ -3471,31 +7284,43 @@ 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, 7) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) var file_did_v1_tx_proto_goTypes = []interface{}{ - (*MsgRegisterController)(nil), // 0: did.v1.MsgRegisterController - (*MsgRegisterControllerResponse)(nil), // 1: did.v1.MsgRegisterControllerResponse - (*MsgExecuteTx)(nil), // 2: did.v1.MsgExecuteTx - (*MsgExecuteTxResponse)(nil), // 3: did.v1.MsgExecuteTxResponse - (*MsgUpdateParams)(nil), // 4: did.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 5: did.v1.MsgUpdateParamsResponse - nil, // 6: did.v1.MsgExecuteTx.MessagesEntry - (*Params)(nil), // 7: did.v1.Params + (*MsgLinkAuthentication)(nil), // 0: did.v1.MsgLinkAuthentication + (*MsgLinkAuthenticationResponse)(nil), // 1: did.v1.MsgLinkAuthenticationResponse + (*MsgLinkAssertion)(nil), // 2: did.v1.MsgLinkAssertion + (*MsgLinkAssertionResponse)(nil), // 3: did.v1.MsgLinkAssertionResponse + (*MsgExecuteTx)(nil), // 4: did.v1.MsgExecuteTx + (*MsgExecuteTxResponse)(nil), // 5: did.v1.MsgExecuteTxResponse + (*MsgUnlinkAssertion)(nil), // 6: did.v1.MsgUnlinkAssertion + (*MsgUnlinkAssertionResponse)(nil), // 7: did.v1.MsgUnlinkAssertionResponse + (*MsgUnlinkAuthentication)(nil), // 8: did.v1.MsgUnlinkAuthentication + (*MsgUnlinkAuthenticationResponse)(nil), // 9: did.v1.MsgUnlinkAuthenticationResponse + (*MsgUpdateParams)(nil), // 10: did.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 11: did.v1.MsgUpdateParamsResponse + nil, // 12: did.v1.MsgExecuteTx.MessagesEntry + (*Params)(nil), // 13: did.v1.Params } var file_did_v1_tx_proto_depIdxs = []int32{ - 6, // 0: did.v1.MsgExecuteTx.messages:type_name -> did.v1.MsgExecuteTx.MessagesEntry - 7, // 1: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 2, // 2: did.v1.Msg.ExecuteTx:input_type -> did.v1.MsgExecuteTx - 0, // 3: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController - 4, // 4: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 3, // 5: did.v1.Msg.ExecuteTx:output_type -> did.v1.MsgExecuteTxResponse - 1, // 6: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse - 5, // 7: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 12, // 0: did.v1.MsgExecuteTx.messages:type_name -> did.v1.MsgExecuteTx.MessagesEntry + 13, // 1: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 4, // 2: did.v1.Msg.ExecuteTx:input_type -> did.v1.MsgExecuteTx + 2, // 3: did.v1.Msg.LinkAssertion:input_type -> did.v1.MsgLinkAssertion + 0, // 4: did.v1.Msg.LinkAuthentication:input_type -> did.v1.MsgLinkAuthentication + 6, // 5: did.v1.Msg.UnlinkAssertion:input_type -> did.v1.MsgUnlinkAssertion + 8, // 6: did.v1.Msg.UnlinkAuthentication:input_type -> did.v1.MsgUnlinkAuthentication + 10, // 7: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams + 5, // 8: did.v1.Msg.ExecuteTx:output_type -> did.v1.MsgExecuteTxResponse + 3, // 9: did.v1.Msg.LinkAssertion:output_type -> did.v1.MsgLinkAssertionResponse + 1, // 10: did.v1.Msg.LinkAuthentication:output_type -> did.v1.MsgLinkAuthenticationResponse + 7, // 11: did.v1.Msg.UnlinkAssertion:output_type -> did.v1.MsgUnlinkAssertionResponse + 9, // 12: did.v1.Msg.UnlinkAuthentication:output_type -> did.v1.MsgUnlinkAuthenticationResponse + 11, // 13: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 8, // [8:14] is the sub-list for method output_type + 2, // [2:8] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_did_v1_tx_proto_init() } @@ -3506,7 +7331,7 @@ func file_did_v1_tx_proto_init() { file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterController); i { + switch v := v.(*MsgLinkAuthentication); i { case 0: return &v.state case 1: @@ -3518,7 +7343,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterControllerResponse); i { + switch v := v.(*MsgLinkAuthenticationResponse); i { case 0: return &v.state case 1: @@ -3530,7 +7355,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteTx); i { + switch v := v.(*MsgLinkAssertion); i { case 0: return &v.state case 1: @@ -3542,7 +7367,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteTxResponse); i { + switch v := v.(*MsgLinkAssertionResponse); i { case 0: return &v.state case 1: @@ -3554,7 +7379,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { + switch v := v.(*MsgExecuteTx); i { case 0: return &v.state case 1: @@ -3566,6 +7391,78 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgExecuteTxResponse); 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.(*MsgUnlinkAssertion); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUnlinkAssertionResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUnlinkAuthentication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUnlinkAuthenticationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParamsResponse); i { case 0: return &v.state @@ -3584,7 +7481,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 7, + NumMessages: 13, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index f981d9c9c..bb6cfcf00 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -19,9 +19,12 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx" - Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" - Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" + Msg_ExecuteTx_FullMethodName = "/did.v1.Msg/ExecuteTx" + Msg_LinkAssertion_FullMethodName = "/did.v1.Msg/LinkAssertion" + Msg_LinkAuthentication_FullMethodName = "/did.v1.Msg/LinkAuthentication" + Msg_UnlinkAssertion_FullMethodName = "/did.v1.Msg/UnlinkAssertion" + Msg_UnlinkAuthentication_FullMethodName = "/did.v1.Msg/UnlinkAuthentication" + Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" ) // MsgClient is the client API for Msg service. @@ -31,9 +34,14 @@ type MsgClient interface { // ExecuteTx executes a transaction on the Sonr Blockchain. It leverages // Macaroon for verification. ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grpc.CallOption) (*MsgExecuteTxResponse, 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) + // LinkAssertion links an assertion to a controller. + LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error) + // LinkAuthentication links an authentication to a controller. + LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error) + // UnlinkAssertion unlinks an assertion from a controller. + UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error) + // UnlinkAuthentication unlinks an authentication from a controller. + UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error) // UpdateParams defines a governance operation for updating the parameters. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) } @@ -55,9 +63,36 @@ func (c *msgClient) ExecuteTx(ctx context.Context, in *MsgExecuteTx, opts ...grp 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...) +func (c *msgClient) LinkAssertion(ctx context.Context, in *MsgLinkAssertion, opts ...grpc.CallOption) (*MsgLinkAssertionResponse, error) { + out := new(MsgLinkAssertionResponse) + err := c.cc.Invoke(ctx, Msg_LinkAssertion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) LinkAuthentication(ctx context.Context, in *MsgLinkAuthentication, opts ...grpc.CallOption) (*MsgLinkAuthenticationResponse, error) { + out := new(MsgLinkAuthenticationResponse) + err := c.cc.Invoke(ctx, Msg_LinkAuthentication_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnlinkAssertion(ctx context.Context, in *MsgUnlinkAssertion, opts ...grpc.CallOption) (*MsgUnlinkAssertionResponse, error) { + out := new(MsgUnlinkAssertionResponse) + err := c.cc.Invoke(ctx, Msg_UnlinkAssertion_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnlinkAuthentication(ctx context.Context, in *MsgUnlinkAuthentication, opts ...grpc.CallOption) (*MsgUnlinkAuthenticationResponse, error) { + out := new(MsgUnlinkAuthenticationResponse) + err := c.cc.Invoke(ctx, Msg_UnlinkAuthentication_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -80,9 +115,14 @@ type MsgServer interface { // ExecuteTx executes a transaction on the Sonr Blockchain. It leverages // Macaroon for verification. ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) - // RegisterController initializes a controller with the given authentication - // set, address, cid, publicKey, and user-defined alias. - RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) + // LinkAssertion links an assertion to a controller. + LinkAssertion(context.Context, *MsgLinkAssertion) (*MsgLinkAssertionResponse, error) + // LinkAuthentication links an authentication to a controller. + LinkAuthentication(context.Context, *MsgLinkAuthentication) (*MsgLinkAuthenticationResponse, error) + // UnlinkAssertion unlinks an assertion from a controller. + UnlinkAssertion(context.Context, *MsgUnlinkAssertion) (*MsgUnlinkAssertionResponse, error) + // UnlinkAuthentication unlinks an authentication from a controller. + UnlinkAuthentication(context.Context, *MsgUnlinkAuthentication) (*MsgUnlinkAuthenticationResponse, error) // UpdateParams defines a governance operation for updating the parameters. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) mustEmbedUnimplementedMsgServer() @@ -95,8 +135,17 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) ExecuteTx(context.Context, *MsgExecuteTx) (*MsgExecuteTxResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ExecuteTx not implemented") } -func (UnimplementedMsgServer) RegisterController(context.Context, *MsgRegisterController) (*MsgRegisterControllerResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method RegisterController not implemented") +func (UnimplementedMsgServer) LinkAssertion(context.Context, *MsgLinkAssertion) (*MsgLinkAssertionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LinkAssertion not implemented") +} +func (UnimplementedMsgServer) LinkAuthentication(context.Context, *MsgLinkAuthentication) (*MsgLinkAuthenticationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method LinkAuthentication not implemented") +} +func (UnimplementedMsgServer) UnlinkAssertion(context.Context, *MsgUnlinkAssertion) (*MsgUnlinkAssertionResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnlinkAssertion not implemented") +} +func (UnimplementedMsgServer) UnlinkAuthentication(context.Context, *MsgUnlinkAuthentication) (*MsgUnlinkAuthenticationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnlinkAuthentication not implemented") } func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") @@ -132,20 +181,74 @@ func _Msg_ExecuteTx_Handler(srv interface{}, ctx context.Context, dec func(inter 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) +func _Msg_LinkAssertion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLinkAssertion) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).RegisterController(ctx, in) + return srv.(MsgServer).LinkAssertion(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_RegisterController_FullMethodName, + FullMethod: Msg_LinkAssertion_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).RegisterController(ctx, req.(*MsgRegisterController)) + return srv.(MsgServer).LinkAssertion(ctx, req.(*MsgLinkAssertion)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_LinkAuthentication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgLinkAuthentication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).LinkAuthentication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_LinkAuthentication_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).LinkAuthentication(ctx, req.(*MsgLinkAuthentication)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnlinkAssertion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnlinkAssertion) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnlinkAssertion(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UnlinkAssertion_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnlinkAssertion(ctx, req.(*MsgUnlinkAssertion)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnlinkAuthentication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnlinkAuthentication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnlinkAuthentication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_UnlinkAuthentication_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnlinkAuthentication(ctx, req.(*MsgUnlinkAuthentication)) } return interceptor(ctx, in, info, handler) } @@ -180,8 +283,20 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_ExecuteTx_Handler, }, { - MethodName: "RegisterController", - Handler: _Msg_RegisterController_Handler, + MethodName: "LinkAssertion", + Handler: _Msg_LinkAssertion_Handler, + }, + { + MethodName: "LinkAuthentication", + Handler: _Msg_LinkAuthentication_Handler, + }, + { + MethodName: "UnlinkAssertion", + Handler: _Msg_UnlinkAssertion_Handler, + }, + { + MethodName: "UnlinkAuthentication", + Handler: _Msg_UnlinkAuthentication_Handler, }, { MethodName: "UpdateParams", diff --git a/api/macaroon/v1/genesis.pulsar.go b/api/macaroon/v1/genesis.pulsar.go index 7e834da9e..779094ca3 100644 --- a/api/macaroon/v1/genesis.pulsar.go +++ b/api/macaroon/v1/genesis.pulsar.go @@ -2134,7 +2134,7 @@ func (x *fastReflection_Scopes) ProtoMethods() *protoiface.Methods { var _ protoreflect.List = (*_Caveats_1_list)(nil) type _Caveats_1_list struct { - list *[]string + list *[]*Caveat } func (x *_Caveats_1_list) Len() int { @@ -2145,32 +2145,37 @@ func (x *_Caveats_1_list) Len() int { } func (x *_Caveats_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Caveats_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Caveat) (*x.list)[i] = concreteValue } func (x *_Caveats_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Caveat) *x.list = append(*x.list, concreteValue) } func (x *_Caveats_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Caveats at list field SupportedFirstParty as it is not of Message kind")) + v := new(Caveat) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Caveats_1_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_Caveats_1_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + v := new(Caveat) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Caveats_1_list) IsValid() bool { @@ -2180,7 +2185,7 @@ func (x *_Caveats_1_list) IsValid() bool { var _ protoreflect.List = (*_Caveats_2_list)(nil) type _Caveats_2_list struct { - list *[]string + list *[]*Caveat } func (x *_Caveats_2_list) Len() int { @@ -2191,32 +2196,37 @@ func (x *_Caveats_2_list) Len() int { } func (x *_Caveats_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_Caveats_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Caveat) (*x.list)[i] = concreteValue } func (x *_Caveats_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Caveat) *x.list = append(*x.list, concreteValue) } func (x *_Caveats_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Caveats at list field SupportedThirdParty as it is not of Message kind")) + v := new(Caveat) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Caveats_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_Caveats_2_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) + v := new(Caveat) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_Caveats_2_list) IsValid() bool { @@ -2430,13 +2440,13 @@ func (x *fastReflection_Caveats) Mutable(fd protoreflect.FieldDescriptor) protor switch fd.FullName() { case "macaroon.v1.Caveats.supported_first_party": if x.SupportedFirstParty == nil { - x.SupportedFirstParty = []string{} + x.SupportedFirstParty = []*Caveat{} } value := &_Caveats_1_list{list: &x.SupportedFirstParty} return protoreflect.ValueOfList(value) case "macaroon.v1.Caveats.supported_third_party": if x.SupportedThirdParty == nil { - x.SupportedThirdParty = []string{} + x.SupportedThirdParty = []*Caveat{} } value := &_Caveats_2_list{list: &x.SupportedThirdParty} return protoreflect.ValueOfList(value) @@ -2454,10 +2464,10 @@ func (x *fastReflection_Caveats) Mutable(fd protoreflect.FieldDescriptor) protor func (x *fastReflection_Caveats) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { case "macaroon.v1.Caveats.supported_first_party": - list := []string{} + list := []*Caveat{} return protoreflect.ValueOfList(&_Caveats_1_list{list: &list}) case "macaroon.v1.Caveats.supported_third_party": - list := []string{} + list := []*Caveat{} return protoreflect.ValueOfList(&_Caveats_2_list{list: &list}) default: if fd.IsExtension() { @@ -2529,14 +2539,14 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods { var l int _ = l if len(x.SupportedFirstParty) > 0 { - for _, s := range x.SupportedFirstParty { - l = len(s) + for _, e := range x.SupportedFirstParty { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } if len(x.SupportedThirdParty) > 0 { - for _, s := range x.SupportedThirdParty { - l = len(s) + for _, e := range x.SupportedThirdParty { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } @@ -2571,18 +2581,32 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods { } if len(x.SupportedThirdParty) > 0 { for iNdEx := len(x.SupportedThirdParty) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.SupportedThirdParty[iNdEx]) - copy(dAtA[i:], x.SupportedThirdParty[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SupportedThirdParty[iNdEx]))) + encoded, err := options.Marshal(x.SupportedThirdParty[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x12 } } if len(x.SupportedFirstParty) > 0 { for iNdEx := len(x.SupportedFirstParty) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.SupportedFirstParty[iNdEx]) - copy(dAtA[i:], x.SupportedFirstParty[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SupportedFirstParty[iNdEx]))) + encoded, err := options.Marshal(x.SupportedFirstParty[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 } @@ -2640,7 +2664,7 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods { if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SupportedFirstParty", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2650,29 +2674,31 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.SupportedFirstParty = append(x.SupportedFirstParty, string(dAtA[iNdEx:postIndex])) + x.SupportedFirstParty = append(x.SupportedFirstParty, &Caveat{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SupportedFirstParty[len(x.SupportedFirstParty)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SupportedThirdParty", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2682,23 +2708,25 @@ func (x *fastReflection_Caveats) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.SupportedThirdParty = append(x.SupportedThirdParty, string(dAtA[iNdEx:postIndex])) + x.SupportedThirdParty = append(x.SupportedThirdParty, &Caveat{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.SupportedThirdParty[len(x.SupportedThirdParty)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -3339,6 +3367,614 @@ func (x *fastReflection_Transactions) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_Caveat_1_list)(nil) + +type _Caveat_1_list struct { + list *[]string +} + +func (x *_Caveat_1_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Caveat_1_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Caveat_1_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Caveat_1_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Caveat_1_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Caveat at list field Scopes as it is not of Message kind")) +} + +func (x *_Caveat_1_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Caveat_1_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Caveat_1_list) IsValid() bool { + return x.list != nil +} + +var ( + md_Caveat protoreflect.MessageDescriptor + fd_Caveat_scopes protoreflect.FieldDescriptor + fd_Caveat_caveat protoreflect.FieldDescriptor + fd_Caveat_description protoreflect.FieldDescriptor +) + +func init() { + file_macaroon_v1_genesis_proto_init() + md_Caveat = File_macaroon_v1_genesis_proto.Messages().ByName("Caveat") + fd_Caveat_scopes = md_Caveat.Fields().ByName("scopes") + fd_Caveat_caveat = md_Caveat.Fields().ByName("caveat") + fd_Caveat_description = md_Caveat.Fields().ByName("description") +} + +var _ protoreflect.Message = (*fastReflection_Caveat)(nil) + +type fastReflection_Caveat Caveat + +func (x *Caveat) ProtoReflect() protoreflect.Message { + return (*fastReflection_Caveat)(x) +} + +func (x *Caveat) slowProtoReflect() protoreflect.Message { + mi := &file_macaroon_v1_genesis_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_Caveat_messageType fastReflection_Caveat_messageType +var _ protoreflect.MessageType = fastReflection_Caveat_messageType{} + +type fastReflection_Caveat_messageType struct{} + +func (x fastReflection_Caveat_messageType) Zero() protoreflect.Message { + return (*fastReflection_Caveat)(nil) +} +func (x fastReflection_Caveat_messageType) New() protoreflect.Message { + return new(fastReflection_Caveat) +} +func (x fastReflection_Caveat_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Caveat +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Caveat) Descriptor() protoreflect.MessageDescriptor { + return md_Caveat +} + +// 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_Caveat) Type() protoreflect.MessageType { + return _fastReflection_Caveat_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Caveat) New() protoreflect.Message { + return new(fastReflection_Caveat) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Caveat) Interface() protoreflect.ProtoMessage { + return (*Caveat)(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_Caveat) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Scopes) != 0 { + value := protoreflect.ValueOfList(&_Caveat_1_list{list: &x.Scopes}) + if !f(fd_Caveat_scopes, value) { + return + } + } + if x.Caveat != "" { + value := protoreflect.ValueOfString(x.Caveat) + if !f(fd_Caveat_caveat, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_Caveat_description, 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_Caveat) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "macaroon.v1.Caveat.scopes": + return len(x.Scopes) != 0 + case "macaroon.v1.Caveat.caveat": + return x.Caveat != "" + case "macaroon.v1.Caveat.description": + return x.Description != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveat")) + } + panic(fmt.Errorf("message macaroon.v1.Caveat 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_Caveat) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "macaroon.v1.Caveat.scopes": + x.Scopes = nil + case "macaroon.v1.Caveat.caveat": + x.Caveat = "" + case "macaroon.v1.Caveat.description": + x.Description = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveat")) + } + panic(fmt.Errorf("message macaroon.v1.Caveat 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_Caveat) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "macaroon.v1.Caveat.scopes": + if len(x.Scopes) == 0 { + return protoreflect.ValueOfList(&_Caveat_1_list{}) + } + listValue := &_Caveat_1_list{list: &x.Scopes} + return protoreflect.ValueOfList(listValue) + case "macaroon.v1.Caveat.caveat": + value := x.Caveat + return protoreflect.ValueOfString(value) + case "macaroon.v1.Caveat.description": + value := x.Description + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveat")) + } + panic(fmt.Errorf("message macaroon.v1.Caveat 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_Caveat) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "macaroon.v1.Caveat.scopes": + lv := value.List() + clv := lv.(*_Caveat_1_list) + x.Scopes = *clv.list + case "macaroon.v1.Caveat.caveat": + x.Caveat = value.Interface().(string) + case "macaroon.v1.Caveat.description": + x.Description = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveat")) + } + panic(fmt.Errorf("message macaroon.v1.Caveat 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_Caveat) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "macaroon.v1.Caveat.scopes": + if x.Scopes == nil { + x.Scopes = []string{} + } + value := &_Caveat_1_list{list: &x.Scopes} + return protoreflect.ValueOfList(value) + case "macaroon.v1.Caveat.caveat": + panic(fmt.Errorf("field caveat of message macaroon.v1.Caveat is not mutable")) + case "macaroon.v1.Caveat.description": + panic(fmt.Errorf("field description of message macaroon.v1.Caveat is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveat")) + } + panic(fmt.Errorf("message macaroon.v1.Caveat 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_Caveat) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "macaroon.v1.Caveat.scopes": + list := []string{} + return protoreflect.ValueOfList(&_Caveat_1_list{list: &list}) + case "macaroon.v1.Caveat.caveat": + return protoreflect.ValueOfString("") + case "macaroon.v1.Caveat.description": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: macaroon.v1.Caveat")) + } + panic(fmt.Errorf("message macaroon.v1.Caveat 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_Caveat) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in macaroon.v1.Caveat", 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_Caveat) 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_Caveat) 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_Caveat) 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_Caveat) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Caveat) + 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.Scopes) > 0 { + for _, s := range x.Scopes { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + l = len(x.Caveat) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + 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().(*Caveat) + 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.Description) > 0 { + i -= len(x.Description) + copy(dAtA[i:], x.Description) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) + i-- + dAtA[i] = 0x1a + } + if len(x.Caveat) > 0 { + i -= len(x.Caveat) + copy(dAtA[i:], x.Caveat) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Caveat))) + i-- + dAtA[i] = 0x12 + } + if len(x.Scopes) > 0 { + for iNdEx := len(x.Scopes) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Scopes[iNdEx]) + copy(dAtA[i:], x.Scopes[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Scopes[iNdEx]))) + 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().(*Caveat) + 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: Caveat: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Caveat: 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 Scopes", 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.Scopes = append(x.Scopes, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Caveat", 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.Caveat = 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 Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 @@ -3538,8 +4174,8 @@ type Caveats struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - SupportedFirstParty []string `protobuf:"bytes,1,rep,name=supported_first_party,json=supportedFirstParty,proto3" json:"supported_first_party,omitempty"` - SupportedThirdParty []string `protobuf:"bytes,2,rep,name=supported_third_party,json=supportedThirdParty,proto3" json:"supported_third_party,omitempty"` + SupportedFirstParty []*Caveat `protobuf:"bytes,1,rep,name=supported_first_party,json=supportedFirstParty,proto3" json:"supported_first_party,omitempty"` + SupportedThirdParty []*Caveat `protobuf:"bytes,2,rep,name=supported_third_party,json=supportedThirdParty,proto3" json:"supported_third_party,omitempty"` } func (x *Caveats) Reset() { @@ -3562,14 +4198,14 @@ func (*Caveats) Descriptor() ([]byte, []int) { return file_macaroon_v1_genesis_proto_rawDescGZIP(), []int{4} } -func (x *Caveats) GetSupportedFirstParty() []string { +func (x *Caveats) GetSupportedFirstParty() []*Caveat { if x != nil { return x.SupportedFirstParty } return nil } -func (x *Caveats) GetSupportedThirdParty() []string { +func (x *Caveats) GetSupportedThirdParty() []*Caveat { if x != nil { return x.SupportedThirdParty } @@ -3621,15 +4257,66 @@ func (x *Transactions) GetDenylist() []string { return nil } +type Caveat struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Scopes []string `protobuf:"bytes,1,rep,name=scopes,proto3" json:"scopes,omitempty"` + Caveat string `protobuf:"bytes,2,opt,name=caveat,proto3" json:"caveat,omitempty"` + Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` +} + +func (x *Caveat) Reset() { + *x = Caveat{} + if protoimpl.UnsafeEnabled { + mi := &file_macaroon_v1_genesis_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Caveat) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Caveat) ProtoMessage() {} + +// Deprecated: Use Caveat.ProtoReflect.Descriptor instead. +func (*Caveat) Descriptor() ([]byte, []int) { + return file_macaroon_v1_genesis_proto_rawDescGZIP(), []int{6} +} + +func (x *Caveat) GetScopes() []string { + if x != nil { + return x.Scopes + } + return nil +} + +func (x *Caveat) GetCaveat() string { + if x != nil { + return x.Caveat + } + return "" +} + +func (x *Caveat) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + var File_macaroon_v1_genesis_proto protoreflect.FileDescriptor var file_macaroon_v1_genesis_proto_rawDesc = []byte{ 0x0a, 0x19, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, - 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, - 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x1a, 0x0f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x0f, 0x64, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, + 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x41, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x31, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, @@ -3657,33 +4344,41 @@ var file_macaroon_v1_genesis_proto_rawDesc = []byte{ 0x72, 0x74, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x3a, 0x18, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0f, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, - 0x8c, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x12, 0x32, 0x0a, 0x15, 0x73, + 0xb6, 0x01, 0x0a, 0x07, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x12, 0x47, 0x0a, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x70, - 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x73, 0x75, 0x70, 0x70, - 0x6f, 0x72, 0x74, 0x65, 0x64, 0x46, 0x69, 0x72, 0x73, 0x74, 0x50, 0x61, 0x72, 0x74, 0x79, 0x12, - 0x32, 0x0a, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x68, 0x69, - 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, - 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, - 0x72, 0x74, 0x79, 0x3a, 0x19, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x6d, 0x61, - 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x22, 0x68, - 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, - 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, - 0x64, 0x65, 0x6e, 0x79, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, - 0x64, 0x65, 0x6e, 0x79, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x1e, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, - 0xb0, 0x2a, 0x15, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, - 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x9f, 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, - 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x31, 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, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, - 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, - 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, - 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x61, 0x72, 0x74, 0x79, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x63, + 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x52, + 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x46, 0x69, 0x72, 0x73, 0x74, 0x50, + 0x61, 0x72, 0x74, 0x79, 0x12, 0x47, 0x0a, 0x15, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, + 0x64, 0x5f, 0x74, 0x68, 0x69, 0x72, 0x64, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x76, + 0x31, 0x2e, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x52, 0x13, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x54, 0x68, 0x69, 0x72, 0x64, 0x50, 0x61, 0x72, 0x74, 0x79, 0x3a, 0x19, 0xe8, + 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x10, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, + 0x2f, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x73, 0x22, 0x68, 0x0a, 0x0c, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x6c, 0x69, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x6c, + 0x6f, 0x77, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x6e, 0x79, 0x6c, 0x69, + 0x73, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x64, 0x65, 0x6e, 0x79, 0x6c, 0x69, + 0x73, 0x74, 0x3a, 0x1e, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x15, 0x6d, 0x61, 0x63, + 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x61, 0x63, 0x74, 0x69, 0x6f, + 0x6e, 0x73, 0x22, 0x5a, 0x0a, 0x06, 0x43, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x73, 0x63, + 0x6f, 0x70, 0x65, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x61, 0x76, 0x65, 0x61, 0x74, 0x12, 0x20, 0x0a, 0x0b, + 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x9f, + 0x01, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, + 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x31, 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, 0x6d, + 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x61, 0x63, 0x61, 0x72, + 0x6f, 0x6f, 0x6e, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x58, 0x58, 0xaa, 0x02, 0x0b, 0x4d, 0x61, + 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0b, 0x4d, 0x61, 0x63, 0x61, + 0x72, 0x6f, 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x17, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, + 0x6f, 0x6e, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0xea, 0x02, 0x0c, 0x4d, 0x61, 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3698,7 +4393,7 @@ func file_macaroon_v1_genesis_proto_rawDescGZIP() []byte { return file_macaroon_v1_genesis_proto_rawDescData } -var file_macaroon_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_macaroon_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_macaroon_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: macaroon.v1.GenesisState (*Params)(nil), // 1: macaroon.v1.Params @@ -3706,17 +4401,20 @@ var file_macaroon_v1_genesis_proto_goTypes = []interface{}{ (*Scopes)(nil), // 3: macaroon.v1.Scopes (*Caveats)(nil), // 4: macaroon.v1.Caveats (*Transactions)(nil), // 5: macaroon.v1.Transactions + (*Caveat)(nil), // 6: macaroon.v1.Caveat } var file_macaroon_v1_genesis_proto_depIdxs = []int32{ 1, // 0: macaroon.v1.GenesisState.params:type_name -> macaroon.v1.Params 2, // 1: macaroon.v1.Params.methods:type_name -> macaroon.v1.Methods 3, // 2: macaroon.v1.Params.scopes:type_name -> macaroon.v1.Scopes 4, // 3: macaroon.v1.Params.caveats:type_name -> macaroon.v1.Caveats - 4, // [4:4] is the sub-list for method output_type - 4, // [4:4] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 6, // 4: macaroon.v1.Caveats.supported_first_party:type_name -> macaroon.v1.Caveat + 6, // 5: macaroon.v1.Caveats.supported_third_party:type_name -> macaroon.v1.Caveat + 6, // [6:6] is the sub-list for method output_type + 6, // [6:6] is the sub-list for method input_type + 6, // [6:6] is the sub-list for extension type_name + 6, // [6:6] is the sub-list for extension extendee + 0, // [0:6] is the sub-list for field type_name } func init() { file_macaroon_v1_genesis_proto_init() } @@ -3797,6 +4495,18 @@ func file_macaroon_v1_genesis_proto_init() { return nil } } + file_macaroon_v1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Caveat); 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{ @@ -3804,7 +4514,7 @@ func file_macaroon_v1_genesis_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_macaroon_v1_genesis_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 7, NumExtensions: 0, NumServices: 0, }, diff --git a/api/vault/v1/query.pulsar.go b/api/vault/v1/query.pulsar.go index 78029e8ea..0614b4321 100644 --- a/api/vault/v1/query.pulsar.go +++ b/api/vault/v1/query.pulsar.go @@ -1596,25 +1596,27 @@ func (x *fastReflection_QuerySchemaResponse) ProtoMethods() *protoiface.Methods } var ( - md_SyncRequest protoreflect.MessageDescriptor - fd_SyncRequest_did protoreflect.FieldDescriptor + md_AllocateRequest protoreflect.MessageDescriptor + fd_AllocateRequest_origin protoreflect.FieldDescriptor + fd_AllocateRequest_subject protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_SyncRequest = File_vault_v1_query_proto.Messages().ByName("SyncRequest") - fd_SyncRequest_did = md_SyncRequest.Fields().ByName("did") + md_AllocateRequest = File_vault_v1_query_proto.Messages().ByName("AllocateRequest") + fd_AllocateRequest_origin = md_AllocateRequest.Fields().ByName("origin") + fd_AllocateRequest_subject = md_AllocateRequest.Fields().ByName("subject") } -var _ protoreflect.Message = (*fastReflection_SyncRequest)(nil) +var _ protoreflect.Message = (*fastReflection_AllocateRequest)(nil) -type fastReflection_SyncRequest SyncRequest +type fastReflection_AllocateRequest AllocateRequest -func (x *SyncRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncRequest)(x) +func (x *AllocateRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_AllocateRequest)(x) } -func (x *SyncRequest) slowProtoReflect() protoreflect.Message { +func (x *AllocateRequest) slowProtoReflect() protoreflect.Message { mi := &file_vault_v1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1626,43 +1628,43 @@ func (x *SyncRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SyncRequest_messageType fastReflection_SyncRequest_messageType -var _ protoreflect.MessageType = fastReflection_SyncRequest_messageType{} +var _fastReflection_AllocateRequest_messageType fastReflection_AllocateRequest_messageType +var _ protoreflect.MessageType = fastReflection_AllocateRequest_messageType{} -type fastReflection_SyncRequest_messageType struct{} +type fastReflection_AllocateRequest_messageType struct{} -func (x fastReflection_SyncRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncRequest)(nil) +func (x fastReflection_AllocateRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_AllocateRequest)(nil) } -func (x fastReflection_SyncRequest_messageType) New() protoreflect.Message { - return new(fastReflection_SyncRequest) +func (x fastReflection_AllocateRequest_messageType) New() protoreflect.Message { + return new(fastReflection_AllocateRequest) } -func (x fastReflection_SyncRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncRequest +func (x fastReflection_AllocateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AllocateRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SyncRequest) Descriptor() protoreflect.MessageDescriptor { - return md_SyncRequest +func (x *fastReflection_AllocateRequest) Descriptor() protoreflect.MessageDescriptor { + return md_AllocateRequest } // 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 +func (x *fastReflection_AllocateRequest) Type() protoreflect.MessageType { + return _fastReflection_AllocateRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncRequest) New() protoreflect.Message { - return new(fastReflection_SyncRequest) +func (x *fastReflection_AllocateRequest) New() protoreflect.Message { + return new(fastReflection_AllocateRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { - return (*SyncRequest)(x) +func (x *fastReflection_AllocateRequest) Interface() protoreflect.ProtoMessage { + return (*AllocateRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -1670,10 +1672,16 @@ func (x *fastReflection_SyncRequest) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SyncRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_SyncRequest_did, value) { +func (x *fastReflection_AllocateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_AllocateRequest_origin, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_AllocateRequest_subject, value) { return } } @@ -1690,15 +1698,17 @@ func (x *fastReflection_SyncRequest) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_AllocateRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.SyncRequest.did": - return x.Did != "" + case "vault.v1.AllocateRequest.origin": + return x.Origin != "" + case "vault.v1.AllocateRequest.subject": + return x.Subject != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) } } @@ -1708,15 +1718,17 @@ func (x *fastReflection_SyncRequest) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_AllocateRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.SyncRequest.did": - x.Did = "" + case "vault.v1.AllocateRequest.origin": + x.Origin = "" + case "vault.v1.AllocateRequest.subject": + x.Subject = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) } } @@ -1726,16 +1738,19 @@ func (x *fastReflection_SyncRequest) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SyncRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AllocateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.SyncRequest.did": - value := x.Did + case "vault.v1.AllocateRequest.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "vault.v1.AllocateRequest.subject": + value := x.Subject return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", descriptor.FullName())) } } @@ -1749,15 +1764,17 @@ func (x *fastReflection_SyncRequest) Get(descriptor protoreflect.FieldDescriptor // 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) { +func (x *fastReflection_AllocateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.SyncRequest.did": - x.Did = value.Interface().(string) + case "vault.v1.AllocateRequest.origin": + x.Origin = value.Interface().(string) + case "vault.v1.AllocateRequest.subject": + x.Subject = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.AllocateRequest does not contain field %s", fd.FullName())) } } @@ -1771,40 +1788,44 @@ func (x *fastReflection_SyncRequest) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_AllocateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncRequest.did": - panic(fmt.Errorf("field did of message vault.v1.SyncRequest is not mutable")) + case "vault.v1.AllocateRequest.origin": + panic(fmt.Errorf("field origin of message vault.v1.AllocateRequest is not mutable")) + case "vault.v1.AllocateRequest.subject": + panic(fmt.Errorf("field subject of message vault.v1.AllocateRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.AllocateRequest 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 { +func (x *fastReflection_AllocateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncRequest.did": + case "vault.v1.AllocateRequest.origin": + return protoreflect.ValueOfString("") + case "vault.v1.AllocateRequest.subject": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateRequest")) } - panic(fmt.Errorf("message vault.v1.SyncRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.AllocateRequest 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 { +func (x *fastReflection_AllocateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.AllocateRequest", d.FullName())) } panic("unreachable") } @@ -1812,7 +1833,7 @@ func (x *fastReflection_SyncRequest) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SyncRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_AllocateRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1823,7 +1844,7 @@ func (x *fastReflection_SyncRequest) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_AllocateRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1835,7 +1856,7 @@ func (x *fastReflection_SyncRequest) SetUnknown(fields protoreflect.RawFields) { // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_SyncRequest) IsValid() bool { +func (x *fastReflection_AllocateRequest) IsValid() bool { return x != nil } @@ -1845,9 +1866,1122 @@ func (x *fastReflection_SyncRequest) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_AllocateRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncRequest) + x := input.Message.Interface().(*AllocateRequest) + 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.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Subject) + 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().(*AllocateRequest) + 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.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) + i-- + dAtA[i] = 0x12 + } + if len(x.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + 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().(*AllocateRequest) + 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: AllocateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllocateRequest: 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 Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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_AllocateResponse protoreflect.MessageDescriptor + fd_AllocateResponse_success protoreflect.FieldDescriptor + fd_AllocateResponse_cid protoreflect.FieldDescriptor + fd_AllocateResponse_macaroon protoreflect.FieldDescriptor + fd_AllocateResponse_public_uri protoreflect.FieldDescriptor + fd_AllocateResponse_expiry_block protoreflect.FieldDescriptor +) + +func init() { + file_vault_v1_query_proto_init() + md_AllocateResponse = File_vault_v1_query_proto.Messages().ByName("AllocateResponse") + fd_AllocateResponse_success = md_AllocateResponse.Fields().ByName("success") + fd_AllocateResponse_cid = md_AllocateResponse.Fields().ByName("cid") + fd_AllocateResponse_macaroon = md_AllocateResponse.Fields().ByName("macaroon") + fd_AllocateResponse_public_uri = md_AllocateResponse.Fields().ByName("public_uri") + fd_AllocateResponse_expiry_block = md_AllocateResponse.Fields().ByName("expiry_block") +} + +var _ protoreflect.Message = (*fastReflection_AllocateResponse)(nil) + +type fastReflection_AllocateResponse AllocateResponse + +func (x *AllocateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_AllocateResponse)(x) +} + +func (x *AllocateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_vault_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_AllocateResponse_messageType fastReflection_AllocateResponse_messageType +var _ protoreflect.MessageType = fastReflection_AllocateResponse_messageType{} + +type fastReflection_AllocateResponse_messageType struct{} + +func (x fastReflection_AllocateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_AllocateResponse)(nil) +} +func (x fastReflection_AllocateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_AllocateResponse) +} +func (x fastReflection_AllocateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_AllocateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_AllocateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_AllocateResponse +} + +// 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_AllocateResponse) Type() protoreflect.MessageType { + return _fastReflection_AllocateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_AllocateResponse) New() protoreflect.Message { + return new(fastReflection_AllocateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_AllocateResponse) Interface() protoreflect.ProtoMessage { + return (*AllocateResponse)(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_AllocateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_AllocateResponse_success, value) { + return + } + } + if x.Cid != "" { + value := protoreflect.ValueOfString(x.Cid) + if !f(fd_AllocateResponse_cid, value) { + return + } + } + if x.Macaroon != "" { + value := protoreflect.ValueOfString(x.Macaroon) + if !f(fd_AllocateResponse_macaroon, value) { + return + } + } + if x.PublicUri != "" { + value := protoreflect.ValueOfString(x.PublicUri) + if !f(fd_AllocateResponse_public_uri, value) { + return + } + } + if x.ExpiryBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.ExpiryBlock) + if !f(fd_AllocateResponse_expiry_block, 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_AllocateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "vault.v1.AllocateResponse.success": + return x.Success != false + case "vault.v1.AllocateResponse.cid": + return x.Cid != "" + case "vault.v1.AllocateResponse.macaroon": + return x.Macaroon != "" + case "vault.v1.AllocateResponse.public_uri": + return x.PublicUri != "" + case "vault.v1.AllocateResponse.expiry_block": + return x.ExpiryBlock != int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + } + panic(fmt.Errorf("message vault.v1.AllocateResponse 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_AllocateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "vault.v1.AllocateResponse.success": + x.Success = false + case "vault.v1.AllocateResponse.cid": + x.Cid = "" + case "vault.v1.AllocateResponse.macaroon": + x.Macaroon = "" + case "vault.v1.AllocateResponse.public_uri": + x.PublicUri = "" + case "vault.v1.AllocateResponse.expiry_block": + x.ExpiryBlock = int64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + } + panic(fmt.Errorf("message vault.v1.AllocateResponse 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_AllocateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "vault.v1.AllocateResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "vault.v1.AllocateResponse.cid": + value := x.Cid + return protoreflect.ValueOfString(value) + case "vault.v1.AllocateResponse.macaroon": + value := x.Macaroon + return protoreflect.ValueOfString(value) + case "vault.v1.AllocateResponse.public_uri": + value := x.PublicUri + return protoreflect.ValueOfString(value) + case "vault.v1.AllocateResponse.expiry_block": + value := x.ExpiryBlock + return protoreflect.ValueOfInt64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + } + panic(fmt.Errorf("message vault.v1.AllocateResponse 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_AllocateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "vault.v1.AllocateResponse.success": + x.Success = value.Bool() + case "vault.v1.AllocateResponse.cid": + x.Cid = value.Interface().(string) + case "vault.v1.AllocateResponse.macaroon": + x.Macaroon = value.Interface().(string) + case "vault.v1.AllocateResponse.public_uri": + x.PublicUri = value.Interface().(string) + case "vault.v1.AllocateResponse.expiry_block": + x.ExpiryBlock = value.Int() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + } + panic(fmt.Errorf("message vault.v1.AllocateResponse 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_AllocateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.AllocateResponse.success": + panic(fmt.Errorf("field success of message vault.v1.AllocateResponse is not mutable")) + case "vault.v1.AllocateResponse.cid": + panic(fmt.Errorf("field cid of message vault.v1.AllocateResponse is not mutable")) + case "vault.v1.AllocateResponse.macaroon": + panic(fmt.Errorf("field macaroon of message vault.v1.AllocateResponse is not mutable")) + case "vault.v1.AllocateResponse.public_uri": + panic(fmt.Errorf("field public_uri of message vault.v1.AllocateResponse is not mutable")) + case "vault.v1.AllocateResponse.expiry_block": + panic(fmt.Errorf("field expiry_block of message vault.v1.AllocateResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + } + panic(fmt.Errorf("message vault.v1.AllocateResponse 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_AllocateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.AllocateResponse.success": + return protoreflect.ValueOfBool(false) + case "vault.v1.AllocateResponse.cid": + return protoreflect.ValueOfString("") + case "vault.v1.AllocateResponse.macaroon": + return protoreflect.ValueOfString("") + case "vault.v1.AllocateResponse.public_uri": + return protoreflect.ValueOfString("") + case "vault.v1.AllocateResponse.expiry_block": + return protoreflect.ValueOfInt64(int64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.AllocateResponse")) + } + panic(fmt.Errorf("message vault.v1.AllocateResponse 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_AllocateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.AllocateResponse", 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_AllocateResponse) 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_AllocateResponse) 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_AllocateResponse) 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_AllocateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*AllocateResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Success { + n += 2 + } + l = len(x.Cid) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Macaroon) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.PublicUri) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.ExpiryBlock != 0 { + n += 1 + runtime.Sov(uint64(x.ExpiryBlock)) + } + 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().(*AllocateResponse) + 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.ExpiryBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryBlock)) + i-- + dAtA[i] = 0x28 + } + if len(x.PublicUri) > 0 { + i -= len(x.PublicUri) + copy(dAtA[i:], x.PublicUri) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.PublicUri))) + i-- + dAtA[i] = 0x22 + } + if len(x.Macaroon) > 0 { + i -= len(x.Macaroon) + copy(dAtA[i:], x.Macaroon) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macaroon))) + i-- + dAtA[i] = 0x1a + } + if len(x.Cid) > 0 { + i -= len(x.Cid) + copy(dAtA[i:], x.Cid) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) + i-- + dAtA[i] = 0x12 + } + if 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().(*AllocateResponse) + 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: AllocateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: AllocateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macaroon", 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.Macaroon = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicUri", 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.PublicUri = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ExpiryBlock", wireType) + } + x.ExpiryBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + x.ExpiryBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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_SyncInitialRequest protoreflect.MessageDescriptor + fd_SyncInitialRequest_did protoreflect.FieldDescriptor +) + +func init() { + file_vault_v1_query_proto_init() + md_SyncInitialRequest = File_vault_v1_query_proto.Messages().ByName("SyncInitialRequest") + fd_SyncInitialRequest_did = md_SyncInitialRequest.Fields().ByName("did") +} + +var _ protoreflect.Message = (*fastReflection_SyncInitialRequest)(nil) + +type fastReflection_SyncInitialRequest SyncInitialRequest + +func (x *SyncInitialRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncInitialRequest)(x) +} + +func (x *SyncInitialRequest) slowProtoReflect() protoreflect.Message { + mi := &file_vault_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_SyncInitialRequest_messageType fastReflection_SyncInitialRequest_messageType +var _ protoreflect.MessageType = fastReflection_SyncInitialRequest_messageType{} + +type fastReflection_SyncInitialRequest_messageType struct{} + +func (x fastReflection_SyncInitialRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncInitialRequest)(nil) +} +func (x fastReflection_SyncInitialRequest_messageType) New() protoreflect.Message { + return new(fastReflection_SyncInitialRequest) +} +func (x fastReflection_SyncInitialRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncInitialRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SyncInitialRequest) Descriptor() protoreflect.MessageDescriptor { + return md_SyncInitialRequest +} + +// 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_SyncInitialRequest) Type() protoreflect.MessageType { + return _fastReflection_SyncInitialRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SyncInitialRequest) New() protoreflect.Message { + return new(fastReflection_SyncInitialRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SyncInitialRequest) Interface() protoreflect.ProtoMessage { + return (*SyncInitialRequest)(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_SyncInitialRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_SyncInitialRequest_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_SyncInitialRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "vault.v1.SyncInitialRequest.did": + return x.Did != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncInitialRequest 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_SyncInitialRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "vault.v1.SyncInitialRequest.did": + x.Did = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncInitialRequest 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_SyncInitialRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "vault.v1.SyncInitialRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncInitialRequest 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_SyncInitialRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "vault.v1.SyncInitialRequest.did": + x.Did = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncInitialRequest 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_SyncInitialRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.SyncInitialRequest.did": + panic(fmt.Errorf("field did of message vault.v1.SyncInitialRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncInitialRequest 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_SyncInitialRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.SyncInitialRequest.did": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncInitialRequest 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_SyncInitialRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncInitialRequest", 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_SyncInitialRequest) 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_SyncInitialRequest) 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_SyncInitialRequest) 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_SyncInitialRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SyncInitialRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1873,7 +3007,7 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncRequest) + x := input.Message.Interface().(*SyncInitialRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1910,7 +3044,7 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncRequest) + x := input.Message.Interface().(*SyncInitialRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1942,10 +3076,10 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncInitialRequest: 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncInitialRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2016,26 +3150,32 @@ func (x *fastReflection_SyncRequest) ProtoMethods() *protoiface.Methods { } var ( - md_SyncResponse protoreflect.MessageDescriptor - fd_SyncResponse_success protoreflect.FieldDescriptor + md_SyncInitialResponse protoreflect.MessageDescriptor + fd_SyncInitialResponse_success protoreflect.FieldDescriptor + fd_SyncInitialResponse_schema protoreflect.FieldDescriptor + fd_SyncInitialResponse_address protoreflect.FieldDescriptor + fd_SyncInitialResponse_chainID protoreflect.FieldDescriptor ) func init() { file_vault_v1_query_proto_init() - md_SyncResponse = File_vault_v1_query_proto.Messages().ByName("SyncResponse") - fd_SyncResponse_success = md_SyncResponse.Fields().ByName("success") + md_SyncInitialResponse = File_vault_v1_query_proto.Messages().ByName("SyncInitialResponse") + fd_SyncInitialResponse_success = md_SyncInitialResponse.Fields().ByName("success") + fd_SyncInitialResponse_schema = md_SyncInitialResponse.Fields().ByName("schema") + fd_SyncInitialResponse_address = md_SyncInitialResponse.Fields().ByName("address") + fd_SyncInitialResponse_chainID = md_SyncInitialResponse.Fields().ByName("chainID") } -var _ protoreflect.Message = (*fastReflection_SyncResponse)(nil) +var _ protoreflect.Message = (*fastReflection_SyncInitialResponse)(nil) -type fastReflection_SyncResponse SyncResponse +type fastReflection_SyncInitialResponse SyncInitialResponse -func (x *SyncResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_SyncResponse)(x) +func (x *SyncInitialResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncInitialResponse)(x) } -func (x *SyncResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_query_proto_msgTypes[5] +func (x *SyncInitialResponse) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_query_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2046,43 +3186,43 @@ func (x *SyncResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_SyncResponse_messageType fastReflection_SyncResponse_messageType -var _ protoreflect.MessageType = fastReflection_SyncResponse_messageType{} +var _fastReflection_SyncInitialResponse_messageType fastReflection_SyncInitialResponse_messageType +var _ protoreflect.MessageType = fastReflection_SyncInitialResponse_messageType{} -type fastReflection_SyncResponse_messageType struct{} +type fastReflection_SyncInitialResponse_messageType struct{} -func (x fastReflection_SyncResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_SyncResponse)(nil) +func (x fastReflection_SyncInitialResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncInitialResponse)(nil) } -func (x fastReflection_SyncResponse_messageType) New() protoreflect.Message { - return new(fastReflection_SyncResponse) +func (x fastReflection_SyncInitialResponse_messageType) New() protoreflect.Message { + return new(fastReflection_SyncInitialResponse) } -func (x fastReflection_SyncResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_SyncResponse +func (x fastReflection_SyncInitialResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncInitialResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_SyncResponse) Descriptor() protoreflect.MessageDescriptor { - return md_SyncResponse +func (x *fastReflection_SyncInitialResponse) Descriptor() protoreflect.MessageDescriptor { + return md_SyncInitialResponse } // 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 +func (x *fastReflection_SyncInitialResponse) Type() protoreflect.MessageType { + return _fastReflection_SyncInitialResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_SyncResponse) New() protoreflect.Message { - return new(fastReflection_SyncResponse) +func (x *fastReflection_SyncInitialResponse) New() protoreflect.Message { + return new(fastReflection_SyncInitialResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { - return (*SyncResponse)(x) +func (x *fastReflection_SyncInitialResponse) Interface() protoreflect.ProtoMessage { + return (*SyncInitialResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -2090,10 +3230,28 @@ func (x *fastReflection_SyncResponse) Interface() protoreflect.ProtoMessage { // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_SyncResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_SyncInitialResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Success != false { value := protoreflect.ValueOfBool(x.Success) - if !f(fd_SyncResponse_success, value) { + if !f(fd_SyncInitialResponse_success, value) { + return + } + } + if x.Schema != nil { + value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) + if !f(fd_SyncInitialResponse_schema, value) { + return + } + } + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_SyncInitialResponse_address, value) { + return + } + } + if x.ChainID != "" { + value := protoreflect.ValueOfString(x.ChainID) + if !f(fd_SyncInitialResponse_chainID, value) { return } } @@ -2110,15 +3268,21 @@ func (x *fastReflection_SyncResponse) Range(f func(protoreflect.FieldDescriptor, // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_SyncInitialResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.SyncInitialResponse.success": return x.Success != false + case "vault.v1.SyncInitialResponse.schema": + return x.Schema != nil + case "vault.v1.SyncInitialResponse.address": + return x.Address != "" + case "vault.v1.SyncInitialResponse.chainID": + return x.ChainID != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) } } @@ -2128,15 +3292,21 @@ func (x *fastReflection_SyncResponse) Has(fd protoreflect.FieldDescriptor) bool // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_SyncInitialResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.SyncInitialResponse.success": x.Success = false + case "vault.v1.SyncInitialResponse.schema": + x.Schema = nil + case "vault.v1.SyncInitialResponse.address": + x.Address = "" + case "vault.v1.SyncInitialResponse.chainID": + x.ChainID = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) } } @@ -2146,16 +3316,25 @@ func (x *fastReflection_SyncResponse) Clear(fd protoreflect.FieldDescriptor) { // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_SyncResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncInitialResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.SyncInitialResponse.success": value := x.Success return protoreflect.ValueOfBool(value) + case "vault.v1.SyncInitialResponse.schema": + value := x.Schema + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "vault.v1.SyncInitialResponse.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "vault.v1.SyncInitialResponse.chainID": + value := x.ChainID + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", descriptor.FullName())) } } @@ -2169,15 +3348,21 @@ func (x *fastReflection_SyncResponse) Get(descriptor protoreflect.FieldDescripto // 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) { +func (x *fastReflection_SyncInitialResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.SyncInitialResponse.success": x.Success = value.Bool() + case "vault.v1.SyncInitialResponse.schema": + x.Schema = value.Message().Interface().(*Schema) + case "vault.v1.SyncInitialResponse.address": + x.Address = value.Interface().(string) + case "vault.v1.SyncInitialResponse.chainID": + x.ChainID = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncInitialResponse does not contain field %s", fd.FullName())) } } @@ -2191,40 +3376,56 @@ func (x *fastReflection_SyncResponse) Set(fd protoreflect.FieldDescriptor, value // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_SyncInitialResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncResponse.success": - panic(fmt.Errorf("field success of message vault.v1.SyncResponse is not mutable")) + case "vault.v1.SyncInitialResponse.schema": + if x.Schema == nil { + x.Schema = new(Schema) + } + return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) + case "vault.v1.SyncInitialResponse.success": + panic(fmt.Errorf("field success of message vault.v1.SyncInitialResponse is not mutable")) + case "vault.v1.SyncInitialResponse.address": + panic(fmt.Errorf("field address of message vault.v1.SyncInitialResponse is not mutable")) + case "vault.v1.SyncInitialResponse.chainID": + panic(fmt.Errorf("field chainID of message vault.v1.SyncInitialResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncInitialResponse 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 { +func (x *fastReflection_SyncInitialResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "vault.v1.SyncResponse.success": + case "vault.v1.SyncInitialResponse.success": return protoreflect.ValueOfBool(false) + case "vault.v1.SyncInitialResponse.schema": + m := new(Schema) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "vault.v1.SyncInitialResponse.address": + return protoreflect.ValueOfString("") + case "vault.v1.SyncInitialResponse.chainID": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncInitialResponse")) } - panic(fmt.Errorf("message vault.v1.SyncResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message vault.v1.SyncInitialResponse 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 { +func (x *fastReflection_SyncInitialResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncInitialResponse", d.FullName())) } panic("unreachable") } @@ -2232,7 +3433,7 @@ func (x *fastReflection_SyncResponse) WhichOneof(d protoreflect.OneofDescriptor) // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_SyncResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_SyncInitialResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -2243,7 +3444,7 @@ func (x *fastReflection_SyncResponse) GetUnknown() protoreflect.RawFields { // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_SyncResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_SyncInitialResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -2255,7 +3456,7 @@ func (x *fastReflection_SyncResponse) SetUnknown(fields protoreflect.RawFields) // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_SyncResponse) IsValid() bool { +func (x *fastReflection_SyncInitialResponse) IsValid() bool { return x != nil } @@ -2265,9 +3466,9 @@ func (x *fastReflection_SyncResponse) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_SyncInitialResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*SyncResponse) + x := input.Message.Interface().(*SyncInitialResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2282,6 +3483,18 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { if x.Success { n += 2 } + if x.Schema != nil { + l = options.Size(x.Schema) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainID) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2292,7 +3505,7 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*SyncResponse) + x := input.Message.Interface().(*SyncInitialResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2311,6 +3524,34 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.ChainID) > 0 { + i -= len(x.ChainID) + copy(dAtA[i:], x.ChainID) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainID))) + i-- + dAtA[i] = 0x22 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0x1a + } + if x.Schema != nil { + encoded, err := options.Marshal(x.Schema) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } if x.Success { i-- if x.Success { @@ -2332,7 +3573,7 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*SyncResponse) + x := input.Message.Interface().(*SyncInitialResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2364,10 +3605,10 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncInitialResponse: 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) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncInitialResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2390,6 +3631,1143 @@ func (x *fastReflection_SyncResponse) ProtoMethods() *protoiface.Methods { } } x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", 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.Schema == nil { + x.Schema = &Schema{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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_SyncCurrentRequest protoreflect.MessageDescriptor + fd_SyncCurrentRequest_macaroon protoreflect.FieldDescriptor +) + +func init() { + file_vault_v1_query_proto_init() + md_SyncCurrentRequest = File_vault_v1_query_proto.Messages().ByName("SyncCurrentRequest") + fd_SyncCurrentRequest_macaroon = md_SyncCurrentRequest.Fields().ByName("macaroon") +} + +var _ protoreflect.Message = (*fastReflection_SyncCurrentRequest)(nil) + +type fastReflection_SyncCurrentRequest SyncCurrentRequest + +func (x *SyncCurrentRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncCurrentRequest)(x) +} + +func (x *SyncCurrentRequest) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_query_proto_msgTypes[8] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_SyncCurrentRequest_messageType fastReflection_SyncCurrentRequest_messageType +var _ protoreflect.MessageType = fastReflection_SyncCurrentRequest_messageType{} + +type fastReflection_SyncCurrentRequest_messageType struct{} + +func (x fastReflection_SyncCurrentRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncCurrentRequest)(nil) +} +func (x fastReflection_SyncCurrentRequest_messageType) New() protoreflect.Message { + return new(fastReflection_SyncCurrentRequest) +} +func (x fastReflection_SyncCurrentRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncCurrentRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SyncCurrentRequest) Descriptor() protoreflect.MessageDescriptor { + return md_SyncCurrentRequest +} + +// 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_SyncCurrentRequest) Type() protoreflect.MessageType { + return _fastReflection_SyncCurrentRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SyncCurrentRequest) New() protoreflect.Message { + return new(fastReflection_SyncCurrentRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SyncCurrentRequest) Interface() protoreflect.ProtoMessage { + return (*SyncCurrentRequest)(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_SyncCurrentRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Macaroon != "" { + value := protoreflect.ValueOfString(x.Macaroon) + if !f(fd_SyncCurrentRequest_macaroon, 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_SyncCurrentRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "vault.v1.SyncCurrentRequest.macaroon": + return x.Macaroon != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "vault.v1.SyncCurrentRequest.macaroon": + x.Macaroon = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "vault.v1.SyncCurrentRequest.macaroon": + value := x.Macaroon + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "vault.v1.SyncCurrentRequest.macaroon": + x.Macaroon = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.SyncCurrentRequest.macaroon": + panic(fmt.Errorf("field macaroon of message vault.v1.SyncCurrentRequest is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.SyncCurrentRequest.macaroon": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentRequest")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentRequest 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_SyncCurrentRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncCurrentRequest", 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_SyncCurrentRequest) 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_SyncCurrentRequest) 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_SyncCurrentRequest) 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_SyncCurrentRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SyncCurrentRequest) + 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.Macaroon) + 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().(*SyncCurrentRequest) + 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.Macaroon) > 0 { + i -= len(x.Macaroon) + copy(dAtA[i:], x.Macaroon) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macaroon))) + 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().(*SyncCurrentRequest) + 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: SyncCurrentRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncCurrentRequest: 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 Macaroon", 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.Macaroon = 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_SyncCurrentResponse protoreflect.MessageDescriptor + fd_SyncCurrentResponse_success protoreflect.FieldDescriptor + fd_SyncCurrentResponse_schema protoreflect.FieldDescriptor + fd_SyncCurrentResponse_address protoreflect.FieldDescriptor + fd_SyncCurrentResponse_chainID protoreflect.FieldDescriptor +) + +func init() { + file_vault_v1_query_proto_init() + md_SyncCurrentResponse = File_vault_v1_query_proto.Messages().ByName("SyncCurrentResponse") + fd_SyncCurrentResponse_success = md_SyncCurrentResponse.Fields().ByName("success") + fd_SyncCurrentResponse_schema = md_SyncCurrentResponse.Fields().ByName("schema") + fd_SyncCurrentResponse_address = md_SyncCurrentResponse.Fields().ByName("address") + fd_SyncCurrentResponse_chainID = md_SyncCurrentResponse.Fields().ByName("chainID") +} + +var _ protoreflect.Message = (*fastReflection_SyncCurrentResponse)(nil) + +type fastReflection_SyncCurrentResponse SyncCurrentResponse + +func (x *SyncCurrentResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_SyncCurrentResponse)(x) +} + +func (x *SyncCurrentResponse) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_query_proto_msgTypes[9] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_SyncCurrentResponse_messageType fastReflection_SyncCurrentResponse_messageType +var _ protoreflect.MessageType = fastReflection_SyncCurrentResponse_messageType{} + +type fastReflection_SyncCurrentResponse_messageType struct{} + +func (x fastReflection_SyncCurrentResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_SyncCurrentResponse)(nil) +} +func (x fastReflection_SyncCurrentResponse_messageType) New() protoreflect.Message { + return new(fastReflection_SyncCurrentResponse) +} +func (x fastReflection_SyncCurrentResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_SyncCurrentResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_SyncCurrentResponse) Descriptor() protoreflect.MessageDescriptor { + return md_SyncCurrentResponse +} + +// 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_SyncCurrentResponse) Type() protoreflect.MessageType { + return _fastReflection_SyncCurrentResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_SyncCurrentResponse) New() protoreflect.Message { + return new(fastReflection_SyncCurrentResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_SyncCurrentResponse) Interface() protoreflect.ProtoMessage { + return (*SyncCurrentResponse)(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_SyncCurrentResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_SyncCurrentResponse_success, value) { + return + } + } + if x.Schema != nil { + value := protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) + if !f(fd_SyncCurrentResponse_schema, value) { + return + } + } + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_SyncCurrentResponse_address, value) { + return + } + } + if x.ChainID != "" { + value := protoreflect.ValueOfString(x.ChainID) + if !f(fd_SyncCurrentResponse_chainID, 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_SyncCurrentResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "vault.v1.SyncCurrentResponse.success": + return x.Success != false + case "vault.v1.SyncCurrentResponse.schema": + return x.Schema != nil + case "vault.v1.SyncCurrentResponse.address": + return x.Address != "" + case "vault.v1.SyncCurrentResponse.chainID": + return x.ChainID != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "vault.v1.SyncCurrentResponse.success": + x.Success = false + case "vault.v1.SyncCurrentResponse.schema": + x.Schema = nil + case "vault.v1.SyncCurrentResponse.address": + x.Address = "" + case "vault.v1.SyncCurrentResponse.chainID": + x.ChainID = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "vault.v1.SyncCurrentResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "vault.v1.SyncCurrentResponse.schema": + value := x.Schema + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "vault.v1.SyncCurrentResponse.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "vault.v1.SyncCurrentResponse.chainID": + value := x.ChainID + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "vault.v1.SyncCurrentResponse.success": + x.Success = value.Bool() + case "vault.v1.SyncCurrentResponse.schema": + x.Schema = value.Message().Interface().(*Schema) + case "vault.v1.SyncCurrentResponse.address": + x.Address = value.Interface().(string) + case "vault.v1.SyncCurrentResponse.chainID": + x.ChainID = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.SyncCurrentResponse.schema": + if x.Schema == nil { + x.Schema = new(Schema) + } + return protoreflect.ValueOfMessage(x.Schema.ProtoReflect()) + case "vault.v1.SyncCurrentResponse.success": + panic(fmt.Errorf("field success of message vault.v1.SyncCurrentResponse is not mutable")) + case "vault.v1.SyncCurrentResponse.address": + panic(fmt.Errorf("field address of message vault.v1.SyncCurrentResponse is not mutable")) + case "vault.v1.SyncCurrentResponse.chainID": + panic(fmt.Errorf("field chainID of message vault.v1.SyncCurrentResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.SyncCurrentResponse.success": + return protoreflect.ValueOfBool(false) + case "vault.v1.SyncCurrentResponse.schema": + m := new(Schema) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "vault.v1.SyncCurrentResponse.address": + return protoreflect.ValueOfString("") + case "vault.v1.SyncCurrentResponse.chainID": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.SyncCurrentResponse")) + } + panic(fmt.Errorf("message vault.v1.SyncCurrentResponse 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_SyncCurrentResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.SyncCurrentResponse", 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_SyncCurrentResponse) 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_SyncCurrentResponse) 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_SyncCurrentResponse) 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_SyncCurrentResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*SyncCurrentResponse) + 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.Schema != nil { + l = options.Size(x.Schema) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.ChainID) + 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().(*SyncCurrentResponse) + 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.ChainID) > 0 { + i -= len(x.ChainID) + copy(dAtA[i:], x.ChainID) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainID))) + i-- + dAtA[i] = 0x22 + } + if len(x.Address) > 0 { + i -= len(x.Address) + copy(dAtA[i:], x.Address) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + i-- + dAtA[i] = 0x1a + } + if x.Schema != nil { + encoded, err := options.Marshal(x.Schema) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if x.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().(*SyncCurrentResponse) + 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: SyncCurrentResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: SyncCurrentResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + x.Success = bool(v != 0) + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Schema", 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.Schema == nil { + x.Schema = &Schema{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Schema); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Address", 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.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainID", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.ChainID = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2566,17 +4944,18 @@ func (x *QuerySchemaResponse) GetSchema() *Schema { return nil } -// SyncRequest is the request type for the Sync RPC method. -type SyncRequest struct { +// AllocateRequest is the request type for the Allocate RPC method. +type AllocateRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` } -func (x *SyncRequest) Reset() { - *x = SyncRequest{} +func (x *AllocateRequest) Reset() { + *x = AllocateRequest{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2584,35 +4963,46 @@ func (x *SyncRequest) Reset() { } } -func (x *SyncRequest) String() string { +func (x *AllocateRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncRequest) ProtoMessage() {} +func (*AllocateRequest) ProtoMessage() {} -// Deprecated: Use SyncRequest.ProtoReflect.Descriptor instead. -func (*SyncRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use AllocateRequest.ProtoReflect.Descriptor instead. +func (*AllocateRequest) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{4} } -func (x *SyncRequest) GetDid() string { +func (x *AllocateRequest) GetOrigin() string { if x != nil { - return x.Did + return x.Origin } return "" } -// SyncResponse is the response type for the Sync RPC method. -type SyncResponse struct { +func (x *AllocateRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +// AllocateResponse is the response type for the Allocate RPC method. +type AllocateResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` + Macaroon string `protobuf:"bytes,3,opt,name=macaroon,proto3" json:"macaroon,omitempty"` + PublicUri string `protobuf:"bytes,4,opt,name=public_uri,json=publicUri,proto3" json:"public_uri,omitempty"` + ExpiryBlock int64 `protobuf:"varint,5,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` } -func (x *SyncResponse) Reset() { - *x = SyncResponse{} +func (x *AllocateResponse) Reset() { + *x = AllocateResponse{} if protoimpl.UnsafeEnabled { mi := &file_vault_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2620,24 +5010,250 @@ func (x *SyncResponse) Reset() { } } -func (x *SyncResponse) String() string { +func (x *AllocateResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncResponse) ProtoMessage() {} +func (*AllocateResponse) ProtoMessage() {} -// Deprecated: Use SyncResponse.ProtoReflect.Descriptor instead. -func (*SyncResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use AllocateResponse.ProtoReflect.Descriptor instead. +func (*AllocateResponse) Descriptor() ([]byte, []int) { return file_vault_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *SyncResponse) GetSuccess() bool { +func (x *AllocateResponse) GetSuccess() bool { if x != nil { return x.Success } return false } +func (x *AllocateResponse) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + +func (x *AllocateResponse) GetMacaroon() string { + if x != nil { + return x.Macaroon + } + return "" +} + +func (x *AllocateResponse) GetPublicUri() string { + if x != nil { + return x.PublicUri + } + return "" +} + +func (x *AllocateResponse) GetExpiryBlock() int64 { + if x != nil { + return x.ExpiryBlock + } + return 0 +} + +// SyncRequest is the request type for the Sync RPC method. +type SyncInitialRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` +} + +func (x *SyncInitialRequest) Reset() { + *x = SyncInitialRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncInitialRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncInitialRequest) ProtoMessage() {} + +// Deprecated: Use SyncInitialRequest.ProtoReflect.Descriptor instead. +func (*SyncInitialRequest) Descriptor() ([]byte, []int) { + return file_vault_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *SyncInitialRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +// SyncInitialResponse is the response type for the Sync RPC method. +type SyncInitialResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + // Schema is the DID document. + Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // Address is the address of the calling DID. + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // ChainID is the chain ID of the current network. + ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` +} + +func (x *SyncInitialResponse) Reset() { + *x = SyncInitialResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_query_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncInitialResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncInitialResponse) ProtoMessage() {} + +// Deprecated: Use SyncInitialResponse.ProtoReflect.Descriptor instead. +func (*SyncInitialResponse) Descriptor() ([]byte, []int) { + return file_vault_v1_query_proto_rawDescGZIP(), []int{7} +} + +func (x *SyncInitialResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *SyncInitialResponse) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *SyncInitialResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *SyncInitialResponse) GetChainID() string { + if x != nil { + return x.ChainID + } + return "" +} + +// SyncCurrentRequest is the request type for the Sync RPC method. +type SyncCurrentRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Macaroon string `protobuf:"bytes,1,opt,name=macaroon,proto3" json:"macaroon,omitempty"` +} + +func (x *SyncCurrentRequest) Reset() { + *x = SyncCurrentRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_query_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncCurrentRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncCurrentRequest) ProtoMessage() {} + +// Deprecated: Use SyncCurrentRequest.ProtoReflect.Descriptor instead. +func (*SyncCurrentRequest) Descriptor() ([]byte, []int) { + return file_vault_v1_query_proto_rawDescGZIP(), []int{8} +} + +func (x *SyncCurrentRequest) GetMacaroon() string { + if x != nil { + return x.Macaroon + } + return "" +} + +// SyncCurrentResponse is the response type for the Sync RPC method. +type SyncCurrentResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + // Schema is the DID document. + Schema *Schema `protobuf:"bytes,2,opt,name=schema,proto3" json:"schema,omitempty"` + // Address is the address of the calling DID. + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // ChainID is the chain ID of the current network. + ChainID string `protobuf:"bytes,4,opt,name=chainID,proto3" json:"chainID,omitempty"` +} + +func (x *SyncCurrentResponse) Reset() { + *x = SyncCurrentResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_query_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncCurrentResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncCurrentResponse) ProtoMessage() {} + +// Deprecated: Use SyncCurrentResponse.ProtoReflect.Descriptor instead. +func (*SyncCurrentResponse) Descriptor() ([]byte, []int) { + return file_vault_v1_query_proto_rawDescGZIP(), []int{9} +} + +func (x *SyncCurrentResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *SyncCurrentResponse) GetSchema() *Schema { + if x != nil { + return x.Schema + } + return nil +} + +func (x *SyncCurrentResponse) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *SyncCurrentResponse) GetChainID() string { + if x != nil { + return x.ChainID + } + return "" +} + var File_vault_v1_query_proto protoreflect.FileDescriptor var file_vault_v1_query_proto_rawDesc = []byte{ @@ -2657,38 +5273,86 @@ var file_vault_v1_query_proto_rawDesc = []byte{ 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, - 0x68, 0x65, 0x6d, 0x61, 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, - 0x98, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, 0x0a, 0x06, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5f, 0x0a, 0x06, 0x53, 0x63, - 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x4d, 0x0a, 0x04, 0x53, - 0x79, 0x6e, 0x63, 0x12, 0x15, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, - 0x79, 0x6e, 0x63, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x16, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x10, 0x22, 0x0e, 0x2f, 0x76, 0x61, 0x75, - 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, - 0x6f, 0x6d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 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, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, - 0x61, 0x75, 0x6c, 0x74, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, - 0x56, 0x31, 0xe2, 0x02, 0x14, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, - 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, - 0x74, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x65, 0x6d, 0x61, 0x22, 0x43, 0x0a, 0x0f, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x22, 0x9c, 0x01, 0x0a, 0x10, 0x41, 0x6c, + 0x6c, 0x6f, 0x63, 0x61, 0x74, 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, 0x63, 0x69, 0x64, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, + 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, + 0x63, 0x61, 0x72, 0x6f, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, + 0x69, 0x63, 0x55, 0x72, 0x69, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, + 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, + 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x26, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, + 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 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, 0x8d, 0x01, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, + 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, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x63, + 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x44, + 0x22, 0x30, 0x0a, 0x12, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, + 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x6d, 0x61, 0x63, 0x61, 0x72, 0x6f, + 0x6f, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x13, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, + 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, + 0x63, 0x65, 0x73, 0x73, 0x12, 0x28, 0x0a, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x06, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x69, + 0x6e, 0x49, 0x44, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, + 0x49, 0x44, 0x32, 0x80, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x5f, 0x0a, 0x06, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5f, 0x0a, + 0x06, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x18, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x12, 0x12, 0x10, 0x2f, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x5d, + 0x0a, 0x08, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x19, 0x2e, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, + 0x2e, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x1a, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x22, 0x12, 0x2f, 0x76, 0x61, 0x75, 0x6c, + 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x61, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x12, 0x6a, 0x0a, + 0x0b, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x1c, 0x2e, 0x76, + 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, + 0x69, 0x61, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, + 0x6c, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, + 0x18, 0x22, 0x16, 0x2f, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, + 0x63, 0x2d, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x6a, 0x0a, 0x0b, 0x53, 0x79, 0x6e, + 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x12, 0x1c, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, + 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, + 0x31, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22, 0x16, 0x2f, + 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x79, 0x6e, 0x63, 0x2d, 0x63, 0x75, + 0x72, 0x72, 0x65, 0x6e, 0x74, 0x42, 0x88, 0x01, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x61, + 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2b, 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, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x76, + 0x31, 0xa2, 0x02, 0x03, 0x56, 0x58, 0x58, 0xaa, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x2e, + 0x56, 0x31, 0xca, 0x02, 0x08, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x14, + 0x56, 0x61, 0x75, 0x6c, 0x74, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x09, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x3a, 0x3a, 0x56, 0x31, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2703,31 +5367,41 @@ func file_vault_v1_query_proto_rawDescGZIP() []byte { return file_vault_v1_query_proto_rawDescData } -var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_vault_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_vault_v1_query_proto_goTypes = []interface{}{ (*QueryParamsRequest)(nil), // 0: vault.v1.QueryParamsRequest (*QueryParamsResponse)(nil), // 1: vault.v1.QueryParamsResponse (*QuerySchemaRequest)(nil), // 2: vault.v1.QuerySchemaRequest (*QuerySchemaResponse)(nil), // 3: vault.v1.QuerySchemaResponse - (*SyncRequest)(nil), // 4: vault.v1.SyncRequest - (*SyncResponse)(nil), // 5: vault.v1.SyncResponse - (*Params)(nil), // 6: vault.v1.Params - (*Schema)(nil), // 7: vault.v1.Schema + (*AllocateRequest)(nil), // 4: vault.v1.AllocateRequest + (*AllocateResponse)(nil), // 5: vault.v1.AllocateResponse + (*SyncInitialRequest)(nil), // 6: vault.v1.SyncInitialRequest + (*SyncInitialResponse)(nil), // 7: vault.v1.SyncInitialResponse + (*SyncCurrentRequest)(nil), // 8: vault.v1.SyncCurrentRequest + (*SyncCurrentResponse)(nil), // 9: vault.v1.SyncCurrentResponse + (*Params)(nil), // 10: vault.v1.Params + (*Schema)(nil), // 11: vault.v1.Schema } var file_vault_v1_query_proto_depIdxs = []int32{ - 6, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params - 7, // 1: vault.v1.QuerySchemaResponse.schema:type_name -> vault.v1.Schema - 0, // 2: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest - 2, // 3: vault.v1.Query.Schema:input_type -> vault.v1.QuerySchemaRequest - 4, // 4: vault.v1.Query.Sync:input_type -> vault.v1.SyncRequest - 1, // 5: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse - 3, // 6: vault.v1.Query.Schema:output_type -> vault.v1.QuerySchemaResponse - 5, // 7: vault.v1.Query.Sync:output_type -> vault.v1.SyncResponse - 5, // [5:8] is the sub-list for method output_type - 2, // [2:5] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name + 10, // 0: vault.v1.QueryParamsResponse.params:type_name -> vault.v1.Params + 11, // 1: vault.v1.QuerySchemaResponse.schema:type_name -> vault.v1.Schema + 11, // 2: vault.v1.SyncInitialResponse.schema:type_name -> vault.v1.Schema + 11, // 3: vault.v1.SyncCurrentResponse.schema:type_name -> vault.v1.Schema + 0, // 4: vault.v1.Query.Params:input_type -> vault.v1.QueryParamsRequest + 2, // 5: vault.v1.Query.Schema:input_type -> vault.v1.QuerySchemaRequest + 4, // 6: vault.v1.Query.Allocate:input_type -> vault.v1.AllocateRequest + 6, // 7: vault.v1.Query.SyncInitial:input_type -> vault.v1.SyncInitialRequest + 8, // 8: vault.v1.Query.SyncCurrent:input_type -> vault.v1.SyncCurrentRequest + 1, // 9: vault.v1.Query.Params:output_type -> vault.v1.QueryParamsResponse + 3, // 10: vault.v1.Query.Schema:output_type -> vault.v1.QuerySchemaResponse + 5, // 11: vault.v1.Query.Allocate:output_type -> vault.v1.AllocateResponse + 7, // 12: vault.v1.Query.SyncInitial:output_type -> vault.v1.SyncInitialResponse + 9, // 13: vault.v1.Query.SyncCurrent:output_type -> vault.v1.SyncCurrentResponse + 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 } func init() { file_vault_v1_query_proto_init() } @@ -2786,7 +5460,7 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncRequest); i { + switch v := v.(*AllocateRequest); i { case 0: return &v.state case 1: @@ -2798,7 +5472,55 @@ func file_vault_v1_query_proto_init() { } } file_vault_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncResponse); i { + switch v := v.(*AllocateResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncInitialRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncInitialResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncCurrentRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncCurrentResponse); i { case 0: return &v.state case 1: @@ -2816,7 +5538,7 @@ func file_vault_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_vault_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/api/vault/v1/query_grpc.pb.go b/api/vault/v1/query_grpc.pb.go index e4ec88029..92be1c9d6 100644 --- a/api/vault/v1/query_grpc.pb.go +++ b/api/vault/v1/query_grpc.pb.go @@ -19,9 +19,11 @@ import ( const _ = grpc.SupportPackageIsVersion7 const ( - Query_Params_FullMethodName = "/vault.v1.Query/Params" - Query_Schema_FullMethodName = "/vault.v1.Query/Schema" - Query_Sync_FullMethodName = "/vault.v1.Query/Sync" + Query_Params_FullMethodName = "/vault.v1.Query/Params" + Query_Schema_FullMethodName = "/vault.v1.Query/Schema" + Query_Allocate_FullMethodName = "/vault.v1.Query/Allocate" + Query_SyncInitial_FullMethodName = "/vault.v1.Query/SyncInitial" + Query_SyncCurrent_FullMethodName = "/vault.v1.Query/SyncCurrent" ) // QueryClient is the client API for Query service. @@ -33,9 +35,15 @@ type QueryClient interface { // Schema queries the DID document by its id. And returns the required PKL // information Schema(ctx context.Context, in *QuerySchemaRequest, opts ...grpc.CallOption) (*QuerySchemaResponse, error) + // Allocate initializes a Target Vault available for claims with a compatible + // Authentication mechanism. The default authentication mechanism is WebAuthn. + Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, 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) + SyncInitial(ctx context.Context, in *SyncInitialRequest, opts ...grpc.CallOption) (*SyncInitialResponse, error) + // SyncCurrent queries the DID document by its id. And returns the required PKL + // information + SyncCurrent(ctx context.Context, in *SyncCurrentRequest, opts ...grpc.CallOption) (*SyncCurrentResponse, error) } type queryClient struct { @@ -64,9 +72,27 @@ func (c *queryClient) Schema(ctx context.Context, in *QuerySchemaRequest, opts . 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...) +func (c *queryClient) Allocate(ctx context.Context, in *AllocateRequest, opts ...grpc.CallOption) (*AllocateResponse, error) { + out := new(AllocateResponse) + err := c.cc.Invoke(ctx, Query_Allocate_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SyncInitial(ctx context.Context, in *SyncInitialRequest, opts ...grpc.CallOption) (*SyncInitialResponse, error) { + out := new(SyncInitialResponse) + err := c.cc.Invoke(ctx, Query_SyncInitial_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) SyncCurrent(ctx context.Context, in *SyncCurrentRequest, opts ...grpc.CallOption) (*SyncCurrentResponse, error) { + out := new(SyncCurrentResponse) + err := c.cc.Invoke(ctx, Query_SyncCurrent_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -82,9 +108,15 @@ type QueryServer interface { // Schema queries the DID document by its id. And returns the required PKL // information Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) + // Allocate initializes a Target Vault available for claims with a compatible + // Authentication mechanism. The default authentication mechanism is WebAuthn. + Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) // Sync queries the DID document by its id. And returns the required PKL // information - Sync(context.Context, *SyncRequest) (*SyncResponse, error) + SyncInitial(context.Context, *SyncInitialRequest) (*SyncInitialResponse, error) + // SyncCurrent queries the DID document by its id. And returns the required PKL + // information + SyncCurrent(context.Context, *SyncCurrentRequest) (*SyncCurrentResponse, error) mustEmbedUnimplementedQueryServer() } @@ -98,8 +130,14 @@ func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*Q func (UnimplementedQueryServer) Schema(context.Context, *QuerySchemaRequest) (*QuerySchemaResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Schema not implemented") } -func (UnimplementedQueryServer) Sync(context.Context, *SyncRequest) (*SyncResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Sync not implemented") +func (UnimplementedQueryServer) Allocate(context.Context, *AllocateRequest) (*AllocateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Allocate not implemented") +} +func (UnimplementedQueryServer) SyncInitial(context.Context, *SyncInitialRequest) (*SyncInitialResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncInitial not implemented") +} +func (UnimplementedQueryServer) SyncCurrent(context.Context, *SyncCurrentRequest) (*SyncCurrentResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method SyncCurrent not implemented") } func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} @@ -150,20 +188,56 @@ func _Query_Schema_Handler(srv interface{}, ctx context.Context, dec func(interf 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) +func _Query_Allocate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AllocateRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(QueryServer).Sync(ctx, in) + return srv.(QueryServer).Allocate(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Query_Sync_FullMethodName, + FullMethod: Query_Allocate_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Sync(ctx, req.(*SyncRequest)) + return srv.(QueryServer).Allocate(ctx, req.(*AllocateRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SyncInitial_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncInitialRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SyncInitial(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_SyncInitial_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SyncInitial(ctx, req.(*SyncInitialRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_SyncCurrent_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SyncCurrentRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).SyncCurrent(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_SyncCurrent_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).SyncCurrent(ctx, req.(*SyncCurrentRequest)) } return interceptor(ctx, in, info, handler) } @@ -184,8 +258,16 @@ var Query_ServiceDesc = grpc.ServiceDesc{ Handler: _Query_Schema_Handler, }, { - MethodName: "Sync", - Handler: _Query_Sync_Handler, + MethodName: "Allocate", + Handler: _Query_Allocate_Handler, + }, + { + MethodName: "SyncInitial", + Handler: _Query_SyncInitial_Handler, + }, + { + MethodName: "SyncCurrent", + Handler: _Query_SyncCurrent_Handler, }, }, Streams: []grpc.StreamDesc{}, diff --git a/api/vault/v1/tx.pulsar.go b/api/vault/v1/tx.pulsar.go index d5b550bcf..359070f1e 100644 --- a/api/vault/v1/tx.pulsar.go +++ b/api/vault/v1/tx.pulsar.go @@ -16,861 +16,6 @@ import ( sync "sync" ) -var ( - md_MsgUpdateParams protoreflect.MessageDescriptor - fd_MsgUpdateParams_authority protoreflect.FieldDescriptor - fd_MsgUpdateParams_params protoreflect.FieldDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgUpdateParams = File_vault_v1_tx_proto.Messages().ByName("MsgUpdateParams") - fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") - fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) - -type fastReflection_MsgUpdateParams MsgUpdateParams - -func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(x) -} - -func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[0] - 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_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} - -type fastReflection_MsgUpdateParams_messageType struct{} - -func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParams)(nil) -} -func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} -func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParams -} - -// 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_MsgUpdateParams) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgUpdateParams_authority, value) { - return - } - } - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_MsgUpdateParams_params, 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - return x.Authority != "" - case "vault.v1.MsgUpdateParams.params": - return x.Params != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - x.Authority = "" - case "vault.v1.MsgUpdateParams.params": - x.Params = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "vault.v1.MsgUpdateParams.authority": - value := x.Authority - return protoreflect.ValueOfString(value) - case "vault.v1.MsgUpdateParams.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - x.Authority = value.Interface().(string) - case "vault.v1.MsgUpdateParams.params": - x.Params = value.Message().Interface().(*Params) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - case "vault.v1.MsgUpdateParams.authority": - panic(fmt.Errorf("field authority of message vault.v1.MsgUpdateParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "vault.v1.MsgUpdateParams.authority": - return protoreflect.ValueOfString("") - case "vault.v1.MsgUpdateParams.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParams) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Authority) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Params != nil { - l = options.Size(x.Params) - 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().(*MsgUpdateParams) - 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.Params != nil { - encoded, err := options.Marshal(x.Params) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Authority) > 0 { - i -= len(x.Authority) - copy(dAtA[i:], x.Authority) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUpdateParams) - 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: MsgUpdateParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Authority = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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_MsgUpdateParamsResponse protoreflect.MessageDescriptor -) - -func init() { - file_vault_v1_tx_proto_init() - md_MsgUpdateParamsResponse = File_vault_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) - -type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse - -func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(x) -} - -func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} - -type fastReflection_MsgUpdateParamsResponse_messageType struct{} - -func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUpdateParamsResponse)(nil) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} -func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUpdateParamsResponse -} - -// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgUpdateParamsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { - return new(fastReflection_MsgUpdateParamsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { - return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) - } - panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUpdateParamsResponse) - 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.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().(*MsgUpdateParamsResponse) - 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 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().(*MsgUpdateParamsResponse) - 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: MsgUpdateParamsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - 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_MsgAllocateVault protoreflect.MessageDescriptor fd_MsgAllocateVault_authority protoreflect.FieldDescriptor @@ -895,7 +40,7 @@ func (x *MsgAllocateVault) ProtoReflect() protoreflect.Message { } func (x *MsgAllocateVault) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[2] + mi := &file_vault_v1_tx_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1445,7 +590,7 @@ func (x *MsgAllocateVaultResponse) ProtoReflect() protoreflect.Message { } func (x *MsgAllocateVaultResponse) slowProtoReflect() protoreflect.Message { - mi := &file_vault_v1_tx_proto_msgTypes[3] + mi := &file_vault_v1_tx_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2005,6 +1150,861 @@ func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Met } } +var ( + md_MsgUpdateParams protoreflect.MessageDescriptor + fd_MsgUpdateParams_authority protoreflect.FieldDescriptor + fd_MsgUpdateParams_params protoreflect.FieldDescriptor +) + +func init() { + file_vault_v1_tx_proto_init() + md_MsgUpdateParams = File_vault_v1_tx_proto.Messages().ByName("MsgUpdateParams") + fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") + fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) + +type fastReflection_MsgUpdateParams MsgUpdateParams + +func (x *MsgUpdateParams) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(x) +} + +func (x *MsgUpdateParams) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_tx_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParams_messageType fastReflection_MsgUpdateParams_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParams_messageType{} + +type fastReflection_MsgUpdateParams_messageType struct{} + +func (x fastReflection_MsgUpdateParams_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParams)(nil) +} +func (x fastReflection_MsgUpdateParams_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} +func (x fastReflection_MsgUpdateParams_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParams) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParams +} + +// 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_MsgUpdateParams) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParams_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParams) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParams) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParams) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParams)(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_MsgUpdateParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgUpdateParams_authority, value) { + return + } + } + if x.Params != nil { + value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + if !f(fd_MsgUpdateParams_params, 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_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "vault.v1.MsgUpdateParams.authority": + return x.Authority != "" + case "vault.v1.MsgUpdateParams.params": + return x.Params != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "vault.v1.MsgUpdateParams.authority": + x.Authority = "" + case "vault.v1.MsgUpdateParams.params": + x.Params = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "vault.v1.MsgUpdateParams.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "vault.v1.MsgUpdateParams.params": + value := x.Params + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "vault.v1.MsgUpdateParams.authority": + x.Authority = value.Interface().(string) + case "vault.v1.MsgUpdateParams.params": + x.Params = value.Message().Interface().(*Params) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.MsgUpdateParams.params": + if x.Params == nil { + x.Params = new(Params) + } + return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "vault.v1.MsgUpdateParams.authority": + panic(fmt.Errorf("field authority of message vault.v1.MsgUpdateParams is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "vault.v1.MsgUpdateParams.authority": + return protoreflect.ValueOfString("") + case "vault.v1.MsgUpdateParams.params": + m := new(Params) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParams")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParams 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_MsgUpdateParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgUpdateParams", 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) 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_MsgUpdateParams) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParams) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Params != nil { + l = options.Size(x.Params) + 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().(*MsgUpdateParams) + 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.Params != nil { + encoded, err := options.Marshal(x.Params) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgUpdateParams) + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { + x.Params = &Params{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); 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_MsgUpdateParamsResponse protoreflect.MessageDescriptor +) + +func init() { + file_vault_v1_tx_proto_init() + md_MsgUpdateParamsResponse = File_vault_v1_tx_proto.Messages().ByName("MsgUpdateParamsResponse") +} + +var _ protoreflect.Message = (*fastReflection_MsgUpdateParamsResponse)(nil) + +type fastReflection_MsgUpdateParamsResponse MsgUpdateParamsResponse + +func (x *MsgUpdateParamsResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(x) +} + +func (x *MsgUpdateParamsResponse) slowProtoReflect() protoreflect.Message { + mi := &file_vault_v1_tx_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgUpdateParamsResponse_messageType fastReflection_MsgUpdateParamsResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgUpdateParamsResponse_messageType{} + +type fastReflection_MsgUpdateParamsResponse_messageType struct{} + +func (x fastReflection_MsgUpdateParamsResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgUpdateParamsResponse)(nil) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} +func (x fastReflection_MsgUpdateParamsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgUpdateParamsResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgUpdateParamsResponse +} + +// 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_MsgUpdateParamsResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgUpdateParamsResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgUpdateParamsResponse) New() protoreflect.Message { + return new(fastReflection_MsgUpdateParamsResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgUpdateParamsResponse) Interface() protoreflect.ProtoMessage { + return (*MsgUpdateParamsResponse)(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_MsgUpdateParamsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_MsgUpdateParamsResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: vault.v1.MsgUpdateParamsResponse")) + } + panic(fmt.Errorf("message vault.v1.MsgUpdateParamsResponse 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_MsgUpdateParamsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in vault.v1.MsgUpdateParamsResponse", 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) 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_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgUpdateParamsResponse) + 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.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().(*MsgUpdateParamsResponse) + 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 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().(*MsgUpdateParamsResponse) + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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 @@ -2018,86 +2018,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// MsgUpdateParams is the Msg/UpdateParams request type. -// -// Since: cosmos-sdk 0.47 -type MsgUpdateParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the parameters to update. - // - // NOTE: All parameters must be supplied. - Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` -} - -func (x *MsgUpdateParams) Reset() { - *x = MsgUpdateParams{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParams) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. -func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgUpdateParams) GetAuthority() string { - if x != nil { - return x.Authority - } - return "" -} - -func (x *MsgUpdateParams) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - -// MsgUpdateParamsResponse defines the response structure for executing a -// MsgUpdateParams message. -// -// Since: cosmos-sdk 0.47 -type MsgUpdateParamsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgUpdateParamsResponse) Reset() { - *x = MsgUpdateParamsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUpdateParamsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUpdateParamsResponse) ProtoMessage() {} - -// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. -func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{1} -} - // MsgAllocateVault is the message type for the AllocateVault RPC. type MsgAllocateVault struct { state protoimpl.MessageState @@ -2115,7 +2035,7 @@ type MsgAllocateVault struct { func (x *MsgAllocateVault) Reset() { *x = MsgAllocateVault{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[2] + mi := &file_vault_v1_tx_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2129,7 +2049,7 @@ func (*MsgAllocateVault) ProtoMessage() {} // Deprecated: Use MsgAllocateVault.ProtoReflect.Descriptor instead. func (*MsgAllocateVault) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{2} + return file_vault_v1_tx_proto_rawDescGZIP(), []int{0} } func (x *MsgAllocateVault) GetAuthority() string { @@ -2173,7 +2093,7 @@ type MsgAllocateVaultResponse struct { func (x *MsgAllocateVaultResponse) Reset() { *x = MsgAllocateVaultResponse{} if protoimpl.UnsafeEnabled { - mi := &file_vault_v1_tx_proto_msgTypes[3] + mi := &file_vault_v1_tx_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2187,7 +2107,7 @@ func (*MsgAllocateVaultResponse) ProtoMessage() {} // Deprecated: Use MsgAllocateVaultResponse.ProtoReflect.Descriptor instead. func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) { - return file_vault_v1_tx_proto_rawDescGZIP(), []int{3} + return file_vault_v1_tx_proto_rawDescGZIP(), []int{1} } func (x *MsgAllocateVaultResponse) GetCid() string { @@ -2218,6 +2138,86 @@ func (x *MsgAllocateVaultResponse) GetLocalhost() bool { return false } +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the parameters to update. + // + // NOTE: All parameters must be supplied. + Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` +} + +func (x *MsgUpdateParams) Reset() { + *x = MsgUpdateParams{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParams) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParams) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParams.ProtoReflect.Descriptor instead. +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return file_vault_v1_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgUpdateParams) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgUpdateParams) GetParams() *Params { + if x != nil { + return x.Params + } + return nil +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *MsgUpdateParamsResponse) Reset() { + *x = MsgUpdateParamsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_vault_v1_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgUpdateParamsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgUpdateParamsResponse) ProtoMessage() {} + +// Deprecated: Use MsgUpdateParamsResponse.ProtoReflect.Descriptor instead. +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return file_vault_v1_tx_proto_rawDescGZIP(), []int{3} +} + var File_vault_v1_tx_proto protoreflect.FileDescriptor var file_vault_v1_tx_proto_rawDesc = []byte{ @@ -2230,35 +2230,35 @@ var file_vault_v1_tx_proto_rawDesc = []byte{ 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x89, 0x01, - 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, 0x0a, 0x06, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x76, 0x61, 0x75, 0x6c, - 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, - 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, - 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 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, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x18, 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, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, - 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, - 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, - 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 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, 0x32, 0xc7, 0x01, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x8c, 0x01, + 0x0a, 0x10, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, + 0x6c, 0x74, 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, 0x18, 0x0a, 0x07, 0x73, 0x75, + 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, + 0x6a, 0x65, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, + 0x18, 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, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x79, 0x5f, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x79, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x14, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 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, 0x89, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2e, + 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, + 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, + 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xc7, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x6b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x1a, 0x2e, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x22, @@ -2297,18 +2297,18 @@ func file_vault_v1_tx_proto_rawDescGZIP() []byte { var file_vault_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_vault_v1_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: vault.v1.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: vault.v1.MsgUpdateParamsResponse - (*MsgAllocateVault)(nil), // 2: vault.v1.MsgAllocateVault - (*MsgAllocateVaultResponse)(nil), // 3: vault.v1.MsgAllocateVaultResponse + (*MsgAllocateVault)(nil), // 0: vault.v1.MsgAllocateVault + (*MsgAllocateVaultResponse)(nil), // 1: vault.v1.MsgAllocateVaultResponse + (*MsgUpdateParams)(nil), // 2: vault.v1.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 3: vault.v1.MsgUpdateParamsResponse (*Params)(nil), // 4: vault.v1.Params } var file_vault_v1_tx_proto_depIdxs = []int32{ 4, // 0: vault.v1.MsgUpdateParams.params:type_name -> vault.v1.Params - 2, // 1: vault.v1.Msg.AllocateVault:input_type -> vault.v1.MsgAllocateVault - 0, // 2: vault.v1.Msg.UpdateParams:input_type -> vault.v1.MsgUpdateParams - 3, // 3: vault.v1.Msg.AllocateVault:output_type -> vault.v1.MsgAllocateVaultResponse - 1, // 4: vault.v1.Msg.UpdateParams:output_type -> vault.v1.MsgUpdateParamsResponse + 0, // 1: vault.v1.Msg.AllocateVault:input_type -> vault.v1.MsgAllocateVault + 2, // 2: vault.v1.Msg.UpdateParams:input_type -> vault.v1.MsgUpdateParams + 1, // 3: vault.v1.Msg.AllocateVault:output_type -> vault.v1.MsgAllocateVaultResponse + 3, // 4: vault.v1.Msg.UpdateParams:output_type -> vault.v1.MsgUpdateParamsResponse 3, // [3:5] is the sub-list for method output_type 1, // [1:3] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -2324,30 +2324,6 @@ func file_vault_v1_tx_proto_init() { file_vault_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_vault_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUpdateParamsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_vault_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAllocateVault); i { case 0: return &v.state @@ -2359,7 +2335,7 @@ func file_vault_v1_tx_proto_init() { return nil } } - file_vault_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + file_vault_v1_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgAllocateVaultResponse); i { case 0: return &v.state @@ -2371,6 +2347,30 @@ func file_vault_v1_tx_proto_init() { return nil } } + file_vault_v1_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParams); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_vault_v1_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgUpdateParamsResponse); 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{ diff --git a/app/app.go b/app/app.go index f8090e7e7..54d9aba8a 100644 --- a/app/app.go +++ b/app/app.go @@ -1191,7 +1191,7 @@ func GetDefaultBypassFeeMessages() []string { sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenConfirm{}), sdk.MsgTypeURL(&ibcchanneltypes.MsgChannelOpenAck{}), sdk.MsgTypeURL(&vaulttypes.MsgAllocateVault{}), - sdk.MsgTypeURL(&didtypes.MsgRegisterController{}), + sdk.MsgTypeURL(&didtypes.MsgLinkAuthentication{}), } } diff --git a/buf.work.yaml b/buf.work.yaml new file mode 100644 index 000000000..494296bfa --- /dev/null +++ b/buf.work.yaml @@ -0,0 +1,4 @@ +version: v1 +directories: + - proto + - third_party/proto diff --git a/cmd/hway/main.go b/cmd/hway/main.go index 7cbd747ae..9d42bd747 100644 --- a/cmd/hway/main.go +++ b/cmd/hway/main.go @@ -11,8 +11,8 @@ import ( func main() { s := echo.New() - s.Use(ctx.SessionMiddleware) - routes.RegisterProxyViews(s) - routes.RegisterProxyAPI(s) + s.Use(ctx.HighwaySessionMiddleware) + routes.RegisterGatewayViews(s) + routes.RegisterGatewayAPI(s) workers.Serve(s) } diff --git a/wrangler.toml b/cmd/hway/wrangler.toml similarity index 64% rename from wrangler.toml rename to cmd/hway/wrangler.toml index 2aca33118..fbff4fbc7 100644 --- a/wrangler.toml +++ b/cmd/hway/wrangler.toml @@ -1,8 +1,8 @@ name = "sonr-id" -main = "./cmd/hway/build/worker.mjs" +main = "./build/worker.mjs" compatibility_date = "2024-10-07" routes = [{ pattern = "sonr.id", custom_domain = true }] [build] -command = "make hway-build" +command = "task hway:build" diff --git a/devbox.json b/devbox.json index 0f7ff7266..f79a3cbb9 100644 --- a/devbox.json +++ b/devbox.json @@ -1,6 +1,11 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": ["go@1.22", "bun@latest", "ipfs@latest", "templ@latest"], + "packages": [ + "go@1.22", + "bun@latest", + "ipfs@latest", + "templ@latest" + ], "env": { "GOPATH": "$HOME/go", "PATH": "./build:$HOME/go/bin:$PATH", @@ -20,18 +25,18 @@ }, "shell": { "scripts": { - "build:docker": ["make local-image"], - "build:hway": ["make hway-build"], - "build:nebula": ["make nebula-build"], - "build:motr": ["make motr-build"], - "build:sonrd": ["make motr-build", "make build"], - "build": ["make motr-build", "make build", "make hway-build"], - "gen:proto": ["rm -rf ./pkg/nebula/node_modules", "make proto-gen"], - "gen:pkl": ["make gen-pkl"], - "gen:templ": ["make gen-templ"], - "start": ["process-compose up -f ./deploy/process-compose.yaml"], - "stop": ["process-compose down -f ./deploy/process-compose.yaml"], - "start:testnet": ["make sh-testnet"] + "gen:pkl": [ + "make gen-pkl" + ], + "gen:templ": [ + "make gen-templ" + ], + "start": [ + "process-compose up -f ./deploy/process-compose.yaml" + ], + "stop": [ + "process-compose down -f ./deploy/process-compose.yaml" + ] } } } diff --git a/go.mod b/go.mod index c7d53f314..d413d203e 100644 --- a/go.mod +++ b/go.mod @@ -66,14 +66,13 @@ require ( github.com/go-webauthn/webauthn v0.10.2 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 - github.com/gorilla/sessions v1.4.0 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/ipfs/boxo v0.21.0 github.com/ipfs/kubo v0.29.0 github.com/joho/godotenv v1.5.1 github.com/labstack/echo/v4 v4.10.2 github.com/nlepage/go-js-promise v1.0.0 - github.com/onsonr/crypto v1.32.0 + github.com/onsonr/crypto v1.33.0 github.com/segmentio/ksuid v1.0.4 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 @@ -183,7 +182,6 @@ require ( github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.2 // indirect github.com/gorilla/handlers v1.5.2 // indirect - github.com/gorilla/securecookie v1.1.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect diff --git a/go.sum b/go.sum index 0093bc405..b4762e5c4 100644 --- a/go.sum +++ b/go.sum @@ -1375,10 +1375,6 @@ github.com/gorilla/handlers v1.5.2 h1:cLTUSsNkgcwhgRqvCNmdbRWG0A3N4F+M2nWKdScwyE github.com/gorilla/handlers v1.5.2/go.mod h1:dX+xVpaxdSw+q0Qek8SSsl3dfMk3jNddUkMzo0GtH0w= github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/gorilla/securecookie v1.1.2 h1:YCIWL56dvtr73r6715mJs5ZvhtnY73hBvEF8kXD8ePA= -github.com/gorilla/securecookie v1.1.2/go.mod h1:NfCASbcHqRSY+3a8tlWJwsQap2VX5pwzwo4h3eOamfo= -github.com/gorilla/sessions v1.4.0 h1:kpIYOp/oi6MG/p5PgxApU8srsSw9tuFbt46Lt7auzqQ= -github.com/gorilla/sessions v1.4.0/go.mod h1:FLWm50oby91+hl7p/wRxDth9bWSuk0qVL2emc7lT5ik= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= @@ -1833,8 +1829,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.32.0 h1:3XxItjoYg4vLuTU7uvpbIl/MTk2tb6L43SSO9RFcEXc= -github.com/onsonr/crypto v1.32.0/go.mod h1:NSfeCO6XoyQeSDEp6Jy42UGG5047GvzG6lW9lRnjrR0= +github.com/onsonr/crypto v1.33.0 h1:K0KgEQXrzppw/nPXn1swY1a7oUmMdQGcLycuipoqjqM= +github.com/onsonr/crypto v1.33.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/ctx/authorize.go b/internal/ctx/authorize.go deleted file mode 100644 index c5085b2e5..000000000 --- a/internal/ctx/authorize.go +++ /dev/null @@ -1,95 +0,0 @@ -package ctx - -import ( - "fmt" - "net/http" - "time" - - "github.com/labstack/echo/v4" - "gopkg.in/macaroon.v2" -) - -const ( - OriginMacroonCaveat MacroonCaveat = "origin" - ScopesMacroonCaveat MacroonCaveat = "scopes" - SubjectMacroonCaveat MacroonCaveat = "subject" - ExpMacroonCaveat MacroonCaveat = "exp" - TokenMacroonCaveat MacroonCaveat = "token" -) - -var MacroonCaveats = []MacroonCaveat{OriginMacroonCaveat, ScopesMacroonCaveat, SubjectMacroonCaveat, ExpMacroonCaveat, TokenMacroonCaveat} - -type MacroonCaveat string - -func (c MacroonCaveat) Equal(other string) bool { - return string(c) == other -} - -func (c MacroonCaveat) String() string { - return string(c) -} - -func (c MacroonCaveat) Verify(value string) error { - switch c { - case OriginMacroonCaveat: - return nil - case ScopesMacroonCaveat: - return nil - case SubjectMacroonCaveat: - return nil - case ExpMacroonCaveat: - // Check if the expiration time is still valid - exp, err := time.Parse(time.RFC3339, value) - if err != nil { - return err - } - if time.Now().After(exp) { - return fmt.Errorf("expired") - } - return nil - case TokenMacroonCaveat: - return nil - default: - return fmt.Errorf("unknown caveat: %s", c) - } -} - -func MacaroonMiddleware(secretKeyStr string, location string) echo.MiddlewareFunc { - secretKey := []byte(secretKeyStr) - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - // Extract the macaroon from the Authorization header - auth := c.Request().Header.Get("Authorization") - if auth == "" { - return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Missing Authorization header"}) - } - - // Decode the macaroon - mac, err := macaroon.Base64Decode([]byte(auth)) - if err != nil { - return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon encoding"}) - } - - token, err := macaroon.New(secretKey, mac, location, macaroon.LatestVersion) - if err != nil { - return c.JSON(http.StatusBadRequest, map[string]string{"error": "Invalid macaroon"}) - } - - // Verify the macaroon - err = token.Verify(secretKey, func(caveat string) error { - for _, c := range MacroonCaveats { - if c.String() == caveat { - return nil - } - } - return nil // Return nil if the caveat is valid - }, nil) - if err != nil { - return c.JSON(http.StatusUnauthorized, map[string]string{"error": "Invalid macaroon"}) - } - - // Macaroon is valid, proceed to the next handler - return next(c) - } - } -} diff --git a/internal/ctx/channel.go b/internal/ctx/channel.go deleted file mode 100644 index 01e04aef8..000000000 --- a/internal/ctx/channel.go +++ /dev/null @@ -1,44 +0,0 @@ -//go:build js && wasm - -package ctx - -import ( - "syscall/js" - - "github.com/labstack/echo/v4" -) - -type BroadcastContext struct { - echo.Context - Channel js.Value -} - -func (c *BroadcastContext) BroadcastMessage(message string) { - c.Channel.Call("postMessage", message) -} - -type JSHandler func(this js.Value, args []js.Value) interface{} - -func UseBroadcastChannel(channelName string, handler JSHandler) echo.MiddlewareFunc { - var channel js.Value - - return func(next echo.HandlerFunc) echo.HandlerFunc { - return func(c echo.Context) error { - if channel.IsUndefined() { - channel = js.Global().Get("BroadcastChannel").New(channelName) - channel.Call("addEventListener", "message", handler) - } - - cc := &BroadcastContext{ - Context: c, - Channel: channel, - } - return next(cc) - } - } -} - -func PostBroadcastMessage(c echo.Context, message string) { - cc := c.(*BroadcastContext) - cc.BroadcastMessage(message) -} diff --git a/internal/ctx/cookies.go b/internal/ctx/cookies.go new file mode 100644 index 000000000..08060fb64 --- /dev/null +++ b/internal/ctx/cookies.go @@ -0,0 +1,30 @@ +package ctx + +import ( + "github.com/labstack/echo/v4" + "github.com/segmentio/ksuid" +) + +type CookieKey string + +const ( + CookieKeySessionID CookieKey = "session.id" + CookieKeySonrAddr CookieKey = "sonr.addr" + CookieKeySonrDID CookieKey = "sonr.did" + CookieKeyVaultCID CookieKey = "vault.cid" + CookieKeyVaultSchema CookieKey = "vault.schema" +) + +func (c CookieKey) String() string { + return string(c) +} + +func GetSessionID(c echo.Context) string { + // Attempt to read the session ID from the "session" cookie + sessionID, err := ReadCookie(c, CookieKeySessionID) + if err != nil { + // Generate a new KSUID if the session cookie is missing or invalid + WriteCookie(c, CookieKeySessionID, ksuid.New().String()) + } + return sessionID +} diff --git a/internal/ctx/ctx_dwn.go b/internal/ctx/ctx_dwn.go new file mode 100644 index 000000000..afbd63a1b --- /dev/null +++ b/internal/ctx/ctx_dwn.go @@ -0,0 +1,77 @@ +package ctx + +import ( + "encoding/json" + "net/http" + + "github.com/labstack/echo/v4" + dwngen "github.com/onsonr/sonr/internal/dwn/gen" +) + +type DWNContext struct { + echo.Context + + // Defaults + id string // Generated ksuid http cookie; Initialized on first request +} + +func (s *DWNContext) HasAuthorization() bool { + v := ReadHeader(s.Context, HeaderAuthorization) + return v != "" +} + +func (s *DWNContext) ID() string { + return s.id +} + +func (s *DWNContext) Address() string { + v, err := ReadCookie(s.Context, CookieKeySonrAddr) + if err != nil { + return "" + } + return v +} + +func (s *DWNContext) IPFSGatewayURL() string { + return ReadHeader(s.Context, HeaderIPFSGatewayURL) +} + +func (s *DWNContext) ChainID() string { + return ReadHeader(s.Context, HeaderSonrChainID) +} + +func (s *DWNContext) Schema() *dwngen.Schema { + v, err := ReadCookie(s.Context, CookieKeyVaultSchema) + if err != nil { + return nil + } + var schema dwngen.Schema + err = json.Unmarshal([]byte(v), &schema) + if err != nil { + return nil + } + return &schema +} + +func GetDWNContext(c echo.Context) (*DWNContext, error) { + ctx, ok := c.(*DWNContext) + if !ok { + return nil, echo.NewHTTPError(http.StatusInternalServerError, "DWN Context not found") + } + return ctx, nil +} + +// HighwaySessionMiddleware establishes a Session Cookie. +func DWNSessionMiddleware(config *dwngen.Config) echo.MiddlewareFunc { + return func(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + sessionID := GetSessionID(c) + injectConfig(c, config) + cc := &DWNContext{ + Context: c, + id: sessionID, + } + return next(cc) + } + } +} diff --git a/internal/ctx/ctx_hway.go b/internal/ctx/ctx_hway.go new file mode 100644 index 000000000..fcbf3ba7a --- /dev/null +++ b/internal/ctx/ctx_hway.go @@ -0,0 +1,38 @@ +package ctx + +import ( + "net/http" + + "github.com/labstack/echo/v4" +) + +type HwayContext struct { + echo.Context + + // Defaults + id string // Generated ksuid http cookie; Initialized on first request +} + +func (s *HwayContext) ID() string { + return s.id +} + +func GetHWAYContext(c echo.Context) (*HwayContext, error) { + ctx, ok := c.(*HwayContext) + if !ok { + return nil, echo.NewHTTPError(http.StatusInternalServerError, "Highway Context not found") + } + return ctx, nil +} + +// HighwaySessionMiddleware establishes a Session Cookie. +func HighwaySessionMiddleware(next echo.HandlerFunc) echo.HandlerFunc { + return func(c echo.Context) error { + sessionID := GetSessionID(c) + cc := &HwayContext{ + Context: c, + id: sessionID, + } + return next(cc) + } +} diff --git a/internal/ctx/ctx_sonr.go b/internal/ctx/ctx_sonr.go new file mode 100644 index 000000000..33ef1d6d1 --- /dev/null +++ b/internal/ctx/ctx_sonr.go @@ -0,0 +1,21 @@ +package ctx + +import ( + "time" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type SonrContext struct { + sdk.Context +} + +func GetSonrCTX(ctx sdk.Context) *SonrContext { + return &SonrContext{ctx} +} + +func (s *SonrContext) GetBlockExpiration(duration time.Duration) int64 { + blockTime := s.BlockTime() + avgBlockTime := float64(blockTime.Sub(blockTime).Seconds()) + return int64(duration.Seconds() / avgBlockTime) +} diff --git a/internal/ctx/headers.go b/internal/ctx/headers.go index 65a449f1d..26258e138 100644 --- a/internal/ctx/headers.go +++ b/internal/ctx/headers.go @@ -1,68 +1,37 @@ package ctx -// ╭───────────────────────────────────────────────────────────╮ -// │ Request Headers │ -// ╰───────────────────────────────────────────────────────────╯ +import ( + "encoding/json" -type RequestHeaders struct { - CacheControl *string `header:"Cache-Control"` - DeviceMemory *string `header:"Device-Memory"` - From *string `header:"From"` - Host *string `header:"Host"` - Referer *string `header:"Referer"` - UserAgent *string `header:"User-Agent"` - ViewportWidth *string `header:"Viewport-Width"` - Width *string `header:"Width"` + "github.com/labstack/echo/v4" + dwngen "github.com/onsonr/sonr/internal/dwn/gen" +) - // HTMX Specific - HXBoosted *string `header:"HX-Boosted"` - HXCurrentURL *string `header:"HX-Current-URL"` - HXHistoryRestoreRequest *string `header:"HX-History-Restore-Request"` - HXPrompt *string `header:"HX-Prompt"` - HXRequest *string `header:"HX-Request"` - HXTarget *string `header:"HX-Target"` - HXTriggerName *string `header:"HX-Trigger-Name"` - HXTrigger *string `header:"HX-Trigger"` +type HeaderKey string + +const ( + HeaderAuthorization HeaderKey = "Authorization" + + HeaderIPFSGatewayURL HeaderKey = "X-IPFS-Gateway" + HeaderSonrChainID HeaderKey = "X-Sonr-ChainID" + HeaderSonrKeyshare HeaderKey = "X-Sonr-Keyshare" +) + +func (h HeaderKey) String() string { + return string(h) } -type ProtectedRequestHeaders struct { - Authorization *string `header:"Authorization"` - Forwarded *string `header:"Forwarded"` - Link *string `header:"Link"` - PermissionsPolicy *string `header:"Permissions-Policy"` - ProxyAuthorization *string `header:"Proxy-Authorization"` - WWWAuthenticate *string `header:"WWW-Authenticate"` -} +func injectConfig(c echo.Context, config *dwngen.Config) { + WriteHeader(c, HeaderIPFSGatewayURL, config.IpfsGatewayUrl) + WriteHeader(c, HeaderSonrChainID, config.SonrChainId) + WriteHeader(c, HeaderSonrKeyshare, config.MotrKeyshare) + WriteCookie(c, CookieKeySonrAddr, config.MotrAddress) -// ╭───────────────────────────────────────────────────────────╮ -// │ Response Headers │ -// ╰───────────────────────────────────────────────────────────╯ + schemaBz, err := json.Marshal(config.VaultSchema) + if err != nil { + c.Logger().Error(err) + return + } -type ResponseHeaders struct { - // HTMX Specific - HXLocation *string `header:"HX-Location"` - HXPushURL *string `header:"HX-Push-Url"` - HXRedirect *string `header:"HX-Redirect"` - HXRefresh *string `header:"HX-Refresh"` - HXReplaceURL *string `header:"HX-Replace-Url"` - HXReswap *string `header:"HX-Reswap"` - HXRetarget *string `header:"HX-Retarget"` - HXReselect *string `header:"HX-Reselect"` - HXTrigger *string `header:"HX-Trigger"` - HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"` - HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"` -} - -type ProtectedResponseHeaders struct { - AcceptCH *string `header:"Accept-CH"` - AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"` - AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"` - AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"` - AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"` - AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"` - ContentSecurityPolicy *string `header:"Content-Security-Policy"` - CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"` - PermissionsPolicy *string `header:"Permissions-Policy"` - ProxyAuthorization *string `header:"Proxy-Authorization"` - WWWAuthenticate *string `header:"WWW-Authenticate"` + WriteCookie(c, CookieKeyVaultSchema, string(schemaBz)) } diff --git a/internal/ctx/render.go b/internal/ctx/render.go deleted file mode 100644 index 6a4deeb83..000000000 --- a/internal/ctx/render.go +++ /dev/null @@ -1,25 +0,0 @@ -package ctx - -import ( - "bytes" - - "github.com/a-h/templ" - "github.com/labstack/echo/v4" -) - -func RenderTempl(c echo.Context, cmp templ.Component) error { - // Create a buffer to store the rendered HTML - buf := &bytes.Buffer{} - // Render the component to the buffer - err := cmp.Render(c.Request().Context(), buf) - if err != nil { - return err - } - - // Set the content type - c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) - - // Write the buffered content to the response - _, err = c.Response().Write(buf.Bytes()) - return err -} diff --git a/internal/ctx/request.go b/internal/ctx/request.go new file mode 100644 index 000000000..d89bc629f --- /dev/null +++ b/internal/ctx/request.go @@ -0,0 +1,35 @@ +package ctx + +// ╭───────────────────────────────────────────────────────────╮ +// │ Request Headers │ +// ╰───────────────────────────────────────────────────────────╯ + +type RequestHeaders struct { + CacheControl *string `header:"Cache-Control"` + DeviceMemory *string `header:"Device-Memory"` + From *string `header:"From"` + Host *string `header:"Host"` + Referer *string `header:"Referer"` + UserAgent *string `header:"User-Agent"` + ViewportWidth *string `header:"Viewport-Width"` + Width *string `header:"Width"` + + // HTMX Specific + HXBoosted *string `header:"HX-Boosted"` + HXCurrentURL *string `header:"HX-Current-URL"` + HXHistoryRestoreRequest *string `header:"HX-History-Restore-Request"` + HXPrompt *string `header:"HX-Prompt"` + HXRequest *string `header:"HX-Request"` + HXTarget *string `header:"HX-Target"` + HXTriggerName *string `header:"HX-Trigger-Name"` + HXTrigger *string `header:"HX-Trigger"` +} + +type ProtectedRequestHeaders struct { + Authorization *string `header:"Authorization"` + Forwarded *string `header:"Forwarded"` + Link *string `header:"Link"` + PermissionsPolicy *string `header:"Permissions-Policy"` + ProxyAuthorization *string `header:"Proxy-Authorization"` + WWWAuthenticate *string `header:"WWW-Authenticate"` +} diff --git a/internal/ctx/response.go b/internal/ctx/response.go new file mode 100644 index 000000000..1984b1794 --- /dev/null +++ b/internal/ctx/response.go @@ -0,0 +1,38 @@ +package ctx + +import "github.com/go-webauthn/webauthn/protocol" + +type WebBytes = protocol.URLEncodedBase64 + +// ╭───────────────────────────────────────────────────────────╮ +// │ Response Headers │ +// ╰───────────────────────────────────────────────────────────╯ + +type ResponseHeaders struct { + // HTMX Specific + HXLocation *string `header:"HX-Location"` + HXPushURL *string `header:"HX-Push-Url"` + HXRedirect *string `header:"HX-Redirect"` + HXRefresh *string `header:"HX-Refresh"` + HXReplaceURL *string `header:"HX-Replace-Url"` + HXReswap *string `header:"HX-Reswap"` + HXRetarget *string `header:"HX-Retarget"` + HXReselect *string `header:"HX-Reselect"` + HXTrigger *string `header:"HX-Trigger"` + HXTriggerAfterSettle *string `header:"HX-Trigger-After-Settle"` + HXTriggerAfterSwap *string `header:"HX-Trigger-After-Swap"` +} + +type ProtectedResponseHeaders struct { + AcceptCH *string `header:"Accept-CH"` + AccessControlAllowCredentials *string `header:"Access-Control-Allow-Credentials"` + AccessControlAllowHeaders *string `header:"Access-Control-Allow-Headers"` + AccessControlAllowMethods *string `header:"Access-Control-Allow-Methods"` + AccessControlExposeHeaders *string `header:"Access-Control-Expose-Headers"` + AccessControlRequestHeaders *string `header:"Access-Control-Request-Headers"` + ContentSecurityPolicy *string `header:"Content-Security-Policy"` + CrossOriginEmbedderPolicy *string `header:"Cross-Origin-Embedder-Policy"` + PermissionsPolicy *string `header:"Permissions-Policy"` + ProxyAuthorization *string `header:"Proxy-Authorization"` + WWWAuthenticate *string `header:"WWW-Authenticate"` +} diff --git a/internal/ctx/session.go b/internal/ctx/session.go deleted file mode 100644 index 01178d42a..000000000 --- a/internal/ctx/session.go +++ /dev/null @@ -1,103 +0,0 @@ -package ctx - -import ( - "context" - "errors" - "net/http" - "net/url" - "time" - - "github.com/gorilla/sessions" - "github.com/labstack/echo/v4" - "github.com/segmentio/ksuid" -) - -var store sessions.Store - -type ctxKeySessionID struct{} - -// SessionMiddleware establishes a Session Cookie. -func SessionMiddleware(next echo.HandlerFunc) echo.HandlerFunc { - store = sessions.NewCookieStore([]byte("SESSION_KEY")) - return func(c echo.Context) error { - ctx := c.Request().Context() - - // Attempt to read the session ID from the "session" cookie - sessionID, err := readSessionIDFromCookie(c) - if err != nil { - // Generate a new KSUID if the session cookie is missing or invalid - sessionID = ksuid.New().String() - // Write the new session ID to the "session" cookie - err = writeSessionIDToCookie(c, sessionID) - if err != nil { - return c.JSON( - http.StatusInternalServerError, - map[string]string{"error": "Failed to set session cookie"}, - ) - } - } - - // Inject the session ID into the context - ctx = context.WithValue(ctx, ctxKeySessionID{}, sessionID) - // Update the request with the new context - c.SetRequest(c.Request().WithContext(ctx)) - - return next(c) - } -} - -func buildSession(c echo.Context, id string) *Session { - return &Session{ - ID: id, - Origin: getOrigin(c.Request().Header.Get("Host")), - UserAgent: c.Request().Header.Get("Sec-Ch-Ua"), - Platform: c.Request().Header.Get("Sec-Ch-Ua-Platform"), - Address: c.Request().Header.Get("X-Sonr-Address"), - ChainID: "", - } -} - -func getOrigin(o string) string { - if o == "" { - return "" - } - u, err := url.Parse(o) - if err != nil { - return "" - } - return u.Hostname() -} - -func getSessionID(ctx context.Context) (string, error) { - sessionID, ok := ctx.Value(ctxKeySessionID{}).(string) - if !ok || sessionID == "" { - return "", errors.New("session ID not found in context") - } - return sessionID, nil -} - -func readSessionIDFromCookie(c echo.Context) (string, error) { - cookie, err := c.Cookie("session") - if err != nil { - // Cookie not found or other error - return "", err - } - if cookie == nil || cookie.Value == "" { - // Cookie is empty - return "", http.ErrNoCookie - } - return cookie.Value, nil -} - -func writeSessionIDToCookie(c echo.Context, sessionID string) error { - cookie := &http.Cookie{ - Name: "session", - Value: sessionID, - Expires: time.Now().Add(24 * time.Hour), - HttpOnly: true, - Path: "/", - // Add Secure and SameSite attributes as needed - } - c.SetCookie(cookie) - return nil -} diff --git a/internal/ctx/state.go b/internal/ctx/state.go deleted file mode 100644 index 915b5d4e6..000000000 --- a/internal/ctx/state.go +++ /dev/null @@ -1,27 +0,0 @@ -package ctx - -import "github.com/labstack/echo/v4" - -type AuthState string - -const ( - Visitor AuthState = "visitor" - Authenticated AuthState = "authenticated" - Expired AuthState = "expired" - - PendingCredentials AuthState = "pending_credentials" - PendingAssertion AuthState = "pending_assertion" -) - -func (s AuthState) String() string { - return string(s) -} - -func GetAuthState(c echo.Context) AuthState { - vals := c.Request().Header.Values("Authorization") - if len(vals) == 0 { - return Visitor - } - s := AuthState(c.Request().Header.Get("Authorization")) - return s -} diff --git a/internal/ctx/store.go b/internal/ctx/store.go deleted file mode 100644 index 2cfd41517..000000000 --- a/internal/ctx/store.go +++ /dev/null @@ -1,70 +0,0 @@ -package ctx - -import ( - "errors" - "fmt" - - "github.com/go-webauthn/webauthn/protocol" - "github.com/labstack/echo/v4" -) - -type WebBytes = protocol.URLEncodedBase64 - -type Session struct { - // Defaults - ID string // Generated ksuid http cookie; Initialized on first request - Origin string // Webauthn mapping to Relaying Party ID; Initialized on first request - UserAgent string - Platform string - - // Initialization - Address string // Webauthn mapping to User ID; Supplied by DWN frontend - ChainID string // Macaroon mapping to location; Supplied by DWN frontend - - Subject string // Webauthn mapping to User Displayable Name; Supplied by DWN frontend - - // Authentication - challenge WebBytes // Webauthn mapping to Challenge; Per session based on origin -} - -func (s *Session) GetChallenge(subject string) (WebBytes, error) { - // Check if challenge is already set and subject matches - if s.Subject != "" && s.Subject != subject { - return nil, errors.New("challenge already set, and subject does not match") - } else if s.Subject == "" { - s.Subject = subject - } else { - return s.challenge, nil - } - - if s.challenge == nil { - chl, err := protocol.CreateChallenge() - if err != nil { - return nil, err - } - s.challenge = chl - } - return s.challenge, nil -} - -func (s *Session) ValidateChallenge(challenge WebBytes, subject string) error { - if s.challenge == nil { - return nil - } - if s.challenge.String() != challenge.String() { - return fmt.Errorf("invalid challenge") - } - s.Subject = subject - return nil -} - -func GetSession(c echo.Context) *Session { - id, _ := getSessionID(c.Request().Context()) - return buildSession(c, id) -} - -func SetAddress(c echo.Context, address string) *Session { - // Write address to X-Sonr-Address header - c.Response().Header().Set("X-Sonr-Address", address) - return buildSession(c, "") -} diff --git a/internal/ctx/utils.go b/internal/ctx/utils.go new file mode 100644 index 000000000..dc38fac69 --- /dev/null +++ b/internal/ctx/utils.go @@ -0,0 +1,73 @@ +package ctx + +import ( + "bytes" + "net/http" + "time" + + "github.com/a-h/templ" + "github.com/labstack/echo/v4" +) + +// ╭───────────────────────────────────────────────────────────╮ +// │ Template Rendering │ +// ╰───────────────────────────────────────────────────────────╯ + +func RenderTempl(c echo.Context, cmp templ.Component) error { + // Create a buffer to store the rendered HTML + buf := &bytes.Buffer{} + // Render the component to the buffer + err := cmp.Render(c.Request().Context(), buf) + if err != nil { + return err + } + + // Set the content type + c.Response().Header().Set(echo.HeaderContentType, echo.MIMETextHTML) + + // Write the buffered content to the response + _, err = c.Response().Write(buf.Bytes()) + return err +} + +// ╭──────────────────────────────────────────────────────────╮ +// │ Cookie Management │ +// ╰──────────────────────────────────────────────────────────╯ + +func ReadCookie(c echo.Context, key CookieKey) (string, error) { + cookie, err := c.Cookie(key.String()) + if err != nil { + // Cookie not found or other error + return "", err + } + if cookie == nil || cookie.Value == "" { + // Cookie is empty + return "", http.ErrNoCookie + } + return cookie.Value, nil +} + +func WriteCookie(c echo.Context, key CookieKey, value string) error { + cookie := &http.Cookie{ + Name: key.String(), + Value: value, + Expires: time.Now().Add(24 * time.Hour), + HttpOnly: true, + Path: "/", + // Add Secure and SameSite attributes as needed + } + c.SetCookie(cookie) + return nil +} + +// ╭────────────────────────────────────────────────────────╮ +// │ HTTP Headers │ +// ╰────────────────────────────────────────────────────────╯ + +func WriteHeader(c echo.Context, key HeaderKey, value string) { + c.Response().Header().Set(key.String(), value) +} + +func ReadHeader(c echo.Context, key HeaderKey) string { + return c.Response().Header().Get(key.String()) +} diff --git a/internal/dwn/app.wasm b/internal/dwn/app.wasm index 96b0621a8..939054e1d 100755 Binary files a/internal/dwn/app.wasm and b/internal/dwn/app.wasm differ diff --git a/internal/dwn/embed.go b/internal/dwn/embed.go index aa8f5acbd..9860a04f9 100644 --- a/internal/dwn/embed.go +++ b/internal/dwn/embed.go @@ -2,10 +2,18 @@ package dwn import ( _ "embed" + "encoding/json" "github.com/ipfs/boxo/files" "github.com/onsonr/sonr/internal/dwn/gen" - "github.com/onsonr/sonr/pkg/nebula/components/index" + "github.com/onsonr/sonr/pkg/nebula/components/vaultindex" +) + +const ( + FileNameAppWASM = "app.wasm" + FileNameConfigJSON = "dwn.json" + FileNameIndexHTML = "index.html" + FileNameWorkerJS = "sw.js" ) //go:embed app.wasm @@ -14,21 +22,21 @@ var dwnWasmData []byte //go:embed sw.js var swJSData []byte -var ( - dwnWasmFile = files.NewBytesFile(dwnWasmData) - swJSFile = files.NewBytesFile(swJSData) -) - // NewVaultDirectory creates a new directory with the default files func NewVaultDirectory(cnfg *gen.Config) (files.Node, error) { - idxFile, err := index.BuildFile(cnfg) + idxFile, err := vaultindex.BuildFile(cnfg) + if err != nil { + return nil, err + } + cnfgBz, err := json.Marshal(cnfg) if err != nil { return nil, err } fileMap := map[string]files.Node{ - "sw.js": swJSFile, - "app.wasm": dwnWasmFile, - "index.html": idxFile, + FileNameAppWASM: files.NewBytesFile(dwnWasmData), + FileNameConfigJSON: files.NewBytesFile(cnfgBz), + FileNameIndexHTML: idxFile, + FileNameWorkerJS: files.NewBytesFile(swJSData), } return files.NewMapDirectory(fileMap), nil } diff --git a/internal/dwn/serve.go b/internal/dwn/fetch/serve.go similarity index 99% rename from internal/dwn/serve.go rename to internal/dwn/fetch/serve.go index 0de8251a2..8e44b86ea 100644 --- a/internal/dwn/serve.go +++ b/internal/dwn/fetch/serve.go @@ -1,7 +1,7 @@ //go:build js && wasm // +build js,wasm -package dwn +package fetch import ( "bytes" diff --git a/internal/dwn/gen/Config.pkl.go b/internal/dwn/gen/Config.pkl.go index 22e5e3c36..e08b568dd 100644 --- a/internal/dwn/gen/Config.pkl.go +++ b/internal/dwn/gen/Config.pkl.go @@ -2,13 +2,17 @@ package gen type Config struct { - Ipfs *IPFS `pkl:"ipfs" json:"ipfs,omitempty"` + IpfsGatewayUrl string `pkl:"ipfsGatewayUrl" json:"ipfsGatewayUrl,omitempty"` - Sonr *Sonr `pkl:"sonr" json:"sonr,omitempty"` + MotrKeyshare string `pkl:"motrKeyshare" json:"motrKeyshare,omitempty"` - Motr *Motr `pkl:"motr" json:"motr,omitempty"` + MotrAddress string `pkl:"motrAddress" json:"motrAddress,omitempty"` - Schema *Schema `pkl:"schema" json:"schema,omitempty"` + SonrApiUrl string `pkl:"sonrApiUrl" json:"sonrApiUrl,omitempty"` - ProxyUrl string `pkl:"proxyUrl" json:"proxyUrl,omitempty"` + SonrRpcUrl string `pkl:"sonrRpcUrl" json:"sonrRpcUrl,omitempty"` + + SonrChainId string `pkl:"sonrChainId" json:"sonrChainId,omitempty"` + + VaultSchema *Schema `pkl:"vaultSchema" json:"vaultSchema,omitempty"` } diff --git a/internal/dwn/gen/IPFS.pkl.go b/internal/dwn/gen/IPFS.pkl.go deleted file mode 100644 index 41711f873..000000000 --- a/internal/dwn/gen/IPFS.pkl.go +++ /dev/null @@ -1,8 +0,0 @@ -// Code generated from Pkl module `dwngen`. DO NOT EDIT. -package gen - -type IPFS struct { - ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"` - - GatewayUrl string `pkl:"gatewayUrl" json:"gatewayUrl,omitempty"` -} diff --git a/internal/dwn/gen/Motr.pkl.go b/internal/dwn/gen/Motr.pkl.go deleted file mode 100644 index 066606d61..000000000 --- a/internal/dwn/gen/Motr.pkl.go +++ /dev/null @@ -1,10 +0,0 @@ -// Code generated from Pkl module `dwngen`. DO NOT EDIT. -package gen - -type Motr struct { - Keyshare string `pkl:"keyshare" json:"keyshare,omitempty"` - - Address string `pkl:"address" json:"address,omitempty"` - - Origin string `pkl:"origin" json:"origin,omitempty"` -} diff --git a/internal/dwn/gen/Sonr.pkl.go b/internal/dwn/gen/Sonr.pkl.go deleted file mode 100644 index 200b59b2d..000000000 --- a/internal/dwn/gen/Sonr.pkl.go +++ /dev/null @@ -1,14 +0,0 @@ -// Code generated from Pkl module `dwngen`. DO NOT EDIT. -package gen - -type Sonr struct { - ApiUrl string `pkl:"apiUrl" json:"apiUrl,omitempty"` - - GrpcUrl string `pkl:"grpcUrl" json:"grpcUrl,omitempty"` - - RpcUrl string `pkl:"rpcUrl" json:"rpcUrl,omitempty"` - - WebSocketUrl string `pkl:"webSocketUrl" json:"webSocketUrl,omitempty"` - - ChainId string `pkl:"chainId" json:"chainId,omitempty"` -} diff --git a/internal/dwn/gen/init.pkl.go b/internal/dwn/gen/init.pkl.go index aa2ce998a..9cea869d9 100644 --- a/internal/dwn/gen/init.pkl.go +++ b/internal/dwn/gen/init.pkl.go @@ -6,8 +6,5 @@ import "github.com/apple/pkl-go/pkl" func init() { pkl.RegisterMapping("dwngen", Dwngen{}) pkl.RegisterMapping("dwngen#Config", Config{}) - pkl.RegisterMapping("dwngen#IPFS", IPFS{}) - pkl.RegisterMapping("dwngen#Sonr", Sonr{}) - pkl.RegisterMapping("dwngen#Motr", Motr{}) pkl.RegisterMapping("dwngen#Schema", Schema{}) } diff --git a/cmd/motr/main.go b/internal/dwn/wasm/main.go similarity index 68% rename from cmd/motr/main.go rename to internal/dwn/wasm/main.go index 2454db36a..32f6b8a68 100644 --- a/cmd/motr/main.go +++ b/internal/dwn/wasm/main.go @@ -9,11 +9,13 @@ import ( "github.com/labstack/echo/v4" "github.com/onsonr/sonr/internal/ctx" - "github.com/onsonr/sonr/internal/dwn" + "github.com/onsonr/sonr/internal/dwn/fetch" dwngen "github.com/onsonr/sonr/internal/dwn/gen" "github.com/onsonr/sonr/pkg/workers/routes" ) +const FileNameConfigJSON = "dwn.json" + var config *dwngen.Config func main() { @@ -24,19 +26,19 @@ func main() { // Setup HTTP server e := echo.New() - e.Use(ctx.SessionMiddleware) - routes.RegisterClientAPI(e) - routes.RegisterClientViews(e) - dwn.Serve(e) + e.Use(ctx.DWNSessionMiddleware(config)) + routes.RegisterWebNodeAPI(e) + routes.RegisterWebNodeViews(e) + fetch.Serve(e) } func loadDwnConfig() error { // Read dwn.json config - dwnBz, err := os.ReadFile("dwn.json") + dwnBz, err := os.ReadFile(FileNameConfigJSON) if err != nil { return err } - dwnConfig := &dwngen.Config{} + dwnConfig := new(dwngen.Config) err = json.Unmarshal(dwnBz, dwnConfig) if err != nil { return err diff --git a/pkg/nebula/assets/css/styles.css b/pkg/nebula/assets/css/styles.css index 03be56384..166f78fb1 100644 --- a/pkg/nebula/assets/css/styles.css +++ b/pkg/nebula/assets/css/styles.css @@ -923,6 +923,40 @@ select{ format("woff2"); } +.container{ + width: 100%; +} + +@media (min-width: 640px){ + .container{ + max-width: 640px; + } +} + +@media (min-width: 768px){ + .container{ + max-width: 768px; + } +} + +@media (min-width: 1024px){ + .container{ + max-width: 1024px; + } +} + +@media (min-width: 1280px){ + .container{ + max-width: 1280px; + } +} + +@media (min-width: 1536px){ + .container{ + max-width: 1536px; + } +} + .motion-preset-slide-up{ --motion-origin-translate-y: 25%; --motion-origin-opacity: 0; @@ -1074,16 +1108,6 @@ select{ margin: 0.5rem; } -.-mx-6{ - margin-left: -1.5rem; - margin-right: -1.5rem; -} - -.mx-6{ - margin-left: 1.5rem; - margin-right: 1.5rem; -} - .mx-auto{ margin-left: auto; margin-right: auto; @@ -2027,10 +2051,6 @@ select{ padding-top: 0px; } -.pt-12{ - padding-top: 3rem; -} - .pt-2{ padding-top: 0.5rem; } @@ -2059,6 +2079,10 @@ select{ vertical-align: top; } +.font-fancy{ + font-family: "ZT Bros Oskon 90s", sans-serif; +} + .font-inter{ font-family: Inter, sans-serif; } @@ -2549,11 +2573,6 @@ select{ mask-image: linear-gradient(to right,transparent 8px, rgb(255 255 255 / .7) 64px, #fff 50%, rgb(255 255 255 / .7) calc(100% - 64px), transparent calc(100% - 8px)); } -.\[mask-image\:linear-gradient\(white_0\%\2c white_calc\(100\%-40px\)\2c _transparent_calc\(100\%-1px\)\)\]{ - -webkit-mask-image: linear-gradient(white 0%,white calc(100% - 40px), transparent calc(100% - 1px)); - mask-image: linear-gradient(white 0%,white calc(100% - 40px), transparent calc(100% - 1px)); -} - /* See Alpine.js: https://github.com/alpinejs/alpine#x-cloak */ [x-cloak=""] { @@ -3462,10 +3481,6 @@ input[type="search"]::-webkit-search-results-decoration { padding-bottom: 5rem; } - .md\:pt-20{ - padding-top: 5rem; - } - .md\:pt-40{ padding-top: 10rem; } diff --git a/pkg/nebula/assets/js/alpin-focus.min.js b/pkg/nebula/assets/js/alpin-focus.min.js new file mode 100644 index 000000000..5a2d18be2 --- /dev/null +++ b/pkg/nebula/assets/js/alpin-focus.min.js @@ -0,0 +1,15 @@ +(()=>{var _=["input","select","textarea","a[href]","button","[tabindex]:not(slot)","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])',"details>summary:first-of-type","details"],k=_.join(","),K=typeof Element>"u",N=K?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,B=!K&&Element.prototype.getRootNode?function(i){return i.getRootNode()}:function(i){return i.ownerDocument},V=function(e,t,a){var n=Array.prototype.slice.apply(e.querySelectorAll(k));return t&&N.call(e,k)&&n.unshift(e),n=n.filter(a),n},$=function i(e,t,a){for(var n=[],r=Array.from(e);r.length;){var s=r.shift();if(s.tagName==="SLOT"){var l=s.assignedElements(),m=l.length?l:s.children,p=i(m,!0,a);a.flatten?n.push.apply(n,p):n.push({scope:s,candidates:p})}else{var v=N.call(s,k);v&&a.filter(s)&&(t||!e.includes(s))&&n.push(s);var h=s.shadowRoot||typeof a.getShadowRoot=="function"&&a.getShadowRoot(s),y=!a.shadowRootFilter||a.shadowRootFilter(s);if(h&&y){var w=i(h===!0?s.children:h.children,!0,a);a.flatten?n.push.apply(n,w):n.push({scope:s,candidates:w})}else r.unshift.apply(r,s.children)}}return n},Y=function(e,t){return e.tabIndex<0&&(t||/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||e.isContentEditable)&&isNaN(parseInt(e.getAttribute("tabindex"),10))?0:e.tabIndex},se=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Z=function(e){return e.tagName==="INPUT"},ce=function(e){return Z(e)&&e.type==="hidden"},le=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(a){return a.tagName==="SUMMARY"});return t},fe=function(e,t){for(var a=0;asummary:first-of-type"),s=r?e.parentElement:e;if(N.call(s,"details:not([open]) *"))return!0;var l=B(e).host,m=l?.ownerDocument.contains(l)||e.ownerDocument.contains(e);if(!a||a==="full"){if(typeof n=="function"){for(var p=e;e;){var v=e.parentElement,h=B(e);if(v&&!v.shadowRoot&&n(v)===!0)return W(e);e.assignedSlot?e=e.assignedSlot:!v&&h!==e.ownerDocument?e=h.host:e=v}e=p}if(m)return!e.getClientRects().length}else if(a==="non-zero-area")return W(e);return!1},pe=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var a=0;a=0)},me=function i(e){var t=[],a=[];return e.forEach(function(n,r){var s=!!n.scope,l=s?n.scope:n,m=Y(l,s),p=s?i(n.candidates):l;m===0?s?t.push.apply(t,p):t.push(l):a.push({documentOrder:r,tabIndex:m,item:n,isScope:s,content:p})}),a.sort(se).reduce(function(n,r){return r.isScope?n.push.apply(n,r.content):n.push(r.content),n},[]).concat(t)},z=function(e,t){t=t||{};var a;return t.getShadowRoot?a=$([e],t.includeContainer,{filter:G.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ge}):a=V(e,t.includeContainer,G.bind(null,t)),me(a)},x=function(e,t){t=t||{};var a;return t.getShadowRoot?a=$([e],t.includeContainer,{filter:I.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):a=V(e,t.includeContainer,I.bind(null,t)),a},A=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return N.call(e,k)===!1?!1:G(t,e)},ye=_.concat("iframe").join(","),R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return N.call(e,ye)===!1?!1:I(t,e)};function Q(i,e){var t=Object.keys(i);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(i);e&&(a=a.filter(function(n){return Object.getOwnPropertyDescriptor(i,n).enumerable})),t.push.apply(t,a)}return t}function X(i){for(var e=1;e0){var a=i[i.length-1];a!==t&&a.pause()}var n=i.indexOf(t);n===-1||i.splice(n,1),i.push(t)},deactivateTrap:function(t){var a=i.indexOf(t);a!==-1&&i.splice(a,1),i.length>0&&i[i.length-1].unpause()}}}(),Te=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Fe=function(e){return e.key==="Escape"||e.key==="Esc"||e.keyCode===27},Se=function(e){return e.key==="Tab"||e.keyCode===9},ee=function(e){return setTimeout(e,0)},te=function(e,t){var a=-1;return e.every(function(n,r){return t(n)?(a=r,!1):!0}),a},O=function(e){for(var t=arguments.length,a=new Array(t>1?t-1:0),n=1;n1?c-1:0),f=1;f=0)o=a.activeElement;else{var u=r.tabbableGroups[0],c=u&&u.firstTabbableNode;o=c||p("fallbackFocus")}if(!o)throw new Error("Your focus-trap needs to have at least one focusable element");return o},h=function(){if(r.containerGroups=r.containers.map(function(o){var u=z(o,n.tabbableOptions),c=x(o,n.tabbableOptions);return{container:o,tabbableNodes:u,focusableNodes:c,firstTabbableNode:u.length>0?u[0]:null,lastTabbableNode:u.length>0?u[u.length-1]:null,nextTabbableNode:function(f){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=c.findIndex(function(E){return E===f});if(!(F<0))return g?c.slice(F+1).find(function(E){return A(E,n.tabbableOptions)}):c.slice(0,F).reverse().find(function(E){return A(E,n.tabbableOptions)})}}}),r.tabbableGroups=r.containerGroups.filter(function(o){return o.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!p("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times")},y=function d(o){if(o!==!1&&o!==a.activeElement){if(!o||!o.focus){d(v());return}o.focus({preventScroll:!!n.preventScroll}),r.mostRecentlyFocusedNode=o,Te(o)&&o.select()}},w=function(o){var u=p("setReturnFocus",o);return u||(u===!1?!1:o)},S=function(o){var u=L(o);if(!(m(u)>=0)){if(O(n.clickOutsideDeactivates,o)){s.deactivate({returnFocus:n.returnFocusOnDeactivate&&!R(u,n.tabbableOptions)});return}O(n.allowOutsideClick,o)||o.preventDefault()}},D=function(o){var u=L(o),c=m(u)>=0;c||u instanceof Document?c&&(r.mostRecentlyFocusedNode=u):(o.stopImmediatePropagation(),y(r.mostRecentlyFocusedNode||v()))},T=function(o){var u=L(o);h();var c=null;if(r.tabbableGroups.length>0){var b=m(u),f=b>=0?r.containerGroups[b]:void 0;if(b<0)o.shiftKey?c=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:c=r.tabbableGroups[0].firstTabbableNode;else if(o.shiftKey){var g=te(r.tabbableGroups,function(P){var j=P.firstTabbableNode;return u===j});if(g<0&&(f.container===u||R(u,n.tabbableOptions)&&!A(u,n.tabbableOptions)&&!f.nextTabbableNode(u,!1))&&(g=b),g>=0){var F=g===0?r.tabbableGroups.length-1:g-1,E=r.tabbableGroups[F];c=E.lastTabbableNode}}else{var C=te(r.tabbableGroups,function(P){var j=P.lastTabbableNode;return u===j});if(C<0&&(f.container===u||R(u,n.tabbableOptions)&&!A(u,n.tabbableOptions)&&!f.nextTabbableNode(u))&&(C=b),C>=0){var oe=C===r.tabbableGroups.length-1?0:C+1,ue=r.tabbableGroups[oe];c=ue.firstTabbableNode}}}else c=p("fallbackFocus");c&&(o.preventDefault(),y(c))},M=function(o){if(Fe(o)&&O(n.escapeDeactivates,o)!==!1){o.preventDefault(),s.deactivate();return}if(Se(o)){T(o);return}},q=function(o){var u=L(o);m(u)>=0||O(n.clickOutsideDeactivates,o)||O(n.allowOutsideClick,o)||(o.preventDefault(),o.stopImmediatePropagation())},H=function(){if(r.active)return J.activateTrap(s),r.delayInitialFocusTimer=n.delayInitialFocus?ee(function(){y(v())}):y(v()),a.addEventListener("focusin",D,!0),a.addEventListener("mousedown",S,{capture:!0,passive:!1}),a.addEventListener("touchstart",S,{capture:!0,passive:!1}),a.addEventListener("click",q,{capture:!0,passive:!1}),a.addEventListener("keydown",M,{capture:!0,passive:!1}),s},U=function(){if(r.active)return a.removeEventListener("focusin",D,!0),a.removeEventListener("mousedown",S,!0),a.removeEventListener("touchstart",S,!0),a.removeEventListener("click",q,!0),a.removeEventListener("keydown",M,!0),s};return s={get active(){return r.active},get paused(){return r.paused},activate:function(o){if(r.active)return this;var u=l(o,"onActivate"),c=l(o,"onPostActivate"),b=l(o,"checkCanFocusTrap");b||h(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=a.activeElement,u&&u();var f=function(){b&&h(),H(),c&&c()};return b?(b(r.containers.concat()).then(f,f),this):(f(),this)},deactivate:function(o){if(!r.active)return this;var u=X({onDeactivate:n.onDeactivate,onPostDeactivate:n.onPostDeactivate,checkCanReturnFocus:n.checkCanReturnFocus},o);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,U(),r.active=!1,r.paused=!1,J.deactivateTrap(s);var c=l(u,"onDeactivate"),b=l(u,"onPostDeactivate"),f=l(u,"checkCanReturnFocus"),g=l(u,"returnFocus","returnFocusOnDeactivate");c&&c();var F=function(){ee(function(){g&&y(w(r.nodeFocusedBeforeActivation)),b&&b()})};return g&&f?(f(w(r.nodeFocusedBeforeActivation)).then(F,F),this):(F(),this)},pause:function(){return r.paused||!r.active?this:(r.paused=!0,U(),this)},unpause:function(){return!r.paused||!r.active?this:(r.paused=!1,h(),H(),this)},updateContainerElements:function(o){var u=[].concat(o).filter(Boolean);return r.containers=u.map(function(c){return typeof c=="string"?a.querySelector(c):c}),r.active&&h(),this}},s.updateContainerElements(e),s};function ne(i){let e,t;window.addEventListener("focusin",()=>{e=t,t=document.activeElement}),i.magic("focus",a=>{let n=a;return{__noscroll:!1,__wrapAround:!1,within(r){return n=r,this},withoutScrolling(){return this.__noscroll=!0,this},noscroll(){return this.__noscroll=!0,this},withWrapAround(){return this.__wrapAround=!0,this},wrap(){return this.withWrapAround()},focusable(r){return R(r)},previouslyFocused(){return e},lastFocused(){return e},focused(){return t},focusables(){return Array.isArray(n)?n:x(n,{displayCheck:"none"})},all(){return this.focusables()},isFirst(r){let s=this.all();return s[0]&&s[0].isSameNode(r)},isLast(r){let s=this.all();return s.length&&s.slice(-1)[0].isSameNode(r)},getFirst(){return this.all()[0]},getLast(){return this.all().slice(-1)[0]},getNext(){let r=this.all(),s=document.activeElement;if(r.indexOf(s)!==-1)return this.__wrapAround&&r.indexOf(s)===r.length-1?r[0]:r[r.indexOf(s)+1]},getPrevious(){let r=this.all(),s=document.activeElement;if(r.indexOf(s)!==-1)return this.__wrapAround&&r.indexOf(s)===0?r.slice(-1)[0]:r[r.indexOf(s)-1]},first(){this.focus(this.getFirst())},last(){this.focus(this.getLast())},next(){this.focus(this.getNext())},previous(){this.focus(this.getPrevious())},prev(){return this.previous()},focus(r){r&&setTimeout(()=>{r.hasAttribute("tabindex")||r.setAttribute("tabindex","0"),r.focus({preventScroll:this.__noscroll})})}}}),i.directive("trap",i.skipDuringClone((a,{expression:n,modifiers:r},{effect:s,evaluateLater:l,cleanup:m})=>{let p=l(n),v=!1,h={escapeDeactivates:!1,allowOutsideClick:!0,fallbackFocus:()=>a};if(r.includes("noautofocus"))h.initialFocus=!1;else{let T=a.querySelector("[autofocus]");T&&(h.initialFocus=T)}let y=re(a,h),w=()=>{},S=()=>{},D=()=>{w(),w=()=>{},S(),S=()=>{},y.deactivate({returnFocus:!r.includes("noreturn")})};s(()=>p(T=>{v!==T&&(T&&!v&&(r.includes("noscroll")&&(S=Ee()),r.includes("inert")&&(w=ae(a)),setTimeout(()=>{y.activate()},15)),!T&&v&&D(),v=!!T)})),m(D)},(a,{expression:n,modifiers:r},{evaluate:s})=>{r.includes("inert")&&s(n)&&ae(a)}))}function ae(i){let e=[];return ie(i,t=>{let a=t.hasAttribute("aria-hidden");t.setAttribute("aria-hidden","true"),e.push(()=>a||t.removeAttribute("aria-hidden"))}),()=>{for(;e.length;)e.pop()()}}function ie(i,e){i.isSameNode(document.body)||!i.parentNode||Array.from(i.parentNode.children).forEach(t=>{t.isSameNode(i)?ie(i.parentNode,e):e(t)})}function Ee(){let i=document.documentElement.style.overflow,e=document.documentElement.style.paddingRight,t=window.innerWidth-document.documentElement.clientWidth;return document.documentElement.style.overflow="hidden",document.documentElement.style.paddingRight=`${t}px`,()=>{document.documentElement.style.overflow=i,document.documentElement.style.paddingRight=e}}document.addEventListener("alpine:init",()=>{window.Alpine.plugin(ne)});})(); +/*! Bundled license information: + +tabbable/dist/index.esm.js: + (*! + * tabbable 5.3.3 + * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE + *) + +focus-trap/dist/focus-trap.esm.js: + (*! + * focus-trap 6.9.4 + * @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE + *) +*/ diff --git a/pkg/nebula/components/auth/forms/details_basic.templ b/pkg/nebula/components/auth/forms/details_basic.templ deleted file mode 100644 index 9d669eede..000000000 --- a/pkg/nebula/components/auth/forms/details_basic.templ +++ /dev/null @@ -1,11 +0,0 @@ -package forms - -templ BasicDetailsForm() { -
-
-
-
-
-
-
-} diff --git a/pkg/nebula/components/auth/route.go b/pkg/nebula/components/auth/route.go deleted file mode 100644 index 73a376bc5..000000000 --- a/pkg/nebula/components/auth/route.go +++ /dev/null @@ -1,18 +0,0 @@ -package auth - -import ( - "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/internal/ctx" -) - -func AuthorizeRoute(c echo.Context) error { - return ctx.RenderTempl(c, AuthorizeModal(c)) -} - -func LoginRoute(c echo.Context) error { - return ctx.RenderTempl(c, LoginModal(c)) -} - -func RegisterRoute(c echo.Context) error { - return ctx.RenderTempl(c, RegisterModal(c)) -} diff --git a/pkg/nebula/components/auth/forms/consent_privacy.templ b/pkg/nebula/components/authentication/forms/consent_privacy.templ similarity index 100% rename from pkg/nebula/components/auth/forms/consent_privacy.templ rename to pkg/nebula/components/authentication/forms/consent_privacy.templ diff --git a/pkg/nebula/components/auth/forms/consent_privacy_templ.go b/pkg/nebula/components/authentication/forms/consent_privacy_templ.go similarity index 100% rename from pkg/nebula/components/auth/forms/consent_privacy_templ.go rename to pkg/nebula/components/authentication/forms/consent_privacy_templ.go diff --git a/pkg/nebula/components/auth/forms/credential_assert.templ b/pkg/nebula/components/authentication/forms/credential_assert.templ similarity index 72% rename from pkg/nebula/components/auth/forms/credential_assert.templ rename to pkg/nebula/components/authentication/forms/credential_assert.templ index 142ecaca8..d40eba567 100644 --- a/pkg/nebula/components/auth/forms/credential_assert.templ +++ b/pkg/nebula/components/authentication/forms/credential_assert.templ @@ -1,5 +1,7 @@ package forms +import "github.com/labstack/echo/v4" + templ AssertCredentialForm() {
@@ -9,3 +11,25 @@ templ AssertCredentialForm() {
} + +templ NavigatorCredentialsGetAll(c echo.Context) { + +} diff --git a/pkg/nebula/components/auth/forms/credential_assert_templ.go b/pkg/nebula/components/authentication/forms/credential_assert_templ.go similarity index 61% rename from pkg/nebula/components/auth/forms/credential_assert_templ.go rename to pkg/nebula/components/authentication/forms/credential_assert_templ.go index 9c3712c7f..ff593b240 100644 --- a/pkg/nebula/components/auth/forms/credential_assert_templ.go +++ b/pkg/nebula/components/authentication/forms/credential_assert_templ.go @@ -8,6 +8,8 @@ package forms import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" +import "github.com/labstack/echo/v4" + func AssertCredentialForm() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context @@ -37,4 +39,33 @@ func AssertCredentialForm() templ.Component { }) } +func NavigatorCredentialsGetAll(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/components/auth/forms/credential_register.templ b/pkg/nebula/components/authentication/forms/credential_register.templ similarity index 62% rename from pkg/nebula/components/auth/forms/credential_register.templ rename to pkg/nebula/components/authentication/forms/credential_register.templ index 4e91ee1a6..a221b14b4 100644 --- a/pkg/nebula/components/auth/forms/credential_register.templ +++ b/pkg/nebula/components/authentication/forms/credential_register.templ @@ -1,5 +1,7 @@ package forms +import "github.com/labstack/echo/v4" + templ RegisterCredentialForm() {
@@ -9,3 +11,39 @@ templ RegisterCredentialForm() {
} + +templ NavigatorCredentialsCreate(c echo.Context) { + +} diff --git a/pkg/nebula/components/auth/forms/credential_register_templ.go b/pkg/nebula/components/authentication/forms/credential_register_templ.go similarity index 56% rename from pkg/nebula/components/auth/forms/credential_register_templ.go rename to pkg/nebula/components/authentication/forms/credential_register_templ.go index 0ef8c8922..a41ba1cdf 100644 --- a/pkg/nebula/components/auth/forms/credential_register_templ.go +++ b/pkg/nebula/components/authentication/forms/credential_register_templ.go @@ -8,6 +8,8 @@ package forms import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" +import "github.com/labstack/echo/v4" + func RegisterCredentialForm() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context @@ -37,4 +39,33 @@ func RegisterCredentialForm() templ.Component { }) } +func NavigatorCredentialsCreate(c echo.Context) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/components/authentication/forms/details_basic.templ b/pkg/nebula/components/authentication/forms/details_basic.templ new file mode 100644 index 000000000..03193f63e --- /dev/null +++ b/pkg/nebula/components/authentication/forms/details_basic.templ @@ -0,0 +1,18 @@ +package forms + +templ BasicDetailsForm() { +
+
+ @nameInput() + @usernameInput() +
+
+} + +templ nameInput() { +
+} + +templ usernameInput() { +
+} diff --git a/pkg/nebula/components/authentication/forms/details_basic_templ.go b/pkg/nebula/components/authentication/forms/details_basic_templ.go new file mode 100644 index 000000000..925f5a565 --- /dev/null +++ b/pkg/nebula/components/authentication/forms/details_basic_templ.go @@ -0,0 +1,110 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package forms + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +func BasicDetailsForm() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = nameInput().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = usernameInput().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func nameInput() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func usernameInput() templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var3 := templ.GetChildren(ctx) + if templ_7745c5c3_Var3 == nil { + templ_7745c5c3_Var3 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/components/auth/modal.templ b/pkg/nebula/components/authentication/modal.templ similarity index 79% rename from pkg/nebula/components/auth/modal.templ rename to pkg/nebula/components/authentication/modal.templ index 924686bee..b5e39eb8a 100644 --- a/pkg/nebula/components/auth/modal.templ +++ b/pkg/nebula/components/authentication/modal.templ @@ -1,8 +1,8 @@ -package auth +package authentication import ( "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/pkg/nebula/components/auth/sections" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/sections" "github.com/onsonr/sonr/pkg/nebula/global/styles" ) @@ -14,12 +14,12 @@ templ RegisterModal(c echo.Context) { templ LoginModal(c echo.Context) { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { - @sections.RegisterStart() + @sections.LoginStart() } } templ AuthorizeModal(c echo.Context) { @styles.OpenModal("Account Registration", "Enter your account information below to create your account.") { - @sections.RegisterStart() + @sections.AuthorizeStart() } } diff --git a/pkg/nebula/components/auth/modal_templ.go b/pkg/nebula/components/authentication/modal_templ.go similarity index 95% rename from pkg/nebula/components/auth/modal_templ.go rename to pkg/nebula/components/authentication/modal_templ.go index 4fa86f454..88e43050d 100644 --- a/pkg/nebula/components/auth/modal_templ.go +++ b/pkg/nebula/components/authentication/modal_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.778 -package auth +package authentication //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -10,7 +10,7 @@ import templruntime "github.com/a-h/templ/runtime" import ( "github.com/labstack/echo/v4" - "github.com/onsonr/sonr/pkg/nebula/components/auth/sections" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/sections" "github.com/onsonr/sonr/pkg/nebula/global/styles" ) @@ -94,7 +94,7 @@ func LoginModal(c echo.Context) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = sections.RegisterStart().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = sections.LoginStart().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -141,7 +141,7 @@ func AuthorizeModal(c echo.Context) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Err = sections.RegisterStart().Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Err = sections.AuthorizeStart().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/pkg/nebula/components/authentication/route.go b/pkg/nebula/components/authentication/route.go new file mode 100644 index 000000000..2e85d2de1 --- /dev/null +++ b/pkg/nebula/components/authentication/route.go @@ -0,0 +1,37 @@ +package authentication + +import ( + "log" + + "github.com/labstack/echo/v4" + "github.com/onsonr/sonr/internal/ctx" +) + +// ╭───────────────────────────────────────────────────────────╮ +// │ DWN Routes - Authentication │ +// ╰───────────────────────────────────────────────────────────╯ + +func CurrentViewRoute(c echo.Context) error { + s, err := ctx.GetDWNContext(c) + if err != nil { + return err + } + log.Printf("Session ID: %s", s.ID()) + return ctx.RenderTempl(c, CurrentView(c)) +} + +// ╭───────────────────────────────────────────────────────────╮ +// │ Hway Routes - Authentication │ +// ╰───────────────────────────────────────────────────────────╯ + +func AuthorizeModalRoute(c echo.Context) error { + return ctx.RenderTempl(c, AuthorizeModal(c)) +} + +func LoginModalRoute(c echo.Context) error { + return ctx.RenderTempl(c, LoginModal(c)) +} + +func RegisterModalRoute(c echo.Context) error { + return ctx.RenderTempl(c, RegisterModal(c)) +} diff --git a/pkg/nebula/components/auth/sections/authorize.templ b/pkg/nebula/components/authentication/sections/authorize.templ similarity index 92% rename from pkg/nebula/components/auth/sections/authorize.templ rename to pkg/nebula/components/authentication/sections/authorize.templ index b52d47492..8dd62d0b0 100644 --- a/pkg/nebula/components/auth/sections/authorize.templ +++ b/pkg/nebula/components/authentication/sections/authorize.templ @@ -1,7 +1,7 @@ package sections import ( - "github.com/onsonr/sonr/pkg/nebula/components/auth/forms" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) diff --git a/pkg/nebula/components/auth/sections/authorize_templ.go b/pkg/nebula/components/authentication/sections/authorize_templ.go similarity index 97% rename from pkg/nebula/components/auth/sections/authorize_templ.go rename to pkg/nebula/components/authentication/sections/authorize_templ.go index cfa05d036..2187d334f 100644 --- a/pkg/nebula/components/auth/sections/authorize_templ.go +++ b/pkg/nebula/components/authentication/sections/authorize_templ.go @@ -9,7 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/nebula/components/auth/forms" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) diff --git a/pkg/nebula/components/auth/sections/login.templ b/pkg/nebula/components/authentication/sections/login.templ similarity index 92% rename from pkg/nebula/components/auth/sections/login.templ rename to pkg/nebula/components/authentication/sections/login.templ index 2c35ffc91..4fa8d39e0 100644 --- a/pkg/nebula/components/auth/sections/login.templ +++ b/pkg/nebula/components/authentication/sections/login.templ @@ -1,7 +1,7 @@ package sections import ( - "github.com/onsonr/sonr/pkg/nebula/components/auth/forms" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) diff --git a/pkg/nebula/components/auth/sections/login_templ.go b/pkg/nebula/components/authentication/sections/login_templ.go similarity index 97% rename from pkg/nebula/components/auth/sections/login_templ.go rename to pkg/nebula/components/authentication/sections/login_templ.go index afe89f36d..5b4f49fb3 100644 --- a/pkg/nebula/components/auth/sections/login_templ.go +++ b/pkg/nebula/components/authentication/sections/login_templ.go @@ -9,7 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/nebula/components/auth/forms" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) diff --git a/pkg/nebula/components/auth/sections/register.templ b/pkg/nebula/components/authentication/sections/register.templ similarity index 92% rename from pkg/nebula/components/auth/sections/register.templ rename to pkg/nebula/components/authentication/sections/register.templ index 123dc8045..4fd6e6d5b 100644 --- a/pkg/nebula/components/auth/sections/register.templ +++ b/pkg/nebula/components/authentication/sections/register.templ @@ -1,7 +1,7 @@ package sections import ( - "github.com/onsonr/sonr/pkg/nebula/components/auth/forms" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) diff --git a/pkg/nebula/components/auth/sections/register_templ.go b/pkg/nebula/components/authentication/sections/register_templ.go similarity index 97% rename from pkg/nebula/components/auth/sections/register_templ.go rename to pkg/nebula/components/authentication/sections/register_templ.go index 7f30081d9..435426748 100644 --- a/pkg/nebula/components/auth/sections/register_templ.go +++ b/pkg/nebula/components/authentication/sections/register_templ.go @@ -9,7 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/nebula/components/auth/forms" + "github.com/onsonr/sonr/pkg/nebula/components/authentication/forms" "github.com/onsonr/sonr/pkg/nebula/global/styles" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) diff --git a/pkg/nebula/components/authentication/view.templ b/pkg/nebula/components/authentication/view.templ new file mode 100644 index 000000000..bb631cd74 --- /dev/null +++ b/pkg/nebula/components/authentication/view.templ @@ -0,0 +1,23 @@ +package authentication + +import echo "github.com/labstack/echo/v4" + +templ CurrentView(c echo.Context) { +
+
+
+
+
+

Current Account

+
+
+

+ Logout +

+
+
+
+
+
+} + diff --git a/pkg/nebula/components/auth/forms/details_basic_templ.go b/pkg/nebula/components/authentication/view_templ.go similarity index 50% rename from pkg/nebula/components/auth/forms/details_basic_templ.go rename to pkg/nebula/components/authentication/view_templ.go index 74860dfb8..1436237b1 100644 --- a/pkg/nebula/components/auth/forms/details_basic_templ.go +++ b/pkg/nebula/components/authentication/view_templ.go @@ -1,14 +1,16 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.778 -package forms +package authentication //lint:file-ignore SA4006 This context is only used if a nested component is present. import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" -func BasicDetailsForm() templ.Component { +import echo "github.com/labstack/echo/v4" + +func CurrentView(c echo.Context) templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { @@ -29,7 +31,7 @@ func BasicDetailsForm() templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

Current Account

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/pkg/nebula/components/home/route.go b/pkg/nebula/components/home/route.go deleted file mode 100644 index 50db28084..000000000 --- a/pkg/nebula/components/home/route.go +++ /dev/null @@ -1,18 +0,0 @@ -package home - -import ( - "log" - - "github.com/labstack/echo/v4" - - "github.com/onsonr/sonr/internal/ctx" -) - -func Route(c echo.Context) error { - s := ctx.GetSession(c) - log.Printf("Session ID: %s", s.ID) - log.Printf("Session Origin: %s", s.Origin) - log.Printf("Session Address: %s", s.Address) - log.Printf("Session ChainID: %s", s.ChainID) - return ctx.RenderTempl(c, View()) -} diff --git a/pkg/nebula/components/home/sections/highlights.templ b/pkg/nebula/components/home/sections/highlights.templ deleted file mode 100644 index 7a51227df..000000000 --- a/pkg/nebula/components/home/sections/highlights.templ +++ /dev/null @@ -1,219 +0,0 @@ -package sections - -import models "github.com/onsonr/sonr/internal/orm/marketing" - -templ Highlights(highlights *models.Highlights) { - -
-
-
-
-

- { highlights.Heading } -

-

- { highlights.Subtitle } -

-
-
- -
- - - - -
- -
-
- -
-
- Feature 01 -
-
- -
-
- Feature 02 -
-
- -
-
- Feature 03 -
-
- -
-
- Feature 04 -
-
-
-
-
-
-
-
-} diff --git a/pkg/nebula/components/home/sections/highlights_templ.go b/pkg/nebula/components/home/sections/highlights_templ.go deleted file mode 100644 index e7cbe6dac..000000000 --- a/pkg/nebula/components/home/sections/highlights_templ.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.778 -package sections - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -import models "github.com/onsonr/sonr/internal/orm/marketing" - -func Highlights(highlights *models.Highlights) templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var2 string - templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Heading) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/highlights.templ`, Line: 14, Col: 26} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - var templ_7745c5c3_Var3 string - templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Subtitle) - if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/highlights.templ`, Line: 17, Col: 27} - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

\"Feature
\"Feature
\"Feature
\"Feature
") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/components/home/page.templ b/pkg/nebula/components/marketing/page.templ similarity index 79% rename from pkg/nebula/components/home/page.templ rename to pkg/nebula/components/marketing/page.templ index 185f55012..40427855c 100644 --- a/pkg/nebula/components/home/page.templ +++ b/pkg/nebula/components/marketing/page.templ @@ -1,7 +1,7 @@ -package home +package marketing import ( - "github.com/onsonr/sonr/pkg/nebula/components/home/sections" + "github.com/onsonr/sonr/pkg/nebula/components/marketing/sections" "github.com/onsonr/sonr/pkg/nebula/global/styles" ) diff --git a/pkg/nebula/components/home/page_templ.go b/pkg/nebula/components/marketing/page_templ.go similarity index 98% rename from pkg/nebula/components/home/page_templ.go rename to pkg/nebula/components/marketing/page_templ.go index 378203192..e7ad7bd2d 100644 --- a/pkg/nebula/components/home/page_templ.go +++ b/pkg/nebula/components/marketing/page_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.778 -package home +package marketing //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -9,7 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/pkg/nebula/components/home/sections" + "github.com/onsonr/sonr/pkg/nebula/components/marketing/sections" "github.com/onsonr/sonr/pkg/nebula/global/styles" ) diff --git a/pkg/nebula/components/marketing/route.go b/pkg/nebula/components/marketing/route.go new file mode 100644 index 000000000..9e132a075 --- /dev/null +++ b/pkg/nebula/components/marketing/route.go @@ -0,0 +1,18 @@ +package marketing + +import ( + "log" + + "github.com/labstack/echo/v4" + + "github.com/onsonr/sonr/internal/ctx" +) + +func HomeRoute(c echo.Context) error { + s, err := ctx.GetHWAYContext(c) + if err != nil { + return err + } + log.Printf("Session ID: %s", s.ID()) + return ctx.RenderTempl(c, View()) +} diff --git a/pkg/nebula/components/home/sections/architecture.templ b/pkg/nebula/components/marketing/sections/architecture.templ similarity index 100% rename from pkg/nebula/components/home/sections/architecture.templ rename to pkg/nebula/components/marketing/sections/architecture.templ diff --git a/pkg/nebula/components/home/sections/architecture_templ.go b/pkg/nebula/components/marketing/sections/architecture_templ.go similarity index 100% rename from pkg/nebula/components/home/sections/architecture_templ.go rename to pkg/nebula/components/marketing/sections/architecture_templ.go diff --git a/pkg/nebula/components/home/sections/cta.templ b/pkg/nebula/components/marketing/sections/cta.templ similarity index 100% rename from pkg/nebula/components/home/sections/cta.templ rename to pkg/nebula/components/marketing/sections/cta.templ diff --git a/pkg/nebula/components/home/sections/cta_templ.go b/pkg/nebula/components/marketing/sections/cta_templ.go similarity index 100% rename from pkg/nebula/components/home/sections/cta_templ.go rename to pkg/nebula/components/marketing/sections/cta_templ.go diff --git a/pkg/nebula/components/home/sections/footer.templ b/pkg/nebula/components/marketing/sections/footer.templ similarity index 100% rename from pkg/nebula/components/home/sections/footer.templ rename to pkg/nebula/components/marketing/sections/footer.templ diff --git a/pkg/nebula/components/home/sections/footer_templ.go b/pkg/nebula/components/marketing/sections/footer_templ.go similarity index 100% rename from pkg/nebula/components/home/sections/footer_templ.go rename to pkg/nebula/components/marketing/sections/footer_templ.go diff --git a/pkg/nebula/components/home/sections/header.templ b/pkg/nebula/components/marketing/sections/header.templ similarity index 100% rename from pkg/nebula/components/home/sections/header.templ rename to pkg/nebula/components/marketing/sections/header.templ diff --git a/pkg/nebula/components/home/sections/header_templ.go b/pkg/nebula/components/marketing/sections/header_templ.go similarity index 100% rename from pkg/nebula/components/home/sections/header_templ.go rename to pkg/nebula/components/marketing/sections/header_templ.go diff --git a/pkg/nebula/components/home/sections/hero.templ b/pkg/nebula/components/marketing/sections/hero.templ similarity index 95% rename from pkg/nebula/components/home/sections/hero.templ rename to pkg/nebula/components/marketing/sections/hero.templ index c0dea16bc..1248dcb45 100644 --- a/pkg/nebula/components/home/sections/hero.templ +++ b/pkg/nebula/components/marketing/sections/hero.templ @@ -1,6 +1,7 @@ package sections import ( + "fmt" models "github.com/onsonr/sonr/internal/orm/marketing" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) @@ -13,7 +14,7 @@ templ Hero(hero *models.Hero) {
-

+

{ hero.TitleFirst } { hero.TitleEmphasis } @@ -58,7 +59,7 @@ templ stats(stats []*models.Stat) {
for _, item := range stats {
-

{ item.Value }{ item.Denom }

+

{ item.Value }{ item.Denom }

{ item.Label }

} @@ -67,6 +68,10 @@ templ stats(stats []*models.Stat) {
} +func getCounter(value string) string { + return fmt.Sprintf("counter(%s)", value) +} + script counterAnimation() { document.addEventListener('alpine:init', () => { Alpine.data('counter', (target = 0, duration = 3000) => ({ diff --git a/pkg/nebula/components/home/sections/hero_templ.go b/pkg/nebula/components/marketing/sections/hero_templ.go similarity index 91% rename from pkg/nebula/components/home/sections/hero_templ.go rename to pkg/nebula/components/marketing/sections/hero_templ.go index ed3a3b33f..186be4450 100644 --- a/pkg/nebula/components/home/sections/hero_templ.go +++ b/pkg/nebula/components/marketing/sections/hero_templ.go @@ -9,6 +9,7 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( + "fmt" models "github.com/onsonr/sonr/internal/orm/marketing" "github.com/onsonr/sonr/pkg/nebula/global/ui" ) @@ -34,14 +35,14 @@ func Hero(hero *models.Hero) templ.Component { templ_7745c5c3_Var1 = templ.NopComponent } ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } var templ_7745c5c3_Var2 string templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleFirst) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 17, Col: 24} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 18, Col: 24} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) if templ_7745c5c3_Err != nil { @@ -54,7 +55,7 @@ func Hero(hero *models.Hero) templ.Component { var templ_7745c5c3_Var3 string templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleEmphasis) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 19, Col: 28} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 20, Col: 28} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) if templ_7745c5c3_Err != nil { @@ -67,7 +68,7 @@ func Hero(hero *models.Hero) templ.Component { var templ_7745c5c3_Var4 string templ_7745c5c3_Var4, templ_7745c5c3_Err = templ.JoinStringErrs(hero.TitleSecond) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 24, Col: 25} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 25, Col: 25} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var4)) if templ_7745c5c3_Err != nil { @@ -80,7 +81,7 @@ func Hero(hero *models.Hero) templ.Component { var templ_7745c5c3_Var5 string templ_7745c5c3_Var5, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Subtitle) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 27, Col: 22} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 28, Col: 22} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var5)) if templ_7745c5c3_Err != nil { @@ -146,7 +147,7 @@ func heroImage(hero *models.Hero) templ.Component { var templ_7745c5c3_Var7 string templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Src) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 47, Col: 23} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 48, Col: 23} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) if templ_7745c5c3_Err != nil { @@ -159,7 +160,7 @@ func heroImage(hero *models.Hero) templ.Component { var templ_7745c5c3_Var8 string templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Width) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 48, Col: 27} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 49, Col: 27} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { @@ -172,7 +173,7 @@ func heroImage(hero *models.Hero) templ.Component { var templ_7745c5c3_Var9 string templ_7745c5c3_Var9, templ_7745c5c3_Err = templ.JoinStringErrs(hero.Image.Height) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 49, Col: 29} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 50, Col: 29} } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var9)) if templ_7745c5c3_Err != nil { @@ -212,29 +213,42 @@ func stats(stats []*models.Stat) templ.Component { return templ_7745c5c3_Err } for _, item := range stats { - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var12 string + templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Value) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 62, Col: 157} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var12 string - templ_7745c5c3_Var12, templ_7745c5c3_Err = templ.JoinStringErrs(item.Denom) + var templ_7745c5c3_Var13 string + templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Denom) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 61, Col: 166} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 62, Col: 178} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var12)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -242,12 +256,12 @@ func stats(stats []*models.Stat) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var13 string - templ_7745c5c3_Var13, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label) + var templ_7745c5c3_Var14 string + templ_7745c5c3_Var14, templ_7745c5c3_Err = templ.JoinStringErrs(item.Label) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/home/sections/hero.templ`, Line: 62, Col: 50} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/hero.templ`, Line: 63, Col: 50} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var13)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var14)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -272,6 +286,10 @@ func stats(stats []*models.Stat) templ.Component { }) } +func getCounter(value string) string { + return fmt.Sprintf("counter(%s)", value) +} + func counterAnimation() templ.ComponentScript { return templ.ComponentScript{ Name: `__templ_counterAnimation_cac3`, diff --git a/pkg/nebula/components/marketing/sections/highlights.templ b/pkg/nebula/components/marketing/sections/highlights.templ new file mode 100644 index 000000000..e23252c49 --- /dev/null +++ b/pkg/nebula/components/marketing/sections/highlights.templ @@ -0,0 +1,102 @@ +package sections + +import ( + "fmt" + models "github.com/onsonr/sonr/internal/orm/marketing" +) + +templ Highlights(highlights *models.Highlights) { + +
+
+
+
+

+ { highlights.Heading } +

+

+ { highlights.Subtitle } +

+
+
+ +
+ @highlightTab(1, highlights.Features[0]) + @highlightTab(2, highlights.Features[1]) + @highlightTab(3, highlights.Features[2]) + @highlightTab(4, highlights.Features[3]) +
+
+
+
+
+} + +templ highlightTab(index int, highlight *models.Feature) { + +} + +templ highlightCard(index int, highlight *models.Feature) { +
+
+ { +
+
+} + +func getSelectedClass(index int) string { + return fmt.Sprintf("tab === '%d' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] shadow-sm rotate-1'", index+1) +} + +func getShowBorder(index int) string { + return fmt.Sprintf("tab === '%d' ? 'hidden' : ''", index+1) +} + +func getClickPrevent(index int) string { + return fmt.Sprintf("tab = '%d'", index+1) +} + +func getXShow(index int) string { + return fmt.Sprintf("tab === '%d'", index+1) +} diff --git a/pkg/nebula/components/marketing/sections/highlights_templ.go b/pkg/nebula/components/marketing/sections/highlights_templ.go new file mode 100644 index 000000000..295014bc4 --- /dev/null +++ b/pkg/nebula/components/marketing/sections/highlights_templ.go @@ -0,0 +1,287 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.778 +package sections + +//lint:file-ignore SA4006 This context is only used if a nested component is present. + +import "github.com/a-h/templ" +import templruntime "github.com/a-h/templ/runtime" + +import ( + "fmt" + models "github.com/onsonr/sonr/internal/orm/marketing" +) + +func Highlights(highlights *models.Highlights) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var1 := templ.GetChildren(ctx) + if templ_7745c5c3_Var1 == nil { + templ_7745c5c3_Var1 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var2 string + templ_7745c5c3_Var2, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Heading) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 17, Col: 26} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var2)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + var templ_7745c5c3_Var3 string + templ_7745c5c3_Var3, templ_7745c5c3_Err = templ.JoinStringErrs(highlights.Subtitle) + if templ_7745c5c3_Err != nil { + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/components/marketing/sections/highlights.templ`, Line: 20, Col: 27} + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var3)) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("

") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = highlightTab(1, highlights.Features[0]).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = highlightTab(2, highlights.Features[1]).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func highlightTab(index int, highlight *models.Feature) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var4 := templ.GetChildren(ctx) + if templ_7745c5c3_Var4 == nil { + templ_7745c5c3_Var4 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func highlightCard(index int, highlight *models.Feature) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var10 := templ.GetChildren(ctx) + if templ_7745c5c3_Var10 == nil { + templ_7745c5c3_Var10 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
\"")
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func getSelectedClass(index int) string { + return fmt.Sprintf("tab === '%d' ? 'bg-zinc-100 opacity-60 hover:opacity-100 transition' : '[background:linear-gradient(theme(colors.white),theme(colors.white))_padding-box,linear-gradient(120deg,theme(colors.zinc.300),theme(colors.zinc.100),theme(colors.zinc.300))_border-box] shadow-sm rotate-1'", index+1) +} + +func getShowBorder(index int) string { + return fmt.Sprintf("tab === '%d' ? 'hidden' : ''", index+1) +} + +func getClickPrevent(index int) string { + return fmt.Sprintf("tab = '%d'", index+1) +} + +func getXShow(index int) string { + return fmt.Sprintf("tab === '%d'", index+1) +} + +var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/components/home/sections/lowlights.templ b/pkg/nebula/components/marketing/sections/lowlights.templ similarity index 100% rename from pkg/nebula/components/home/sections/lowlights.templ rename to pkg/nebula/components/marketing/sections/lowlights.templ diff --git a/pkg/nebula/components/home/sections/lowlights_templ.go b/pkg/nebula/components/marketing/sections/lowlights_templ.go similarity index 100% rename from pkg/nebula/components/home/sections/lowlights_templ.go rename to pkg/nebula/components/marketing/sections/lowlights_templ.go diff --git a/pkg/nebula/components/home/sections/mission.templ b/pkg/nebula/components/marketing/sections/mission.templ similarity index 100% rename from pkg/nebula/components/home/sections/mission.templ rename to pkg/nebula/components/marketing/sections/mission.templ diff --git a/pkg/nebula/components/home/sections/mission_templ.go b/pkg/nebula/components/marketing/sections/mission_templ.go similarity index 100% rename from pkg/nebula/components/home/sections/mission_templ.go rename to pkg/nebula/components/marketing/sections/mission_templ.go diff --git a/pkg/nebula/components/home/static.go b/pkg/nebula/components/marketing/static.go similarity index 87% rename from pkg/nebula/components/home/static.go rename to pkg/nebula/components/marketing/static.go index 8240eebc4..0a6d91503 100644 --- a/pkg/nebula/components/home/static.go +++ b/pkg/nebula/components/marketing/static.go @@ -1,4 +1,4 @@ -package home +package marketing import models "github.com/onsonr/sonr/internal/orm/marketing" @@ -27,22 +27,22 @@ var highlights = &models.Highlights{ Subtitle: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.", Features: []*models.Feature{ { - Title: "Infinite-Factor Authentication", + Title: "∞-Factor Auth", Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.", Icon: nil, }, { - Title: "Self-Custody BTC & ETH", + Title: "Data Ownership", Desc: "Sonr leverages advanced cryptography to permit facilitating Wallet Operations directly on-chain, without the need for a centralized server.", Icon: nil, }, { - Title: "mAiNsTrEaM Ready", + Title: "Everyday Transactions", Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.", Icon: nil, }, { - Title: "DAO Governed", + Title: "Limitless Possibilities", Desc: "Sonr is a proudly American Project which operates under the new Wyoming DUNA Legal Framework, ensuring the protection of your digital rights.", Icon: nil, }, @@ -54,25 +54,18 @@ var mission = &models.Mission{ Heading: "The Protocol for Decentralized Identity & Authentication", Subtitle: "We're creating the Global Standard for Decentralized Identity. Authenticate users with PassKeys, Issue Crypto Wallets, Build Payment flows, Send Encrypted Messages - all on a single platform.", Experience: &models.Feature{ - Title: "Experience", + Title: "Less is More", Desc: "Sonr is a comprehensive system for Identity Management which proteects users across their digital personas while providing Developers a cost-effective solution for decentralized authentication.", Icon: nil, }, Compliance: &models.Feature{ - Title: "Compliance", + Title: "Works where there's Internet", Desc: "Sonr is designed to work across all platforms and devices, building a encrypted and anonymous identity layer for each user on the internet.", Icon: nil, }, Interoperability: &models.Feature{ - Title: "Interoperability", + Title: "American Made DUNA", Desc: "Sonr follows the latest specifications from W3C, DIF, and ICF to essentially have an Interchain-Connected, Smart Account System - seamlessly authenticated with PassKeys.", Icon: nil, }, - Standards: []*models.Feature{ - { - Title: "Standards", - Desc: "Sonr is a proudly American Project which operates under the new Wyoming DUNA Legal Framework, ensuring the protection of your digital rights.", - Icon: nil, - }, - }, } diff --git a/pkg/nebula/components/index/build.go b/pkg/nebula/components/vaultindex/file.go similarity index 66% rename from pkg/nebula/components/index/build.go rename to pkg/nebula/components/vaultindex/file.go index 4a2fc6823..186c6e1ec 100644 --- a/pkg/nebula/components/index/build.go +++ b/pkg/nebula/components/vaultindex/file.go @@ -1,21 +1,16 @@ -package index +package vaultindex import ( "bytes" "context" - "encoding/json" "github.com/ipfs/boxo/files" "github.com/onsonr/sonr/internal/dwn/gen" ) func BuildFile(cnfg *gen.Config) (files.Node, error) { - _, err := json.Marshal(cnfg) - if err != nil { - return nil, err - } w := bytes.NewBuffer(nil) - err = IndexFile().Render(context.Background(), w) + err := IndexFile().Render(context.Background(), w) if err != nil { return nil, err } diff --git a/pkg/nebula/components/index/index.templ b/pkg/nebula/components/vaultindex/index.templ similarity index 58% rename from pkg/nebula/components/index/index.templ rename to pkg/nebula/components/vaultindex/index.templ index 9d85eba18..56c1e12c5 100644 --- a/pkg/nebula/components/index/index.templ +++ b/pkg/nebula/components/vaultindex/index.templ @@ -1,31 +1,29 @@ -package index +package vaultindex import ( - "github.com/onsonr/sonr/internal/dwn/gen" "github.com/onsonr/sonr/pkg/nebula/global/state" "github.com/onsonr/sonr/pkg/nebula/global/styles" ) -func ConfigFile(dwnConfig *gen.Config) { -} - templ IndexFile() { + @styles.Styles() @styles.Alpine() @styles.Htmx() - @styles.Styles() Sonr DWN @state.RegisterServiceWorker() - -
-
Loading...
-
- + @styles.Toaster() { + +
+
Loading...
+
+ + } } diff --git a/pkg/nebula/components/index/index_templ.go b/pkg/nebula/components/vaultindex/index_templ.go similarity index 64% rename from pkg/nebula/components/index/index_templ.go rename to pkg/nebula/components/vaultindex/index_templ.go index 7dc6f32d8..80677bafb 100644 --- a/pkg/nebula/components/index/index_templ.go +++ b/pkg/nebula/components/vaultindex/index_templ.go @@ -1,7 +1,7 @@ // Code generated by templ - DO NOT EDIT. // templ: version: v0.2.778 -package index +package vaultindex //lint:file-ignore SA4006 This context is only used if a nested component is present. @@ -9,14 +9,10 @@ import "github.com/a-h/templ" import templruntime "github.com/a-h/templ/runtime" import ( - "github.com/onsonr/sonr/internal/dwn/gen" "github.com/onsonr/sonr/pkg/nebula/global/state" "github.com/onsonr/sonr/pkg/nebula/global/styles" ) -func ConfigFile(dwnConfig *gen.Config) { -} - func IndexFile() templ.Component { return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context @@ -42,6 +38,10 @@ func IndexFile() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } + templ_7745c5c3_Err = styles.Styles().Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } templ_7745c5c3_Err = styles.Alpine().Render(ctx, templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -50,10 +50,6 @@ func IndexFile() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = styles.Styles().Render(ctx, templ_7745c5c3_Buffer) - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("Sonr DWN") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err @@ -62,7 +58,33 @@ func IndexFile() templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Loading...
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Var2 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
Loading...
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = styles.Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/pkg/nebula/deps.mjs b/pkg/nebula/deps.mjs index 57859ccf8..02a253dfd 100644 --- a/pkg/nebula/deps.mjs +++ b/pkg/nebula/deps.mjs @@ -34,11 +34,36 @@ async function main() { "./assets/js/alpine.min.js", ); + // Fetch alpin-focus.min.js + await fetchAndSave( + "https://cdnjs.cloudflare.com/ajax/libs/alpinejs-focus/3.14.1/cdn.min.js", + "./assets/js/alpin-focus.min.js", + ); + // Fetch dexie.min.js await fetchAndSave( "https://cdnjs.cloudflare.com/ajax/libs/dexie/4.0.8/dexie.min.js", "./assets/js/dexie.min.js", ); + + // Fetch d3.min.js + await fetchAndSave( + "https://cdnjs.cloudflare.com/ajax/libs/d3/7.9.0/d3.min.js", + "./assets/js/d3.min.js", + ); + + // TopoJSON + await fetchAndSave( + "https://cdnjs.cloudflare.com/ajax/libs/topojson/3.0.2/topojson.min.js", + "./assets/js/topojson.min.js", + ); + + // Datamaps + await fetchAndSave( + "https://cdnjs.cloudflare.com/ajax/libs/datamaps/0.5.9/datamaps.world.min.js", + "./assets/js/datamaps.world.min.js", + ); + } main(); diff --git a/pkg/nebula/global/state/credentials.templ b/pkg/nebula/global/state/credentials.templ deleted file mode 100644 index 06a6c9c16..000000000 --- a/pkg/nebula/global/state/credentials.templ +++ /dev/null @@ -1,92 +0,0 @@ -package state - -templ NavigatorCredentialsCreate() { - -} - -templ NavigatorCredentialsGet() { - -} - -templ NavigatorCredentialsGetAll() { - -} - -templ NavigatorCredentialsHasPasskey() { - -} diff --git a/pkg/nebula/global/state/credentials_templ.go b/pkg/nebula/global/state/credentials_templ.go deleted file mode 100644 index 3790d28c4..000000000 --- a/pkg/nebula/global/state/credentials_templ.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by templ - DO NOT EDIT. - -// templ: version: v0.2.778 -package state - -//lint:file-ignore SA4006 This context is only used if a nested component is present. - -import "github.com/a-h/templ" -import templruntime "github.com/a-h/templ/runtime" - -func NavigatorCredentialsCreate() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var1 := templ.GetChildren(ctx) - if templ_7745c5c3_Var1 == nil { - templ_7745c5c3_Var1 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func NavigatorCredentialsGet() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var2 := templ.GetChildren(ctx) - if templ_7745c5c3_Var2 == nil { - templ_7745c5c3_Var2 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func NavigatorCredentialsGetAll() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var3 := templ.GetChildren(ctx) - if templ_7745c5c3_Var3 == nil { - templ_7745c5c3_Var3 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -func NavigatorCredentialsHasPasskey() templ.Component { - return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { - templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context - if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { - return templ_7745c5c3_CtxErr - } - templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) - if !templ_7745c5c3_IsBuffer { - defer func() { - templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) - if templ_7745c5c3_Err == nil { - templ_7745c5c3_Err = templ_7745c5c3_BufErr - } - }() - } - ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var4 := templ.GetChildren(ctx) - if templ_7745c5c3_Var4 == nil { - templ_7745c5c3_Var4 = templ.NopComponent - } - ctx = templ.ClearChildren(ctx) - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") - if templ_7745c5c3_Err != nil { - return templ_7745c5c3_Err - } - return templ_7745c5c3_Err - }) -} - -var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/global/state/database.templ b/pkg/nebula/global/state/database.templ index d6fb91a91..a60c2f2bd 100644 --- a/pkg/nebula/global/state/database.templ +++ b/pkg/nebula/global/state/database.templ @@ -15,3 +15,14 @@ templ InsertAccount(accountName string) { console.log("Inserted account with ID:", accountId); } + +templ InsertCredential(credentialName string) { + +} diff --git a/pkg/nebula/global/state/database_templ.go b/pkg/nebula/global/state/database_templ.go index 5d9f24eff..07c237348 100644 --- a/pkg/nebula/global/state/database_templ.go +++ b/pkg/nebula/global/state/database_templ.go @@ -37,4 +37,33 @@ func InsertAccount(accountName string) templ.Component { }) } +func InsertCredential(credentialName string) templ.Component { + return templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + if templ_7745c5c3_CtxErr := ctx.Err(); templ_7745c5c3_CtxErr != nil { + return templ_7745c5c3_CtxErr + } + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + templ_7745c5c3_Var2 := templ.GetChildren(ctx) + if templ_7745c5c3_Var2 == nil { + templ_7745c5c3_Var2 = templ.NopComponent + } + ctx = templ.ClearChildren(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + var _ = templruntime.GeneratedTemplate diff --git a/pkg/nebula/global/state/state.go b/pkg/nebula/global/state/state.go deleted file mode 100644 index 7bf2df5b4..000000000 --- a/pkg/nebula/global/state/state.go +++ /dev/null @@ -1 +0,0 @@ -package state diff --git a/pkg/nebula/global/state/worker.templ b/pkg/nebula/global/state/worker.templ index c17b61507..4b3de4773 100644 --- a/pkg/nebula/global/state/worker.templ +++ b/pkg/nebula/global/state/worker.templ @@ -1,13 +1,15 @@ package state var ( - serviceWorkerHandle = templ.NewOnceHandle() + serviceWorkerInstall = templ.NewOnceHandle() + serviceWorkerReady = templ.NewOnceHandle() ) templ RegisterServiceWorker() { - @serviceWorkerHandle.Once() { - ") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } return templ_7745c5c3_Err }) - templ_7745c5c3_Err = serviceWorkerHandle.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) + templ_7745c5c3_Err = serviceWorkerInstall.Once().Render(templ.WithChildren(ctx, templ_7745c5c3_Var2), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/pkg/nebula/global/styles/layout.templ b/pkg/nebula/global/styles/layout.templ index d82b8318d..767eaa034 100644 --- a/pkg/nebula/global/styles/layout.templ +++ b/pkg/nebula/global/styles/layout.templ @@ -42,9 +42,11 @@ templ Layout(title string, remote bool) { -
- { children... } -
+ @Toaster() { +
+ { children... } +
+ } } @@ -68,9 +70,11 @@ templ LayoutNoBody(title string, remote bool) {
-
- { children... } -
+ @Toaster() { +
+ { children... } +
+ }
diff --git a/pkg/nebula/global/styles/layout_templ.go b/pkg/nebula/global/styles/layout_templ.go index b9d307b01..c19918b6a 100644 --- a/pkg/nebula/global/styles/layout_templ.go +++ b/pkg/nebula/global/styles/layout_templ.go @@ -173,15 +173,41 @@ func Layout(title string, remote bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ_7745c5c3_Var4.Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Var6 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var4.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var6), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -205,9 +231,9 @@ func LayoutNoBody(title string, remote bool) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var6 := templ.GetChildren(ctx) - if templ_7745c5c3_Var6 == nil { - templ_7745c5c3_Var6 = templ.NopComponent + templ_7745c5c3_Var7 := templ.GetChildren(ctx) + if templ_7745c5c3_Var7 == nil { + templ_7745c5c3_Var7 = templ.NopComponent } ctx = templ.ClearChildren(ctx) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") @@ -234,24 +260,50 @@ func LayoutNoBody(title string, remote bool) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - var templ_7745c5c3_Var7 string - templ_7745c5c3_Var7, templ_7745c5c3_Err = templ.JoinStringErrs(title) + var templ_7745c5c3_Var8 string + templ_7745c5c3_Var8, templ_7745c5c3_Err = templ.JoinStringErrs(title) if templ_7745c5c3_Err != nil { - return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 63, Col: 17} + return templ.Error{Err: templ_7745c5c3_Err, FileName: `pkg/nebula/global/styles/layout.templ`, Line: 65, Col: 17} } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var7)) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString(templ.EscapeString(templ_7745c5c3_Var8)) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templ_7745c5c3_Var6.Render(ctx, templ_7745c5c3_Buffer) + templ_7745c5c3_Var9 := templruntime.GeneratedTemplate(func(templ_7745c5c3_Input templruntime.GeneratedComponentInput) (templ_7745c5c3_Err error) { + templ_7745c5c3_W, ctx := templ_7745c5c3_Input.Writer, templ_7745c5c3_Input.Context + templ_7745c5c3_Buffer, templ_7745c5c3_IsBuffer := templruntime.GetBuffer(templ_7745c5c3_W) + if !templ_7745c5c3_IsBuffer { + defer func() { + templ_7745c5c3_BufErr := templruntime.ReleaseBuffer(templ_7745c5c3_Buffer) + if templ_7745c5c3_Err == nil { + templ_7745c5c3_Err = templ_7745c5c3_BufErr + } + }() + } + ctx = templ.InitializeContext(ctx) + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + templ_7745c5c3_Err = templ_7745c5c3_Var7.Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) + templ_7745c5c3_Err = Toaster().Render(templ.WithChildren(ctx, templ_7745c5c3_Var9), templ_7745c5c3_Buffer) if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("
") + _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } @@ -275,21 +327,21 @@ func OpenModal(title, description string) templ.Component { }() } ctx = templ.InitializeContext(ctx) - templ_7745c5c3_Var8 := templ.GetChildren(ctx) - if templ_7745c5c3_Var8 == nil { - templ_7745c5c3_Var8 = templ.NopComponent + templ_7745c5c3_Var10 := templ.GetChildren(ctx) + if templ_7745c5c3_Var10 == nil { + templ_7745c5c3_Var10 = templ.NopComponent } ctx = templ.ClearChildren(ctx) _, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("