diff --git a/.air.toml b/.air.toml deleted file mode 100644 index afd174c32..000000000 --- a/.air.toml +++ /dev/null @@ -1,72 +0,0 @@ -root = "." -testdata_dir = "testdata" -tmp_dir = "tmp" - -[build] -# Array of commands to run before each build -pre_cmd = ["task templ"] -# Just plain old shell command. You could use `make` as well. -cmd = "go build -o ./tmp/vltd ./cmd/vltd" -# Array of commands to run after ^C -bin = "tmp/vltd" -# Watch these filename extensions. -include_ext = ["go", "proto", "templ"] -# Ignore these filename extensions or directories. -exclude_dir = ["api", "crypto", "pkl", "scripts", "tmp", ".github"] -# Watch these directories if you specified. -include_dir = ["pkg", "x", "internal", ".github"] -# Watch these files. -include_file = [] -# Exclude files. -exclude_file = [] -# Exclude specific regular expressions. -exclude_regex = ["_test\\.go"] -# Exclude unchanged files. -exclude_unchanged = true -# Follow symlink for directories -follow_symlink = true -# This log file places in your tmp_dir. -log = "air.log" -# Poll files for changes instead of using fsnotify. -poll = false -# Poll interval (defaults to the minimum interval of 500ms). -poll_interval = 500 # ms -# It's not necessary to trigger build each time file changes if it's too frequent. -delay = 0 # ms -# Stop running old binary when build errors occur. -stop_on_error = true -# Send Interrupt signal before killing process (windows does not support this feature) -send_interrupt = false -# Delay after sending Interrupt signal -kill_delay = 500 # nanosecond -# Rerun binary or not -rerun = false -# Delay after each execution -rerun_delay = 500 - -[log] -# Show log time -time = false -# Only show main log (silences watcher, build, runner) -main_only = false - -[color] -# Customize each part's color. If no color found, use the raw app log. -main = "magenta" -watcher = "cyan" -build = "yellow" -runner = "green" - -[misc] -# Delete tmp directory on exit -clean_on_exit = true - -[screen] -clear_on_rebuild = true -keep_scroll = true - -# Enable live-reloading on the browser. -[proxy] -enabled = true -proxy_port = 8090 -app_port = 8080 diff --git a/.cz.toml b/.cz.toml index 50372f0f5..f033b5b67 100644 --- a/.cz.toml +++ b/.cz.toml @@ -2,6 +2,6 @@ name = "cz_conventional_commits" tag_format = "$version" version_scheme = "semver" -version = "0.6.0" +version = "0.7.0" update_changelog_on_bump = true major_version_zero = true diff --git a/.github/workflows/auto-bump.yml b/.github/workflows/auto-bump.yml deleted file mode 100644 index 7a7db6141..000000000 --- a/.github/workflows/auto-bump.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Automatic Tag Bump -on: - pull_request: - types: - - closed - branches: - - main - -jobs: - build: - if: github.event.pull_request.merged == true - runs-on: ubuntu-22.04 - permissions: - contents: write - steps: - - uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.merge_commit_sha }} - fetch-depth: "0" - - - name: Bump version and push tag - uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token - WITH_V: true - PRERELEASE: true diff --git a/.github/workflows/buf-publish.yml b/.github/workflows/buf-publish.yml index 2cf261ab1..97f76d5c2 100644 --- a/.github/workflows/buf-publish.yml +++ b/.github/workflows/buf-publish.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: # Run `git checkout` - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 # Install the `buf` CLI - uses: bufbuild/buf-setup-action@v1 # Push only the Input in `proto` to the BSR diff --git a/.github/workflows/docker-release.yml b/.github/workflows/docker-release.yml index 973f818b6..91e8a8260 100644 --- a/.github/workflows/docker-release.yml +++ b/.github/workflows/docker-release.yml @@ -1,4 +1,4 @@ -name: docker image release +name: Publish Docker Image # NOTE: For this action to work, you must enable write permissions in your github repository settings. # Settings -> Actions -> General. "Workflow Permissions". Select "Read and write permissions". diff --git a/.github/workflows/docker-vm-release.yml b/.github/workflows/docker-vm-release.yml new file mode 100644 index 000000000..6747a2db3 --- /dev/null +++ b/.github/workflows/docker-vm-release.yml @@ -0,0 +1,48 @@ +name: Publish VM Image + +on: + push: + branches: [master, develop, feature/*] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +env: + GO_VERSION: 1.22 + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + release-image: + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + # all lowercase ghcr registry + - run: | + DOCKER_REGISTRY=`echo "${{ env.REGISTRY }}/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'` + echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV + + REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'` + echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV + + - name: Parse tag + id: tag + run: | + # v0.0.1 + VERSION=$(echo ${{ github.ref_name }} | sed "s/v//") + # 0.0.1 + echo "VERSION=$VERSION" >> $GITHUB_ENV + + # build and publish package to ghcr (public) with codebase remaining private + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-binary.yml b/.github/workflows/run-goreleaser.yml similarity index 78% rename from .github/workflows/release-binary.yml rename to .github/workflows/run-goreleaser.yml index 59b309562..341347524 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/run-goreleaser.yml @@ -5,10 +5,7 @@ name: "Release Binary" on: push: tags: - - '**' - -# Test Locally with: -# goreleaser build --skip-validate --snapshot --clean + - "**" jobs: goreleaser: @@ -20,9 +17,9 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-go@v2 + - uses: actions/setup-go@v3 with: - go-version: '1.21' + go-version: "1.21" - name: Clean up dist directory run: rm -rf dist @@ -40,4 +37,4 @@ jobs: version: latest args: release --skip-validate --clean env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/tag-on-merge.yml b/.github/workflows/tag-on-merge.yml new file mode 100644 index 000000000..227c0b7dd --- /dev/null +++ b/.github/workflows/tag-on-merge.yml @@ -0,0 +1,62 @@ +name: Automatic Tag Bump +on: + pull_request: + types: + - closed + branches: + - develop + - master + +permissions: + contents: write + +jobs: + build: + if: github.event.pull_request.merged == true + runs-on: ubuntu-22.04 + permissions: + contents: write + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.merge_commit_sha }} + fetch-depth: "0" + + - name: Bump version and push tag + uses: anothrNick/github-tag-action@v1 # Don't use @master or @v1 unless you're happy to test the latest version + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # if you don't want to set write permissions use a PAT token + WITH_V: true + + release-image: + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + # all lowercase ghcr registry + - run: | + DOCKER_REGISTRY=`echo "${{ env.REGISTRY }}/${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]'` + echo "DOCKER_REGISTRY=$DOCKER_REGISTRY" >> $GITHUB_ENV + + REPO_NAME=`echo "${{ github.repository }}" | awk -F'/' '{print $2}' | tr '[:upper:]' '[:lower:]'` + echo "REPO_NAME=$REPO_NAME" >> $GITHUB_ENV + + - name: Parse tag + id: tag + run: | + # v0.0.1 + VERSION=$(echo ${{ github.ref_name }} | sed "s/v//") + # 0.0.1 + echo "VERSION=$VERSION" >> $GITHUB_ENV + + # build and publish package to ghcr (public) with codebase remaining private + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2e48dbf2f..f93bcc367 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Binaries +.data *.exe *.exe~ *.dll diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..aa1869be8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,114 @@ +## 0.7.0 (2024-09-05) + +### Feat + +- add SQLite database support +- Add targets for templ and vault in Makefile and use only make in devbox.json +- Add models.go file with database table structs +- Convert constant SQL queries to functions in queries.go and update db.go to use prepared statements +- Simplify db.go implementation +- Update the db implementation to use the provided go library +- Add DBConfig and DBOption types +- Add DIDNamespace and PermissionScope enums +- Add database enum types +- Update `createPermissionsTable` to match Permissions struct +- Add createKeysharesTable to internal/db/db.go +- Add constant SQL queries to queries.go and use prepared statements in db.go +- Update createProfilesTable and add createPropertiesTable +- Update the `createCredentialsTable` method to match the proper Credential struct +- Add keyshares table +- Implement database layer for Vault node +- introduce database layer +- Add method to initialize SQLite database +- add persistent SQLite database support in WASM +- **orm**: remove unused ORM models +- implement API endpoints for profile management +- Merge zkgate.go and zkprop.go logic +- Uncomment and modify zkgate code to work with Property struct +- Add zkgate.go file +- add WASM build step to devbox.json +- add KeyCurve and KeyType to KeyInfo in genesis +- Update the `CreateWitness` and `CreateAccumulator` and `VerifyWitness` and `UpdateAccumulator` to Use the new `Accumulator` and `Witness` types. Then Clean up the code in the file and refactor the marshalling methods +- add basic vault command operations +- add initial wasm entrypoint +- Implement IPFS file, location, and filesystem abstractions +- add IPFS file system abstraction +- Add AddFile and AddFolder methods +- Update GetCID and GetIPNS functions to read data from IPFS node +- Add local filesystem check for IPFS and IPNS +- Improve IPFS client initialization and mount checking +- Update `EncodePublicKey` to be the inverse of `DecodePublicKey` +- add DID model definitions +- add DID method for each coin +- Expand KeyType enum and update KeyInfo message in genesis.proto +- Add whitelisted key types to genesis params +- Add DID grants protobuf definition +- Add fields to KeyInfo struct to distinguish CBOR and standard blockchain key types +- Add new message types for AssetInfo, ChainInfo, Endpoint, ExplorerInfo, FeeInfo, and KeyInfo +- run sonr-node container in testnet network and make network external +- Add docker-compose.yaml file to start a Sonr testnet node + +### Fix + +- update Makefile to use sonrd instead of wasmd +- Remove unused statement map and prepare statements +- Refactor database connection and statement handling +- update db implementation to use go-sqlite3 v0.18.2 +- Reorder the SQL statements in the tables.go file +- update go-sqlite3 dependency to version 1.14.23 +- Update module names in protobuf files +- Ensure IPFS client is initialized before pinning CID +- Use Unixfs().Get() instead of Cat() for IPFS and IPNS content retrieval +- Initialize IPFS client and check for mounted directories +- update default assets with correct asset types +- Fix EncodePublicKey method in KeyInfo struct +- remove unused imports and simplify KeyInfo message +- bind node ports to localhost +- Update docker-compose network name to dokploy-network +- Update network name to dokploy +- remove unused port mapping +- Update docker-compose.yaml to use correct volume path +- update docker-compose volume name +- Update docker-compose.yaml to use shell directly for sonrd command +- replace "sh" with "/bin/sh" in docker-compose.yaml command + +### Refactor + +- remove unused template file +- Replace PrimaryKey with Property struct in zkprop.go +- remove unused FileSystem interface +- remove unused functions and types +- update AssetInfo protobuf definition +- add field to +- Update KeyKind Enum to have proper naming conventions +- Update `DIDNamespace` to have proper naming convention +- expose ports directly in docker-compose +- remove unused port mappings +- streamline script execution +- use CMD instead of ENTRYPOINT in Dockerfile + +## v0.0.1 (2024-08-28) + +### Feat + +- configure Sonr testnet environment +- Update Dockerfile to start and run a testnet +- add Equal methods for AssetInfo and ChainInfo types +- Add ProveWitness and SyncVault RPCs +- Add MsgRegisterService to handle service registration +- Add MsgRegisterService to handle service registration +- add enums.pulsar.go file for PermissionScope enum + +### Fix + +- Update runner image dependencies for debian-11 +- **deps**: update golang image to 1.21 +- **chains**: update nomic chain build target +- Remove unused `Meta` message from `genesis.proto` +- Add ProveWitness and SyncVault RPCs + +### Refactor + +- **deps**: Upgrade Debian base image to 11 +- Simplify the types and properties to keep a consistent structure for the blockchain +- remove PERMISSION_SCOPE_IDENTIFIERS_ENS enum value diff --git a/Dockerfile b/Dockerfile index 06a441335..48e3cb96c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,20 @@ +FROM jetpackio/devbox:latest as sonrvm + +# 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 + +RUN devbox run -- echo "Installed Packages." + +ENTRYPOINT ["devbox", "run"] + +# -------------------------------------------------------- FROM golang:1.22-alpine AS go-builder SHELL ["/bin/sh", "-ecuxo", "pipefail"] @@ -33,7 +50,6 @@ FROM debian:11-slim COPY --from=go-builder /code/build/sonrd /usr/bin/sonrd - # Install dependencies for Debian 11 RUN apt-get update && apt-get install -y \ curl \ diff --git a/Makefile b/Makefile index 200e23b1d..1159b3d32 100644 --- a/Makefile +++ b/Makefile @@ -10,7 +10,7 @@ SIMAPP = ./app # for dockerized protobuf tools DOCKER := $(shell which docker) -HTTPS_GIT := github.com/onsonr/hway.git +HTTPS_GIT := github.com/onsonr/sonr.git export GO111MODULE = on @@ -213,7 +213,7 @@ proto-check-breaking: ## --- Testnet Utilities --- get-localic: @echo "Installing local-interchain" - git clone --branch v8.2.0 https://github.com/strangelove-ventures/interchaintest.git interchaintest-downloader + git clone --branch v8.7.0 https://github.com/strangelove-ventures/interchaintest.git interchaintest-downloader cd interchaintest-downloader/local-interchain && make install @echo ✅ local-interchain installed $(shell which local-ic) @@ -230,7 +230,7 @@ local-image: ifeq (,$(shell which heighliner)) echo 'heighliner' binary not found. Consider running `make get-heighliner` else - heighliner build -c sonr --local -f chains.yaml + heighliner build -c sonrd --local -f chains.yaml endif .PHONY: get-heighliner local-image is-localic-installed @@ -292,3 +292,43 @@ sh-testnet: mod-tidy CHAIN_ID="sonr-testnet-1" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_node.sh .PHONY: setup-testnet set-testnet-configs testnet testnet-basic sh-testnet + + + +############################################################################### +### templ & vault ### +############################################################################### + +.PHONY: templ vault + +templ: + @echo "Generating templ files" + templ generate + +vault: + @echo "Building vault.wasm" + GOOS=js GOARCH=wasm go build -o ./internal/files/vault.wasm ./cmd/vault/main.go + +############################################################################### +### help ### +############################################################################### + +.PHONY: explorer +explorer: + docker compose up + +help: + @echo "Usage: make " + @echo "" + @echo "Available targets:" + @echo " install : Install the binary" + @echo " local-image : Install the docker image" + @echo " proto-gen : Generate code from proto files" + @echo " testnet : Local devnet with IBC" + @echo " sh-testnet : Shell local devnet" + @echo " ictest-basic : Basic end-to-end test" + @echo " ictest-ibc : IBC end-to-end test" + @echo " templ : Generate templ files" + @echo " vault : Build vault.wasm" + +.PHONY: help diff --git a/README.md b/README.md index 53e3230b4..5945b3aee 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,13 @@ # `sonr` - Sonr Chain -[![Go Reference](https://pkg.go.dev/badge/github.com/didao-org/sonr.svg)](https://pkg.go.dev/github.com/didao-org/sonr) -![GitHub commit activity](https://img.shields.io/github/commit-activity/w/didao-org/sonr) -![GitHub Release Date - Published_At](https://img.shields.io/github/release-date/didao-org/sonr) +[![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) ![Discord](https://img.shields.io/discord/843061375160156170?logo=discord&label=Discord%20Chat) -[![Go Report Card](https://goreportcard.com/badge/github.com/didao-org/sonr)](https://goreportcard.com/report/github.com/didao-org/sonr) +[![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) [![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=sonrhq_sonr&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=sonr-io_sonr) [![Mutable.ai Auto Wiki](https://img.shields.io/badge/Auto_Wiki-Mutable.ai-blue)](https://wiki.mutable.ai/di-dao/sonr) @@ -21,6 +21,22 @@ Sonr is a combination of decentralized primitives. Fundamentally, it is a peer-t
+## 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 + ## Acknowledgements Sonr would not have been possible without the direct and indirect support of the following organizations and individuals: @@ -35,7 +51,7 @@ Sonr would not have been possible without the direct and indirect support of the ## Community & Support -- [Forum](https://github.com/onsonr/hway/discussions) -- [Issues](https://github.com/onsonr/hway/issues) +- [Forum](https://github.com/onsonr/sonr/discussions) +- [Issues](https://github.com/onsonr/sonr/issues) - [Twitter](https://sonr.io/twitter) - [Dev Chat](https://sonr.io/discord) diff --git a/api/did/module/v1/module.pulsar.go b/api/did/module/v1/module.pulsar.go index 7c1691072..2b23de2d5 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.hway.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.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.hway.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.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.hway.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.did.module.v1.Module does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message onsonr.sonr.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.hway.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.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.hway.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.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.hway.did.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.did.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.did.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.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.hway.did.module.v1.Module", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.did.module.v1.Module", d.FullName())) } panic("unreachable") } @@ -415,26 +415,26 @@ 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, 0x68, 0x77, 0x61, 0x79, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, + 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, 0x68, - 0x77, 0x61, 0x79, 0x42, 0xe8, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, - 0x6e, 0x72, 0x2e, 0x68, 0x77, 0x61, 0x79, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x6d, 0x6f, 0x64, 0x75, + 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, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, + 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, 0x48, 0x44, 0x4d, 0xaa, 0x02, - 0x19, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x48, 0x77, 0x61, 0x79, 0x2e, 0x44, 0x69, 0x64, + 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, 0x48, 0x77, 0x61, 0x79, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, + 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, - 0x48, 0x77, 0x61, 0x79, 0x5c, 0x44, 0x69, 0x64, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 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, 0x48, 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x44, + 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, } @@ -453,7 +453,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.hway.did.module.v1.Module + (*Module)(nil), // 0: onsonr.sonr.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/accounts.pulsar.go b/api/did/v1/accounts.pulsar.go index fd493d1c7..44bb1d4a2 100644 --- a/api/did/v1/accounts.pulsar.go +++ b/api/did/v1/accounts.pulsar.go @@ -1564,7 +1564,7 @@ var file_did_v1_accounts_proto_rawDesc = []byte{ 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x7d, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, + 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, diff --git a/api/did/v1/constants.pulsar.go b/api/did/v1/constants.pulsar.go new file mode 100644 index 000000000..44e845b41 --- /dev/null +++ b/api/did/v1/constants.pulsar.go @@ -0,0 +1,727 @@ +// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. +package didv1 + +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) + +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.0 +// protoc (unknown) +// source: did/v1/constants.proto + +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) + +// AssetType defines the type of asset: native, wrapped, staking, pool, or unspecified +type AssetType int32 + +const ( + AssetType_ASSET_TYPE_UNSPECIFIED AssetType = 0 + AssetType_ASSET_TYPE_NATIVE AssetType = 1 + AssetType_ASSET_TYPE_WRAPPED AssetType = 2 + AssetType_ASSET_TYPE_STAKING AssetType = 3 + AssetType_ASSET_TYPE_POOL AssetType = 4 + AssetType_ASSET_TYPE_IBC AssetType = 5 + AssetType_ASSET_TYPE_CW20 AssetType = 6 +) + +// Enum value maps for AssetType. +var ( + AssetType_name = map[int32]string{ + 0: "ASSET_TYPE_UNSPECIFIED", + 1: "ASSET_TYPE_NATIVE", + 2: "ASSET_TYPE_WRAPPED", + 3: "ASSET_TYPE_STAKING", + 4: "ASSET_TYPE_POOL", + 5: "ASSET_TYPE_IBC", + 6: "ASSET_TYPE_CW20", + } + AssetType_value = map[string]int32{ + "ASSET_TYPE_UNSPECIFIED": 0, + "ASSET_TYPE_NATIVE": 1, + "ASSET_TYPE_WRAPPED": 2, + "ASSET_TYPE_STAKING": 3, + "ASSET_TYPE_POOL": 4, + "ASSET_TYPE_IBC": 5, + "ASSET_TYPE_CW20": 6, + } +) + +func (x AssetType) Enum() *AssetType { + p := new(AssetType) + *p = x + return p +} + +func (x AssetType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (AssetType) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[0].Descriptor() +} + +func (AssetType) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[0] +} + +func (x AssetType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use AssetType.Descriptor instead. +func (AssetType) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{0} +} + +// DIDNamespace define the different namespaces of DID +type DIDNamespace int32 + +const ( + DIDNamespace_DID_NAMESPACE_UNSPECIFIED DIDNamespace = 0 + DIDNamespace_DID_NAMESPACE_IPFS DIDNamespace = 1 + DIDNamespace_DID_NAMESPACE_SONR DIDNamespace = 2 + DIDNamespace_DID_NAMESPACE_BITCOIN DIDNamespace = 3 + DIDNamespace_DID_NAMESPACE_ETHEREUM DIDNamespace = 4 + DIDNamespace_DID_NAMESPACE_IBC DIDNamespace = 5 + DIDNamespace_DID_NAMESPACE_WEBAUTHN DIDNamespace = 6 + DIDNamespace_DID_NAMESPACE_DWN DIDNamespace = 7 + DIDNamespace_DID_NAMESPACE_SERVICE DIDNamespace = 8 +) + +// Enum value maps for DIDNamespace. +var ( + DIDNamespace_name = map[int32]string{ + 0: "DID_NAMESPACE_UNSPECIFIED", + 1: "DID_NAMESPACE_IPFS", + 2: "DID_NAMESPACE_SONR", + 3: "DID_NAMESPACE_BITCOIN", + 4: "DID_NAMESPACE_ETHEREUM", + 5: "DID_NAMESPACE_IBC", + 6: "DID_NAMESPACE_WEBAUTHN", + 7: "DID_NAMESPACE_DWN", + 8: "DID_NAMESPACE_SERVICE", + } + DIDNamespace_value = map[string]int32{ + "DID_NAMESPACE_UNSPECIFIED": 0, + "DID_NAMESPACE_IPFS": 1, + "DID_NAMESPACE_SONR": 2, + "DID_NAMESPACE_BITCOIN": 3, + "DID_NAMESPACE_ETHEREUM": 4, + "DID_NAMESPACE_IBC": 5, + "DID_NAMESPACE_WEBAUTHN": 6, + "DID_NAMESPACE_DWN": 7, + "DID_NAMESPACE_SERVICE": 8, + } +) + +func (x DIDNamespace) Enum() *DIDNamespace { + p := new(DIDNamespace) + *p = x + return p +} + +func (x DIDNamespace) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (DIDNamespace) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[1].Descriptor() +} + +func (DIDNamespace) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[1] +} + +func (x DIDNamespace) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use DIDNamespace.Descriptor instead. +func (DIDNamespace) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{1} +} + +// KeyAlgorithm defines the key algorithm +type KeyAlgorithm int32 + +const ( + KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED KeyAlgorithm = 0 + KeyAlgorithm_KEY_ALGORITHM_ES256 KeyAlgorithm = 1 + KeyAlgorithm_KEY_ALGORITHM_ES384 KeyAlgorithm = 2 + KeyAlgorithm_KEY_ALGORITHM_ES512 KeyAlgorithm = 3 + KeyAlgorithm_KEY_ALGORITHM_EDDSA KeyAlgorithm = 4 + KeyAlgorithm_KEY_ALGORITHM_ES256K KeyAlgorithm = 5 + KeyAlgorithm_KEY_ALGORITHM_BLS12377 KeyAlgorithm = 6 + KeyAlgorithm_KEY_ALGORITHM_KECCAK256 KeyAlgorithm = 7 +) + +// Enum value maps for KeyAlgorithm. +var ( + KeyAlgorithm_name = map[int32]string{ + 0: "KEY_ALGORITHM_UNSPECIFIED", + 1: "KEY_ALGORITHM_ES256", + 2: "KEY_ALGORITHM_ES384", + 3: "KEY_ALGORITHM_ES512", + 4: "KEY_ALGORITHM_EDDSA", + 5: "KEY_ALGORITHM_ES256K", + 6: "KEY_ALGORITHM_BLS12377", + 7: "KEY_ALGORITHM_KECCAK256", + } + KeyAlgorithm_value = map[string]int32{ + "KEY_ALGORITHM_UNSPECIFIED": 0, + "KEY_ALGORITHM_ES256": 1, + "KEY_ALGORITHM_ES384": 2, + "KEY_ALGORITHM_ES512": 3, + "KEY_ALGORITHM_EDDSA": 4, + "KEY_ALGORITHM_ES256K": 5, + "KEY_ALGORITHM_BLS12377": 6, + "KEY_ALGORITHM_KECCAK256": 7, + } +) + +func (x KeyAlgorithm) Enum() *KeyAlgorithm { + p := new(KeyAlgorithm) + *p = x + return p +} + +func (x KeyAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[2].Descriptor() +} + +func (KeyAlgorithm) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[2] +} + +func (x KeyAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyAlgorithm.Descriptor instead. +func (KeyAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{2} +} + +// KeyCurve defines the key curve +type KeyCurve int32 + +const ( + KeyCurve_KEY_CURVE_UNSPECIFIED KeyCurve = 0 + KeyCurve_KEY_CURVE_P256 KeyCurve = 1 + KeyCurve_KEY_CURVE_P384 KeyCurve = 2 + KeyCurve_KEY_CURVE_P521 KeyCurve = 3 + KeyCurve_KEY_CURVE_X25519 KeyCurve = 4 + KeyCurve_KEY_CURVE_X448 KeyCurve = 5 + KeyCurve_KEY_CURVE_ED25519 KeyCurve = 6 + KeyCurve_KEY_CURVE_ED448 KeyCurve = 7 + KeyCurve_KEY_CURVE_SECP256K1 KeyCurve = 8 +) + +// Enum value maps for KeyCurve. +var ( + KeyCurve_name = map[int32]string{ + 0: "KEY_CURVE_UNSPECIFIED", + 1: "KEY_CURVE_P256", + 2: "KEY_CURVE_P384", + 3: "KEY_CURVE_P521", + 4: "KEY_CURVE_X25519", + 5: "KEY_CURVE_X448", + 6: "KEY_CURVE_ED25519", + 7: "KEY_CURVE_ED448", + 8: "KEY_CURVE_SECP256K1", + } + KeyCurve_value = map[string]int32{ + "KEY_CURVE_UNSPECIFIED": 0, + "KEY_CURVE_P256": 1, + "KEY_CURVE_P384": 2, + "KEY_CURVE_P521": 3, + "KEY_CURVE_X25519": 4, + "KEY_CURVE_X448": 5, + "KEY_CURVE_ED25519": 6, + "KEY_CURVE_ED448": 7, + "KEY_CURVE_SECP256K1": 8, + } +) + +func (x KeyCurve) Enum() *KeyCurve { + p := new(KeyCurve) + *p = x + return p +} + +func (x KeyCurve) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyCurve) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[3].Descriptor() +} + +func (KeyCurve) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[3] +} + +func (x KeyCurve) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyCurve.Descriptor instead. +func (KeyCurve) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{3} +} + +// KeyEncoding defines the key encoding +type KeyEncoding int32 + +const ( + KeyEncoding_KEY_ENCODING_UNSPECIFIED KeyEncoding = 0 + KeyEncoding_KEY_ENCODING_RAW KeyEncoding = 1 + KeyEncoding_KEY_ENCODING_HEX KeyEncoding = 2 + KeyEncoding_KEY_ENCODING_MULTIBASE KeyEncoding = 3 + KeyEncoding_KEY_ENCODING_JWK KeyEncoding = 4 +) + +// Enum value maps for KeyEncoding. +var ( + KeyEncoding_name = map[int32]string{ + 0: "KEY_ENCODING_UNSPECIFIED", + 1: "KEY_ENCODING_RAW", + 2: "KEY_ENCODING_HEX", + 3: "KEY_ENCODING_MULTIBASE", + 4: "KEY_ENCODING_JWK", + } + KeyEncoding_value = map[string]int32{ + "KEY_ENCODING_UNSPECIFIED": 0, + "KEY_ENCODING_RAW": 1, + "KEY_ENCODING_HEX": 2, + "KEY_ENCODING_MULTIBASE": 3, + "KEY_ENCODING_JWK": 4, + } +) + +func (x KeyEncoding) Enum() *KeyEncoding { + p := new(KeyEncoding) + *p = x + return p +} + +func (x KeyEncoding) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyEncoding) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[4].Descriptor() +} + +func (KeyEncoding) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[4] +} + +func (x KeyEncoding) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyEncoding.Descriptor instead. +func (KeyEncoding) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{4} +} + +// KeyRole defines the kind of key +type KeyRole int32 + +const ( + KeyRole_KEY_ROLE_UNSPECIFIED KeyRole = 0 + // Blockchain key types + KeyRole_KEY_ROLE_AUTHENTICATION KeyRole = 1 // Passkeys and FIDO + KeyRole_KEY_ROLE_ASSERTION KeyRole = 2 // Zk Identifiers + KeyRole_KEY_ROLE_DELEGATION KeyRole = 3 // ETH,BTC,IBC addresses + KeyRole_KEY_ROLE_INVOCATION KeyRole = 4 // DWN Controllers +) + +// Enum value maps for KeyRole. +var ( + KeyRole_name = map[int32]string{ + 0: "KEY_ROLE_UNSPECIFIED", + 1: "KEY_ROLE_AUTHENTICATION", + 2: "KEY_ROLE_ASSERTION", + 3: "KEY_ROLE_DELEGATION", + 4: "KEY_ROLE_INVOCATION", + } + KeyRole_value = map[string]int32{ + "KEY_ROLE_UNSPECIFIED": 0, + "KEY_ROLE_AUTHENTICATION": 1, + "KEY_ROLE_ASSERTION": 2, + "KEY_ROLE_DELEGATION": 3, + "KEY_ROLE_INVOCATION": 4, + } +) + +func (x KeyRole) Enum() *KeyRole { + p := new(KeyRole) + *p = x + return p +} + +func (x KeyRole) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyRole) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[5].Descriptor() +} + +func (KeyRole) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[5] +} + +func (x KeyRole) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyRole.Descriptor instead. +func (KeyRole) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{5} +} + +// KeyType defines the key type +type KeyType int32 + +const ( + KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 + KeyType_KEY_TYPE_OCTET KeyType = 1 + KeyType_KEY_TYPE_ELLIPTIC KeyType = 2 + KeyType_KEY_TYPE_RSA KeyType = 3 + KeyType_KEY_TYPE_SYMMETRIC KeyType = 4 + KeyType_KEY_TYPE_HMAC KeyType = 5 +) + +// Enum value maps for KeyType. +var ( + KeyType_name = map[int32]string{ + 0: "KEY_TYPE_UNSPECIFIED", + 1: "KEY_TYPE_OCTET", + 2: "KEY_TYPE_ELLIPTIC", + 3: "KEY_TYPE_RSA", + 4: "KEY_TYPE_SYMMETRIC", + 5: "KEY_TYPE_HMAC", + } + KeyType_value = map[string]int32{ + "KEY_TYPE_UNSPECIFIED": 0, + "KEY_TYPE_OCTET": 1, + "KEY_TYPE_ELLIPTIC": 2, + "KEY_TYPE_RSA": 3, + "KEY_TYPE_SYMMETRIC": 4, + "KEY_TYPE_HMAC": 5, + } +) + +func (x KeyType) Enum() *KeyType { + p := new(KeyType) + *p = x + return p +} + +func (x KeyType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (KeyType) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[6].Descriptor() +} + +func (KeyType) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[6] +} + +func (x KeyType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use KeyType.Descriptor instead. +func (KeyType) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{6} +} + +// PermissionScope define the Capabilities Controllers can grant for Services +type PermissionScope int32 + +const ( + PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 + PermissionScope_PERMISSION_SCOPE_BASIC_INFO PermissionScope = 1 + PermissionScope_PERMISSION_SCOPE_RECORDS_READ PermissionScope = 2 + PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE PermissionScope = 3 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 + PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 + PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 + PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 + PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 + PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 + PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 +) + +// Enum value maps for PermissionScope. +var ( + PermissionScope_name = map[int32]string{ + 0: "PERMISSION_SCOPE_UNSPECIFIED", + 1: "PERMISSION_SCOPE_BASIC_INFO", + 2: "PERMISSION_SCOPE_RECORDS_READ", + 3: "PERMISSION_SCOPE_RECORDS_WRITE", + 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", + 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", + 6: "PERMISSION_SCOPE_WALLETS_READ", + 7: "PERMISSION_SCOPE_WALLETS_CREATE", + 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", + 9: "PERMISSION_SCOPE_WALLETS_UPDATE", + 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", + 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", + 12: "PERMISSION_SCOPE_ADMIN_USER", + 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", + } + PermissionScope_value = map[string]int32{ + "PERMISSION_SCOPE_UNSPECIFIED": 0, + "PERMISSION_SCOPE_BASIC_INFO": 1, + "PERMISSION_SCOPE_RECORDS_READ": 2, + "PERMISSION_SCOPE_RECORDS_WRITE": 3, + "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, + "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, + "PERMISSION_SCOPE_WALLETS_READ": 6, + "PERMISSION_SCOPE_WALLETS_CREATE": 7, + "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, + "PERMISSION_SCOPE_WALLETS_UPDATE": 9, + "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, + "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, + "PERMISSION_SCOPE_ADMIN_USER": 12, + "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, + } +) + +func (x PermissionScope) Enum() *PermissionScope { + p := new(PermissionScope) + *p = x + return p +} + +func (x PermissionScope) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (PermissionScope) Descriptor() protoreflect.EnumDescriptor { + return file_did_v1_constants_proto_enumTypes[7].Descriptor() +} + +func (PermissionScope) Type() protoreflect.EnumType { + return &file_did_v1_constants_proto_enumTypes[7] +} + +func (x PermissionScope) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use PermissionScope.Descriptor instead. +func (PermissionScope) EnumDescriptor() ([]byte, []int) { + return file_did_v1_constants_proto_rawDescGZIP(), []int{7} +} + +var File_did_v1_constants_proto protoreflect.FileDescriptor + +var file_did_v1_constants_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, + 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2a, 0xac, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1a, + 0x0a, 0x16, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x41, 0x53, + 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4e, 0x41, 0x54, 0x49, 0x56, 0x45, 0x10, + 0x01, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x57, 0x52, 0x41, 0x50, 0x50, 0x45, 0x44, 0x10, 0x02, 0x12, 0x16, 0x0a, 0x12, 0x41, 0x53, 0x53, + 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x41, 0x4b, 0x49, 0x4e, 0x47, 0x10, + 0x03, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, + 0x50, 0x4f, 0x4f, 0x4c, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, 0x41, 0x53, 0x53, 0x45, 0x54, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x12, 0x13, 0x0a, 0x0f, 0x41, 0x53, + 0x53, 0x45, 0x54, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x43, 0x57, 0x32, 0x30, 0x10, 0x06, 0x2a, + 0xf9, 0x01, 0x0a, 0x0c, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, + 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, + 0x5f, 0x49, 0x50, 0x46, 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, + 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x4f, 0x4e, 0x52, 0x10, 0x02, 0x12, + 0x19, 0x0a, 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, + 0x5f, 0x42, 0x49, 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, + 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x45, 0x54, 0x48, 0x45, + 0x52, 0x45, 0x55, 0x4d, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, + 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x12, 0x1a, 0x0a, + 0x16, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x57, + 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, + 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x44, 0x57, 0x4e, 0x10, 0x07, + 0x12, 0x19, 0x0a, 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, + 0x45, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x10, 0x08, 0x2a, 0xe4, 0x01, 0x0a, 0x0c, + 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x1d, 0x0a, 0x19, + 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x55, 0x4e, + 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x4b, + 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x53, 0x32, + 0x35, 0x36, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, + 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x53, 0x33, 0x38, 0x34, 0x10, 0x02, 0x12, 0x17, 0x0a, + 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, + 0x53, 0x35, 0x31, 0x32, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, + 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x45, 0x44, 0x44, 0x53, 0x41, 0x10, 0x04, 0x12, + 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, + 0x5f, 0x45, 0x53, 0x32, 0x35, 0x36, 0x4b, 0x10, 0x05, 0x12, 0x1a, 0x0a, 0x16, 0x4b, 0x45, 0x59, + 0x5f, 0x41, 0x4c, 0x47, 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x42, 0x4c, 0x53, 0x31, 0x32, + 0x33, 0x37, 0x37, 0x10, 0x06, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x45, 0x59, 0x5f, 0x41, 0x4c, 0x47, + 0x4f, 0x52, 0x49, 0x54, 0x48, 0x4d, 0x5f, 0x4b, 0x45, 0x43, 0x43, 0x41, 0x4b, 0x32, 0x35, 0x36, + 0x10, 0x07, 0x2a, 0xd0, 0x01, 0x0a, 0x08, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, 0x12, + 0x19, 0x0a, 0x15, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x55, 0x4e, 0x53, + 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, + 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x32, 0x35, 0x36, 0x10, 0x01, 0x12, 0x12, + 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x50, 0x33, 0x38, 0x34, + 0x10, 0x02, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, + 0x50, 0x35, 0x32, 0x31, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, + 0x52, 0x56, 0x45, 0x5f, 0x58, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x04, 0x12, 0x12, 0x0a, 0x0e, + 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x58, 0x34, 0x34, 0x38, 0x10, 0x05, + 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x45, 0x44, + 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, 0x06, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x43, + 0x55, 0x52, 0x56, 0x45, 0x5f, 0x45, 0x44, 0x34, 0x34, 0x38, 0x10, 0x07, 0x12, 0x17, 0x0a, 0x13, + 0x4b, 0x45, 0x59, 0x5f, 0x43, 0x55, 0x52, 0x56, 0x45, 0x5f, 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, + 0x36, 0x4b, 0x31, 0x10, 0x08, 0x2a, 0x89, 0x01, 0x0a, 0x0b, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x1c, 0x0a, 0x18, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, + 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, + 0x44, 0x10, 0x00, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, + 0x49, 0x4e, 0x47, 0x5f, 0x52, 0x41, 0x57, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, + 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x48, 0x45, 0x58, 0x10, 0x02, 0x12, + 0x1a, 0x0a, 0x16, 0x4b, 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, + 0x4d, 0x55, 0x4c, 0x54, 0x49, 0x42, 0x41, 0x53, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x4b, + 0x45, 0x59, 0x5f, 0x45, 0x4e, 0x43, 0x4f, 0x44, 0x49, 0x4e, 0x47, 0x5f, 0x4a, 0x57, 0x4b, 0x10, + 0x04, 0x2a, 0x8a, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x18, 0x0a, + 0x14, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, + 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4b, 0x45, 0x59, 0x5f, 0x52, + 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x45, 0x4e, 0x54, 0x49, 0x43, 0x41, 0x54, 0x49, + 0x4f, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, + 0x5f, 0x41, 0x53, 0x53, 0x45, 0x52, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, + 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x44, 0x45, 0x4c, 0x45, 0x47, 0x41, 0x54, + 0x49, 0x4f, 0x4e, 0x10, 0x03, 0x12, 0x17, 0x0a, 0x13, 0x4b, 0x45, 0x59, 0x5f, 0x52, 0x4f, 0x4c, + 0x45, 0x5f, 0x49, 0x4e, 0x56, 0x4f, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x10, 0x04, 0x2a, 0x8b, + 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, + 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, + 0x45, 0x44, 0x10, 0x00, 0x12, 0x12, 0x0a, 0x0e, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, + 0x5f, 0x4f, 0x43, 0x54, 0x45, 0x54, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, + 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4c, 0x4c, 0x49, 0x50, 0x54, 0x49, 0x43, 0x10, 0x02, 0x12, + 0x10, 0x0a, 0x0c, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x52, 0x53, 0x41, 0x10, + 0x03, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x59, + 0x4d, 0x4d, 0x45, 0x54, 0x52, 0x49, 0x43, 0x10, 0x04, 0x12, 0x11, 0x0a, 0x0d, 0x4b, 0x45, 0x59, + 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x48, 0x4d, 0x41, 0x43, 0x10, 0x05, 0x2a, 0x9f, 0x04, 0x0a, + 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, + 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x46, + 0x4f, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x53, 0x5f, + 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, + 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x52, + 0x44, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, + 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, + 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, + 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, + 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x50, + 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, + 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x06, 0x12, 0x23, + 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, + 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, + 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, + 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, + 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x50, + 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, + 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x10, 0x09, + 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, + 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, + 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x45, + 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, + 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x42, 0x52, 0x4f, 0x41, + 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, + 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, + 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x45, 0x52, 0x4d, + 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, + 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, 0x4f, 0x52, 0x10, 0x0d, 0x42, 0x7e, + 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0e, 0x43, 0x6f, + 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, + 0x72, 0x2f, 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 ( + file_did_v1_constants_proto_rawDescOnce sync.Once + file_did_v1_constants_proto_rawDescData = file_did_v1_constants_proto_rawDesc +) + +func file_did_v1_constants_proto_rawDescGZIP() []byte { + file_did_v1_constants_proto_rawDescOnce.Do(func() { + file_did_v1_constants_proto_rawDescData = protoimpl.X.CompressGZIP(file_did_v1_constants_proto_rawDescData) + }) + return file_did_v1_constants_proto_rawDescData +} + +var file_did_v1_constants_proto_enumTypes = make([]protoimpl.EnumInfo, 8) +var file_did_v1_constants_proto_goTypes = []interface{}{ + (AssetType)(0), // 0: did.v1.AssetType + (DIDNamespace)(0), // 1: did.v1.DIDNamespace + (KeyAlgorithm)(0), // 2: did.v1.KeyAlgorithm + (KeyCurve)(0), // 3: did.v1.KeyCurve + (KeyEncoding)(0), // 4: did.v1.KeyEncoding + (KeyRole)(0), // 5: did.v1.KeyRole + (KeyType)(0), // 6: did.v1.KeyType + (PermissionScope)(0), // 7: did.v1.PermissionScope +} +var file_did_v1_constants_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_did_v1_constants_proto_init() } +func file_did_v1_constants_proto_init() { + if File_did_v1_constants_proto != nil { + return + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_did_v1_constants_proto_rawDesc, + NumEnums: 8, + NumMessages: 0, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_did_v1_constants_proto_goTypes, + DependencyIndexes: file_did_v1_constants_proto_depIdxs, + EnumInfos: file_did_v1_constants_proto_enumTypes, + }.Build() + File_did_v1_constants_proto = out.File + file_did_v1_constants_proto_rawDesc = nil + file_did_v1_constants_proto_goTypes = nil + file_did_v1_constants_proto_depIdxs = nil +} diff --git a/api/did/v1/genesis.pulsar.go b/api/did/v1/genesis.pulsar.go index c56d95123..c526c1028 100644 --- a/api/did/v1/genesis.pulsar.go +++ b/api/did/v1/genesis.pulsar.go @@ -609,6 +609,7 @@ var ( fd_Params_whitelisted_assets protoreflect.FieldDescriptor fd_Params_whitelisted_chains protoreflect.FieldDescriptor fd_Params_allowed_public_keys protoreflect.FieldDescriptor + fd_Params_openid_config protoreflect.FieldDescriptor ) func init() { @@ -617,6 +618,7 @@ func init() { fd_Params_whitelisted_assets = md_Params.Fields().ByName("whitelisted_assets") fd_Params_whitelisted_chains = md_Params.Fields().ByName("whitelisted_chains") fd_Params_allowed_public_keys = md_Params.Fields().ByName("allowed_public_keys") + fd_Params_openid_config = md_Params.Fields().ByName("openid_config") } var _ protoreflect.Message = (*fastReflection_Params)(nil) @@ -702,6 +704,12 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } + if x.OpenidConfig != nil { + value := protoreflect.ValueOfMessage(x.OpenidConfig.ProtoReflect()) + if !f(fd_Params_openid_config, value) { + return + } + } } // Has reports whether a field is populated. @@ -723,6 +731,8 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return len(x.WhitelistedChains) != 0 case "did.v1.Params.allowed_public_keys": return len(x.AllowedPublicKeys) != 0 + case "did.v1.Params.openid_config": + return x.OpenidConfig != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -745,6 +755,8 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.WhitelistedChains = nil case "did.v1.Params.allowed_public_keys": x.AllowedPublicKeys = nil + case "did.v1.Params.openid_config": + x.OpenidConfig = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -779,6 +791,9 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Params_3_list{list: &x.AllowedPublicKeys} return protoreflect.ValueOfList(listValue) + case "did.v1.Params.openid_config": + value := x.OpenidConfig + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -811,6 +826,8 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Params_3_list) x.AllowedPublicKeys = *clv.list + case "did.v1.Params.openid_config": + x.OpenidConfig = value.Message().Interface().(*OpenIDConfig) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -849,6 +866,11 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Params_3_list{list: &x.AllowedPublicKeys} return protoreflect.ValueOfList(value) + case "did.v1.Params.openid_config": + if x.OpenidConfig == nil { + x.OpenidConfig = new(OpenIDConfig) + } + return protoreflect.ValueOfMessage(x.OpenidConfig.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -871,6 +893,9 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor case "did.v1.Params.allowed_public_keys": list := []*KeyInfo{} return protoreflect.ValueOfList(&_Params_3_list{list: &list}) + case "did.v1.Params.openid_config": + m := new(OpenIDConfig) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Params")) @@ -958,6 +983,10 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if x.OpenidConfig != nil { + l = options.Size(x.OpenidConfig) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -987,6 +1016,20 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.OpenidConfig != nil { + encoded, err := options.Marshal(x.OpenidConfig) + 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.AllowedPublicKeys) > 0 { for iNdEx := len(x.AllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { encoded, err := options.Marshal(x.AllowedPublicKeys[iNdEx]) @@ -1186,6 +1229,42 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OpenidConfig", 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.OpenidConfig == nil { + x.OpenidConfig = &OpenIDConfig{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OpenidConfig); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -1222,40 +1301,26 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } var ( - md_AssetInfo protoreflect.MessageDescriptor - fd_AssetInfo_id protoreflect.FieldDescriptor - fd_AssetInfo_denom protoreflect.FieldDescriptor - fd_AssetInfo_symbol protoreflect.FieldDescriptor - fd_AssetInfo_asset_type protoreflect.FieldDescriptor - fd_AssetInfo_origin_chain protoreflect.FieldDescriptor - fd_AssetInfo_origin_denom protoreflect.FieldDescriptor - fd_AssetInfo_decimals protoreflect.FieldDescriptor - fd_AssetInfo_description protoreflect.FieldDescriptor - fd_AssetInfo_image_url protoreflect.FieldDescriptor - fd_AssetInfo_coingecko_id protoreflect.FieldDescriptor - fd_AssetInfo_is_enabled protoreflect.FieldDescriptor - fd_AssetInfo_ibc_path protoreflect.FieldDescriptor - fd_AssetInfo_ibc_channel protoreflect.FieldDescriptor - fd_AssetInfo_ibc_port protoreflect.FieldDescriptor + md_AssetInfo protoreflect.MessageDescriptor + fd_AssetInfo_index protoreflect.FieldDescriptor + fd_AssetInfo_hrp protoreflect.FieldDescriptor + fd_AssetInfo_symbol protoreflect.FieldDescriptor + fd_AssetInfo_asset_type protoreflect.FieldDescriptor + fd_AssetInfo_name protoreflect.FieldDescriptor + fd_AssetInfo_method protoreflect.FieldDescriptor + fd_AssetInfo_icon_url protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() md_AssetInfo = File_did_v1_genesis_proto.Messages().ByName("AssetInfo") - fd_AssetInfo_id = md_AssetInfo.Fields().ByName("id") - fd_AssetInfo_denom = md_AssetInfo.Fields().ByName("denom") + fd_AssetInfo_index = md_AssetInfo.Fields().ByName("index") + fd_AssetInfo_hrp = md_AssetInfo.Fields().ByName("hrp") fd_AssetInfo_symbol = md_AssetInfo.Fields().ByName("symbol") fd_AssetInfo_asset_type = md_AssetInfo.Fields().ByName("asset_type") - fd_AssetInfo_origin_chain = md_AssetInfo.Fields().ByName("origin_chain") - fd_AssetInfo_origin_denom = md_AssetInfo.Fields().ByName("origin_denom") - fd_AssetInfo_decimals = md_AssetInfo.Fields().ByName("decimals") - fd_AssetInfo_description = md_AssetInfo.Fields().ByName("description") - fd_AssetInfo_image_url = md_AssetInfo.Fields().ByName("image_url") - fd_AssetInfo_coingecko_id = md_AssetInfo.Fields().ByName("coingecko_id") - fd_AssetInfo_is_enabled = md_AssetInfo.Fields().ByName("is_enabled") - fd_AssetInfo_ibc_path = md_AssetInfo.Fields().ByName("ibc_path") - fd_AssetInfo_ibc_channel = md_AssetInfo.Fields().ByName("ibc_channel") - fd_AssetInfo_ibc_port = md_AssetInfo.Fields().ByName("ibc_port") + fd_AssetInfo_name = md_AssetInfo.Fields().ByName("name") + fd_AssetInfo_method = md_AssetInfo.Fields().ByName("method") + fd_AssetInfo_icon_url = md_AssetInfo.Fields().ByName("icon_url") } var _ protoreflect.Message = (*fastReflection_AssetInfo)(nil) @@ -1323,15 +1388,15 @@ func (x *fastReflection_AssetInfo) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_AssetInfo_id, value) { + if x.Index != int64(0) { + value := protoreflect.ValueOfInt64(x.Index) + if !f(fd_AssetInfo_index, value) { return } } - if x.Denom != "" { - value := protoreflect.ValueOfString(x.Denom) - if !f(fd_AssetInfo_denom, value) { + if x.Hrp != "" { + value := protoreflect.ValueOfString(x.Hrp) + if !f(fd_AssetInfo_hrp, value) { return } } @@ -1341,69 +1406,27 @@ func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, pr return } } - if x.AssetType != "" { - value := protoreflect.ValueOfString(x.AssetType) + if x.AssetType != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.AssetType)) if !f(fd_AssetInfo_asset_type, value) { return } } - if x.OriginChain != "" { - value := protoreflect.ValueOfString(x.OriginChain) - if !f(fd_AssetInfo_origin_chain, value) { + if x.Name != "" { + value := protoreflect.ValueOfString(x.Name) + if !f(fd_AssetInfo_name, value) { return } } - if x.OriginDenom != "" { - value := protoreflect.ValueOfString(x.OriginDenom) - if !f(fd_AssetInfo_origin_denom, value) { + if x.Method != "" { + value := protoreflect.ValueOfString(x.Method) + if !f(fd_AssetInfo_method, value) { return } } - if x.Decimals != int32(0) { - value := protoreflect.ValueOfInt32(x.Decimals) - if !f(fd_AssetInfo_decimals, value) { - return - } - } - if x.Description != "" { - value := protoreflect.ValueOfString(x.Description) - if !f(fd_AssetInfo_description, value) { - return - } - } - if x.ImageUrl != "" { - value := protoreflect.ValueOfString(x.ImageUrl) - if !f(fd_AssetInfo_image_url, value) { - return - } - } - if x.CoingeckoId != "" { - value := protoreflect.ValueOfString(x.CoingeckoId) - if !f(fd_AssetInfo_coingecko_id, value) { - return - } - } - if x.IsEnabled != false { - value := protoreflect.ValueOfBool(x.IsEnabled) - if !f(fd_AssetInfo_is_enabled, value) { - return - } - } - if x.IbcPath != "" { - value := protoreflect.ValueOfString(x.IbcPath) - if !f(fd_AssetInfo_ibc_path, value) { - return - } - } - if x.IbcChannel != "" { - value := protoreflect.ValueOfString(x.IbcChannel) - if !f(fd_AssetInfo_ibc_channel, value) { - return - } - } - if x.IbcPort != "" { - value := protoreflect.ValueOfString(x.IbcPort) - if !f(fd_AssetInfo_ibc_port, value) { + if x.IconUrl != "" { + value := protoreflect.ValueOfString(x.IconUrl) + if !f(fd_AssetInfo_icon_url, value) { return } } @@ -1422,34 +1445,20 @@ func (x *fastReflection_AssetInfo) Range(f func(protoreflect.FieldDescriptor, pr // a repeated field is populated if it is non-empty. func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.AssetInfo.id": - return x.Id != "" - case "did.v1.AssetInfo.denom": - return x.Denom != "" + case "did.v1.AssetInfo.index": + return x.Index != int64(0) + case "did.v1.AssetInfo.hrp": + return x.Hrp != "" case "did.v1.AssetInfo.symbol": return x.Symbol != "" case "did.v1.AssetInfo.asset_type": - return x.AssetType != "" - case "did.v1.AssetInfo.origin_chain": - return x.OriginChain != "" - case "did.v1.AssetInfo.origin_denom": - return x.OriginDenom != "" - case "did.v1.AssetInfo.decimals": - return x.Decimals != int32(0) - case "did.v1.AssetInfo.description": - return x.Description != "" - case "did.v1.AssetInfo.image_url": - return x.ImageUrl != "" - case "did.v1.AssetInfo.coingecko_id": - return x.CoingeckoId != "" - case "did.v1.AssetInfo.is_enabled": - return x.IsEnabled != false - case "did.v1.AssetInfo.ibc_path": - return x.IbcPath != "" - case "did.v1.AssetInfo.ibc_channel": - return x.IbcChannel != "" - case "did.v1.AssetInfo.ibc_port": - return x.IbcPort != "" + return x.AssetType != 0 + case "did.v1.AssetInfo.name": + return x.Name != "" + case "did.v1.AssetInfo.method": + return x.Method != "" + case "did.v1.AssetInfo.icon_url": + return x.IconUrl != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) @@ -1466,34 +1475,20 @@ func (x *fastReflection_AssetInfo) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.AssetInfo.id": - x.Id = "" - case "did.v1.AssetInfo.denom": - x.Denom = "" + case "did.v1.AssetInfo.index": + x.Index = int64(0) + case "did.v1.AssetInfo.hrp": + x.Hrp = "" case "did.v1.AssetInfo.symbol": x.Symbol = "" case "did.v1.AssetInfo.asset_type": - x.AssetType = "" - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = "" - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = "" - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(0) - case "did.v1.AssetInfo.description": - x.Description = "" - case "did.v1.AssetInfo.image_url": - x.ImageUrl = "" - case "did.v1.AssetInfo.coingecko_id": - x.CoingeckoId = "" - case "did.v1.AssetInfo.is_enabled": - x.IsEnabled = false - case "did.v1.AssetInfo.ibc_path": - x.IbcPath = "" - case "did.v1.AssetInfo.ibc_channel": - x.IbcChannel = "" - case "did.v1.AssetInfo.ibc_port": - x.IbcPort = "" + x.AssetType = 0 + case "did.v1.AssetInfo.name": + x.Name = "" + case "did.v1.AssetInfo.method": + x.Method = "" + case "did.v1.AssetInfo.icon_url": + x.IconUrl = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) @@ -1510,47 +1505,26 @@ func (x *fastReflection_AssetInfo) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.AssetInfo.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.denom": - value := x.Denom + case "did.v1.AssetInfo.index": + value := x.Index + return protoreflect.ValueOfInt64(value) + case "did.v1.AssetInfo.hrp": + value := x.Hrp return protoreflect.ValueOfString(value) case "did.v1.AssetInfo.symbol": value := x.Symbol return protoreflect.ValueOfString(value) case "did.v1.AssetInfo.asset_type": value := x.AssetType + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.AssetInfo.name": + value := x.Name return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_chain": - value := x.OriginChain + case "did.v1.AssetInfo.method": + value := x.Method return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.origin_denom": - value := x.OriginDenom - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.decimals": - value := x.Decimals - return protoreflect.ValueOfInt32(value) - case "did.v1.AssetInfo.description": - value := x.Description - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.image_url": - value := x.ImageUrl - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.coingecko_id": - value := x.CoingeckoId - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.is_enabled": - value := x.IsEnabled - return protoreflect.ValueOfBool(value) - case "did.v1.AssetInfo.ibc_path": - value := x.IbcPath - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.ibc_channel": - value := x.IbcChannel - return protoreflect.ValueOfString(value) - case "did.v1.AssetInfo.ibc_port": - value := x.IbcPort + case "did.v1.AssetInfo.icon_url": + value := x.IconUrl return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { @@ -1572,34 +1546,20 @@ func (x *fastReflection_AssetInfo) Get(descriptor protoreflect.FieldDescriptor) // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.AssetInfo.id": - x.Id = value.Interface().(string) - case "did.v1.AssetInfo.denom": - x.Denom = value.Interface().(string) + case "did.v1.AssetInfo.index": + x.Index = value.Int() + case "did.v1.AssetInfo.hrp": + x.Hrp = value.Interface().(string) case "did.v1.AssetInfo.symbol": x.Symbol = value.Interface().(string) case "did.v1.AssetInfo.asset_type": - x.AssetType = value.Interface().(string) - case "did.v1.AssetInfo.origin_chain": - x.OriginChain = value.Interface().(string) - case "did.v1.AssetInfo.origin_denom": - x.OriginDenom = value.Interface().(string) - case "did.v1.AssetInfo.decimals": - x.Decimals = int32(value.Int()) - case "did.v1.AssetInfo.description": - x.Description = value.Interface().(string) - case "did.v1.AssetInfo.image_url": - x.ImageUrl = value.Interface().(string) - case "did.v1.AssetInfo.coingecko_id": - x.CoingeckoId = value.Interface().(string) - case "did.v1.AssetInfo.is_enabled": - x.IsEnabled = value.Bool() - case "did.v1.AssetInfo.ibc_path": - x.IbcPath = value.Interface().(string) - case "did.v1.AssetInfo.ibc_channel": - x.IbcChannel = value.Interface().(string) - case "did.v1.AssetInfo.ibc_port": - x.IbcPort = value.Interface().(string) + x.AssetType = (AssetType)(value.Enum()) + case "did.v1.AssetInfo.name": + x.Name = value.Interface().(string) + case "did.v1.AssetInfo.method": + x.Method = value.Interface().(string) + case "did.v1.AssetInfo.icon_url": + x.IconUrl = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) @@ -1620,34 +1580,20 @@ func (x *fastReflection_AssetInfo) Set(fd protoreflect.FieldDescriptor, value pr // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.AssetInfo.id": - panic(fmt.Errorf("field id of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.denom": - panic(fmt.Errorf("field denom of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.index": + panic(fmt.Errorf("field index of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.hrp": + panic(fmt.Errorf("field hrp of message did.v1.AssetInfo is not mutable")) case "did.v1.AssetInfo.symbol": panic(fmt.Errorf("field symbol of message did.v1.AssetInfo is not mutable")) case "did.v1.AssetInfo.asset_type": panic(fmt.Errorf("field asset_type of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_chain": - panic(fmt.Errorf("field origin_chain of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.origin_denom": - panic(fmt.Errorf("field origin_denom of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.decimals": - panic(fmt.Errorf("field decimals of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.description": - panic(fmt.Errorf("field description of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.image_url": - panic(fmt.Errorf("field image_url of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.coingecko_id": - panic(fmt.Errorf("field coingecko_id of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.is_enabled": - panic(fmt.Errorf("field is_enabled of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_path": - panic(fmt.Errorf("field ibc_path of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_channel": - panic(fmt.Errorf("field ibc_channel of message did.v1.AssetInfo is not mutable")) - case "did.v1.AssetInfo.ibc_port": - panic(fmt.Errorf("field ibc_port of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.name": + panic(fmt.Errorf("field name of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.method": + panic(fmt.Errorf("field method of message did.v1.AssetInfo is not mutable")) + case "did.v1.AssetInfo.icon_url": + panic(fmt.Errorf("field icon_url of message did.v1.AssetInfo is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.AssetInfo")) @@ -1661,33 +1607,19 @@ func (x *fastReflection_AssetInfo) Mutable(fd protoreflect.FieldDescriptor) prot // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_AssetInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.AssetInfo.id": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.denom": + case "did.v1.AssetInfo.index": + return protoreflect.ValueOfInt64(int64(0)) + case "did.v1.AssetInfo.hrp": return protoreflect.ValueOfString("") case "did.v1.AssetInfo.symbol": return protoreflect.ValueOfString("") case "did.v1.AssetInfo.asset_type": + return protoreflect.ValueOfEnum(0) + case "did.v1.AssetInfo.name": return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_chain": + case "did.v1.AssetInfo.method": return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.origin_denom": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.decimals": - return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.AssetInfo.description": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.image_url": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.coingecko_id": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.is_enabled": - return protoreflect.ValueOfBool(false) - case "did.v1.AssetInfo.ibc_path": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.ibc_channel": - return protoreflect.ValueOfString("") - case "did.v1.AssetInfo.ibc_port": + case "did.v1.AssetInfo.icon_url": return protoreflect.ValueOfString("") default: if fd.IsExtension() { @@ -1758,11 +1690,10 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Id) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) + if x.Index != 0 { + n += 1 + runtime.Sov(uint64(x.Index)) } - l = len(x.Denom) + l = len(x.Hrp) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1770,45 +1701,18 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.AssetType) + if x.AssetType != 0 { + n += 1 + runtime.Sov(uint64(x.AssetType)) + } + l = len(x.Name) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.OriginChain) + l = len(x.Method) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.OriginDenom) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Decimals != 0 { - n += 1 + runtime.Sov(uint64(x.Decimals)) - } - l = len(x.Description) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ImageUrl) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.CoingeckoId) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.IsEnabled { - n += 2 - } - l = len(x.IbcPath) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcChannel) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.IbcPort) + l = len(x.IconUrl) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -1841,83 +1745,31 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.IbcPort) > 0 { - i -= len(x.IbcPort) - copy(dAtA[i:], x.IbcPort) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPort))) + if len(x.IconUrl) > 0 { + i -= len(x.IconUrl) + copy(dAtA[i:], x.IconUrl) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IconUrl))) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x3a } - if len(x.IbcChannel) > 0 { - i -= len(x.IbcChannel) - copy(dAtA[i:], x.IbcChannel) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(x.IbcPath) > 0 { - i -= len(x.IbcPath) - copy(dAtA[i:], x.IbcPath) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if x.IsEnabled { - i-- - if x.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(x.CoingeckoId) > 0 { - i -= len(x.CoingeckoId) - copy(dAtA[i:], x.CoingeckoId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(x.ImageUrl) > 0 { - i -= len(x.ImageUrl) - copy(dAtA[i:], x.ImageUrl) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(x.Description) > 0 { - i -= len(x.Description) - copy(dAtA[i:], x.Description) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Description))) - i-- - dAtA[i] = 0x42 - } - if x.Decimals != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(x.OriginDenom) > 0 { - i -= len(x.OriginDenom) - copy(dAtA[i:], x.OriginDenom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginDenom))) + if len(x.Method) > 0 { + i -= len(x.Method) + copy(dAtA[i:], x.Method) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Method))) i-- dAtA[i] = 0x32 } - if len(x.OriginChain) > 0 { - i -= len(x.OriginChain) - copy(dAtA[i:], x.OriginChain) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.OriginChain))) + if len(x.Name) > 0 { + i -= len(x.Name) + copy(dAtA[i:], x.Name) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Name))) i-- dAtA[i] = 0x2a } - if len(x.AssetType) > 0 { - i -= len(x.AssetType) - copy(dAtA[i:], x.AssetType) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AssetType))) + if x.AssetType != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.AssetType)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } if len(x.Symbol) > 0 { i -= len(x.Symbol) @@ -1926,19 +1778,17 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x1a } - if len(x.Denom) > 0 { - i -= len(x.Denom) - copy(dAtA[i:], x.Denom) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denom))) + if len(x.Hrp) > 0 { + i -= len(x.Hrp) + copy(dAtA[i:], x.Hrp) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hrp))) i-- dAtA[i] = 0x12 } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + if x.Index != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Index)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -1990,10 +1840,10 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var stringLen uint64 + x.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2003,27 +1853,14 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.Index |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hrp", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2051,7 +1888,7 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Denom = string(dAtA[iNdEx:postIndex]) + x.Hrp = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2086,10 +1923,10 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { x.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { + if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) } - var stringLen uint64 + x.AssetType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -2099,27 +1936,14 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + x.AssetType |= AssetType(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2147,11 +1971,11 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OriginChain = string(dAtA[iNdEx:postIndex]) + x.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2179,30 +2003,11 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.OriginDenom = string(dAtA[iNdEx:postIndex]) + x.Method = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - x.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - x.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IconUrl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2230,187 +2035,7 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.IbcPort = string(dAtA[iNdEx:postIndex]) + x.IconUrl = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2447,120 +2072,64 @@ func (x *fastReflection_AssetInfo) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_ChainInfo_7_list)(nil) +var _ protoreflect.List = (*_ChainInfo_5_list)(nil) -type _ChainInfo_7_list struct { - list *[]*ChainInfo_Endpoint +type _ChainInfo_5_list struct { + list *[]*ValidatorInfo } -func (x *_ChainInfo_7_list) Len() int { +func (x *_ChainInfo_5_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_ChainInfo_7_list) Get(i int) protoreflect.Value { +func (x *_ChainInfo_5_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_ChainInfo_7_list) Set(i int, value protoreflect.Value) { +func (x *_ChainInfo_5_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) + concreteValue := valueUnwrapped.Interface().(*ValidatorInfo) (*x.list)[i] = concreteValue } -func (x *_ChainInfo_7_list) Append(value protoreflect.Value) { +func (x *_ChainInfo_5_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) + concreteValue := valueUnwrapped.Interface().(*ValidatorInfo) *x.list = append(*x.list, concreteValue) } -func (x *_ChainInfo_7_list) AppendMutable() protoreflect.Value { - v := new(ChainInfo_Endpoint) +func (x *_ChainInfo_5_list) AppendMutable() protoreflect.Value { + v := new(ValidatorInfo) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_ChainInfo_7_list) Truncate(n int) { +func (x *_ChainInfo_5_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_ChainInfo_7_list) NewElement() protoreflect.Value { - v := new(ChainInfo_Endpoint) +func (x *_ChainInfo_5_list) NewElement() protoreflect.Value { + v := new(ValidatorInfo) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_ChainInfo_7_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_ChainInfo_8_list)(nil) - -type _ChainInfo_8_list struct { - list *[]*ChainInfo_Endpoint -} - -func (x *_ChainInfo_8_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_ChainInfo_8_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) - (*x.list)[i] = concreteValue -} - -func (x *_ChainInfo_8_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*ChainInfo_Endpoint) - *x.list = append(*x.list, concreteValue) -} - -func (x *_ChainInfo_8_list) AppendMutable() protoreflect.Value { - v := new(ChainInfo_Endpoint) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_ChainInfo_8_list) NewElement() protoreflect.Value { - v := new(ChainInfo_Endpoint) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_ChainInfo_8_list) IsValid() bool { +func (x *_ChainInfo_5_list) IsValid() bool { return x.list != nil } var ( - md_ChainInfo protoreflect.MessageDescriptor - fd_ChainInfo_id protoreflect.FieldDescriptor - fd_ChainInfo_chain_id protoreflect.FieldDescriptor - fd_ChainInfo_name protoreflect.FieldDescriptor - fd_ChainInfo_symbol protoreflect.FieldDescriptor - fd_ChainInfo_bech32_prefix protoreflect.FieldDescriptor - fd_ChainInfo_genesis_time protoreflect.FieldDescriptor - fd_ChainInfo_grpc_endpoints protoreflect.FieldDescriptor - fd_ChainInfo_rest_endpoints protoreflect.FieldDescriptor - fd_ChainInfo_explorer protoreflect.FieldDescriptor - fd_ChainInfo_fee_info protoreflect.FieldDescriptor + md_ChainInfo protoreflect.MessageDescriptor + fd_ChainInfo_id protoreflect.FieldDescriptor + fd_ChainInfo_chain_id protoreflect.FieldDescriptor + fd_ChainInfo_name protoreflect.FieldDescriptor + fd_ChainInfo_symbol protoreflect.FieldDescriptor + fd_ChainInfo_validators protoreflect.FieldDescriptor ) func init() { @@ -2570,12 +2139,7 @@ func init() { fd_ChainInfo_chain_id = md_ChainInfo.Fields().ByName("chain_id") fd_ChainInfo_name = md_ChainInfo.Fields().ByName("name") fd_ChainInfo_symbol = md_ChainInfo.Fields().ByName("symbol") - fd_ChainInfo_bech32_prefix = md_ChainInfo.Fields().ByName("bech32_prefix") - fd_ChainInfo_genesis_time = md_ChainInfo.Fields().ByName("genesis_time") - fd_ChainInfo_grpc_endpoints = md_ChainInfo.Fields().ByName("grpc_endpoints") - fd_ChainInfo_rest_endpoints = md_ChainInfo.Fields().ByName("rest_endpoints") - fd_ChainInfo_explorer = md_ChainInfo.Fields().ByName("explorer") - fd_ChainInfo_fee_info = md_ChainInfo.Fields().ByName("fee_info") + fd_ChainInfo_validators = md_ChainInfo.Fields().ByName("validators") } var _ protoreflect.Message = (*fastReflection_ChainInfo)(nil) @@ -2667,39 +2231,9 @@ func (x *fastReflection_ChainInfo) Range(f func(protoreflect.FieldDescriptor, pr return } } - if x.Bech32Prefix != "" { - value := protoreflect.ValueOfString(x.Bech32Prefix) - if !f(fd_ChainInfo_bech32_prefix, value) { - return - } - } - if x.GenesisTime != "" { - value := protoreflect.ValueOfString(x.GenesisTime) - if !f(fd_ChainInfo_genesis_time, value) { - return - } - } - if len(x.GrpcEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_7_list{list: &x.GrpcEndpoints}) - if !f(fd_ChainInfo_grpc_endpoints, value) { - return - } - } - if len(x.RestEndpoints) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_8_list{list: &x.RestEndpoints}) - if !f(fd_ChainInfo_rest_endpoints, value) { - return - } - } - if x.Explorer != nil { - value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - if !f(fd_ChainInfo_explorer, value) { - return - } - } - if x.FeeInfo != nil { - value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) - if !f(fd_ChainInfo_fee_info, value) { + if len(x.Validators) != 0 { + value := protoreflect.ValueOfList(&_ChainInfo_5_list{list: &x.Validators}) + if !f(fd_ChainInfo_validators, value) { return } } @@ -2726,18 +2260,8 @@ func (x *fastReflection_ChainInfo) Has(fd protoreflect.FieldDescriptor) bool { return x.Name != "" case "did.v1.ChainInfo.symbol": return x.Symbol != "" - case "did.v1.ChainInfo.bech32_prefix": - return x.Bech32Prefix != "" - case "did.v1.ChainInfo.genesis_time": - return x.GenesisTime != "" - case "did.v1.ChainInfo.grpc_endpoints": - return len(x.GrpcEndpoints) != 0 - case "did.v1.ChainInfo.rest_endpoints": - return len(x.RestEndpoints) != 0 - case "did.v1.ChainInfo.explorer": - return x.Explorer != nil - case "did.v1.ChainInfo.fee_info": - return x.FeeInfo != nil + case "did.v1.ChainInfo.validators": + return len(x.Validators) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) @@ -2762,18 +2286,8 @@ func (x *fastReflection_ChainInfo) Clear(fd protoreflect.FieldDescriptor) { x.Name = "" case "did.v1.ChainInfo.symbol": x.Symbol = "" - case "did.v1.ChainInfo.bech32_prefix": - x.Bech32Prefix = "" - case "did.v1.ChainInfo.genesis_time": - x.GenesisTime = "" - case "did.v1.ChainInfo.grpc_endpoints": - x.GrpcEndpoints = nil - case "did.v1.ChainInfo.rest_endpoints": - x.RestEndpoints = nil - case "did.v1.ChainInfo.explorer": - x.Explorer = nil - case "did.v1.ChainInfo.fee_info": - x.FeeInfo = nil + case "did.v1.ChainInfo.validators": + x.Validators = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) @@ -2802,30 +2316,12 @@ func (x *fastReflection_ChainInfo) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.ChainInfo.symbol": value := x.Symbol return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.bech32_prefix": - value := x.Bech32Prefix - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.genesis_time": - value := x.GenesisTime - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.grpc_endpoints": - if len(x.GrpcEndpoints) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_7_list{}) + case "did.v1.ChainInfo.validators": + if len(x.Validators) == 0 { + return protoreflect.ValueOfList(&_ChainInfo_5_list{}) } - listValue := &_ChainInfo_7_list{list: &x.GrpcEndpoints} + listValue := &_ChainInfo_5_list{list: &x.Validators} return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.rest_endpoints": - if len(x.RestEndpoints) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_8_list{}) - } - listValue := &_ChainInfo_8_list{list: &x.RestEndpoints} - return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.explorer": - value := x.Explorer - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - value := x.FeeInfo - return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) @@ -2854,22 +2350,10 @@ func (x *fastReflection_ChainInfo) Set(fd protoreflect.FieldDescriptor, value pr x.Name = value.Interface().(string) case "did.v1.ChainInfo.symbol": x.Symbol = value.Interface().(string) - case "did.v1.ChainInfo.bech32_prefix": - x.Bech32Prefix = value.Interface().(string) - case "did.v1.ChainInfo.genesis_time": - x.GenesisTime = value.Interface().(string) - case "did.v1.ChainInfo.grpc_endpoints": + case "did.v1.ChainInfo.validators": lv := value.List() - clv := lv.(*_ChainInfo_7_list) - x.GrpcEndpoints = *clv.list - case "did.v1.ChainInfo.rest_endpoints": - lv := value.List() - clv := lv.(*_ChainInfo_8_list) - x.RestEndpoints = *clv.list - case "did.v1.ChainInfo.explorer": - x.Explorer = value.Message().Interface().(*ChainInfo_ExplorerInfo) - case "did.v1.ChainInfo.fee_info": - x.FeeInfo = value.Message().Interface().(*ChainInfo_FeeInfo) + clv := lv.(*_ChainInfo_5_list) + x.Validators = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) @@ -2890,28 +2374,12 @@ func (x *fastReflection_ChainInfo) Set(fd protoreflect.FieldDescriptor, value pr // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.grpc_endpoints": - if x.GrpcEndpoints == nil { - x.GrpcEndpoints = []*ChainInfo_Endpoint{} + case "did.v1.ChainInfo.validators": + if x.Validators == nil { + x.Validators = []*ValidatorInfo{} } - value := &_ChainInfo_7_list{list: &x.GrpcEndpoints} + value := &_ChainInfo_5_list{list: &x.Validators} return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.rest_endpoints": - if x.RestEndpoints == nil { - x.RestEndpoints = []*ChainInfo_Endpoint{} - } - value := &_ChainInfo_8_list{list: &x.RestEndpoints} - return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.explorer": - if x.Explorer == nil { - x.Explorer = new(ChainInfo_ExplorerInfo) - } - return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - if x.FeeInfo == nil { - x.FeeInfo = new(ChainInfo_FeeInfo) - } - return protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) case "did.v1.ChainInfo.id": panic(fmt.Errorf("field id of message did.v1.ChainInfo is not mutable")) case "did.v1.ChainInfo.chain_id": @@ -2920,10 +2388,6 @@ func (x *fastReflection_ChainInfo) Mutable(fd protoreflect.FieldDescriptor) prot panic(fmt.Errorf("field name of message did.v1.ChainInfo is not mutable")) case "did.v1.ChainInfo.symbol": panic(fmt.Errorf("field symbol of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.bech32_prefix": - panic(fmt.Errorf("field bech32_prefix of message did.v1.ChainInfo is not mutable")) - case "did.v1.ChainInfo.genesis_time": - panic(fmt.Errorf("field genesis_time of message did.v1.ChainInfo is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) @@ -2945,22 +2409,9 @@ func (x *fastReflection_ChainInfo) NewField(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfString("") case "did.v1.ChainInfo.symbol": return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.bech32_prefix": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.genesis_time": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.grpc_endpoints": - list := []*ChainInfo_Endpoint{} - return protoreflect.ValueOfList(&_ChainInfo_7_list{list: &list}) - case "did.v1.ChainInfo.rest_endpoints": - list := []*ChainInfo_Endpoint{} - return protoreflect.ValueOfList(&_ChainInfo_8_list{list: &list}) - case "did.v1.ChainInfo.explorer": - m := new(ChainInfo_ExplorerInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "did.v1.ChainInfo.fee_info": - m := new(ChainInfo_FeeInfo) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ChainInfo.validators": + list := []*ValidatorInfo{} + return protoreflect.ValueOfList(&_ChainInfo_5_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo")) @@ -3046,34 +2497,12 @@ func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Bech32Prefix) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.GenesisTime) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.GrpcEndpoints) > 0 { - for _, e := range x.GrpcEndpoints { + if len(x.Validators) > 0 { + for _, e := range x.Validators { l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.RestEndpoints) > 0 { - for _, e := range x.RestEndpoints { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.Explorer != nil { - l = options.Size(x.Explorer) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.FeeInfo != nil { - l = options.Size(x.FeeInfo) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3103,37 +2532,9 @@ func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.FeeInfo != nil { - encoded, err := options.Marshal(x.FeeInfo) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x52 - } - if x.Explorer != nil { - encoded, err := options.Marshal(x.Explorer) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x4a - } - if len(x.RestEndpoints) > 0 { - for iNdEx := len(x.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.RestEndpoints[iNdEx]) + if len(x.Validators) > 0 { + for iNdEx := len(x.Validators) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Validators[iNdEx]) if err != nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3144,39 +2545,9 @@ func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x2a } } - if len(x.GrpcEndpoints) > 0 { - for iNdEx := len(x.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.GrpcEndpoints[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.GenesisTime) > 0 { - i -= len(x.GenesisTime) - copy(dAtA[i:], x.GenesisTime) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(x.Bech32Prefix) > 0 { - i -= len(x.Bech32Prefix) - copy(dAtA[i:], x.Bech32Prefix) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } if len(x.Symbol) > 0 { i -= len(x.Symbol) copy(dAtA[i:], x.Symbol) @@ -3384,71 +2755,7 @@ func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Bech32Prefix = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.GenesisTime = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3475,114 +2782,8 @@ func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.GrpcEndpoints = append(x.GrpcEndpoints, &ChainInfo_Endpoint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoints[len(x.GrpcEndpoints)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.RestEndpoints = append(x.RestEndpoints, &ChainInfo_Endpoint{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RestEndpoints[len(x.RestEndpoints)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 9: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Explorer == nil { - x.Explorer = &ChainInfo_ExplorerInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 10: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.FeeInfo == nil { - x.FeeInfo = &ChainInfo_FeeInfo{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeeInfo); err != nil { + x.Validators = append(x.Validators, &ValidatorInfo{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Validators[len(x.Validators)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -3622,28 +2823,34 @@ func (x *fastReflection_ChainInfo) ProtoMethods() *protoiface.Methods { } var ( - md_ChainInfo_Endpoint protoreflect.MessageDescriptor - fd_ChainInfo_Endpoint_url protoreflect.FieldDescriptor - fd_ChainInfo_Endpoint_is_primary protoreflect.FieldDescriptor + md_KeyInfo protoreflect.MessageDescriptor + fd_KeyInfo_role protoreflect.FieldDescriptor + fd_KeyInfo_algorithm protoreflect.FieldDescriptor + fd_KeyInfo_encoding protoreflect.FieldDescriptor + fd_KeyInfo_curve protoreflect.FieldDescriptor + fd_KeyInfo_type protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() - md_ChainInfo_Endpoint = File_did_v1_genesis_proto.Messages().ByName("ChainInfo").Messages().ByName("Endpoint") - fd_ChainInfo_Endpoint_url = md_ChainInfo_Endpoint.Fields().ByName("url") - fd_ChainInfo_Endpoint_is_primary = md_ChainInfo_Endpoint.Fields().ByName("is_primary") + md_KeyInfo = File_did_v1_genesis_proto.Messages().ByName("KeyInfo") + fd_KeyInfo_role = md_KeyInfo.Fields().ByName("role") + fd_KeyInfo_algorithm = md_KeyInfo.Fields().ByName("algorithm") + fd_KeyInfo_encoding = md_KeyInfo.Fields().ByName("encoding") + fd_KeyInfo_curve = md_KeyInfo.Fields().ByName("curve") + fd_KeyInfo_type = md_KeyInfo.Fields().ByName("type") } -var _ protoreflect.Message = (*fastReflection_ChainInfo_Endpoint)(nil) +var _ protoreflect.Message = (*fastReflection_KeyInfo)(nil) -type fastReflection_ChainInfo_Endpoint ChainInfo_Endpoint +type fastReflection_KeyInfo KeyInfo -func (x *ChainInfo_Endpoint) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainInfo_Endpoint)(x) +func (x *KeyInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_KeyInfo)(x) } -func (x *ChainInfo_Endpoint) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[5] +func (x *KeyInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3654,43 +2861,43 @@ func (x *ChainInfo_Endpoint) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ChainInfo_Endpoint_messageType fastReflection_ChainInfo_Endpoint_messageType -var _ protoreflect.MessageType = fastReflection_ChainInfo_Endpoint_messageType{} +var _fastReflection_KeyInfo_messageType fastReflection_KeyInfo_messageType +var _ protoreflect.MessageType = fastReflection_KeyInfo_messageType{} -type fastReflection_ChainInfo_Endpoint_messageType struct{} +type fastReflection_KeyInfo_messageType struct{} -func (x fastReflection_ChainInfo_Endpoint_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainInfo_Endpoint)(nil) +func (x fastReflection_KeyInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_KeyInfo)(nil) } -func (x fastReflection_ChainInfo_Endpoint_messageType) New() protoreflect.Message { - return new(fastReflection_ChainInfo_Endpoint) +func (x fastReflection_KeyInfo_messageType) New() protoreflect.Message { + return new(fastReflection_KeyInfo) } -func (x fastReflection_ChainInfo_Endpoint_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo_Endpoint +func (x fastReflection_KeyInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_KeyInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ChainInfo_Endpoint) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo_Endpoint +func (x *fastReflection_KeyInfo) Descriptor() protoreflect.MessageDescriptor { + return md_KeyInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ChainInfo_Endpoint) Type() protoreflect.MessageType { - return _fastReflection_ChainInfo_Endpoint_messageType +func (x *fastReflection_KeyInfo) Type() protoreflect.MessageType { + return _fastReflection_KeyInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainInfo_Endpoint) New() protoreflect.Message { - return new(fastReflection_ChainInfo_Endpoint) +func (x *fastReflection_KeyInfo) New() protoreflect.Message { + return new(fastReflection_KeyInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainInfo_Endpoint) Interface() protoreflect.ProtoMessage { - return (*ChainInfo_Endpoint)(x) +func (x *fastReflection_KeyInfo) Interface() protoreflect.ProtoMessage { + return (*KeyInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -3698,16 +2905,34 @@ func (x *fastReflection_ChainInfo_Endpoint) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ChainInfo_Endpoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Url != "" { - value := protoreflect.ValueOfString(x.Url) - if !f(fd_ChainInfo_Endpoint_url, value) { +func (x *fastReflection_KeyInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Role != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role)) + if !f(fd_KeyInfo_role, value) { return } } - if x.IsPrimary != false { - value := protoreflect.ValueOfBool(x.IsPrimary) - if !f(fd_ChainInfo_Endpoint_is_primary, value) { + if x.Algorithm != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Algorithm)) + if !f(fd_KeyInfo_algorithm, value) { + return + } + } + if x.Encoding != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoding)) + if !f(fd_KeyInfo_encoding, value) { + return + } + } + if x.Curve != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Curve)) + if !f(fd_KeyInfo_curve, value) { + return + } + } + if x.Type_ != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Type_)) + if !f(fd_KeyInfo_type, value) { return } } @@ -3724,17 +2949,23 @@ func (x *fastReflection_ChainInfo_Endpoint) Range(f func(protoreflect.FieldDescr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ChainInfo_Endpoint) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.ChainInfo.Endpoint.url": - return x.Url != "" - case "did.v1.ChainInfo.Endpoint.is_primary": - return x.IsPrimary != false + case "did.v1.KeyInfo.role": + return x.Role != 0 + case "did.v1.KeyInfo.algorithm": + return x.Algorithm != 0 + case "did.v1.KeyInfo.encoding": + return x.Encoding != 0 + case "did.v1.KeyInfo.curve": + return x.Curve != 0 + case "did.v1.KeyInfo.type": + return x.Type_ != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) } } @@ -3744,17 +2975,23 @@ func (x *fastReflection_ChainInfo_Endpoint) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_Endpoint) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_KeyInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.ChainInfo.Endpoint.url": - x.Url = "" - case "did.v1.ChainInfo.Endpoint.is_primary": - x.IsPrimary = false + case "did.v1.KeyInfo.role": + x.Role = 0 + case "did.v1.KeyInfo.algorithm": + x.Algorithm = 0 + case "did.v1.KeyInfo.encoding": + x.Encoding = 0 + case "did.v1.KeyInfo.curve": + x.Curve = 0 + case "did.v1.KeyInfo.type": + x.Type_ = 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) } } @@ -3764,19 +3001,28 @@ func (x *fastReflection_ChainInfo_Endpoint) Clear(fd protoreflect.FieldDescripto // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ChainInfo_Endpoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.ChainInfo.Endpoint.url": - value := x.Url - return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.Endpoint.is_primary": - value := x.IsPrimary - return protoreflect.ValueOfBool(value) + case "did.v1.KeyInfo.role": + value := x.Role + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.KeyInfo.algorithm": + value := x.Algorithm + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.KeyInfo.encoding": + value := x.Encoding + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.KeyInfo.curve": + value := x.Curve + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.KeyInfo.type": + value := x.Type_ + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", descriptor.FullName())) } } @@ -3790,17 +3036,23 @@ func (x *fastReflection_ChainInfo_Endpoint) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_Endpoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_KeyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.ChainInfo.Endpoint.url": - x.Url = value.Interface().(string) - case "did.v1.ChainInfo.Endpoint.is_primary": - x.IsPrimary = value.Bool() + case "did.v1.KeyInfo.role": + x.Role = (KeyRole)(value.Enum()) + case "did.v1.KeyInfo.algorithm": + x.Algorithm = (KeyAlgorithm)(value.Enum()) + case "did.v1.KeyInfo.encoding": + x.Encoding = (KeyEncoding)(value.Enum()) + case "did.v1.KeyInfo.curve": + x.Curve = (KeyCurve)(value.Enum()) + case "did.v1.KeyInfo.type": + x.Type_ = (KeyType)(value.Enum()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) } } @@ -3814,44 +3066,56 @@ func (x *fastReflection_ChainInfo_Endpoint) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_Endpoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_KeyInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.Endpoint.url": - panic(fmt.Errorf("field url of message did.v1.ChainInfo.Endpoint is not mutable")) - case "did.v1.ChainInfo.Endpoint.is_primary": - panic(fmt.Errorf("field is_primary of message did.v1.ChainInfo.Endpoint is not mutable")) + case "did.v1.KeyInfo.role": + panic(fmt.Errorf("field role of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.algorithm": + panic(fmt.Errorf("field algorithm of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.encoding": + panic(fmt.Errorf("field encoding of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.curve": + panic(fmt.Errorf("field curve of message did.v1.KeyInfo is not mutable")) + case "did.v1.KeyInfo.type": + panic(fmt.Errorf("field type of message did.v1.KeyInfo is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ChainInfo_Endpoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_KeyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.Endpoint.url": - return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.Endpoint.is_primary": - return protoreflect.ValueOfBool(false) + case "did.v1.KeyInfo.role": + return protoreflect.ValueOfEnum(0) + case "did.v1.KeyInfo.algorithm": + return protoreflect.ValueOfEnum(0) + case "did.v1.KeyInfo.encoding": + return protoreflect.ValueOfEnum(0) + case "did.v1.KeyInfo.curve": + return protoreflect.ValueOfEnum(0) + case "did.v1.KeyInfo.type": + return protoreflect.ValueOfEnum(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.Endpoint")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.Endpoint does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ChainInfo_Endpoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_KeyInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo.Endpoint", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.KeyInfo", d.FullName())) } panic("unreachable") } @@ -3859,7 +3123,7 @@ func (x *fastReflection_ChainInfo_Endpoint) WhichOneof(d protoreflect.OneofDescr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ChainInfo_Endpoint) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_KeyInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3870,7 +3134,7 @@ func (x *fastReflection_ChainInfo_Endpoint) 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_ChainInfo_Endpoint) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_KeyInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3882,7 +3146,7 @@ func (x *fastReflection_ChainInfo_Endpoint) SetUnknown(fields protoreflect.RawFi // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ChainInfo_Endpoint) IsValid() bool { +func (x *fastReflection_KeyInfo) IsValid() bool { return x != nil } @@ -3892,9 +3156,2831 @@ func (x *fastReflection_ChainInfo_Endpoint) 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_ChainInfo_Endpoint) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainInfo_Endpoint) + x := input.Message.Interface().(*KeyInfo) + 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.Role != 0 { + n += 1 + runtime.Sov(uint64(x.Role)) + } + if x.Algorithm != 0 { + n += 1 + runtime.Sov(uint64(x.Algorithm)) + } + if x.Encoding != 0 { + n += 1 + runtime.Sov(uint64(x.Encoding)) + } + if x.Curve != 0 { + n += 1 + runtime.Sov(uint64(x.Curve)) + } + if x.Type_ != 0 { + n += 1 + runtime.Sov(uint64(x.Type_)) + } + 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().(*KeyInfo) + 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.Type_ != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Type_)) + i-- + dAtA[i] = 0x28 + } + if x.Curve != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Curve)) + i-- + dAtA[i] = 0x20 + } + if x.Encoding != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoding)) + i-- + dAtA[i] = 0x18 + } + if x.Algorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Algorithm)) + i-- + dAtA[i] = 0x10 + } + if x.Role != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Role)) + 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().(*KeyInfo) + 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: KeyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: KeyInfo: 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 Role", wireType) + } + x.Role = 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.Role |= KeyRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + x.Algorithm = 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.Algorithm |= KeyAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + x.Encoding = 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.Encoding |= KeyEncoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) + } + x.Curve = 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.Curve |= KeyCurve(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Type_", wireType) + } + x.Type_ = 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.Type_ |= KeyType(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.List = (*_OpenIDConfig_5_list)(nil) + +type _OpenIDConfig_5_list struct { + list *[]string +} + +func (x *_OpenIDConfig_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OpenIDConfig_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_OpenIDConfig_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_OpenIDConfig_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_OpenIDConfig_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field ScopesSupported as it is not of Message kind")) +} + +func (x *_OpenIDConfig_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_OpenIDConfig_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_OpenIDConfig_5_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_OpenIDConfig_6_list)(nil) + +type _OpenIDConfig_6_list struct { + list *[]string +} + +func (x *_OpenIDConfig_6_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OpenIDConfig_6_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_OpenIDConfig_6_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_OpenIDConfig_6_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_OpenIDConfig_6_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field ResponseTypesSupported as it is not of Message kind")) +} + +func (x *_OpenIDConfig_6_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_OpenIDConfig_6_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_OpenIDConfig_6_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_OpenIDConfig_7_list)(nil) + +type _OpenIDConfig_7_list struct { + list *[]string +} + +func (x *_OpenIDConfig_7_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OpenIDConfig_7_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_OpenIDConfig_7_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_OpenIDConfig_7_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_OpenIDConfig_7_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field ResponseModesSupported as it is not of Message kind")) +} + +func (x *_OpenIDConfig_7_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_OpenIDConfig_7_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_OpenIDConfig_7_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_OpenIDConfig_8_list)(nil) + +type _OpenIDConfig_8_list struct { + list *[]string +} + +func (x *_OpenIDConfig_8_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OpenIDConfig_8_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_OpenIDConfig_8_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_OpenIDConfig_8_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_OpenIDConfig_8_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field GrantTypesSupported as it is not of Message kind")) +} + +func (x *_OpenIDConfig_8_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_OpenIDConfig_8_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_OpenIDConfig_8_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_OpenIDConfig_9_list)(nil) + +type _OpenIDConfig_9_list struct { + list *[]string +} + +func (x *_OpenIDConfig_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OpenIDConfig_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_OpenIDConfig_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_OpenIDConfig_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_OpenIDConfig_9_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field AcrValuesSupported as it is not of Message kind")) +} + +func (x *_OpenIDConfig_9_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_OpenIDConfig_9_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_OpenIDConfig_9_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_OpenIDConfig_10_list)(nil) + +type _OpenIDConfig_10_list struct { + list *[]string +} + +func (x *_OpenIDConfig_10_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_OpenIDConfig_10_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_OpenIDConfig_10_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_OpenIDConfig_10_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_OpenIDConfig_10_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message OpenIDConfig at list field SubjectTypesSupported as it is not of Message kind")) +} + +func (x *_OpenIDConfig_10_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_OpenIDConfig_10_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_OpenIDConfig_10_list) IsValid() bool { + return x.list != nil +} + +var ( + md_OpenIDConfig protoreflect.MessageDescriptor + fd_OpenIDConfig_issuer protoreflect.FieldDescriptor + fd_OpenIDConfig_authorization_endpoint protoreflect.FieldDescriptor + fd_OpenIDConfig_token_endpoint protoreflect.FieldDescriptor + fd_OpenIDConfig_userinfo_endpoint protoreflect.FieldDescriptor + fd_OpenIDConfig_scopes_supported protoreflect.FieldDescriptor + fd_OpenIDConfig_response_types_supported protoreflect.FieldDescriptor + fd_OpenIDConfig_response_modes_supported protoreflect.FieldDescriptor + fd_OpenIDConfig_grant_types_supported protoreflect.FieldDescriptor + fd_OpenIDConfig_acr_values_supported protoreflect.FieldDescriptor + fd_OpenIDConfig_subject_types_supported protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_OpenIDConfig = File_did_v1_genesis_proto.Messages().ByName("OpenIDConfig") + fd_OpenIDConfig_issuer = md_OpenIDConfig.Fields().ByName("issuer") + fd_OpenIDConfig_authorization_endpoint = md_OpenIDConfig.Fields().ByName("authorization_endpoint") + fd_OpenIDConfig_token_endpoint = md_OpenIDConfig.Fields().ByName("token_endpoint") + fd_OpenIDConfig_userinfo_endpoint = md_OpenIDConfig.Fields().ByName("userinfo_endpoint") + fd_OpenIDConfig_scopes_supported = md_OpenIDConfig.Fields().ByName("scopes_supported") + fd_OpenIDConfig_response_types_supported = md_OpenIDConfig.Fields().ByName("response_types_supported") + fd_OpenIDConfig_response_modes_supported = md_OpenIDConfig.Fields().ByName("response_modes_supported") + fd_OpenIDConfig_grant_types_supported = md_OpenIDConfig.Fields().ByName("grant_types_supported") + fd_OpenIDConfig_acr_values_supported = md_OpenIDConfig.Fields().ByName("acr_values_supported") + fd_OpenIDConfig_subject_types_supported = md_OpenIDConfig.Fields().ByName("subject_types_supported") +} + +var _ protoreflect.Message = (*fastReflection_OpenIDConfig)(nil) + +type fastReflection_OpenIDConfig OpenIDConfig + +func (x *OpenIDConfig) ProtoReflect() protoreflect.Message { + return (*fastReflection_OpenIDConfig)(x) +} + +func (x *OpenIDConfig) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_OpenIDConfig_messageType fastReflection_OpenIDConfig_messageType +var _ protoreflect.MessageType = fastReflection_OpenIDConfig_messageType{} + +type fastReflection_OpenIDConfig_messageType struct{} + +func (x fastReflection_OpenIDConfig_messageType) Zero() protoreflect.Message { + return (*fastReflection_OpenIDConfig)(nil) +} +func (x fastReflection_OpenIDConfig_messageType) New() protoreflect.Message { + return new(fastReflection_OpenIDConfig) +} +func (x fastReflection_OpenIDConfig_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_OpenIDConfig +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_OpenIDConfig) Descriptor() protoreflect.MessageDescriptor { + return md_OpenIDConfig +} + +// 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_OpenIDConfig) Type() protoreflect.MessageType { + return _fastReflection_OpenIDConfig_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_OpenIDConfig) New() protoreflect.Message { + return new(fastReflection_OpenIDConfig) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_OpenIDConfig) Interface() protoreflect.ProtoMessage { + return (*OpenIDConfig)(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_OpenIDConfig) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Issuer != "" { + value := protoreflect.ValueOfString(x.Issuer) + if !f(fd_OpenIDConfig_issuer, value) { + return + } + } + if x.AuthorizationEndpoint != "" { + value := protoreflect.ValueOfString(x.AuthorizationEndpoint) + if !f(fd_OpenIDConfig_authorization_endpoint, value) { + return + } + } + if x.TokenEndpoint != "" { + value := protoreflect.ValueOfString(x.TokenEndpoint) + if !f(fd_OpenIDConfig_token_endpoint, value) { + return + } + } + if x.UserinfoEndpoint != "" { + value := protoreflect.ValueOfString(x.UserinfoEndpoint) + if !f(fd_OpenIDConfig_userinfo_endpoint, value) { + return + } + } + if len(x.ScopesSupported) != 0 { + value := protoreflect.ValueOfList(&_OpenIDConfig_5_list{list: &x.ScopesSupported}) + if !f(fd_OpenIDConfig_scopes_supported, value) { + return + } + } + if len(x.ResponseTypesSupported) != 0 { + value := protoreflect.ValueOfList(&_OpenIDConfig_6_list{list: &x.ResponseTypesSupported}) + if !f(fd_OpenIDConfig_response_types_supported, value) { + return + } + } + if len(x.ResponseModesSupported) != 0 { + value := protoreflect.ValueOfList(&_OpenIDConfig_7_list{list: &x.ResponseModesSupported}) + if !f(fd_OpenIDConfig_response_modes_supported, value) { + return + } + } + if len(x.GrantTypesSupported) != 0 { + value := protoreflect.ValueOfList(&_OpenIDConfig_8_list{list: &x.GrantTypesSupported}) + if !f(fd_OpenIDConfig_grant_types_supported, value) { + return + } + } + if len(x.AcrValuesSupported) != 0 { + value := protoreflect.ValueOfList(&_OpenIDConfig_9_list{list: &x.AcrValuesSupported}) + if !f(fd_OpenIDConfig_acr_values_supported, value) { + return + } + } + if len(x.SubjectTypesSupported) != 0 { + value := protoreflect.ValueOfList(&_OpenIDConfig_10_list{list: &x.SubjectTypesSupported}) + if !f(fd_OpenIDConfig_subject_types_supported, 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_OpenIDConfig) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.OpenIDConfig.issuer": + return x.Issuer != "" + case "did.v1.OpenIDConfig.authorization_endpoint": + return x.AuthorizationEndpoint != "" + case "did.v1.OpenIDConfig.token_endpoint": + return x.TokenEndpoint != "" + case "did.v1.OpenIDConfig.userinfo_endpoint": + return x.UserinfoEndpoint != "" + case "did.v1.OpenIDConfig.scopes_supported": + return len(x.ScopesSupported) != 0 + case "did.v1.OpenIDConfig.response_types_supported": + return len(x.ResponseTypesSupported) != 0 + case "did.v1.OpenIDConfig.response_modes_supported": + return len(x.ResponseModesSupported) != 0 + case "did.v1.OpenIDConfig.grant_types_supported": + return len(x.GrantTypesSupported) != 0 + case "did.v1.OpenIDConfig.acr_values_supported": + return len(x.AcrValuesSupported) != 0 + case "did.v1.OpenIDConfig.subject_types_supported": + return len(x.SubjectTypesSupported) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) + } + panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.OpenIDConfig.issuer": + x.Issuer = "" + case "did.v1.OpenIDConfig.authorization_endpoint": + x.AuthorizationEndpoint = "" + case "did.v1.OpenIDConfig.token_endpoint": + x.TokenEndpoint = "" + case "did.v1.OpenIDConfig.userinfo_endpoint": + x.UserinfoEndpoint = "" + case "did.v1.OpenIDConfig.scopes_supported": + x.ScopesSupported = nil + case "did.v1.OpenIDConfig.response_types_supported": + x.ResponseTypesSupported = nil + case "did.v1.OpenIDConfig.response_modes_supported": + x.ResponseModesSupported = nil + case "did.v1.OpenIDConfig.grant_types_supported": + x.GrantTypesSupported = nil + case "did.v1.OpenIDConfig.acr_values_supported": + x.AcrValuesSupported = nil + case "did.v1.OpenIDConfig.subject_types_supported": + x.SubjectTypesSupported = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) + } + panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.OpenIDConfig.issuer": + value := x.Issuer + return protoreflect.ValueOfString(value) + case "did.v1.OpenIDConfig.authorization_endpoint": + value := x.AuthorizationEndpoint + return protoreflect.ValueOfString(value) + case "did.v1.OpenIDConfig.token_endpoint": + value := x.TokenEndpoint + return protoreflect.ValueOfString(value) + case "did.v1.OpenIDConfig.userinfo_endpoint": + value := x.UserinfoEndpoint + return protoreflect.ValueOfString(value) + case "did.v1.OpenIDConfig.scopes_supported": + if len(x.ScopesSupported) == 0 { + return protoreflect.ValueOfList(&_OpenIDConfig_5_list{}) + } + listValue := &_OpenIDConfig_5_list{list: &x.ScopesSupported} + return protoreflect.ValueOfList(listValue) + case "did.v1.OpenIDConfig.response_types_supported": + if len(x.ResponseTypesSupported) == 0 { + return protoreflect.ValueOfList(&_OpenIDConfig_6_list{}) + } + listValue := &_OpenIDConfig_6_list{list: &x.ResponseTypesSupported} + return protoreflect.ValueOfList(listValue) + case "did.v1.OpenIDConfig.response_modes_supported": + if len(x.ResponseModesSupported) == 0 { + return protoreflect.ValueOfList(&_OpenIDConfig_7_list{}) + } + listValue := &_OpenIDConfig_7_list{list: &x.ResponseModesSupported} + return protoreflect.ValueOfList(listValue) + case "did.v1.OpenIDConfig.grant_types_supported": + if len(x.GrantTypesSupported) == 0 { + return protoreflect.ValueOfList(&_OpenIDConfig_8_list{}) + } + listValue := &_OpenIDConfig_8_list{list: &x.GrantTypesSupported} + return protoreflect.ValueOfList(listValue) + case "did.v1.OpenIDConfig.acr_values_supported": + if len(x.AcrValuesSupported) == 0 { + return protoreflect.ValueOfList(&_OpenIDConfig_9_list{}) + } + listValue := &_OpenIDConfig_9_list{list: &x.AcrValuesSupported} + return protoreflect.ValueOfList(listValue) + case "did.v1.OpenIDConfig.subject_types_supported": + if len(x.SubjectTypesSupported) == 0 { + return protoreflect.ValueOfList(&_OpenIDConfig_10_list{}) + } + listValue := &_OpenIDConfig_10_list{list: &x.SubjectTypesSupported} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) + } + panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.OpenIDConfig.issuer": + x.Issuer = value.Interface().(string) + case "did.v1.OpenIDConfig.authorization_endpoint": + x.AuthorizationEndpoint = value.Interface().(string) + case "did.v1.OpenIDConfig.token_endpoint": + x.TokenEndpoint = value.Interface().(string) + case "did.v1.OpenIDConfig.userinfo_endpoint": + x.UserinfoEndpoint = value.Interface().(string) + case "did.v1.OpenIDConfig.scopes_supported": + lv := value.List() + clv := lv.(*_OpenIDConfig_5_list) + x.ScopesSupported = *clv.list + case "did.v1.OpenIDConfig.response_types_supported": + lv := value.List() + clv := lv.(*_OpenIDConfig_6_list) + x.ResponseTypesSupported = *clv.list + case "did.v1.OpenIDConfig.response_modes_supported": + lv := value.List() + clv := lv.(*_OpenIDConfig_7_list) + x.ResponseModesSupported = *clv.list + case "did.v1.OpenIDConfig.grant_types_supported": + lv := value.List() + clv := lv.(*_OpenIDConfig_8_list) + x.GrantTypesSupported = *clv.list + case "did.v1.OpenIDConfig.acr_values_supported": + lv := value.List() + clv := lv.(*_OpenIDConfig_9_list) + x.AcrValuesSupported = *clv.list + case "did.v1.OpenIDConfig.subject_types_supported": + lv := value.List() + clv := lv.(*_OpenIDConfig_10_list) + x.SubjectTypesSupported = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) + } + panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.OpenIDConfig.scopes_supported": + if x.ScopesSupported == nil { + x.ScopesSupported = []string{} + } + value := &_OpenIDConfig_5_list{list: &x.ScopesSupported} + return protoreflect.ValueOfList(value) + case "did.v1.OpenIDConfig.response_types_supported": + if x.ResponseTypesSupported == nil { + x.ResponseTypesSupported = []string{} + } + value := &_OpenIDConfig_6_list{list: &x.ResponseTypesSupported} + return protoreflect.ValueOfList(value) + case "did.v1.OpenIDConfig.response_modes_supported": + if x.ResponseModesSupported == nil { + x.ResponseModesSupported = []string{} + } + value := &_OpenIDConfig_7_list{list: &x.ResponseModesSupported} + return protoreflect.ValueOfList(value) + case "did.v1.OpenIDConfig.grant_types_supported": + if x.GrantTypesSupported == nil { + x.GrantTypesSupported = []string{} + } + value := &_OpenIDConfig_8_list{list: &x.GrantTypesSupported} + return protoreflect.ValueOfList(value) + case "did.v1.OpenIDConfig.acr_values_supported": + if x.AcrValuesSupported == nil { + x.AcrValuesSupported = []string{} + } + value := &_OpenIDConfig_9_list{list: &x.AcrValuesSupported} + return protoreflect.ValueOfList(value) + case "did.v1.OpenIDConfig.subject_types_supported": + if x.SubjectTypesSupported == nil { + x.SubjectTypesSupported = []string{} + } + value := &_OpenIDConfig_10_list{list: &x.SubjectTypesSupported} + return protoreflect.ValueOfList(value) + case "did.v1.OpenIDConfig.issuer": + panic(fmt.Errorf("field issuer of message did.v1.OpenIDConfig is not mutable")) + case "did.v1.OpenIDConfig.authorization_endpoint": + panic(fmt.Errorf("field authorization_endpoint of message did.v1.OpenIDConfig is not mutable")) + case "did.v1.OpenIDConfig.token_endpoint": + panic(fmt.Errorf("field token_endpoint of message did.v1.OpenIDConfig is not mutable")) + case "did.v1.OpenIDConfig.userinfo_endpoint": + panic(fmt.Errorf("field userinfo_endpoint of message did.v1.OpenIDConfig is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) + } + panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.OpenIDConfig.issuer": + return protoreflect.ValueOfString("") + case "did.v1.OpenIDConfig.authorization_endpoint": + return protoreflect.ValueOfString("") + case "did.v1.OpenIDConfig.token_endpoint": + return protoreflect.ValueOfString("") + case "did.v1.OpenIDConfig.userinfo_endpoint": + return protoreflect.ValueOfString("") + case "did.v1.OpenIDConfig.scopes_supported": + list := []string{} + return protoreflect.ValueOfList(&_OpenIDConfig_5_list{list: &list}) + case "did.v1.OpenIDConfig.response_types_supported": + list := []string{} + return protoreflect.ValueOfList(&_OpenIDConfig_6_list{list: &list}) + case "did.v1.OpenIDConfig.response_modes_supported": + list := []string{} + return protoreflect.ValueOfList(&_OpenIDConfig_7_list{list: &list}) + case "did.v1.OpenIDConfig.grant_types_supported": + list := []string{} + return protoreflect.ValueOfList(&_OpenIDConfig_8_list{list: &list}) + case "did.v1.OpenIDConfig.acr_values_supported": + list := []string{} + return protoreflect.ValueOfList(&_OpenIDConfig_9_list{list: &list}) + case "did.v1.OpenIDConfig.subject_types_supported": + list := []string{} + return protoreflect.ValueOfList(&_OpenIDConfig_10_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.OpenIDConfig")) + } + panic(fmt.Errorf("message did.v1.OpenIDConfig 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_OpenIDConfig) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.OpenIDConfig", 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_OpenIDConfig) 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_OpenIDConfig) 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_OpenIDConfig) 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_OpenIDConfig) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*OpenIDConfig) + 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.Issuer) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AuthorizationEndpoint) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.TokenEndpoint) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.UserinfoEndpoint) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ScopesSupported) > 0 { + for _, s := range x.ScopesSupported { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ResponseTypesSupported) > 0 { + for _, s := range x.ResponseTypesSupported { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.ResponseModesSupported) > 0 { + for _, s := range x.ResponseModesSupported { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.GrantTypesSupported) > 0 { + for _, s := range x.GrantTypesSupported { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.AcrValuesSupported) > 0 { + for _, s := range x.AcrValuesSupported { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.SubjectTypesSupported) > 0 { + for _, s := range x.SubjectTypesSupported { + l = len(s) + 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().(*OpenIDConfig) + 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.SubjectTypesSupported) > 0 { + for iNdEx := len(x.SubjectTypesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.SubjectTypesSupported[iNdEx]) + copy(dAtA[i:], x.SubjectTypesSupported[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SubjectTypesSupported[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(x.AcrValuesSupported) > 0 { + for iNdEx := len(x.AcrValuesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.AcrValuesSupported[iNdEx]) + copy(dAtA[i:], x.AcrValuesSupported[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AcrValuesSupported[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(x.GrantTypesSupported) > 0 { + for iNdEx := len(x.GrantTypesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.GrantTypesSupported[iNdEx]) + copy(dAtA[i:], x.GrantTypesSupported[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.GrantTypesSupported[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(x.ResponseModesSupported) > 0 { + for iNdEx := len(x.ResponseModesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.ResponseModesSupported[iNdEx]) + copy(dAtA[i:], x.ResponseModesSupported[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResponseModesSupported[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(x.ResponseTypesSupported) > 0 { + for iNdEx := len(x.ResponseTypesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.ResponseTypesSupported[iNdEx]) + copy(dAtA[i:], x.ResponseTypesSupported[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ResponseTypesSupported[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(x.ScopesSupported) > 0 { + for iNdEx := len(x.ScopesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.ScopesSupported[iNdEx]) + copy(dAtA[i:], x.ScopesSupported[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ScopesSupported[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.UserinfoEndpoint) > 0 { + i -= len(x.UserinfoEndpoint) + copy(dAtA[i:], x.UserinfoEndpoint) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.UserinfoEndpoint))) + i-- + dAtA[i] = 0x22 + } + if len(x.TokenEndpoint) > 0 { + i -= len(x.TokenEndpoint) + copy(dAtA[i:], x.TokenEndpoint) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TokenEndpoint))) + i-- + dAtA[i] = 0x1a + } + if len(x.AuthorizationEndpoint) > 0 { + i -= len(x.AuthorizationEndpoint) + copy(dAtA[i:], x.AuthorizationEndpoint) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AuthorizationEndpoint))) + i-- + dAtA[i] = 0x12 + } + if len(x.Issuer) > 0 { + i -= len(x.Issuer) + copy(dAtA[i:], x.Issuer) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Issuer))) + 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().(*OpenIDConfig) + 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: OpenIDConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: OpenIDConfig: 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 Issuer", 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.Issuer = 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 AuthorizationEndpoint", 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.AuthorizationEndpoint = 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 TokenEndpoint", 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.TokenEndpoint = 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 UserinfoEndpoint", 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.UserinfoEndpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ScopesSupported", 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.ScopesSupported = append(x.ScopesSupported, 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 ResponseTypesSupported", 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.ResponseTypesSupported = append(x.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ResponseModesSupported", 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.ResponseModesSupported = append(x.ResponseModesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field GrantTypesSupported", 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.GrantTypesSupported = append(x.GrantTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AcrValuesSupported", 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.AcrValuesSupported = append(x.AcrValuesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 10: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", 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.SubjectTypesSupported = append(x.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.List = (*_ValidatorInfo_2_list)(nil) + +type _ValidatorInfo_2_list struct { + list *[]*ValidatorInfo_Endpoint +} + +func (x *_ValidatorInfo_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorInfo_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorInfo_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorInfo_Endpoint) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorInfo_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorInfo_Endpoint) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorInfo_2_list) AppendMutable() protoreflect.Value { + v := new(ValidatorInfo_Endpoint) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorInfo_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorInfo_2_list) NewElement() protoreflect.Value { + v := new(ValidatorInfo_Endpoint) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorInfo_2_list) IsValid() bool { + return x.list != nil +} + +var _ protoreflect.List = (*_ValidatorInfo_3_list)(nil) + +type _ValidatorInfo_3_list struct { + list *[]*ValidatorInfo_Endpoint +} + +func (x *_ValidatorInfo_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_ValidatorInfo_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_ValidatorInfo_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorInfo_Endpoint) + (*x.list)[i] = concreteValue +} + +func (x *_ValidatorInfo_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*ValidatorInfo_Endpoint) + *x.list = append(*x.list, concreteValue) +} + +func (x *_ValidatorInfo_3_list) AppendMutable() protoreflect.Value { + v := new(ValidatorInfo_Endpoint) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorInfo_3_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_ValidatorInfo_3_list) NewElement() protoreflect.Value { + v := new(ValidatorInfo_Endpoint) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_ValidatorInfo_3_list) IsValid() bool { + return x.list != nil +} + +var ( + md_ValidatorInfo protoreflect.MessageDescriptor + fd_ValidatorInfo_moniker protoreflect.FieldDescriptor + fd_ValidatorInfo_grpc_endpoints protoreflect.FieldDescriptor + fd_ValidatorInfo_rest_endpoints protoreflect.FieldDescriptor + fd_ValidatorInfo_explorer protoreflect.FieldDescriptor + fd_ValidatorInfo_fee_info protoreflect.FieldDescriptor + fd_ValidatorInfo_ibc_channel protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ValidatorInfo = File_did_v1_genesis_proto.Messages().ByName("ValidatorInfo") + fd_ValidatorInfo_moniker = md_ValidatorInfo.Fields().ByName("moniker") + fd_ValidatorInfo_grpc_endpoints = md_ValidatorInfo.Fields().ByName("grpc_endpoints") + fd_ValidatorInfo_rest_endpoints = md_ValidatorInfo.Fields().ByName("rest_endpoints") + fd_ValidatorInfo_explorer = md_ValidatorInfo.Fields().ByName("explorer") + fd_ValidatorInfo_fee_info = md_ValidatorInfo.Fields().ByName("fee_info") + fd_ValidatorInfo_ibc_channel = md_ValidatorInfo.Fields().ByName("ibc_channel") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorInfo)(nil) + +type fastReflection_ValidatorInfo ValidatorInfo + +func (x *ValidatorInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorInfo)(x) +} + +func (x *ValidatorInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_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_ValidatorInfo_messageType fastReflection_ValidatorInfo_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorInfo_messageType{} + +type fastReflection_ValidatorInfo_messageType struct{} + +func (x fastReflection_ValidatorInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorInfo)(nil) +} +func (x fastReflection_ValidatorInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo) +} +func (x fastReflection_ValidatorInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo +} + +// 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_ValidatorInfo) Type() protoreflect.MessageType { + return _fastReflection_ValidatorInfo_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorInfo) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorInfo) Interface() protoreflect.ProtoMessage { + return (*ValidatorInfo)(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_ValidatorInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Moniker != "" { + value := protoreflect.ValueOfString(x.Moniker) + if !f(fd_ValidatorInfo_moniker, value) { + return + } + } + if len(x.GrpcEndpoints) != 0 { + value := protoreflect.ValueOfList(&_ValidatorInfo_2_list{list: &x.GrpcEndpoints}) + if !f(fd_ValidatorInfo_grpc_endpoints, value) { + return + } + } + if len(x.RestEndpoints) != 0 { + value := protoreflect.ValueOfList(&_ValidatorInfo_3_list{list: &x.RestEndpoints}) + if !f(fd_ValidatorInfo_rest_endpoints, value) { + return + } + } + if x.Explorer != nil { + value := protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + if !f(fd_ValidatorInfo_explorer, value) { + return + } + } + if x.FeeInfo != nil { + value := protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) + if !f(fd_ValidatorInfo_fee_info, value) { + return + } + } + if x.IbcChannel != nil { + value := protoreflect.ValueOfMessage(x.IbcChannel.ProtoReflect()) + if !f(fd_ValidatorInfo_ibc_channel, 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_ValidatorInfo) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ValidatorInfo.moniker": + return x.Moniker != "" + case "did.v1.ValidatorInfo.grpc_endpoints": + return len(x.GrpcEndpoints) != 0 + case "did.v1.ValidatorInfo.rest_endpoints": + return len(x.RestEndpoints) != 0 + case "did.v1.ValidatorInfo.explorer": + return x.Explorer != nil + case "did.v1.ValidatorInfo.fee_info": + return x.FeeInfo != nil + case "did.v1.ValidatorInfo.ibc_channel": + return x.IbcChannel != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo 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_ValidatorInfo) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ValidatorInfo.moniker": + x.Moniker = "" + case "did.v1.ValidatorInfo.grpc_endpoints": + x.GrpcEndpoints = nil + case "did.v1.ValidatorInfo.rest_endpoints": + x.RestEndpoints = nil + case "did.v1.ValidatorInfo.explorer": + x.Explorer = nil + case "did.v1.ValidatorInfo.fee_info": + x.FeeInfo = nil + case "did.v1.ValidatorInfo.ibc_channel": + x.IbcChannel = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo 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_ValidatorInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ValidatorInfo.moniker": + value := x.Moniker + return protoreflect.ValueOfString(value) + case "did.v1.ValidatorInfo.grpc_endpoints": + if len(x.GrpcEndpoints) == 0 { + return protoreflect.ValueOfList(&_ValidatorInfo_2_list{}) + } + listValue := &_ValidatorInfo_2_list{list: &x.GrpcEndpoints} + return protoreflect.ValueOfList(listValue) + case "did.v1.ValidatorInfo.rest_endpoints": + if len(x.RestEndpoints) == 0 { + return protoreflect.ValueOfList(&_ValidatorInfo_3_list{}) + } + listValue := &_ValidatorInfo_3_list{list: &x.RestEndpoints} + return protoreflect.ValueOfList(listValue) + case "did.v1.ValidatorInfo.explorer": + value := x.Explorer + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.ValidatorInfo.fee_info": + value := x.FeeInfo + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.ValidatorInfo.ibc_channel": + value := x.IbcChannel + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo 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_ValidatorInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ValidatorInfo.moniker": + x.Moniker = value.Interface().(string) + case "did.v1.ValidatorInfo.grpc_endpoints": + lv := value.List() + clv := lv.(*_ValidatorInfo_2_list) + x.GrpcEndpoints = *clv.list + case "did.v1.ValidatorInfo.rest_endpoints": + lv := value.List() + clv := lv.(*_ValidatorInfo_3_list) + x.RestEndpoints = *clv.list + case "did.v1.ValidatorInfo.explorer": + x.Explorer = value.Message().Interface().(*ValidatorInfo_ExplorerInfo) + case "did.v1.ValidatorInfo.fee_info": + x.FeeInfo = value.Message().Interface().(*ValidatorInfo_FeeInfo) + case "did.v1.ValidatorInfo.ibc_channel": + x.IbcChannel = value.Message().Interface().(*ValidatorInfo_IBCChannel) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo 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_ValidatorInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ValidatorInfo.grpc_endpoints": + if x.GrpcEndpoints == nil { + x.GrpcEndpoints = []*ValidatorInfo_Endpoint{} + } + value := &_ValidatorInfo_2_list{list: &x.GrpcEndpoints} + return protoreflect.ValueOfList(value) + case "did.v1.ValidatorInfo.rest_endpoints": + if x.RestEndpoints == nil { + x.RestEndpoints = []*ValidatorInfo_Endpoint{} + } + value := &_ValidatorInfo_3_list{list: &x.RestEndpoints} + return protoreflect.ValueOfList(value) + case "did.v1.ValidatorInfo.explorer": + if x.Explorer == nil { + x.Explorer = new(ValidatorInfo_ExplorerInfo) + } + return protoreflect.ValueOfMessage(x.Explorer.ProtoReflect()) + case "did.v1.ValidatorInfo.fee_info": + if x.FeeInfo == nil { + x.FeeInfo = new(ValidatorInfo_FeeInfo) + } + return protoreflect.ValueOfMessage(x.FeeInfo.ProtoReflect()) + case "did.v1.ValidatorInfo.ibc_channel": + if x.IbcChannel == nil { + x.IbcChannel = new(ValidatorInfo_IBCChannel) + } + return protoreflect.ValueOfMessage(x.IbcChannel.ProtoReflect()) + case "did.v1.ValidatorInfo.moniker": + panic(fmt.Errorf("field moniker of message did.v1.ValidatorInfo is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo 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_ValidatorInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ValidatorInfo.moniker": + return protoreflect.ValueOfString("") + case "did.v1.ValidatorInfo.grpc_endpoints": + list := []*ValidatorInfo_Endpoint{} + return protoreflect.ValueOfList(&_ValidatorInfo_2_list{list: &list}) + case "did.v1.ValidatorInfo.rest_endpoints": + list := []*ValidatorInfo_Endpoint{} + return protoreflect.ValueOfList(&_ValidatorInfo_3_list{list: &list}) + case "did.v1.ValidatorInfo.explorer": + m := new(ValidatorInfo_ExplorerInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ValidatorInfo.fee_info": + m := new(ValidatorInfo_FeeInfo) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ValidatorInfo.ibc_channel": + m := new(ValidatorInfo_IBCChannel) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo 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_ValidatorInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo", 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_ValidatorInfo) 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_ValidatorInfo) 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_ValidatorInfo) 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_ValidatorInfo) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorInfo) + 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.Moniker) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.GrpcEndpoints) > 0 { + for _, e := range x.GrpcEndpoints { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if len(x.RestEndpoints) > 0 { + for _, e := range x.RestEndpoints { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } + if x.Explorer != nil { + l = options.Size(x.Explorer) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.FeeInfo != nil { + l = options.Size(x.FeeInfo) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.IbcChannel != nil { + l = options.Size(x.IbcChannel) + 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().(*ValidatorInfo) + 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.IbcChannel != nil { + encoded, err := options.Marshal(x.IbcChannel) + 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] = 0x32 + } + if x.FeeInfo != nil { + encoded, err := options.Marshal(x.FeeInfo) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.Explorer != nil { + encoded, err := options.Marshal(x.Explorer) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + if len(x.RestEndpoints) > 0 { + for iNdEx := len(x.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.RestEndpoints[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x1a + } + } + if len(x.GrpcEndpoints) > 0 { + for iNdEx := len(x.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.GrpcEndpoints[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x12 + } + } + if len(x.Moniker) > 0 { + i -= len(x.Moniker) + copy(dAtA[i:], x.Moniker) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Moniker))) + 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().(*ValidatorInfo) + 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: ValidatorInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo: 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 Moniker", 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.Moniker = 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 GrpcEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.GrpcEndpoints = append(x.GrpcEndpoints, &ValidatorInfo_Endpoint{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.GrpcEndpoints[len(x.GrpcEndpoints)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.RestEndpoints = append(x.RestEndpoints, &ValidatorInfo_Endpoint{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.RestEndpoints[len(x.RestEndpoints)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Explorer == nil { + x.Explorer = &ValidatorInfo_ExplorerInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Explorer); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.FeeInfo == nil { + x.FeeInfo = &ValidatorInfo_FeeInfo{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.FeeInfo); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", 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.IbcChannel == nil { + x.IbcChannel = &ValidatorInfo_IBCChannel{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.IbcChannel); 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_ValidatorInfo_Endpoint protoreflect.MessageDescriptor + fd_ValidatorInfo_Endpoint_url protoreflect.FieldDescriptor + fd_ValidatorInfo_Endpoint_is_primary protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_genesis_proto_init() + md_ValidatorInfo_Endpoint = File_did_v1_genesis_proto.Messages().ByName("ValidatorInfo").Messages().ByName("Endpoint") + fd_ValidatorInfo_Endpoint_url = md_ValidatorInfo_Endpoint.Fields().ByName("url") + fd_ValidatorInfo_Endpoint_is_primary = md_ValidatorInfo_Endpoint.Fields().ByName("is_primary") +} + +var _ protoreflect.Message = (*fastReflection_ValidatorInfo_Endpoint)(nil) + +type fastReflection_ValidatorInfo_Endpoint ValidatorInfo_Endpoint + +func (x *ValidatorInfo_Endpoint) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorInfo_Endpoint)(x) +} + +func (x *ValidatorInfo_Endpoint) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_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_ValidatorInfo_Endpoint_messageType fastReflection_ValidatorInfo_Endpoint_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorInfo_Endpoint_messageType{} + +type fastReflection_ValidatorInfo_Endpoint_messageType struct{} + +func (x fastReflection_ValidatorInfo_Endpoint_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorInfo_Endpoint)(nil) +} +func (x fastReflection_ValidatorInfo_Endpoint_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_Endpoint) +} +func (x fastReflection_ValidatorInfo_Endpoint_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_Endpoint +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_ValidatorInfo_Endpoint) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_Endpoint +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_ValidatorInfo_Endpoint) Type() protoreflect.MessageType { + return _fastReflection_ValidatorInfo_Endpoint_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_ValidatorInfo_Endpoint) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_Endpoint) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_ValidatorInfo_Endpoint) Interface() protoreflect.ProtoMessage { + return (*ValidatorInfo_Endpoint)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_ValidatorInfo_Endpoint) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Url != "" { + value := protoreflect.ValueOfString(x.Url) + if !f(fd_ValidatorInfo_Endpoint_url, value) { + return + } + } + if x.IsPrimary != false { + value := protoreflect.ValueOfBool(x.IsPrimary) + if !f(fd_ValidatorInfo_Endpoint_is_primary, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_ValidatorInfo_Endpoint) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.ValidatorInfo.Endpoint.url": + return x.Url != "" + case "did.v1.ValidatorInfo.Endpoint.is_primary": + return x.IsPrimary != false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo.Endpoint does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorInfo_Endpoint) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.ValidatorInfo.Endpoint.url": + x.Url = "" + case "did.v1.ValidatorInfo.Endpoint.is_primary": + x.IsPrimary = false + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo.Endpoint does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_ValidatorInfo_Endpoint) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.ValidatorInfo.Endpoint.url": + value := x.Url + return protoreflect.ValueOfString(value) + case "did.v1.ValidatorInfo.Endpoint.is_primary": + value := x.IsPrimary + return protoreflect.ValueOfBool(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo.Endpoint does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorInfo_Endpoint) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.ValidatorInfo.Endpoint.url": + x.Url = value.Interface().(string) + case "did.v1.ValidatorInfo.Endpoint.is_primary": + x.IsPrimary = value.Bool() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo.Endpoint does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorInfo_Endpoint) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ValidatorInfo.Endpoint.url": + panic(fmt.Errorf("field url of message did.v1.ValidatorInfo.Endpoint is not mutable")) + case "did.v1.ValidatorInfo.Endpoint.is_primary": + panic(fmt.Errorf("field is_primary of message did.v1.ValidatorInfo.Endpoint is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo.Endpoint does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_ValidatorInfo_Endpoint) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.ValidatorInfo.Endpoint.url": + return protoreflect.ValueOfString("") + case "did.v1.ValidatorInfo.Endpoint.is_primary": + return protoreflect.ValueOfBool(false) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.Endpoint")) + } + panic(fmt.Errorf("message did.v1.ValidatorInfo.Endpoint does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_ValidatorInfo_Endpoint) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo.Endpoint", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_ValidatorInfo_Endpoint) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_ValidatorInfo_Endpoint) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_ValidatorInfo_Endpoint) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_ValidatorInfo_Endpoint) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*ValidatorInfo_Endpoint) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3923,7 +6009,7 @@ func (x *fastReflection_ChainInfo_Endpoint) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo_Endpoint) + x := input.Message.Interface().(*ValidatorInfo_Endpoint) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3970,7 +6056,7 @@ func (x *fastReflection_ChainInfo_Endpoint) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo_Endpoint) + x := input.Message.Interface().(*ValidatorInfo_Endpoint) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4002,10 +6088,10 @@ func (x *fastReflection_ChainInfo_Endpoint) 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: ChainInfo_Endpoint: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_Endpoint: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_Endpoint: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4096,28 +6182,28 @@ func (x *fastReflection_ChainInfo_Endpoint) ProtoMethods() *protoiface.Methods { } var ( - md_ChainInfo_ExplorerInfo protoreflect.MessageDescriptor - fd_ChainInfo_ExplorerInfo_name protoreflect.FieldDescriptor - fd_ChainInfo_ExplorerInfo_url protoreflect.FieldDescriptor + md_ValidatorInfo_ExplorerInfo protoreflect.MessageDescriptor + fd_ValidatorInfo_ExplorerInfo_name protoreflect.FieldDescriptor + fd_ValidatorInfo_ExplorerInfo_url protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() - md_ChainInfo_ExplorerInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo").Messages().ByName("ExplorerInfo") - fd_ChainInfo_ExplorerInfo_name = md_ChainInfo_ExplorerInfo.Fields().ByName("name") - fd_ChainInfo_ExplorerInfo_url = md_ChainInfo_ExplorerInfo.Fields().ByName("url") + md_ValidatorInfo_ExplorerInfo = File_did_v1_genesis_proto.Messages().ByName("ValidatorInfo").Messages().ByName("ExplorerInfo") + fd_ValidatorInfo_ExplorerInfo_name = md_ValidatorInfo_ExplorerInfo.Fields().ByName("name") + fd_ValidatorInfo_ExplorerInfo_url = md_ValidatorInfo_ExplorerInfo.Fields().ByName("url") } -var _ protoreflect.Message = (*fastReflection_ChainInfo_ExplorerInfo)(nil) +var _ protoreflect.Message = (*fastReflection_ValidatorInfo_ExplorerInfo)(nil) -type fastReflection_ChainInfo_ExplorerInfo ChainInfo_ExplorerInfo +type fastReflection_ValidatorInfo_ExplorerInfo ValidatorInfo_ExplorerInfo -func (x *ChainInfo_ExplorerInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainInfo_ExplorerInfo)(x) +func (x *ValidatorInfo_ExplorerInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorInfo_ExplorerInfo)(x) } -func (x *ChainInfo_ExplorerInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[6] +func (x *ValidatorInfo_ExplorerInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4128,43 +6214,43 @@ func (x *ChainInfo_ExplorerInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ChainInfo_ExplorerInfo_messageType fastReflection_ChainInfo_ExplorerInfo_messageType -var _ protoreflect.MessageType = fastReflection_ChainInfo_ExplorerInfo_messageType{} +var _fastReflection_ValidatorInfo_ExplorerInfo_messageType fastReflection_ValidatorInfo_ExplorerInfo_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorInfo_ExplorerInfo_messageType{} -type fastReflection_ChainInfo_ExplorerInfo_messageType struct{} +type fastReflection_ValidatorInfo_ExplorerInfo_messageType struct{} -func (x fastReflection_ChainInfo_ExplorerInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainInfo_ExplorerInfo)(nil) +func (x fastReflection_ValidatorInfo_ExplorerInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorInfo_ExplorerInfo)(nil) } -func (x fastReflection_ChainInfo_ExplorerInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ChainInfo_ExplorerInfo) +func (x fastReflection_ValidatorInfo_ExplorerInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_ExplorerInfo) } -func (x fastReflection_ChainInfo_ExplorerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo_ExplorerInfo +func (x fastReflection_ValidatorInfo_ExplorerInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_ExplorerInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ChainInfo_ExplorerInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo_ExplorerInfo +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_ExplorerInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ChainInfo_ExplorerInfo) Type() protoreflect.MessageType { - return _fastReflection_ChainInfo_ExplorerInfo_messageType +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Type() protoreflect.MessageType { + return _fastReflection_ValidatorInfo_ExplorerInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainInfo_ExplorerInfo) New() protoreflect.Message { - return new(fastReflection_ChainInfo_ExplorerInfo) +func (x *fastReflection_ValidatorInfo_ExplorerInfo) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_ExplorerInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainInfo_ExplorerInfo) Interface() protoreflect.ProtoMessage { - return (*ChainInfo_ExplorerInfo)(x) +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Interface() protoreflect.ProtoMessage { + return (*ValidatorInfo_ExplorerInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -4172,16 +6258,16 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) Interface() protoreflect.ProtoMe // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_ChainInfo_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Name != "" { value := protoreflect.ValueOfString(x.Name) - if !f(fd_ChainInfo_ExplorerInfo_name, value) { + if !f(fd_ValidatorInfo_ExplorerInfo_name, value) { return } } if x.Url != "" { value := protoreflect.ValueOfString(x.Url) - if !f(fd_ChainInfo_ExplorerInfo_url, value) { + if !f(fd_ValidatorInfo_ExplorerInfo_url, value) { return } } @@ -4198,17 +6284,17 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) Range(f func(protoreflect.FieldD // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ChainInfo_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.ChainInfo.ExplorerInfo.name": + case "did.v1.ValidatorInfo.ExplorerInfo.name": return x.Name != "" - case "did.v1.ChainInfo.ExplorerInfo.url": + case "did.v1.ValidatorInfo.ExplorerInfo.url": return x.Url != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) } } @@ -4218,17 +6304,17 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) Has(fd protoreflect.FieldDescrip // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.ChainInfo.ExplorerInfo.name": + case "did.v1.ValidatorInfo.ExplorerInfo.name": x.Name = "" - case "did.v1.ChainInfo.ExplorerInfo.url": + case "did.v1.ValidatorInfo.ExplorerInfo.url": x.Url = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) } } @@ -4238,19 +6324,19 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) Clear(fd protoreflect.FieldDescr // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_ChainInfo_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.ChainInfo.ExplorerInfo.name": + case "did.v1.ValidatorInfo.ExplorerInfo.name": value := x.Name return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.ExplorerInfo.url": + case "did.v1.ValidatorInfo.ExplorerInfo.url": value := x.Url return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", descriptor.FullName())) } } @@ -4264,17 +6350,17 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) Get(descriptor protoreflect.Fiel // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.ChainInfo.ExplorerInfo.name": + case "did.v1.ValidatorInfo.ExplorerInfo.name": x.Name = value.Interface().(string) - case "did.v1.ChainInfo.ExplorerInfo.url": + case "did.v1.ValidatorInfo.ExplorerInfo.url": x.Url = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) } } @@ -4288,44 +6374,44 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) Set(fd protoreflect.FieldDescrip // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.ExplorerInfo.name": - panic(fmt.Errorf("field name of message did.v1.ChainInfo.ExplorerInfo is not mutable")) - case "did.v1.ChainInfo.ExplorerInfo.url": - panic(fmt.Errorf("field url of message did.v1.ChainInfo.ExplorerInfo is not mutable")) + case "did.v1.ValidatorInfo.ExplorerInfo.name": + panic(fmt.Errorf("field name of message did.v1.ValidatorInfo.ExplorerInfo is not mutable")) + case "did.v1.ValidatorInfo.ExplorerInfo.url": + panic(fmt.Errorf("field url of message did.v1.ValidatorInfo.ExplorerInfo is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ChainInfo_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.ExplorerInfo.name": + case "did.v1.ValidatorInfo.ExplorerInfo.name": return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.ExplorerInfo.url": + case "did.v1.ValidatorInfo.ExplorerInfo.url": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.ExplorerInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.ExplorerInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.ExplorerInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.ExplorerInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ChainInfo_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo.ExplorerInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo.ExplorerInfo", d.FullName())) } panic("unreachable") } @@ -4333,7 +6419,7 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) WhichOneof(d protoreflect.OneofD // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ChainInfo_ExplorerInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4344,7 +6430,7 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) GetUnknown() protoreflect.RawFie // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_ExplorerInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4356,7 +6442,7 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) SetUnknown(fields protoreflect.R // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ChainInfo_ExplorerInfo) IsValid() bool { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) IsValid() bool { return x != nil } @@ -4366,9 +6452,9 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) 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_ChainInfo_ExplorerInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ValidatorInfo_ExplorerInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainInfo_ExplorerInfo) + x := input.Message.Interface().(*ValidatorInfo_ExplorerInfo) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4398,7 +6484,7 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) ProtoMethods() *protoiface.Metho } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo_ExplorerInfo) + x := input.Message.Interface().(*ValidatorInfo_ExplorerInfo) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4442,7 +6528,7 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) ProtoMethods() *protoiface.Metho }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo_ExplorerInfo) + x := input.Message.Interface().(*ValidatorInfo_ExplorerInfo) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -4474,10 +6560,10 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) ProtoMethods() *protoiface.Metho fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_ExplorerInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_ExplorerInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_ExplorerInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -4579,81 +6665,81 @@ func (x *fastReflection_ChainInfo_ExplorerInfo) ProtoMethods() *protoiface.Metho } } -var _ protoreflect.List = (*_ChainInfo_FeeInfo_2_list)(nil) +var _ protoreflect.List = (*_ValidatorInfo_FeeInfo_2_list)(nil) -type _ChainInfo_FeeInfo_2_list struct { +type _ValidatorInfo_FeeInfo_2_list struct { list *[]string } -func (x *_ChainInfo_FeeInfo_2_list) Len() int { +func (x *_ValidatorInfo_FeeInfo_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_ChainInfo_FeeInfo_2_list) Get(i int) protoreflect.Value { +func (x *_ValidatorInfo_FeeInfo_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfString((*x.list)[i]) } -func (x *_ChainInfo_FeeInfo_2_list) Set(i int, value protoreflect.Value) { +func (x *_ValidatorInfo_FeeInfo_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped (*x.list)[i] = concreteValue } -func (x *_ChainInfo_FeeInfo_2_list) Append(value protoreflect.Value) { +func (x *_ValidatorInfo_FeeInfo_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.String() concreteValue := valueUnwrapped *x.list = append(*x.list, concreteValue) } -func (x *_ChainInfo_FeeInfo_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message ChainInfo_FeeInfo at list field FeeRates as it is not of Message kind")) +func (x *_ValidatorInfo_FeeInfo_2_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message ValidatorInfo_FeeInfo at list field FeeRates as it is not of Message kind")) } -func (x *_ChainInfo_FeeInfo_2_list) Truncate(n int) { +func (x *_ValidatorInfo_FeeInfo_2_list) Truncate(n int) { *x.list = (*x.list)[:n] } -func (x *_ChainInfo_FeeInfo_2_list) NewElement() protoreflect.Value { +func (x *_ValidatorInfo_FeeInfo_2_list) NewElement() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_ChainInfo_FeeInfo_2_list) IsValid() bool { +func (x *_ValidatorInfo_FeeInfo_2_list) IsValid() bool { return x.list != nil } var ( - md_ChainInfo_FeeInfo protoreflect.MessageDescriptor - fd_ChainInfo_FeeInfo_base_denom protoreflect.FieldDescriptor - fd_ChainInfo_FeeInfo_fee_rates protoreflect.FieldDescriptor - fd_ChainInfo_FeeInfo_init_gas_limit protoreflect.FieldDescriptor - fd_ChainInfo_FeeInfo_is_simulable protoreflect.FieldDescriptor - fd_ChainInfo_FeeInfo_gas_multiply protoreflect.FieldDescriptor + md_ValidatorInfo_FeeInfo protoreflect.MessageDescriptor + fd_ValidatorInfo_FeeInfo_base_denom protoreflect.FieldDescriptor + fd_ValidatorInfo_FeeInfo_fee_rates protoreflect.FieldDescriptor + fd_ValidatorInfo_FeeInfo_init_gas_limit protoreflect.FieldDescriptor + fd_ValidatorInfo_FeeInfo_is_simulable protoreflect.FieldDescriptor + fd_ValidatorInfo_FeeInfo_gas_multiply protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() - md_ChainInfo_FeeInfo = File_did_v1_genesis_proto.Messages().ByName("ChainInfo").Messages().ByName("FeeInfo") - fd_ChainInfo_FeeInfo_base_denom = md_ChainInfo_FeeInfo.Fields().ByName("base_denom") - fd_ChainInfo_FeeInfo_fee_rates = md_ChainInfo_FeeInfo.Fields().ByName("fee_rates") - fd_ChainInfo_FeeInfo_init_gas_limit = md_ChainInfo_FeeInfo.Fields().ByName("init_gas_limit") - fd_ChainInfo_FeeInfo_is_simulable = md_ChainInfo_FeeInfo.Fields().ByName("is_simulable") - fd_ChainInfo_FeeInfo_gas_multiply = md_ChainInfo_FeeInfo.Fields().ByName("gas_multiply") + md_ValidatorInfo_FeeInfo = File_did_v1_genesis_proto.Messages().ByName("ValidatorInfo").Messages().ByName("FeeInfo") + fd_ValidatorInfo_FeeInfo_base_denom = md_ValidatorInfo_FeeInfo.Fields().ByName("base_denom") + fd_ValidatorInfo_FeeInfo_fee_rates = md_ValidatorInfo_FeeInfo.Fields().ByName("fee_rates") + fd_ValidatorInfo_FeeInfo_init_gas_limit = md_ValidatorInfo_FeeInfo.Fields().ByName("init_gas_limit") + fd_ValidatorInfo_FeeInfo_is_simulable = md_ValidatorInfo_FeeInfo.Fields().ByName("is_simulable") + fd_ValidatorInfo_FeeInfo_gas_multiply = md_ValidatorInfo_FeeInfo.Fields().ByName("gas_multiply") } -var _ protoreflect.Message = (*fastReflection_ChainInfo_FeeInfo)(nil) +var _ protoreflect.Message = (*fastReflection_ValidatorInfo_FeeInfo)(nil) -type fastReflection_ChainInfo_FeeInfo ChainInfo_FeeInfo +type fastReflection_ValidatorInfo_FeeInfo ValidatorInfo_FeeInfo -func (x *ChainInfo_FeeInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_ChainInfo_FeeInfo)(x) +func (x *ValidatorInfo_FeeInfo) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorInfo_FeeInfo)(x) } -func (x *ChainInfo_FeeInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[7] +func (x *ValidatorInfo_FeeInfo) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4664,43 +6750,43 @@ func (x *ChainInfo_FeeInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_ChainInfo_FeeInfo_messageType fastReflection_ChainInfo_FeeInfo_messageType -var _ protoreflect.MessageType = fastReflection_ChainInfo_FeeInfo_messageType{} +var _fastReflection_ValidatorInfo_FeeInfo_messageType fastReflection_ValidatorInfo_FeeInfo_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorInfo_FeeInfo_messageType{} -type fastReflection_ChainInfo_FeeInfo_messageType struct{} +type fastReflection_ValidatorInfo_FeeInfo_messageType struct{} -func (x fastReflection_ChainInfo_FeeInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_ChainInfo_FeeInfo)(nil) +func (x fastReflection_ValidatorInfo_FeeInfo_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorInfo_FeeInfo)(nil) } -func (x fastReflection_ChainInfo_FeeInfo_messageType) New() protoreflect.Message { - return new(fastReflection_ChainInfo_FeeInfo) +func (x fastReflection_ValidatorInfo_FeeInfo_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_FeeInfo) } -func (x fastReflection_ChainInfo_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo_FeeInfo +func (x fastReflection_ValidatorInfo_FeeInfo_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_FeeInfo } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_ChainInfo_FeeInfo) Descriptor() protoreflect.MessageDescriptor { - return md_ChainInfo_FeeInfo +func (x *fastReflection_ValidatorInfo_FeeInfo) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_FeeInfo } // Type returns the message type, which encapsulates both Go and protobuf // type information. If the Go type information is not needed, // it is recommended that the message descriptor be used instead. -func (x *fastReflection_ChainInfo_FeeInfo) Type() protoreflect.MessageType { - return _fastReflection_ChainInfo_FeeInfo_messageType +func (x *fastReflection_ValidatorInfo_FeeInfo) Type() protoreflect.MessageType { + return _fastReflection_ValidatorInfo_FeeInfo_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_ChainInfo_FeeInfo) New() protoreflect.Message { - return new(fastReflection_ChainInfo_FeeInfo) +func (x *fastReflection_ValidatorInfo_FeeInfo) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_FeeInfo) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_ChainInfo_FeeInfo) Interface() protoreflect.ProtoMessage { - return (*ChainInfo_FeeInfo)(x) +func (x *fastReflection_ValidatorInfo_FeeInfo) Interface() protoreflect.ProtoMessage { + return (*ValidatorInfo_FeeInfo)(x) } // Range iterates over every populated field in an undefined order, @@ -4708,34 +6794,34 @@ func (x *fastReflection_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_ValidatorInfo_FeeInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.BaseDenom != "" { value := protoreflect.ValueOfString(x.BaseDenom) - if !f(fd_ChainInfo_FeeInfo_base_denom, value) { + if !f(fd_ValidatorInfo_FeeInfo_base_denom, value) { return } } if len(x.FeeRates) != 0 { - value := protoreflect.ValueOfList(&_ChainInfo_FeeInfo_2_list{list: &x.FeeRates}) - if !f(fd_ChainInfo_FeeInfo_fee_rates, value) { + value := protoreflect.ValueOfList(&_ValidatorInfo_FeeInfo_2_list{list: &x.FeeRates}) + if !f(fd_ValidatorInfo_FeeInfo_fee_rates, value) { return } } if x.InitGasLimit != int32(0) { value := protoreflect.ValueOfInt32(x.InitGasLimit) - if !f(fd_ChainInfo_FeeInfo_init_gas_limit, value) { + if !f(fd_ValidatorInfo_FeeInfo_init_gas_limit, value) { return } } if x.IsSimulable != false { value := protoreflect.ValueOfBool(x.IsSimulable) - if !f(fd_ChainInfo_FeeInfo_is_simulable, value) { + if !f(fd_ValidatorInfo_FeeInfo_is_simulable, value) { return } } if x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) { value := protoreflect.ValueOfFloat64(x.GasMultiply) - if !f(fd_ChainInfo_FeeInfo_gas_multiply, value) { + if !f(fd_ValidatorInfo_FeeInfo_gas_multiply, value) { return } } @@ -4752,23 +6838,23 @@ func (x *fastReflection_ChainInfo_FeeInfo) Range(f func(protoreflect.FieldDescri // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_ChainInfo_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ValidatorInfo_FeeInfo) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.ChainInfo.FeeInfo.base_denom": + case "did.v1.ValidatorInfo.FeeInfo.base_denom": return x.BaseDenom != "" - case "did.v1.ChainInfo.FeeInfo.fee_rates": + case "did.v1.ValidatorInfo.FeeInfo.fee_rates": return len(x.FeeRates) != 0 - case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": return x.InitGasLimit != int32(0) - case "did.v1.ChainInfo.FeeInfo.is_simulable": + case "did.v1.ValidatorInfo.FeeInfo.is_simulable": return x.IsSimulable != false - case "did.v1.ChainInfo.FeeInfo.gas_multiply": + case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": return x.GasMultiply != float64(0) || math.Signbit(x.GasMultiply) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) } } @@ -4778,23 +6864,23 @@ func (x *fastReflection_ChainInfo_FeeInfo) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ValidatorInfo_FeeInfo) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.ChainInfo.FeeInfo.base_denom": + case "did.v1.ValidatorInfo.FeeInfo.base_denom": x.BaseDenom = "" - case "did.v1.ChainInfo.FeeInfo.fee_rates": + case "did.v1.ValidatorInfo.FeeInfo.fee_rates": x.FeeRates = nil - case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": x.InitGasLimit = int32(0) - case "did.v1.ChainInfo.FeeInfo.is_simulable": + case "did.v1.ValidatorInfo.FeeInfo.is_simulable": x.IsSimulable = false - case "did.v1.ChainInfo.FeeInfo.gas_multiply": + case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": x.GasMultiply = float64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) } } @@ -4804,31 +6890,31 @@ func (x *fastReflection_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_FeeInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.ChainInfo.FeeInfo.base_denom": + case "did.v1.ValidatorInfo.FeeInfo.base_denom": value := x.BaseDenom return protoreflect.ValueOfString(value) - case "did.v1.ChainInfo.FeeInfo.fee_rates": + case "did.v1.ValidatorInfo.FeeInfo.fee_rates": if len(x.FeeRates) == 0 { - return protoreflect.ValueOfList(&_ChainInfo_FeeInfo_2_list{}) + return protoreflect.ValueOfList(&_ValidatorInfo_FeeInfo_2_list{}) } - listValue := &_ChainInfo_FeeInfo_2_list{list: &x.FeeRates} + listValue := &_ValidatorInfo_FeeInfo_2_list{list: &x.FeeRates} return protoreflect.ValueOfList(listValue) - case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": value := x.InitGasLimit return protoreflect.ValueOfInt32(value) - case "did.v1.ChainInfo.FeeInfo.is_simulable": + case "did.v1.ValidatorInfo.FeeInfo.is_simulable": value := x.IsSimulable return protoreflect.ValueOfBool(value) - case "did.v1.ChainInfo.FeeInfo.gas_multiply": + case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": value := x.GasMultiply return protoreflect.ValueOfFloat64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", descriptor.FullName())) } } @@ -4842,25 +6928,25 @@ func (x *fastReflection_ChainInfo_FeeInfo) Get(descriptor protoreflect.FieldDesc // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ValidatorInfo_FeeInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.ChainInfo.FeeInfo.base_denom": + case "did.v1.ValidatorInfo.FeeInfo.base_denom": x.BaseDenom = value.Interface().(string) - case "did.v1.ChainInfo.FeeInfo.fee_rates": + case "did.v1.ValidatorInfo.FeeInfo.fee_rates": lv := value.List() - clv := lv.(*_ChainInfo_FeeInfo_2_list) + clv := lv.(*_ValidatorInfo_FeeInfo_2_list) x.FeeRates = *clv.list - case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": x.InitGasLimit = int32(value.Int()) - case "did.v1.ChainInfo.FeeInfo.is_simulable": + case "did.v1.ValidatorInfo.FeeInfo.is_simulable": x.IsSimulable = value.Bool() - case "did.v1.ChainInfo.FeeInfo.gas_multiply": + case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": x.GasMultiply = value.Float() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) } } @@ -4874,61 +6960,61 @@ func (x *fastReflection_ChainInfo_FeeInfo) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_ChainInfo_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_FeeInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.FeeInfo.fee_rates": + case "did.v1.ValidatorInfo.FeeInfo.fee_rates": if x.FeeRates == nil { x.FeeRates = []string{} } - value := &_ChainInfo_FeeInfo_2_list{list: &x.FeeRates} + value := &_ValidatorInfo_FeeInfo_2_list{list: &x.FeeRates} return protoreflect.ValueOfList(value) - case "did.v1.ChainInfo.FeeInfo.base_denom": - panic(fmt.Errorf("field base_denom of message did.v1.ChainInfo.FeeInfo is not mutable")) - case "did.v1.ChainInfo.FeeInfo.init_gas_limit": - panic(fmt.Errorf("field init_gas_limit of message did.v1.ChainInfo.FeeInfo is not mutable")) - case "did.v1.ChainInfo.FeeInfo.is_simulable": - panic(fmt.Errorf("field is_simulable of message did.v1.ChainInfo.FeeInfo is not mutable")) - case "did.v1.ChainInfo.FeeInfo.gas_multiply": - panic(fmt.Errorf("field gas_multiply of message did.v1.ChainInfo.FeeInfo is not mutable")) + case "did.v1.ValidatorInfo.FeeInfo.base_denom": + panic(fmt.Errorf("field base_denom of message did.v1.ValidatorInfo.FeeInfo is not mutable")) + case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": + panic(fmt.Errorf("field init_gas_limit of message did.v1.ValidatorInfo.FeeInfo is not mutable")) + case "did.v1.ValidatorInfo.FeeInfo.is_simulable": + panic(fmt.Errorf("field is_simulable of message did.v1.ValidatorInfo.FeeInfo is not mutable")) + case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": + panic(fmt.Errorf("field gas_multiply of message did.v1.ValidatorInfo.FeeInfo is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) } } // NewField returns a new value that is assignable to the field // for the given descriptor. For scalars, this returns the default value. // For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_ChainInfo_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_FeeInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.ChainInfo.FeeInfo.base_denom": + case "did.v1.ValidatorInfo.FeeInfo.base_denom": return protoreflect.ValueOfString("") - case "did.v1.ChainInfo.FeeInfo.fee_rates": + case "did.v1.ValidatorInfo.FeeInfo.fee_rates": list := []string{} - return protoreflect.ValueOfList(&_ChainInfo_FeeInfo_2_list{list: &list}) - case "did.v1.ChainInfo.FeeInfo.init_gas_limit": + return protoreflect.ValueOfList(&_ValidatorInfo_FeeInfo_2_list{list: &list}) + case "did.v1.ValidatorInfo.FeeInfo.init_gas_limit": return protoreflect.ValueOfInt32(int32(0)) - case "did.v1.ChainInfo.FeeInfo.is_simulable": + case "did.v1.ValidatorInfo.FeeInfo.is_simulable": return protoreflect.ValueOfBool(false) - case "did.v1.ChainInfo.FeeInfo.gas_multiply": + case "did.v1.ValidatorInfo.FeeInfo.gas_multiply": return protoreflect.ValueOfFloat64(float64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ChainInfo.FeeInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.FeeInfo")) } - panic(fmt.Errorf("message did.v1.ChainInfo.FeeInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.FeeInfo does not contain field %s", fd.FullName())) } } // WhichOneof reports which field within the oneof is populated, // returning nil if none are populated. // It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_ChainInfo_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ValidatorInfo_FeeInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.ChainInfo.FeeInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo.FeeInfo", d.FullName())) } panic("unreachable") } @@ -4936,7 +7022,7 @@ func (x *fastReflection_ChainInfo_FeeInfo) WhichOneof(d protoreflect.OneofDescri // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_ChainInfo_FeeInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ValidatorInfo_FeeInfo) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -4947,7 +7033,7 @@ func (x *fastReflection_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ValidatorInfo_FeeInfo) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -4959,7 +7045,7 @@ func (x *fastReflection_ChainInfo_FeeInfo) SetUnknown(fields protoreflect.RawFie // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_ChainInfo_FeeInfo) IsValid() bool { +func (x *fastReflection_ValidatorInfo_FeeInfo) IsValid() bool { return x != nil } @@ -4969,9 +7055,9 @@ func (x *fastReflection_ChainInfo_FeeInfo) 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_ChainInfo_FeeInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ValidatorInfo_FeeInfo) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*ChainInfo_FeeInfo) + x := input.Message.Interface().(*ValidatorInfo_FeeInfo) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5012,7 +7098,7 @@ func (x *fastReflection_ChainInfo_FeeInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo_FeeInfo) + x := input.Message.Interface().(*ValidatorInfo_FeeInfo) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5079,7 +7165,7 @@ func (x *fastReflection_ChainInfo_FeeInfo) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*ChainInfo_FeeInfo) + x := input.Message.Interface().(*ValidatorInfo_FeeInfo) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5111,10 +7197,10 @@ func (x *fastReflection_ChainInfo_FeeInfo) 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: ChainInfo_FeeInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_FeeInfo: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ChainInfo_FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_FeeInfo: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -5267,32 +7353,28 @@ func (x *fastReflection_ChainInfo_FeeInfo) ProtoMethods() *protoiface.Methods { } var ( - md_KeyInfo protoreflect.MessageDescriptor - fd_KeyInfo_kind protoreflect.FieldDescriptor - fd_KeyInfo_algorithm protoreflect.FieldDescriptor - fd_KeyInfo_curve protoreflect.FieldDescriptor - fd_KeyInfo_encoding protoreflect.FieldDescriptor + md_ValidatorInfo_IBCChannel protoreflect.MessageDescriptor + fd_ValidatorInfo_IBCChannel_id protoreflect.FieldDescriptor + fd_ValidatorInfo_IBCChannel_port protoreflect.FieldDescriptor ) func init() { file_did_v1_genesis_proto_init() - md_KeyInfo = File_did_v1_genesis_proto.Messages().ByName("KeyInfo") - fd_KeyInfo_kind = md_KeyInfo.Fields().ByName("kind") - fd_KeyInfo_algorithm = md_KeyInfo.Fields().ByName("algorithm") - fd_KeyInfo_curve = md_KeyInfo.Fields().ByName("curve") - fd_KeyInfo_encoding = md_KeyInfo.Fields().ByName("encoding") + md_ValidatorInfo_IBCChannel = File_did_v1_genesis_proto.Messages().ByName("ValidatorInfo").Messages().ByName("IBCChannel") + fd_ValidatorInfo_IBCChannel_id = md_ValidatorInfo_IBCChannel.Fields().ByName("id") + fd_ValidatorInfo_IBCChannel_port = md_ValidatorInfo_IBCChannel.Fields().ByName("port") } -var _ protoreflect.Message = (*fastReflection_KeyInfo)(nil) +var _ protoreflect.Message = (*fastReflection_ValidatorInfo_IBCChannel)(nil) -type fastReflection_KeyInfo KeyInfo +type fastReflection_ValidatorInfo_IBCChannel ValidatorInfo_IBCChannel -func (x *KeyInfo) ProtoReflect() protoreflect.Message { - return (*fastReflection_KeyInfo)(x) +func (x *ValidatorInfo_IBCChannel) ProtoReflect() protoreflect.Message { + return (*fastReflection_ValidatorInfo_IBCChannel)(x) } -func (x *KeyInfo) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_genesis_proto_msgTypes[4] +func (x *ValidatorInfo_IBCChannel) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_genesis_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5303,43 +7385,43 @@ func (x *KeyInfo) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_KeyInfo_messageType fastReflection_KeyInfo_messageType -var _ protoreflect.MessageType = fastReflection_KeyInfo_messageType{} +var _fastReflection_ValidatorInfo_IBCChannel_messageType fastReflection_ValidatorInfo_IBCChannel_messageType +var _ protoreflect.MessageType = fastReflection_ValidatorInfo_IBCChannel_messageType{} -type fastReflection_KeyInfo_messageType struct{} +type fastReflection_ValidatorInfo_IBCChannel_messageType struct{} -func (x fastReflection_KeyInfo_messageType) Zero() protoreflect.Message { - return (*fastReflection_KeyInfo)(nil) +func (x fastReflection_ValidatorInfo_IBCChannel_messageType) Zero() protoreflect.Message { + return (*fastReflection_ValidatorInfo_IBCChannel)(nil) } -func (x fastReflection_KeyInfo_messageType) New() protoreflect.Message { - return new(fastReflection_KeyInfo) +func (x fastReflection_ValidatorInfo_IBCChannel_messageType) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_IBCChannel) } -func (x fastReflection_KeyInfo_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_KeyInfo +func (x fastReflection_ValidatorInfo_IBCChannel_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_IBCChannel } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_KeyInfo) Descriptor() protoreflect.MessageDescriptor { - return md_KeyInfo +func (x *fastReflection_ValidatorInfo_IBCChannel) Descriptor() protoreflect.MessageDescriptor { + return md_ValidatorInfo_IBCChannel } // 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_KeyInfo) Type() protoreflect.MessageType { - return _fastReflection_KeyInfo_messageType +func (x *fastReflection_ValidatorInfo_IBCChannel) Type() protoreflect.MessageType { + return _fastReflection_ValidatorInfo_IBCChannel_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_KeyInfo) New() protoreflect.Message { - return new(fastReflection_KeyInfo) +func (x *fastReflection_ValidatorInfo_IBCChannel) New() protoreflect.Message { + return new(fastReflection_ValidatorInfo_IBCChannel) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_KeyInfo) Interface() protoreflect.ProtoMessage { - return (*KeyInfo)(x) +func (x *fastReflection_ValidatorInfo_IBCChannel) Interface() protoreflect.ProtoMessage { + return (*ValidatorInfo_IBCChannel)(x) } // Range iterates over every populated field in an undefined order, @@ -5347,28 +7429,16 @@ func (x *fastReflection_KeyInfo) 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_KeyInfo) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Kind != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Kind)) - if !f(fd_KeyInfo_kind, value) { +func (x *fastReflection_ValidatorInfo_IBCChannel) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_ValidatorInfo_IBCChannel_id, value) { return } } - if x.Algorithm != "" { - value := protoreflect.ValueOfString(x.Algorithm) - if !f(fd_KeyInfo_algorithm, value) { - return - } - } - if x.Curve != "" { - value := protoreflect.ValueOfString(x.Curve) - if !f(fd_KeyInfo_curve, value) { - return - } - } - if x.Encoding != "" { - value := protoreflect.ValueOfString(x.Encoding) - if !f(fd_KeyInfo_encoding, value) { + if x.Port != "" { + value := protoreflect.ValueOfString(x.Port) + if !f(fd_ValidatorInfo_IBCChannel_port, value) { return } } @@ -5385,21 +7455,17 @@ func (x *fastReflection_KeyInfo) Range(f func(protoreflect.FieldDescriptor, prot // 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_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ValidatorInfo_IBCChannel) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.KeyInfo.kind": - return x.Kind != 0 - case "did.v1.KeyInfo.algorithm": - return x.Algorithm != "" - case "did.v1.KeyInfo.curve": - return x.Curve != "" - case "did.v1.KeyInfo.encoding": - return x.Encoding != "" + case "did.v1.ValidatorInfo.IBCChannel.id": + return x.Id != "" + case "did.v1.ValidatorInfo.IBCChannel.port": + return x.Port != "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) } - panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) } } @@ -5409,21 +7475,17 @@ func (x *fastReflection_KeyInfo) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_KeyInfo) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ValidatorInfo_IBCChannel) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.KeyInfo.kind": - x.Kind = 0 - case "did.v1.KeyInfo.algorithm": - x.Algorithm = "" - case "did.v1.KeyInfo.curve": - x.Curve = "" - case "did.v1.KeyInfo.encoding": - x.Encoding = "" + case "did.v1.ValidatorInfo.IBCChannel.id": + x.Id = "" + case "did.v1.ValidatorInfo.IBCChannel.port": + x.Port = "" default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) } - panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) } } @@ -5433,25 +7495,19 @@ func (x *fastReflection_KeyInfo) 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_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_IBCChannel) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.KeyInfo.kind": - value := x.Kind - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.KeyInfo.algorithm": - value := x.Algorithm + case "did.v1.ValidatorInfo.IBCChannel.id": + value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.KeyInfo.curve": - value := x.Curve - return protoreflect.ValueOfString(value) - case "did.v1.KeyInfo.encoding": - value := x.Encoding + case "did.v1.ValidatorInfo.IBCChannel.port": + value := x.Port return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) } - panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", descriptor.FullName())) } } @@ -5465,21 +7521,17 @@ func (x *fastReflection_KeyInfo) Get(descriptor protoreflect.FieldDescriptor) pr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_KeyInfo) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ValidatorInfo_IBCChannel) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.KeyInfo.kind": - x.Kind = (KeyType)(value.Enum()) - case "did.v1.KeyInfo.algorithm": - x.Algorithm = value.Interface().(string) - case "did.v1.KeyInfo.curve": - x.Curve = value.Interface().(string) - case "did.v1.KeyInfo.encoding": - x.Encoding = value.Interface().(string) + case "did.v1.ValidatorInfo.IBCChannel.id": + x.Id = value.Interface().(string) + case "did.v1.ValidatorInfo.IBCChannel.port": + x.Port = value.Interface().(string) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) } - panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel does not contain field %s", fd.FullName())) } } @@ -5493,52 +7545,44 @@ func (x *fastReflection_KeyInfo) Set(fd protoreflect.FieldDescriptor, value prot // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_KeyInfo) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_IBCChannel) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.KeyInfo.kind": - panic(fmt.Errorf("field kind of message did.v1.KeyInfo is not mutable")) - case "did.v1.KeyInfo.algorithm": - panic(fmt.Errorf("field algorithm of message did.v1.KeyInfo is not mutable")) - case "did.v1.KeyInfo.curve": - panic(fmt.Errorf("field curve of message did.v1.KeyInfo is not mutable")) - case "did.v1.KeyInfo.encoding": - panic(fmt.Errorf("field encoding of message did.v1.KeyInfo is not mutable")) + case "did.v1.ValidatorInfo.IBCChannel.id": + panic(fmt.Errorf("field id of message did.v1.ValidatorInfo.IBCChannel is not mutable")) + case "did.v1.ValidatorInfo.IBCChannel.port": + panic(fmt.Errorf("field port of message did.v1.ValidatorInfo.IBCChannel is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) } - panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel 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_KeyInfo) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ValidatorInfo_IBCChannel) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.KeyInfo.kind": - return protoreflect.ValueOfEnum(0) - case "did.v1.KeyInfo.algorithm": + case "did.v1.ValidatorInfo.IBCChannel.id": return protoreflect.ValueOfString("") - case "did.v1.KeyInfo.curve": - return protoreflect.ValueOfString("") - case "did.v1.KeyInfo.encoding": + case "did.v1.ValidatorInfo.IBCChannel.port": return protoreflect.ValueOfString("") default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.KeyInfo")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ValidatorInfo.IBCChannel")) } - panic(fmt.Errorf("message did.v1.KeyInfo does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ValidatorInfo.IBCChannel 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_KeyInfo) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ValidatorInfo_IBCChannel) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.KeyInfo", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.ValidatorInfo.IBCChannel", d.FullName())) } panic("unreachable") } @@ -5546,7 +7590,7 @@ func (x *fastReflection_KeyInfo) WhichOneof(d protoreflect.OneofDescriptor) prot // 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_KeyInfo) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ValidatorInfo_IBCChannel) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -5557,7 +7601,7 @@ func (x *fastReflection_KeyInfo) 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_KeyInfo) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ValidatorInfo_IBCChannel) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -5569,7 +7613,7 @@ func (x *fastReflection_KeyInfo) 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_KeyInfo) IsValid() bool { +func (x *fastReflection_ValidatorInfo_IBCChannel) IsValid() bool { return x != nil } @@ -5579,9 +7623,9 @@ func (x *fastReflection_KeyInfo) 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_KeyInfo) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ValidatorInfo_IBCChannel) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*KeyInfo) + x := input.Message.Interface().(*ValidatorInfo_IBCChannel) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5593,18 +7637,11 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Kind != 0 { - n += 1 + runtime.Sov(uint64(x.Kind)) - } - l = len(x.Algorithm) + l = len(x.Id) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Curve) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Encoding) + l = len(x.Port) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -5618,7 +7655,7 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*KeyInfo) + x := input.Message.Interface().(*ValidatorInfo_IBCChannel) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5637,31 +7674,19 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Encoding) > 0 { - i -= len(x.Encoding) - copy(dAtA[i:], x.Encoding) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Encoding))) - i-- - dAtA[i] = 0x22 - } - if len(x.Curve) > 0 { - i -= len(x.Curve) - copy(dAtA[i:], x.Curve) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Curve))) - i-- - dAtA[i] = 0x1a - } - if len(x.Algorithm) > 0 { - i -= len(x.Algorithm) - copy(dAtA[i:], x.Algorithm) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Algorithm))) + if len(x.Port) > 0 { + i -= len(x.Port) + copy(dAtA[i:], x.Port) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Port))) i-- dAtA[i] = 0x12 } - if x.Kind != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Kind)) + if len(x.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -5674,7 +7699,7 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*KeyInfo) + x := input.Message.Interface().(*ValidatorInfo_IBCChannel) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -5706,17 +7731,17 @@ func (x *fastReflection_KeyInfo) 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: KeyInfo: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_IBCChannel: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ValidatorInfo_IBCChannel: 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 Kind", wireType) + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - x.Kind = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5726,14 +7751,27 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Kind |= KeyType(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5761,71 +7799,7 @@ func (x *fastReflection_KeyInfo) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Algorithm = 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 Curve", 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.Curve = 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 Encoding", 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.Encoding = string(dAtA[iNdEx:postIndex]) + x.Port = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5875,218 +7849,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// DIDNamespace define the different namespaces of DID -type DIDNamespace int32 - -const ( - DIDNamespace_DID_NAMESPACE_UNSPECIFIED DIDNamespace = 0 - DIDNamespace_DID_NAMESPACE_IPFS DIDNamespace = 1 - DIDNamespace_DID_NAMESPACE_SONR DIDNamespace = 2 - DIDNamespace_DID_NAMESPACE_BITCOIN DIDNamespace = 3 - DIDNamespace_DID_NAMESPACE_ETHEREUM DIDNamespace = 4 - DIDNamespace_DID_NAMESPACE_IBC DIDNamespace = 5 -) - -// Enum value maps for DIDNamespace. -var ( - DIDNamespace_name = map[int32]string{ - 0: "DID_NAMESPACE_UNSPECIFIED", - 1: "DID_NAMESPACE_IPFS", - 2: "DID_NAMESPACE_SONR", - 3: "DID_NAMESPACE_BITCOIN", - 4: "DID_NAMESPACE_ETHEREUM", - 5: "DID_NAMESPACE_IBC", - } - DIDNamespace_value = map[string]int32{ - "DID_NAMESPACE_UNSPECIFIED": 0, - "DID_NAMESPACE_IPFS": 1, - "DID_NAMESPACE_SONR": 2, - "DID_NAMESPACE_BITCOIN": 3, - "DID_NAMESPACE_ETHEREUM": 4, - "DID_NAMESPACE_IBC": 5, - } -) - -func (x DIDNamespace) Enum() *DIDNamespace { - p := new(DIDNamespace) - *p = x - return p -} - -func (x DIDNamespace) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (DIDNamespace) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_genesis_proto_enumTypes[0].Descriptor() -} - -func (DIDNamespace) Type() protoreflect.EnumType { - return &file_did_v1_genesis_proto_enumTypes[0] -} - -func (x DIDNamespace) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use DIDNamespace.Descriptor instead. -func (DIDNamespace) EnumDescriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{0} -} - -// KeyKTind defines the kind of key -type KeyType int32 - -const ( - KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 - // Blockchain key types - KeyType_KEY_TYPE_SECP256K1 KeyType = 1 // cross-chain - KeyType_KEY_TYPE_ED25519 KeyType = 2 // validators - KeyType_KEY_TYPE_KECCAK KeyType = 3 // ethereum addresses - KeyType_KEY_TYPE_BLS12381 KeyType = 4 // zero-knowledge - KeyType_KEY_TYPE_X25519 KeyType = 5 // multisig - KeyType_KEY_TYPE_SCHNORR KeyType = 6 // mpc - // Webauthn and FIDO key types - KeyType_KEY_TYPE_WEBAUTHN KeyType = 7 // passkey authentication - KeyType_KEY_TYPE_FIDO KeyType = 8 // fido2 authentication -) - -// Enum value maps for KeyType. -var ( - KeyType_name = map[int32]string{ - 0: "KEY_TYPE_UNSPECIFIED", - 1: "KEY_TYPE_SECP256K1", - 2: "KEY_TYPE_ED25519", - 3: "KEY_TYPE_KECCAK", - 4: "KEY_TYPE_BLS12381", - 5: "KEY_TYPE_X25519", - 6: "KEY_TYPE_SCHNORR", - 7: "KEY_TYPE_WEBAUTHN", - 8: "KEY_TYPE_FIDO", - } - KeyType_value = map[string]int32{ - "KEY_TYPE_UNSPECIFIED": 0, - "KEY_TYPE_SECP256K1": 1, - "KEY_TYPE_ED25519": 2, - "KEY_TYPE_KECCAK": 3, - "KEY_TYPE_BLS12381": 4, - "KEY_TYPE_X25519": 5, - "KEY_TYPE_SCHNORR": 6, - "KEY_TYPE_WEBAUTHN": 7, - "KEY_TYPE_FIDO": 8, - } -) - -func (x KeyType) Enum() *KeyType { - p := new(KeyType) - *p = x - return p -} - -func (x KeyType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (KeyType) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_genesis_proto_enumTypes[1].Descriptor() -} - -func (KeyType) Type() protoreflect.EnumType { - return &file_did_v1_genesis_proto_enumTypes[1] -} - -func (x KeyType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use KeyType.Descriptor instead. -func (KeyType) EnumDescriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{1} -} - -// PermissionScope define the Capabilities Controllers can grant for Services -type PermissionScope int32 - -const ( - PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 - PermissionScope_PERMISSION_SCOPE_BASIC_INFO PermissionScope = 1 - PermissionScope_PERMISSION_SCOPE_RECORDS_READ PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE PermissionScope = 3 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 - PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 - PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 - PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 - PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 - PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 - PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 -) - -// Enum value maps for PermissionScope. -var ( - PermissionScope_name = map[int32]string{ - 0: "PERMISSION_SCOPE_UNSPECIFIED", - 1: "PERMISSION_SCOPE_BASIC_INFO", - 2: "PERMISSION_SCOPE_RECORDS_READ", - 3: "PERMISSION_SCOPE_RECORDS_WRITE", - 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", - 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", - 6: "PERMISSION_SCOPE_WALLETS_READ", - 7: "PERMISSION_SCOPE_WALLETS_CREATE", - 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", - 9: "PERMISSION_SCOPE_WALLETS_UPDATE", - 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", - 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", - 12: "PERMISSION_SCOPE_ADMIN_USER", - 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", - } - PermissionScope_value = map[string]int32{ - "PERMISSION_SCOPE_UNSPECIFIED": 0, - "PERMISSION_SCOPE_BASIC_INFO": 1, - "PERMISSION_SCOPE_RECORDS_READ": 2, - "PERMISSION_SCOPE_RECORDS_WRITE": 3, - "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, - "PERMISSION_SCOPE_WALLETS_READ": 6, - "PERMISSION_SCOPE_WALLETS_CREATE": 7, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, - "PERMISSION_SCOPE_WALLETS_UPDATE": 9, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, - "PERMISSION_SCOPE_ADMIN_USER": 12, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, - } -) - -func (x PermissionScope) Enum() *PermissionScope { - p := new(PermissionScope) - *p = x - return p -} - -func (x PermissionScope) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (PermissionScope) Descriptor() protoreflect.EnumDescriptor { - return file_did_v1_genesis_proto_enumTypes[2].Descriptor() -} - -func (PermissionScope) Type() protoreflect.EnumType { - return &file_did_v1_genesis_proto_enumTypes[2] -} - -func (x PermissionScope) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use PermissionScope.Descriptor instead. -func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} -} - // GenesisState defines the module genesis state type GenesisState struct { state protoimpl.MessageState @@ -6136,6 +7898,8 @@ type Params struct { WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` // Whitelisted Key Types AllowedPublicKeys []*KeyInfo `protobuf:"bytes,3,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty"` + // OpenIDConfig defines the base openid configuration across all did services + OpenidConfig *OpenIDConfig `protobuf:"bytes,4,opt,name=openid_config,json=openidConfig,proto3" json:"openid_config,omitempty"` } func (x *Params) Reset() { @@ -6179,26 +7943,33 @@ func (x *Params) GetAllowedPublicKeys() []*KeyInfo { return nil } +func (x *Params) GetOpenidConfig() *OpenIDConfig { + if x != nil { + return x.OpenidConfig + } + return nil +} + // AssetInfo defines the asset info type AssetInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` + // The coin type index for bip44 path + Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + // The hrp for bech32 address + Hrp string `protobuf:"bytes,2,opt,name=hrp,proto3" json:"hrp,omitempty"` + // The coin symbol + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // The coin name + AssetType AssetType `protobuf:"varint,4,opt,name=asset_type,json=assetType,proto3,enum=did.v1.AssetType" json:"asset_type,omitempty"` + // The name of the asset + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + // The Method of the did namespace + Method string `protobuf:"bytes,6,opt,name=method,proto3" json:"method,omitempty"` + // The icon url + IconUrl string `protobuf:"bytes,7,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` } func (x *AssetInfo) Reset() { @@ -6221,16 +7992,16 @@ func (*AssetInfo) Descriptor() ([]byte, []int) { return file_did_v1_genesis_proto_rawDescGZIP(), []int{2} } -func (x *AssetInfo) GetId() string { +func (x *AssetInfo) GetIndex() int64 { if x != nil { - return x.Id + return x.Index } - return "" + return 0 } -func (x *AssetInfo) GetDenom() string { +func (x *AssetInfo) GetHrp() string { if x != nil { - return x.Denom + return x.Hrp } return "" } @@ -6242,79 +8013,30 @@ func (x *AssetInfo) GetSymbol() string { return "" } -func (x *AssetInfo) GetAssetType() string { +func (x *AssetInfo) GetAssetType() AssetType { if x != nil { return x.AssetType } - return "" + return AssetType_ASSET_TYPE_UNSPECIFIED } -func (x *AssetInfo) GetOriginChain() string { +func (x *AssetInfo) GetName() string { if x != nil { - return x.OriginChain + return x.Name } return "" } -func (x *AssetInfo) GetOriginDenom() string { +func (x *AssetInfo) GetMethod() string { if x != nil { - return x.OriginDenom + return x.Method } return "" } -func (x *AssetInfo) GetDecimals() int32 { +func (x *AssetInfo) GetIconUrl() string { if x != nil { - return x.Decimals - } - return 0 -} - -func (x *AssetInfo) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *AssetInfo) GetImageUrl() string { - if x != nil { - return x.ImageUrl - } - return "" -} - -func (x *AssetInfo) GetCoingeckoId() string { - if x != nil { - return x.CoingeckoId - } - return "" -} - -func (x *AssetInfo) GetIsEnabled() bool { - if x != nil { - return x.IsEnabled - } - return false -} - -func (x *AssetInfo) GetIbcPath() string { - if x != nil { - return x.IbcPath - } - return "" -} - -func (x *AssetInfo) GetIbcChannel() string { - if x != nil { - return x.IbcChannel - } - return "" -} - -func (x *AssetInfo) GetIbcPort() string { - if x != nil { - return x.IbcPort + return x.IconUrl } return "" } @@ -6325,16 +8047,11 @@ type ChainInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ChainInfo_ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *ChainInfo_FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Validators []*ValidatorInfo `protobuf:"bytes,5,rep,name=validators,proto3" json:"validators,omitempty"` } func (x *ChainInfo) Reset() { @@ -6385,44 +8102,9 @@ func (x *ChainInfo) GetSymbol() string { return "" } -func (x *ChainInfo) GetBech32Prefix() string { +func (x *ChainInfo) GetValidators() []*ValidatorInfo { if x != nil { - return x.Bech32Prefix - } - return "" -} - -func (x *ChainInfo) GetGenesisTime() string { - if x != nil { - return x.GenesisTime - } - return "" -} - -func (x *ChainInfo) GetGrpcEndpoints() []*ChainInfo_Endpoint { - if x != nil { - return x.GrpcEndpoints - } - return nil -} - -func (x *ChainInfo) GetRestEndpoints() []*ChainInfo_Endpoint { - if x != nil { - return x.RestEndpoints - } - return nil -} - -func (x *ChainInfo) GetExplorer() *ChainInfo_ExplorerInfo { - if x != nil { - return x.Explorer - } - return nil -} - -func (x *ChainInfo) GetFeeInfo() *ChainInfo_FeeInfo { - if x != nil { - return x.FeeInfo + return x.Validators } return nil } @@ -6433,10 +8115,11 @@ type KeyInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Kind KeyType `protobuf:"varint,1,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` - Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` // e.g., "ES256", "EdDSA", "ES256K" - Curve string `protobuf:"bytes,3,opt,name=curve,proto3" json:"curve,omitempty"` // e.g., "P-256", "Ed25519", "secp256k1" - Encoding string `protobuf:"bytes,4,opt,name=encoding,proto3" json:"encoding,omitempty"` // e.g., "hex", "base64", "multibase" + Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"` + Algorithm KeyAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=did.v1.KeyAlgorithm" json:"algorithm,omitempty"` // e.g., "ES256", "EdDSA", "ES256K" + Encoding KeyEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=did.v1.KeyEncoding" json:"encoding,omitempty"` // e.g., "hex", "base64", "multibase" + Curve KeyCurve `protobuf:"varint,4,opt,name=curve,proto3,enum=did.v1.KeyCurve" json:"curve,omitempty"` // e.g., "P256", "P384", "P521", "X25519", "X448", "Ed25519", "Ed448", "secp256k1" + Type_ KeyType `protobuf:"varint,5,opt,name=type,proto3,enum=did.v1.KeyType" json:"type,omitempty"` // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC" } func (x *KeyInfo) Reset() { @@ -6459,36 +8142,227 @@ func (*KeyInfo) Descriptor() ([]byte, []int) { return file_did_v1_genesis_proto_rawDescGZIP(), []int{4} } -func (x *KeyInfo) GetKind() KeyType { +func (x *KeyInfo) GetRole() KeyRole { if x != nil { - return x.Kind + return x.Role + } + return KeyRole_KEY_ROLE_UNSPECIFIED +} + +func (x *KeyInfo) GetAlgorithm() KeyAlgorithm { + if x != nil { + return x.Algorithm + } + return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED +} + +func (x *KeyInfo) GetEncoding() KeyEncoding { + if x != nil { + return x.Encoding + } + return KeyEncoding_KEY_ENCODING_UNSPECIFIED +} + +func (x *KeyInfo) GetCurve() KeyCurve { + if x != nil { + return x.Curve + } + return KeyCurve_KEY_CURVE_UNSPECIFIED +} + +func (x *KeyInfo) GetType_() KeyType { + if x != nil { + return x.Type_ } return KeyType_KEY_TYPE_UNSPECIFIED } -func (x *KeyInfo) GetAlgorithm() string { +// OpenIDConfig defines the base openid configuration across all did services +type OpenIDConfig struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` + TokenEndpoint string `protobuf:"bytes,3,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` + UserinfoEndpoint string `protobuf:"bytes,4,opt,name=userinfo_endpoint,json=userinfoEndpoint,proto3" json:"userinfo_endpoint,omitempty"` + ScopesSupported []string `protobuf:"bytes,5,rep,name=scopes_supported,json=scopesSupported,proto3" json:"scopes_supported,omitempty"` + ResponseTypesSupported []string `protobuf:"bytes,6,rep,name=response_types_supported,json=responseTypesSupported,proto3" json:"response_types_supported,omitempty"` + ResponseModesSupported []string `protobuf:"bytes,7,rep,name=response_modes_supported,json=responseModesSupported,proto3" json:"response_modes_supported,omitempty"` + GrantTypesSupported []string `protobuf:"bytes,8,rep,name=grant_types_supported,json=grantTypesSupported,proto3" json:"grant_types_supported,omitempty"` + AcrValuesSupported []string `protobuf:"bytes,9,rep,name=acr_values_supported,json=acrValuesSupported,proto3" json:"acr_values_supported,omitempty"` + SubjectTypesSupported []string `protobuf:"bytes,10,rep,name=subject_types_supported,json=subjectTypesSupported,proto3" json:"subject_types_supported,omitempty"` +} + +func (x *OpenIDConfig) Reset() { + *x = OpenIDConfig{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *OpenIDConfig) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*OpenIDConfig) ProtoMessage() {} + +// Deprecated: Use OpenIDConfig.ProtoReflect.Descriptor instead. +func (*OpenIDConfig) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{5} +} + +func (x *OpenIDConfig) GetIssuer() string { if x != nil { - return x.Algorithm + return x.Issuer } return "" } -func (x *KeyInfo) GetCurve() string { +func (x *OpenIDConfig) GetAuthorizationEndpoint() string { if x != nil { - return x.Curve + return x.AuthorizationEndpoint } return "" } -func (x *KeyInfo) GetEncoding() string { +func (x *OpenIDConfig) GetTokenEndpoint() string { if x != nil { - return x.Encoding + return x.TokenEndpoint } return "" } +func (x *OpenIDConfig) GetUserinfoEndpoint() string { + if x != nil { + return x.UserinfoEndpoint + } + return "" +} + +func (x *OpenIDConfig) GetScopesSupported() []string { + if x != nil { + return x.ScopesSupported + } + return nil +} + +func (x *OpenIDConfig) GetResponseTypesSupported() []string { + if x != nil { + return x.ResponseTypesSupported + } + return nil +} + +func (x *OpenIDConfig) GetResponseModesSupported() []string { + if x != nil { + return x.ResponseModesSupported + } + return nil +} + +func (x *OpenIDConfig) GetGrantTypesSupported() []string { + if x != nil { + return x.GrantTypesSupported + } + return nil +} + +func (x *OpenIDConfig) GetAcrValuesSupported() []string { + if x != nil { + return x.AcrValuesSupported + } + return nil +} + +func (x *OpenIDConfig) GetSubjectTypesSupported() []string { + if x != nil { + return x.SubjectTypesSupported + } + return nil +} + +// ValidatorInfo defines information for accepted Validator nodes +type ValidatorInfo struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + GrpcEndpoints []*ValidatorInfo_Endpoint `protobuf:"bytes,2,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` + RestEndpoints []*ValidatorInfo_Endpoint `protobuf:"bytes,3,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` + Explorer *ValidatorInfo_ExplorerInfo `protobuf:"bytes,4,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeInfo *ValidatorInfo_FeeInfo `protobuf:"bytes,5,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` + IbcChannel *ValidatorInfo_IBCChannel `protobuf:"bytes,6,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` +} + +func (x *ValidatorInfo) Reset() { + *x = ValidatorInfo{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorInfo) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorInfo) ProtoMessage() {} + +// Deprecated: Use ValidatorInfo.ProtoReflect.Descriptor instead. +func (*ValidatorInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6} +} + +func (x *ValidatorInfo) GetMoniker() string { + if x != nil { + return x.Moniker + } + return "" +} + +func (x *ValidatorInfo) GetGrpcEndpoints() []*ValidatorInfo_Endpoint { + if x != nil { + return x.GrpcEndpoints + } + return nil +} + +func (x *ValidatorInfo) GetRestEndpoints() []*ValidatorInfo_Endpoint { + if x != nil { + return x.RestEndpoints + } + return nil +} + +func (x *ValidatorInfo) GetExplorer() *ValidatorInfo_ExplorerInfo { + if x != nil { + return x.Explorer + } + return nil +} + +func (x *ValidatorInfo) GetFeeInfo() *ValidatorInfo_FeeInfo { + if x != nil { + return x.FeeInfo + } + return nil +} + +func (x *ValidatorInfo) GetIbcChannel() *ValidatorInfo_IBCChannel { + if x != nil { + return x.IbcChannel + } + return nil +} + // Endpoint defines an endpoint -type ChainInfo_Endpoint struct { +type ValidatorInfo_Endpoint struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -6497,34 +8371,34 @@ type ChainInfo_Endpoint struct { IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` } -func (x *ChainInfo_Endpoint) Reset() { - *x = ChainInfo_Endpoint{} +func (x *ValidatorInfo_Endpoint) Reset() { + *x = ValidatorInfo_Endpoint{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[5] + mi := &file_did_v1_genesis_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ChainInfo_Endpoint) String() string { +func (x *ValidatorInfo_Endpoint) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChainInfo_Endpoint) ProtoMessage() {} +func (*ValidatorInfo_Endpoint) ProtoMessage() {} -// Deprecated: Use ChainInfo_Endpoint.ProtoReflect.Descriptor instead. -func (*ChainInfo_Endpoint) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{3, 0} +// Deprecated: Use ValidatorInfo_Endpoint.ProtoReflect.Descriptor instead. +func (*ValidatorInfo_Endpoint) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 0} } -func (x *ChainInfo_Endpoint) GetUrl() string { +func (x *ValidatorInfo_Endpoint) GetUrl() string { if x != nil { return x.Url } return "" } -func (x *ChainInfo_Endpoint) GetIsPrimary() bool { +func (x *ValidatorInfo_Endpoint) GetIsPrimary() bool { if x != nil { return x.IsPrimary } @@ -6532,7 +8406,7 @@ func (x *ChainInfo_Endpoint) GetIsPrimary() bool { } // ExplorerInfo defines the explorer info -type ChainInfo_ExplorerInfo struct { +type ValidatorInfo_ExplorerInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -6541,34 +8415,34 @@ type ChainInfo_ExplorerInfo struct { Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` } -func (x *ChainInfo_ExplorerInfo) Reset() { - *x = ChainInfo_ExplorerInfo{} +func (x *ValidatorInfo_ExplorerInfo) Reset() { + *x = ValidatorInfo_ExplorerInfo{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[6] + mi := &file_did_v1_genesis_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ChainInfo_ExplorerInfo) String() string { +func (x *ValidatorInfo_ExplorerInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChainInfo_ExplorerInfo) ProtoMessage() {} +func (*ValidatorInfo_ExplorerInfo) ProtoMessage() {} -// Deprecated: Use ChainInfo_ExplorerInfo.ProtoReflect.Descriptor instead. -func (*ChainInfo_ExplorerInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{3, 1} +// Deprecated: Use ValidatorInfo_ExplorerInfo.ProtoReflect.Descriptor instead. +func (*ValidatorInfo_ExplorerInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 1} } -func (x *ChainInfo_ExplorerInfo) GetName() string { +func (x *ValidatorInfo_ExplorerInfo) GetName() string { if x != nil { return x.Name } return "" } -func (x *ChainInfo_ExplorerInfo) GetUrl() string { +func (x *ValidatorInfo_ExplorerInfo) GetUrl() string { if x != nil { return x.Url } @@ -6576,7 +8450,7 @@ func (x *ChainInfo_ExplorerInfo) GetUrl() string { } // FeeInfo defines a fee info -type ChainInfo_FeeInfo struct { +type ValidatorInfo_FeeInfo struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -6588,233 +8462,257 @@ type ChainInfo_FeeInfo struct { GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` } -func (x *ChainInfo_FeeInfo) Reset() { - *x = ChainInfo_FeeInfo{} +func (x *ValidatorInfo_FeeInfo) Reset() { + *x = ValidatorInfo_FeeInfo{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_genesis_proto_msgTypes[7] + mi := &file_did_v1_genesis_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ChainInfo_FeeInfo) String() string { +func (x *ValidatorInfo_FeeInfo) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ChainInfo_FeeInfo) ProtoMessage() {} +func (*ValidatorInfo_FeeInfo) ProtoMessage() {} -// Deprecated: Use ChainInfo_FeeInfo.ProtoReflect.Descriptor instead. -func (*ChainInfo_FeeInfo) Descriptor() ([]byte, []int) { - return file_did_v1_genesis_proto_rawDescGZIP(), []int{3, 2} +// Deprecated: Use ValidatorInfo_FeeInfo.ProtoReflect.Descriptor instead. +func (*ValidatorInfo_FeeInfo) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 2} } -func (x *ChainInfo_FeeInfo) GetBaseDenom() string { +func (x *ValidatorInfo_FeeInfo) GetBaseDenom() string { if x != nil { return x.BaseDenom } return "" } -func (x *ChainInfo_FeeInfo) GetFeeRates() []string { +func (x *ValidatorInfo_FeeInfo) GetFeeRates() []string { if x != nil { return x.FeeRates } return nil } -func (x *ChainInfo_FeeInfo) GetInitGasLimit() int32 { +func (x *ValidatorInfo_FeeInfo) GetInitGasLimit() int32 { if x != nil { return x.InitGasLimit } return 0 } -func (x *ChainInfo_FeeInfo) GetIsSimulable() bool { +func (x *ValidatorInfo_FeeInfo) GetIsSimulable() bool { if x != nil { return x.IsSimulable } return false } -func (x *ChainInfo_FeeInfo) GetGasMultiply() float64 { +func (x *ValidatorInfo_FeeInfo) GetGasMultiply() float64 { if x != nil { return x.GasMultiply } return 0 } +// IBCChannel defines the IBC channel info +type ValidatorInfo_IBCChannel struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` +} + +func (x *ValidatorInfo_IBCChannel) Reset() { + *x = ValidatorInfo_IBCChannel{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_genesis_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ValidatorInfo_IBCChannel) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ValidatorInfo_IBCChannel) ProtoMessage() {} + +// Deprecated: Use ValidatorInfo_IBCChannel.ProtoReflect.Descriptor instead. +func (*ValidatorInfo_IBCChannel) Descriptor() ([]byte, []int) { + return file_did_v1_genesis_proto_rawDescGZIP(), []int{6, 3} +} + +func (x *ValidatorInfo_IBCChannel) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *ValidatorInfo_IBCChannel) GetPort() string { + if x != nil { + return x.Port + } + return "" +} + var File_did_v1_genesis_proto protoreflect.FileDescriptor var file_did_v1_genesis_proto_rawDesc = []byte{ 0x0a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, - 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xe6, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, - 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, - 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, - 0x66, 0x6f, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, - 0x63, 0x4b, 0x65, 0x79, 0x73, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, - 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa2, - 0x03, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, - 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x64, 0x65, 0x6e, - 0x6f, 0x6d, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x73, - 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, - 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x6f, 0x72, 0x69, - 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x12, 0x21, 0x0a, 0x0c, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x06, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, - 0x1a, 0x0a, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x05, 0x52, 0x08, 0x64, 0x65, 0x63, 0x69, 0x6d, 0x61, 0x6c, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, - 0x09, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, - 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x63, 0x6f, 0x69, 0x6e, 0x67, 0x65, 0x63, 0x6b, 0x6f, 0x49, 0x64, 0x12, 0x1d, 0x0a, - 0x0a, 0x69, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x09, 0x69, 0x73, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x19, 0x0a, 0x08, - 0x69, 0x62, 0x63, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x69, 0x62, 0x63, 0x50, 0x61, 0x74, 0x68, 0x12, 0x1f, 0x0a, 0x0b, 0x69, 0x62, 0x63, 0x5f, 0x63, - 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x62, - 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x62, 0x63, 0x5f, - 0x70, 0x6f, 0x72, 0x74, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x62, 0x63, 0x50, - 0x6f, 0x72, 0x74, 0x22, 0xc9, 0x05, 0x0a, 0x09, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, - 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x23, 0x0a, 0x0d, 0x62, 0x65, 0x63, 0x68, - 0x33, 0x32, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0c, 0x62, 0x65, 0x63, 0x68, 0x33, 0x32, 0x50, 0x72, 0x65, 0x66, 0x69, 0x78, 0x12, 0x21, 0x0a, - 0x0c, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0b, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x54, 0x69, 0x6d, 0x65, - 0x12, 0x41, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, - 0x6e, 0x74, 0x73, 0x12, 0x41, 0x0a, 0x0e, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, - 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x3a, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, - 0x65, 0x72, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x70, 0x6c, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x11, + 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x1a, 0x16, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, + 0x6e, 0x74, 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, + 0x3c, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, + 0x2c, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0xa1, 0x02, + 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, 0x69, 0x74, + 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x73, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, + 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, + 0x73, 0x74, 0x65, 0x64, 0x41, 0x73, 0x73, 0x65, 0x74, 0x73, 0x12, 0x40, 0x0a, 0x12, 0x77, 0x68, + 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x73, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x43, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x77, 0x68, 0x69, 0x74, 0x65, + 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x73, 0x12, 0x3f, 0x0a, 0x13, + 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, + 0x65, 0x79, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x11, 0x61, 0x6c, 0x6c, 0x6f, + 0x77, 0x65, 0x64, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x39, 0x0a, + 0x0d, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x70, + 0x65, 0x6e, 0x49, 0x44, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x6f, 0x70, 0x65, 0x6e, + 0x69, 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x3a, 0x17, 0x98, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, + 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x0a, 0x64, 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x22, 0xc4, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x12, + 0x14, 0x0a, 0x05, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, + 0x69, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x72, 0x70, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x68, 0x72, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, + 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, + 0x30, 0x0a, 0x0a, 0x61, 0x73, 0x73, 0x65, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x73, 0x73, + 0x65, 0x74, 0x54, 0x79, 0x70, 0x65, 0x52, 0x09, 0x61, 0x73, 0x73, 0x65, 0x74, 0x54, 0x79, 0x70, + 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x19, 0x0a, + 0x08, 0x69, 0x63, 0x6f, 0x6e, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x69, 0x63, 0x6f, 0x6e, 0x55, 0x72, 0x6c, 0x22, 0x99, 0x01, 0x0a, 0x09, 0x43, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x12, 0x35, 0x0a, + 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x15, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, + 0x74, 0x6f, 0x72, 0x73, 0x22, 0xe0, 0x01, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, + 0x12, 0x23, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, + 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x12, 0x32, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, + 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, + 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x26, 0x0a, 0x05, 0x63, 0x75, + 0x72, 0x76, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x43, 0x75, 0x72, 0x76, 0x65, 0x52, 0x05, 0x63, 0x75, 0x72, + 0x76, 0x65, 0x12, 0x23, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, + 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0xee, 0x03, 0x0a, 0x0c, 0x4f, 0x70, 0x65, 0x6e, + 0x49, 0x44, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, + 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, + 0x12, 0x35, 0x0a, 0x16, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x15, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0d, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x2b, + 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x75, 0x73, 0x65, 0x72, 0x69, + 0x6e, 0x66, 0x6f, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, + 0x65, 0x64, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x38, 0x0a, 0x18, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x6d, 0x6f, 0x64, + 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x16, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4d, 0x6f, 0x64, 0x65, + 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x32, 0x0a, 0x15, 0x67, 0x72, + 0x61, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, + 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x13, 0x67, 0x72, 0x61, 0x6e, 0x74, + 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x12, 0x30, + 0x0a, 0x14, 0x61, 0x63, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x5f, 0x73, 0x75, 0x70, + 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x03, 0x28, 0x09, 0x52, 0x12, 0x61, 0x63, + 0x72, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x53, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, + 0x12, 0x36, 0x0a, 0x17, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x73, 0x5f, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x18, 0x0a, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x15, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x54, 0x79, 0x70, 0x65, 0x73, 0x53, + 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x22, 0xcd, 0x05, 0x0a, 0x0d, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x6f, + 0x6e, 0x69, 0x6b, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x6f, 0x6e, + 0x69, 0x6b, 0x65, 0x72, 0x12, 0x45, 0x0a, 0x0e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x65, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, + 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x67, 0x72, + 0x70, 0x63, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x45, 0x0a, 0x0e, 0x72, + 0x65, 0x73, 0x74, 0x5f, 0x65, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, + 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, + 0x69, 0x6e, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x74, 0x73, 0x12, 0x3e, 0x0a, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x65, 0x78, 0x70, 0x6c, 0x6f, 0x72, - 0x65, 0x72, 0x12, 0x34, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x0a, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x68, - 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, - 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x1a, 0x3b, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, - 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, - 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0x34, 0x0a, 0x0c, 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, - 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x1a, 0xb1, 0x01, 0x0a, 0x07, - 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, - 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, - 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, - 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x66, 0x65, 0x65, 0x52, 0x61, - 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, - 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x69, - 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, - 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, - 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, - 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, - 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x22, - 0x7e, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x23, 0x0a, 0x04, 0x6b, 0x69, - 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, 0x14, 0x0a, - 0x05, 0x63, 0x75, 0x72, 0x76, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x63, 0x75, - 0x72, 0x76, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x18, - 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2a, - 0xab, 0x01, 0x0a, 0x0c, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x12, 0x1d, 0x0a, 0x19, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, - 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, - 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, - 0x5f, 0x49, 0x50, 0x46, 0x53, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x44, 0x49, 0x44, 0x5f, 0x4e, - 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x53, 0x4f, 0x4e, 0x52, 0x10, 0x02, 0x12, - 0x19, 0x0a, 0x15, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, - 0x5f, 0x42, 0x49, 0x54, 0x43, 0x4f, 0x49, 0x4e, 0x10, 0x03, 0x12, 0x1a, 0x0a, 0x16, 0x44, 0x49, - 0x44, 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x45, 0x54, 0x48, 0x45, - 0x52, 0x45, 0x55, 0x4d, 0x10, 0x04, 0x12, 0x15, 0x0a, 0x11, 0x44, 0x49, 0x44, 0x5f, 0x4e, 0x41, - 0x4d, 0x45, 0x53, 0x50, 0x41, 0x43, 0x45, 0x5f, 0x49, 0x42, 0x43, 0x10, 0x05, 0x2a, 0xd2, 0x01, - 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x14, 0x4b, 0x45, 0x59, - 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, - 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, - 0x53, 0x45, 0x43, 0x50, 0x32, 0x35, 0x36, 0x4b, 0x31, 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x4b, - 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x44, 0x32, 0x35, 0x35, 0x31, 0x39, 0x10, - 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4b, 0x45, - 0x43, 0x43, 0x41, 0x4b, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, - 0x50, 0x45, 0x5f, 0x42, 0x4c, 0x53, 0x31, 0x32, 0x33, 0x38, 0x31, 0x10, 0x04, 0x12, 0x13, 0x0a, - 0x0f, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x58, 0x32, 0x35, 0x35, 0x31, 0x39, - 0x10, 0x05, 0x12, 0x14, 0x0a, 0x10, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, - 0x43, 0x48, 0x4e, 0x4f, 0x52, 0x52, 0x10, 0x06, 0x12, 0x15, 0x0a, 0x11, 0x4b, 0x45, 0x59, 0x5f, - 0x54, 0x59, 0x50, 0x45, 0x5f, 0x57, 0x45, 0x42, 0x41, 0x55, 0x54, 0x48, 0x4e, 0x10, 0x07, 0x12, - 0x11, 0x0a, 0x0d, 0x4b, 0x45, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x44, 0x4f, - 0x10, 0x08, 0x2a, 0x9f, 0x04, 0x0a, 0x0f, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, - 0x6e, 0x53, 0x63, 0x6f, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x1c, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, - 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x45, 0x52, 0x4d, - 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x42, 0x41, 0x53, - 0x49, 0x43, 0x5f, 0x49, 0x4e, 0x46, 0x4f, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x52, 0x45, - 0x43, 0x4f, 0x52, 0x44, 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x02, 0x12, 0x22, 0x0a, 0x1e, - 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, - 0x5f, 0x52, 0x45, 0x43, 0x4f, 0x52, 0x44, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, - 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x53, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x27, 0x0a, 0x23, 0x50, 0x45, 0x52, 0x4d, - 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, - 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, - 0x05, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, - 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x52, 0x45, - 0x41, 0x44, 0x10, 0x06, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, - 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, - 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x10, 0x07, 0x12, 0x26, 0x0a, 0x22, 0x50, 0x45, 0x52, - 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, - 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x53, 0x55, 0x42, 0x53, 0x43, 0x52, 0x49, 0x42, 0x45, 0x10, - 0x08, 0x12, 0x23, 0x0a, 0x1f, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, - 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x57, 0x41, 0x4c, 0x4c, 0x45, 0x54, 0x53, 0x5f, 0x55, 0x50, - 0x44, 0x41, 0x54, 0x45, 0x10, 0x09, 0x12, 0x28, 0x0a, 0x24, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, - 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, - 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x59, 0x10, 0x0a, - 0x12, 0x2b, 0x0a, 0x27, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, - 0x43, 0x4f, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x4e, 0x53, 0x41, 0x43, 0x54, 0x49, 0x4f, 0x4e, - 0x53, 0x5f, 0x42, 0x52, 0x4f, 0x41, 0x44, 0x43, 0x41, 0x53, 0x54, 0x10, 0x0b, 0x12, 0x1f, 0x0a, - 0x1b, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, 0x50, - 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x55, 0x53, 0x45, 0x52, 0x10, 0x0c, 0x12, 0x24, - 0x0a, 0x20, 0x50, 0x45, 0x52, 0x4d, 0x49, 0x53, 0x53, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x43, 0x4f, - 0x50, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x5f, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x41, 0x54, - 0x4f, 0x52, 0x10, 0x0d, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, - 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, - 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, - 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, - 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, - 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x72, 0x12, 0x38, 0x0a, 0x08, 0x66, 0x65, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, + 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x46, 0x65, 0x65, 0x49, + 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x66, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x41, 0x0a, 0x0b, + 0x69, 0x62, 0x63, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, + 0x61, 0x74, 0x6f, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x49, 0x42, 0x43, 0x43, 0x68, 0x61, 0x6e, + 0x6e, 0x65, 0x6c, 0x52, 0x0a, 0x69, 0x62, 0x63, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x1a, + 0x3b, 0x0a, 0x08, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x75, + 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x1d, 0x0a, + 0x0a, 0x69, 0x73, 0x5f, 0x70, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x08, 0x52, 0x09, 0x69, 0x73, 0x50, 0x72, 0x69, 0x6d, 0x61, 0x72, 0x79, 0x1a, 0x34, 0x0a, 0x0c, + 0x45, 0x78, 0x70, 0x6c, 0x6f, 0x72, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x1a, 0xb1, 0x01, 0x0a, 0x07, 0x46, 0x65, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x1d, + 0x0a, 0x0a, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x62, 0x61, 0x73, 0x65, 0x44, 0x65, 0x6e, 0x6f, 0x6d, 0x12, 0x1b, 0x0a, + 0x09, 0x66, 0x65, 0x65, 0x5f, 0x72, 0x61, 0x74, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x08, 0x66, 0x65, 0x65, 0x52, 0x61, 0x74, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0e, 0x69, 0x6e, + 0x69, 0x74, 0x5f, 0x67, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x05, 0x52, 0x0c, 0x69, 0x6e, 0x69, 0x74, 0x47, 0x61, 0x73, 0x4c, 0x69, 0x6d, 0x69, 0x74, + 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x73, 0x69, 0x6d, 0x75, 0x6c, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x69, 0x73, 0x53, 0x69, 0x6d, 0x75, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x67, 0x61, 0x73, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, + 0x70, 0x6c, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x01, 0x52, 0x0b, 0x67, 0x61, 0x73, 0x4d, 0x75, + 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x79, 0x1a, 0x30, 0x0a, 0x0a, 0x49, 0x42, 0x43, 0x43, 0x68, 0x61, + 0x6e, 0x6e, 0x65, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x42, 0x7c, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, + 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 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 ( @@ -6829,36 +8727,49 @@ func file_did_v1_genesis_proto_rawDescGZIP() []byte { return file_did_v1_genesis_proto_rawDescData } -var file_did_v1_genesis_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_did_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 11) var file_did_v1_genesis_proto_goTypes = []interface{}{ - (DIDNamespace)(0), // 0: did.v1.DIDNamespace - (KeyType)(0), // 1: did.v1.KeyType - (PermissionScope)(0), // 2: did.v1.PermissionScope - (*GenesisState)(nil), // 3: did.v1.GenesisState - (*Params)(nil), // 4: did.v1.Params - (*AssetInfo)(nil), // 5: did.v1.AssetInfo - (*ChainInfo)(nil), // 6: did.v1.ChainInfo - (*KeyInfo)(nil), // 7: did.v1.KeyInfo - (*ChainInfo_Endpoint)(nil), // 8: did.v1.ChainInfo.Endpoint - (*ChainInfo_ExplorerInfo)(nil), // 9: did.v1.ChainInfo.ExplorerInfo - (*ChainInfo_FeeInfo)(nil), // 10: did.v1.ChainInfo.FeeInfo + (*GenesisState)(nil), // 0: did.v1.GenesisState + (*Params)(nil), // 1: did.v1.Params + (*AssetInfo)(nil), // 2: did.v1.AssetInfo + (*ChainInfo)(nil), // 3: did.v1.ChainInfo + (*KeyInfo)(nil), // 4: did.v1.KeyInfo + (*OpenIDConfig)(nil), // 5: did.v1.OpenIDConfig + (*ValidatorInfo)(nil), // 6: did.v1.ValidatorInfo + (*ValidatorInfo_Endpoint)(nil), // 7: did.v1.ValidatorInfo.Endpoint + (*ValidatorInfo_ExplorerInfo)(nil), // 8: did.v1.ValidatorInfo.ExplorerInfo + (*ValidatorInfo_FeeInfo)(nil), // 9: did.v1.ValidatorInfo.FeeInfo + (*ValidatorInfo_IBCChannel)(nil), // 10: did.v1.ValidatorInfo.IBCChannel + (AssetType)(0), // 11: did.v1.AssetType + (KeyRole)(0), // 12: did.v1.KeyRole + (KeyAlgorithm)(0), // 13: did.v1.KeyAlgorithm + (KeyEncoding)(0), // 14: did.v1.KeyEncoding + (KeyCurve)(0), // 15: did.v1.KeyCurve + (KeyType)(0), // 16: did.v1.KeyType } var file_did_v1_genesis_proto_depIdxs = []int32{ - 4, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params - 5, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo - 6, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo - 7, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.KeyInfo - 8, // 4: did.v1.ChainInfo.grpc_endpoints:type_name -> did.v1.ChainInfo.Endpoint - 8, // 5: did.v1.ChainInfo.rest_endpoints:type_name -> did.v1.ChainInfo.Endpoint - 9, // 6: did.v1.ChainInfo.explorer:type_name -> did.v1.ChainInfo.ExplorerInfo - 10, // 7: did.v1.ChainInfo.fee_info:type_name -> did.v1.ChainInfo.FeeInfo - 1, // 8: did.v1.KeyInfo.kind:type_name -> did.v1.KeyType - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name + 1, // 0: did.v1.GenesisState.params:type_name -> did.v1.Params + 2, // 1: did.v1.Params.whitelisted_assets:type_name -> did.v1.AssetInfo + 3, // 2: did.v1.Params.whitelisted_chains:type_name -> did.v1.ChainInfo + 4, // 3: did.v1.Params.allowed_public_keys:type_name -> did.v1.KeyInfo + 5, // 4: did.v1.Params.openid_config:type_name -> did.v1.OpenIDConfig + 11, // 5: did.v1.AssetInfo.asset_type:type_name -> did.v1.AssetType + 6, // 6: did.v1.ChainInfo.validators:type_name -> did.v1.ValidatorInfo + 12, // 7: did.v1.KeyInfo.role:type_name -> did.v1.KeyRole + 13, // 8: did.v1.KeyInfo.algorithm:type_name -> did.v1.KeyAlgorithm + 14, // 9: did.v1.KeyInfo.encoding:type_name -> did.v1.KeyEncoding + 15, // 10: did.v1.KeyInfo.curve:type_name -> did.v1.KeyCurve + 16, // 11: did.v1.KeyInfo.type:type_name -> did.v1.KeyType + 7, // 12: did.v1.ValidatorInfo.grpc_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint + 7, // 13: did.v1.ValidatorInfo.rest_endpoints:type_name -> did.v1.ValidatorInfo.Endpoint + 8, // 14: did.v1.ValidatorInfo.explorer:type_name -> did.v1.ValidatorInfo.ExplorerInfo + 9, // 15: did.v1.ValidatorInfo.fee_info:type_name -> did.v1.ValidatorInfo.FeeInfo + 10, // 16: did.v1.ValidatorInfo.ibc_channel:type_name -> did.v1.ValidatorInfo.IBCChannel + 17, // [17:17] is the sub-list for method output_type + 17, // [17:17] is the sub-list for method input_type + 17, // [17:17] is the sub-list for extension type_name + 17, // [17:17] is the sub-list for extension extendee + 0, // [0:17] is the sub-list for field type_name } func init() { file_did_v1_genesis_proto_init() } @@ -6866,6 +8777,7 @@ func file_did_v1_genesis_proto_init() { if File_did_v1_genesis_proto != nil { return } + file_did_v1_constants_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { @@ -6928,7 +8840,7 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainInfo_Endpoint); i { + switch v := v.(*OpenIDConfig); i { case 0: return &v.state case 1: @@ -6940,7 +8852,7 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainInfo_ExplorerInfo); i { + switch v := v.(*ValidatorInfo); i { case 0: return &v.state case 1: @@ -6952,7 +8864,43 @@ func file_did_v1_genesis_proto_init() { } } file_did_v1_genesis_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ChainInfo_FeeInfo); i { + switch v := v.(*ValidatorInfo_Endpoint); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorInfo_ExplorerInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorInfo_FeeInfo); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_genesis_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ValidatorInfo_IBCChannel); i { case 0: return &v.state case 1: @@ -6969,14 +8917,13 @@ func file_did_v1_genesis_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_genesis_proto_rawDesc, - NumEnums: 3, - NumMessages: 8, + NumEnums: 0, + NumMessages: 11, NumExtensions: 0, NumServices: 0, }, GoTypes: file_did_v1_genesis_proto_goTypes, DependencyIndexes: file_did_v1_genesis_proto_depIdxs, - EnumInfos: file_did_v1_genesis_proto_enumTypes, MessageInfos: file_did_v1_genesis_proto_msgTypes, }.Build() File_did_v1_genesis_proto = out.File diff --git a/api/did/v1/models.pulsar.go b/api/did/v1/models.pulsar.go index b658f5f8c..46371f374 100644 --- a/api/did/v1/models.pulsar.go +++ b/api/did/v1/models.pulsar.go @@ -4,6 +4,7 @@ package didv1 import ( fmt "fmt" runtime "github.com/cosmos/cosmos-proto/runtime" + _ "github.com/cosmos/gogoproto/gogoproto" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoiface "google.golang.org/protobuf/runtime/protoiface" protoimpl "google.golang.org/protobuf/runtime/protoimpl" @@ -13,80 +14,26 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_DID_5_list)(nil) - -type _DID_5_list struct { - list *[]string -} - -func (x *_DID_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_DID_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_DID_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_DID_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_DID_5_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message DID at list field Paths as it is not of Message kind")) -} - -func (x *_DID_5_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_DID_5_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_DID_5_list) IsValid() bool { - return x.list != nil -} - var ( - md_DID protoreflect.MessageDescriptor - fd_DID_id protoreflect.FieldDescriptor - fd_DID_method protoreflect.FieldDescriptor - fd_DID_network protoreflect.FieldDescriptor - fd_DID_identifier protoreflect.FieldDescriptor - fd_DID_paths protoreflect.FieldDescriptor + md_Accumulator protoreflect.MessageDescriptor + fd_Accumulator_accumulator protoreflect.FieldDescriptor ) func init() { file_did_v1_models_proto_init() - md_DID = File_did_v1_models_proto.Messages().ByName("DID") - fd_DID_id = md_DID.Fields().ByName("id") - fd_DID_method = md_DID.Fields().ByName("method") - fd_DID_network = md_DID.Fields().ByName("network") - fd_DID_identifier = md_DID.Fields().ByName("identifier") - fd_DID_paths = md_DID.Fields().ByName("paths") + md_Accumulator = File_did_v1_models_proto.Messages().ByName("Accumulator") + fd_Accumulator_accumulator = md_Accumulator.Fields().ByName("accumulator") } -var _ protoreflect.Message = (*fastReflection_DID)(nil) +var _ protoreflect.Message = (*fastReflection_Accumulator)(nil) -type fastReflection_DID DID +type fastReflection_Accumulator Accumulator -func (x *DID) ProtoReflect() protoreflect.Message { - return (*fastReflection_DID)(x) +func (x *Accumulator) ProtoReflect() protoreflect.Message { + return (*fastReflection_Accumulator)(x) } -func (x *DID) slowProtoReflect() protoreflect.Message { +func (x *Accumulator) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_models_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -98,43 +45,43 @@ func (x *DID) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_DID_messageType fastReflection_DID_messageType -var _ protoreflect.MessageType = fastReflection_DID_messageType{} +var _fastReflection_Accumulator_messageType fastReflection_Accumulator_messageType +var _ protoreflect.MessageType = fastReflection_Accumulator_messageType{} -type fastReflection_DID_messageType struct{} +type fastReflection_Accumulator_messageType struct{} -func (x fastReflection_DID_messageType) Zero() protoreflect.Message { - return (*fastReflection_DID)(nil) +func (x fastReflection_Accumulator_messageType) Zero() protoreflect.Message { + return (*fastReflection_Accumulator)(nil) } -func (x fastReflection_DID_messageType) New() protoreflect.Message { - return new(fastReflection_DID) +func (x fastReflection_Accumulator_messageType) New() protoreflect.Message { + return new(fastReflection_Accumulator) } -func (x fastReflection_DID_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_DID +func (x fastReflection_Accumulator_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Accumulator } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_DID) Descriptor() protoreflect.MessageDescriptor { - return md_DID +func (x *fastReflection_Accumulator) Descriptor() protoreflect.MessageDescriptor { + return md_Accumulator } // 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_DID) Type() protoreflect.MessageType { - return _fastReflection_DID_messageType +func (x *fastReflection_Accumulator) Type() protoreflect.MessageType { + return _fastReflection_Accumulator_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_DID) New() protoreflect.Message { - return new(fastReflection_DID) +func (x *fastReflection_Accumulator) New() protoreflect.Message { + return new(fastReflection_Accumulator) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_DID) Interface() protoreflect.ProtoMessage { - return (*DID)(x) +func (x *fastReflection_Accumulator) Interface() protoreflect.ProtoMessage { + return (*Accumulator)(x) } // Range iterates over every populated field in an undefined order, @@ -142,34 +89,10 @@ func (x *fastReflection_DID) 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_DID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Id != "" { - value := protoreflect.ValueOfString(x.Id) - if !f(fd_DID_id, value) { - return - } - } - if x.Method != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) - if !f(fd_DID_method, value) { - return - } - } - if x.Network != "" { - value := protoreflect.ValueOfString(x.Network) - if !f(fd_DID_network, value) { - return - } - } - if x.Identifier != "" { - value := protoreflect.ValueOfString(x.Identifier) - if !f(fd_DID_identifier, value) { - return - } - } - if len(x.Paths) != 0 { - value := protoreflect.ValueOfList(&_DID_5_list{list: &x.Paths}) - if !f(fd_DID_paths, value) { +func (x *fastReflection_Accumulator) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Accumulator) != 0 { + value := protoreflect.ValueOfBytes(x.Accumulator) + if !f(fd_Accumulator_accumulator, value) { return } } @@ -186,23 +109,15 @@ func (x *fastReflection_DID) Range(f func(protoreflect.FieldDescriptor, protoref // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_DID) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_Accumulator) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.DID.id": - return x.Id != "" - case "did.v1.DID.method": - return x.Method != 0 - case "did.v1.DID.network": - return x.Network != "" - case "did.v1.DID.identifier": - return x.Identifier != "" - case "did.v1.DID.paths": - return len(x.Paths) != 0 + case "did.v1.Accumulator.accumulator": + return len(x.Accumulator) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) } - panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) } } @@ -212,23 +127,15 @@ func (x *fastReflection_DID) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DID) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_Accumulator) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.DID.id": - x.Id = "" - case "did.v1.DID.method": - x.Method = 0 - case "did.v1.DID.network": - x.Network = "" - case "did.v1.DID.identifier": - x.Identifier = "" - case "did.v1.DID.paths": - x.Paths = nil + case "did.v1.Accumulator.accumulator": + x.Accumulator = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) } - panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) } } @@ -238,31 +145,16 @@ func (x *fastReflection_DID) 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_DID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Accumulator) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.DID.id": - value := x.Id - return protoreflect.ValueOfString(value) - case "did.v1.DID.method": - value := x.Method - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.DID.network": - value := x.Network - return protoreflect.ValueOfString(value) - case "did.v1.DID.identifier": - value := x.Identifier - return protoreflect.ValueOfString(value) - case "did.v1.DID.paths": - if len(x.Paths) == 0 { - return protoreflect.ValueOfList(&_DID_5_list{}) - } - listValue := &_DID_5_list{list: &x.Paths} - return protoreflect.ValueOfList(listValue) + case "did.v1.Accumulator.accumulator": + value := x.Accumulator + return protoreflect.ValueOfBytes(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) } - panic(fmt.Errorf("message did.v1.DID does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", descriptor.FullName())) } } @@ -276,25 +168,15 @@ func (x *fastReflection_DID) Get(descriptor protoreflect.FieldDescriptor) protor // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_Accumulator) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.DID.id": - x.Id = value.Interface().(string) - case "did.v1.DID.method": - x.Method = (DIDNamespace)(value.Enum()) - case "did.v1.DID.network": - x.Network = value.Interface().(string) - case "did.v1.DID.identifier": - x.Identifier = value.Interface().(string) - case "did.v1.DID.paths": - lv := value.List() - clv := lv.(*_DID_5_list) - x.Paths = *clv.list + case "did.v1.Accumulator.accumulator": + x.Accumulator = value.Bytes() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) } - panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Accumulator does not contain field %s", fd.FullName())) } } @@ -308,61 +190,40 @@ func (x *fastReflection_DID) Set(fd protoreflect.FieldDescriptor, value protoref // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_DID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Accumulator) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.DID.paths": - if x.Paths == nil { - x.Paths = []string{} - } - value := &_DID_5_list{list: &x.Paths} - return protoreflect.ValueOfList(value) - case "did.v1.DID.id": - panic(fmt.Errorf("field id of message did.v1.DID is not mutable")) - case "did.v1.DID.method": - panic(fmt.Errorf("field method of message did.v1.DID is not mutable")) - case "did.v1.DID.network": - panic(fmt.Errorf("field network of message did.v1.DID is not mutable")) - case "did.v1.DID.identifier": - panic(fmt.Errorf("field identifier of message did.v1.DID is not mutable")) + case "did.v1.Accumulator.accumulator": + panic(fmt.Errorf("field accumulator of message did.v1.Accumulator is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) } - panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Accumulator 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_DID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_Accumulator) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.DID.id": - return protoreflect.ValueOfString("") - case "did.v1.DID.method": - return protoreflect.ValueOfEnum(0) - case "did.v1.DID.network": - return protoreflect.ValueOfString("") - case "did.v1.DID.identifier": - return protoreflect.ValueOfString("") - case "did.v1.DID.paths": - list := []string{} - return protoreflect.ValueOfList(&_DID_5_list{list: &list}) + case "did.v1.Accumulator.accumulator": + return protoreflect.ValueOfBytes(nil) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Accumulator")) } - panic(fmt.Errorf("message did.v1.DID does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.Accumulator 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_DID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_Accumulator) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.DID", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.Accumulator", d.FullName())) } panic("unreachable") } @@ -370,7 +231,7 @@ func (x *fastReflection_DID) WhichOneof(d protoreflect.OneofDescriptor) protoref // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_DID) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_Accumulator) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -381,7 +242,7 @@ func (x *fastReflection_DID) 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_DID) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_Accumulator) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -393,7 +254,7 @@ func (x *fastReflection_DID) 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_DID) IsValid() bool { +func (x *fastReflection_Accumulator) IsValid() bool { return x != nil } @@ -403,9 +264,9 @@ func (x *fastReflection_DID) 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_DID) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_Accumulator) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*DID) + x := input.Message.Interface().(*Accumulator) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -417,27 +278,10 @@ func (x *fastReflection_DID) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - l = len(x.Id) + l = len(x.Accumulator) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Method != 0 { - n += 1 + runtime.Sov(uint64(x.Method)) - } - l = len(x.Network) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Identifier) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Paths) > 0 { - for _, s := range x.Paths { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -448,7 +292,7 @@ func (x *fastReflection_DID) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*DID) + x := input.Message.Interface().(*Accumulator) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -467,38 +311,10 @@ func (x *fastReflection_DID) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Paths) > 0 { - for iNdEx := len(x.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Paths[iNdEx]) - copy(dAtA[i:], x.Paths[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Paths[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Identifier) > 0 { - i -= len(x.Identifier) - copy(dAtA[i:], x.Identifier) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) - i-- - dAtA[i] = 0x22 - } - if len(x.Network) > 0 { - i -= len(x.Network) - copy(dAtA[i:], x.Network) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Network))) - i-- - dAtA[i] = 0x1a - } - if x.Method != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) - i-- - dAtA[i] = 0x10 - } - if len(x.Id) > 0 { - i -= len(x.Id) - copy(dAtA[i:], x.Id) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + if len(x.Accumulator) > 0 { + i -= len(x.Accumulator) + copy(dAtA[i:], x.Accumulator) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Accumulator))) i-- dAtA[i] = 0xa } @@ -513,7 +329,7 @@ func (x *fastReflection_DID) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*DID) + x := input.Message.Interface().(*Accumulator) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -545,17 +361,17 @@ func (x *fastReflection_DID) 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: DID: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Accumulator: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DID: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Accumulator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -565,138 +381,25 @@ func (x *fastReflection_DID) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + intStringLen + 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.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + x.Accumulator = append(x.Accumulator[:0], dAtA[iNdEx:postIndex]...) + if x.Accumulator == nil { + x.Accumulator = []byte{} } - x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", 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.Network = 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 Identifier", 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.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Paths", 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.Paths = append(x.Paths, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -1535,6 +1238,726 @@ func (x *fastReflection_Credential) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_DID_5_list)(nil) + +type _DID_5_list struct { + list *[]string +} + +func (x *_DID_5_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_DID_5_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_DID_5_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_DID_5_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_DID_5_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message DID at list field Paths as it is not of Message kind")) +} + +func (x *_DID_5_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_DID_5_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_DID_5_list) IsValid() bool { + return x.list != nil +} + +var ( + md_DID protoreflect.MessageDescriptor + fd_DID_method protoreflect.FieldDescriptor + fd_DID_network protoreflect.FieldDescriptor + fd_DID_subject protoreflect.FieldDescriptor + fd_DID_identifier protoreflect.FieldDescriptor + fd_DID_paths protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_DID = File_did_v1_models_proto.Messages().ByName("DID") + fd_DID_method = md_DID.Fields().ByName("method") + fd_DID_network = md_DID.Fields().ByName("network") + fd_DID_subject = md_DID.Fields().ByName("subject") + fd_DID_identifier = md_DID.Fields().ByName("identifier") + fd_DID_paths = md_DID.Fields().ByName("paths") +} + +var _ protoreflect.Message = (*fastReflection_DID)(nil) + +type fastReflection_DID DID + +func (x *DID) ProtoReflect() protoreflect.Message { + return (*fastReflection_DID)(x) +} + +func (x *DID) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_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_DID_messageType fastReflection_DID_messageType +var _ protoreflect.MessageType = fastReflection_DID_messageType{} + +type fastReflection_DID_messageType struct{} + +func (x fastReflection_DID_messageType) Zero() protoreflect.Message { + return (*fastReflection_DID)(nil) +} +func (x fastReflection_DID_messageType) New() protoreflect.Message { + return new(fastReflection_DID) +} +func (x fastReflection_DID_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_DID +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_DID) Descriptor() protoreflect.MessageDescriptor { + return md_DID +} + +// 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_DID) Type() protoreflect.MessageType { + return _fastReflection_DID_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_DID) New() protoreflect.Message { + return new(fastReflection_DID) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_DID) Interface() protoreflect.ProtoMessage { + return (*DID)(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_DID) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Method != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) + if !f(fd_DID_method, value) { + return + } + } + if x.Network != "" { + value := protoreflect.ValueOfString(x.Network) + if !f(fd_DID_network, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_DID_subject, value) { + return + } + } + if x.Identifier != "" { + value := protoreflect.ValueOfString(x.Identifier) + if !f(fd_DID_identifier, value) { + return + } + } + if len(x.Paths) != 0 { + value := protoreflect.ValueOfList(&_DID_5_list{list: &x.Paths}) + if !f(fd_DID_paths, 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_DID) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.DID.method": + return x.Method != 0 + case "did.v1.DID.network": + return x.Network != "" + case "did.v1.DID.subject": + return x.Subject != "" + case "did.v1.DID.identifier": + return x.Identifier != "" + case "did.v1.DID.paths": + return len(x.Paths) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + } + panic(fmt.Errorf("message did.v1.DID 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_DID) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.DID.method": + x.Method = 0 + case "did.v1.DID.network": + x.Network = "" + case "did.v1.DID.subject": + x.Subject = "" + case "did.v1.DID.identifier": + x.Identifier = "" + case "did.v1.DID.paths": + x.Paths = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + } + panic(fmt.Errorf("message did.v1.DID 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_DID) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.DID.method": + value := x.Method + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.DID.network": + value := x.Network + return protoreflect.ValueOfString(value) + case "did.v1.DID.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.DID.identifier": + value := x.Identifier + return protoreflect.ValueOfString(value) + case "did.v1.DID.paths": + if len(x.Paths) == 0 { + return protoreflect.ValueOfList(&_DID_5_list{}) + } + listValue := &_DID_5_list{list: &x.Paths} + return protoreflect.ValueOfList(listValue) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + } + panic(fmt.Errorf("message did.v1.DID 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_DID) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.DID.method": + x.Method = (DIDNamespace)(value.Enum()) + case "did.v1.DID.network": + x.Network = value.Interface().(string) + case "did.v1.DID.subject": + x.Subject = value.Interface().(string) + case "did.v1.DID.identifier": + x.Identifier = value.Interface().(string) + case "did.v1.DID.paths": + lv := value.List() + clv := lv.(*_DID_5_list) + x.Paths = *clv.list + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + } + panic(fmt.Errorf("message did.v1.DID 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_DID) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.DID.paths": + if x.Paths == nil { + x.Paths = []string{} + } + value := &_DID_5_list{list: &x.Paths} + return protoreflect.ValueOfList(value) + case "did.v1.DID.method": + panic(fmt.Errorf("field method of message did.v1.DID is not mutable")) + case "did.v1.DID.network": + panic(fmt.Errorf("field network of message did.v1.DID is not mutable")) + case "did.v1.DID.subject": + panic(fmt.Errorf("field subject of message did.v1.DID is not mutable")) + case "did.v1.DID.identifier": + panic(fmt.Errorf("field identifier of message did.v1.DID is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + } + panic(fmt.Errorf("message did.v1.DID 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_DID) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.DID.method": + return protoreflect.ValueOfEnum(0) + case "did.v1.DID.network": + return protoreflect.ValueOfString("") + case "did.v1.DID.subject": + return protoreflect.ValueOfString("") + case "did.v1.DID.identifier": + return protoreflect.ValueOfString("") + case "did.v1.DID.paths": + list := []string{} + return protoreflect.ValueOfList(&_DID_5_list{list: &list}) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.DID")) + } + panic(fmt.Errorf("message did.v1.DID 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_DID) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.DID", 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_DID) 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_DID) 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_DID) 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_DID) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*DID) + 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.Method != 0 { + n += 1 + runtime.Sov(uint64(x.Method)) + } + l = len(x.Network) + 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.Identifier) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Paths) > 0 { + for _, s := range x.Paths { + l = len(s) + 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().(*DID) + 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.Paths) > 0 { + for iNdEx := len(x.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Paths[iNdEx]) + copy(dAtA[i:], x.Paths[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Paths[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(x.Identifier) > 0 { + i -= len(x.Identifier) + copy(dAtA[i:], x.Identifier) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Identifier))) + 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.Network) > 0 { + i -= len(x.Network) + copy(dAtA[i:], x.Network) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Network))) + i-- + dAtA[i] = 0x12 + } + if x.Method != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) + 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().(*DID) + 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: DID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: DID: 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 Method", wireType) + } + x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Network", 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.Network = 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 Identifier", 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.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Paths", 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.Paths = append(x.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + var _ protoreflect.List = (*_Document_2_list)(nil) type _Document_2_list struct { @@ -1770,6 +2193,52 @@ func (x *_Document_8_list) IsValid() bool { return x.list != nil } +var _ protoreflect.List = (*_Document_9_list)(nil) + +type _Document_9_list struct { + list *[]string +} + +func (x *_Document_9_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Document_9_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Document_9_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Document_9_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Document_9_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Document at list field Service as it is not of Message kind")) +} + +func (x *_Document_9_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Document_9_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Document_9_list) IsValid() bool { + return x.list != nil +} + var ( md_Document protoreflect.MessageDescriptor fd_Document_id protoreflect.FieldDescriptor @@ -1778,6 +2247,7 @@ var ( fd_Document_assertion_method protoreflect.FieldDescriptor fd_Document_capability_delegation protoreflect.FieldDescriptor fd_Document_capability_invocation protoreflect.FieldDescriptor + fd_Document_service protoreflect.FieldDescriptor ) func init() { @@ -1789,6 +2259,7 @@ func init() { fd_Document_assertion_method = md_Document.Fields().ByName("assertion_method") fd_Document_capability_delegation = md_Document.Fields().ByName("capability_delegation") fd_Document_capability_invocation = md_Document.Fields().ByName("capability_invocation") + fd_Document_service = md_Document.Fields().ByName("service") } var _ protoreflect.Message = (*fastReflection_Document)(nil) @@ -1800,7 +2271,7 @@ func (x *Document) ProtoReflect() protoreflect.Message { } func (x *Document) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[2] + mi := &file_did_v1_models_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1892,6 +2363,12 @@ func (x *fastReflection_Document) Range(f func(protoreflect.FieldDescriptor, pro return } } + if len(x.Service) != 0 { + value := protoreflect.ValueOfList(&_Document_9_list{list: &x.Service}) + if !f(fd_Document_service, value) { + return + } + } } // Has reports whether a field is populated. @@ -1919,6 +2396,8 @@ func (x *fastReflection_Document) Has(fd protoreflect.FieldDescriptor) bool { return len(x.CapabilityDelegation) != 0 case "did.v1.Document.capability_invocation": return len(x.CapabilityInvocation) != 0 + case "did.v1.Document.service": + return len(x.Service) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -1947,6 +2426,8 @@ func (x *fastReflection_Document) Clear(fd protoreflect.FieldDescriptor) { x.CapabilityDelegation = nil case "did.v1.Document.capability_invocation": x.CapabilityInvocation = nil + case "did.v1.Document.service": + x.Service = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -1996,6 +2477,12 @@ func (x *fastReflection_Document) Get(descriptor protoreflect.FieldDescriptor) p } listValue := &_Document_8_list{list: &x.CapabilityInvocation} return protoreflect.ValueOfList(listValue) + case "did.v1.Document.service": + if len(x.Service) == 0 { + return protoreflect.ValueOfList(&_Document_9_list{}) + } + listValue := &_Document_9_list{list: &x.Service} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -2038,6 +2525,10 @@ func (x *fastReflection_Document) Set(fd protoreflect.FieldDescriptor, value pro lv := value.List() clv := lv.(*_Document_8_list) x.CapabilityInvocation = *clv.list + case "did.v1.Document.service": + lv := value.List() + clv := lv.(*_Document_9_list) + x.Service = *clv.list default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -2088,6 +2579,12 @@ func (x *fastReflection_Document) Mutable(fd protoreflect.FieldDescriptor) proto } value := &_Document_8_list{list: &x.CapabilityInvocation} return protoreflect.ValueOfList(value) + case "did.v1.Document.service": + if x.Service == nil { + x.Service = []string{} + } + value := &_Document_9_list{list: &x.Service} + return protoreflect.ValueOfList(value) case "did.v1.Document.id": panic(fmt.Errorf("field id of message did.v1.Document is not mutable")) default: @@ -2120,6 +2617,9 @@ func (x *fastReflection_Document) NewField(fd protoreflect.FieldDescriptor) prot case "did.v1.Document.capability_invocation": list := []string{} return protoreflect.ValueOfList(&_Document_8_list{list: &list}) + case "did.v1.Document.service": + list := []string{} + return protoreflect.ValueOfList(&_Document_9_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Document")) @@ -2223,6 +2723,12 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } + if len(x.Service) > 0 { + for _, s := range x.Service { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2252,6 +2758,15 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Service) > 0 { + for iNdEx := len(x.Service) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Service[iNdEx]) + copy(dAtA[i:], x.Service[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Service[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } if len(x.CapabilityInvocation) > 0 { for iNdEx := len(x.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.CapabilityInvocation[iNdEx]) @@ -2554,6 +3069,38 @@ func (x *fastReflection_Document) ProtoMethods() *protoiface.Methods { } x.CapabilityInvocation = append(x.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 9: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", 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.Service = append(x.Service, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2785,7 +3332,7 @@ func (x *Metadata) ProtoReflect() protoreflect.Message { } func (x *Metadata) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[3] + mi := &file_did_v1_models_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3753,7 +4300,7 @@ func (x *Permissions) ProtoReflect() protoreflect.Message { } func (x *Permissions) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[4] + mi := &file_did_v1_models_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4343,116 +4890,12 @@ func (x *fastReflection_Permissions) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.List = (*_Profile_4_list)(nil) - -type _Profile_4_list struct { - list *[]*Credential -} - -func (x *_Profile_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Profile_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Profile_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - (*x.list)[i] = concreteValue -} - -func (x *_Profile_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Credential) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Profile_4_list) AppendMutable() protoreflect.Value { - v := new(Credential) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Profile_4_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Profile_4_list) NewElement() protoreflect.Value { - v := new(Credential) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Profile_4_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_Profile_5_list)(nil) - -type _Profile_5_list struct { - list *[]*VerificationMethod -} - -func (x *_Profile_5_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Profile_5_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Profile_5_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - (*x.list)[i] = concreteValue -} - -func (x *_Profile_5_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Profile_5_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Profile_5_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Profile_5_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Profile_5_list) IsValid() bool { - return x.list != nil -} - var ( - md_Profile protoreflect.MessageDescriptor - fd_Profile_id protoreflect.FieldDescriptor - fd_Profile_subject protoreflect.FieldDescriptor - fd_Profile_controller protoreflect.FieldDescriptor - fd_Profile_credentials protoreflect.FieldDescriptor - fd_Profile_attestations protoreflect.FieldDescriptor - fd_Profile_metadata protoreflect.FieldDescriptor + md_Profile protoreflect.MessageDescriptor + fd_Profile_id protoreflect.FieldDescriptor + fd_Profile_subject protoreflect.FieldDescriptor + fd_Profile_controller protoreflect.FieldDescriptor + fd_Profile_metadata protoreflect.FieldDescriptor ) func init() { @@ -4461,8 +4904,6 @@ func init() { fd_Profile_id = md_Profile.Fields().ByName("id") fd_Profile_subject = md_Profile.Fields().ByName("subject") fd_Profile_controller = md_Profile.Fields().ByName("controller") - fd_Profile_credentials = md_Profile.Fields().ByName("credentials") - fd_Profile_attestations = md_Profile.Fields().ByName("attestations") fd_Profile_metadata = md_Profile.Fields().ByName("metadata") } @@ -4475,7 +4916,7 @@ func (x *Profile) ProtoReflect() protoreflect.Message { } func (x *Profile) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[5] + mi := &file_did_v1_models_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4549,18 +4990,6 @@ func (x *fastReflection_Profile) Range(f func(protoreflect.FieldDescriptor, prot return } } - if len(x.Credentials) != 0 { - value := protoreflect.ValueOfList(&_Profile_4_list{list: &x.Credentials}) - if !f(fd_Profile_credentials, value) { - return - } - } - if len(x.Attestations) != 0 { - value := protoreflect.ValueOfList(&_Profile_5_list{list: &x.Attestations}) - if !f(fd_Profile_attestations, value) { - return - } - } if x.Metadata != nil { value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) if !f(fd_Profile_metadata, value) { @@ -4588,10 +5017,6 @@ func (x *fastReflection_Profile) Has(fd protoreflect.FieldDescriptor) bool { return x.Subject != "" case "did.v1.Profile.controller": return x.Controller != "" - case "did.v1.Profile.credentials": - return len(x.Credentials) != 0 - case "did.v1.Profile.attestations": - return len(x.Attestations) != 0 case "did.v1.Profile.metadata": return x.Metadata != nil default: @@ -4616,10 +5041,6 @@ func (x *fastReflection_Profile) Clear(fd protoreflect.FieldDescriptor) { x.Subject = "" case "did.v1.Profile.controller": x.Controller = "" - case "did.v1.Profile.credentials": - x.Credentials = nil - case "did.v1.Profile.attestations": - x.Attestations = nil case "did.v1.Profile.metadata": x.Metadata = nil default: @@ -4647,18 +5068,6 @@ func (x *fastReflection_Profile) Get(descriptor protoreflect.FieldDescriptor) pr case "did.v1.Profile.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Profile.credentials": - if len(x.Credentials) == 0 { - return protoreflect.ValueOfList(&_Profile_4_list{}) - } - listValue := &_Profile_4_list{list: &x.Credentials} - return protoreflect.ValueOfList(listValue) - case "did.v1.Profile.attestations": - if len(x.Attestations) == 0 { - return protoreflect.ValueOfList(&_Profile_5_list{}) - } - listValue := &_Profile_5_list{list: &x.Attestations} - return protoreflect.ValueOfList(listValue) case "did.v1.Profile.metadata": value := x.Metadata return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -4688,14 +5097,6 @@ func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value prot x.Subject = value.Interface().(string) case "did.v1.Profile.controller": x.Controller = value.Interface().(string) - case "did.v1.Profile.credentials": - lv := value.List() - clv := lv.(*_Profile_4_list) - x.Credentials = *clv.list - case "did.v1.Profile.attestations": - lv := value.List() - clv := lv.(*_Profile_5_list) - x.Attestations = *clv.list case "did.v1.Profile.metadata": x.Metadata = value.Message().Interface().(*Metadata) default: @@ -4718,18 +5119,6 @@ func (x *fastReflection_Profile) Set(fd protoreflect.FieldDescriptor, value prot // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Profile) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Profile.credentials": - if x.Credentials == nil { - x.Credentials = []*Credential{} - } - value := &_Profile_4_list{list: &x.Credentials} - return protoreflect.ValueOfList(value) - case "did.v1.Profile.attestations": - if x.Attestations == nil { - x.Attestations = []*VerificationMethod{} - } - value := &_Profile_5_list{list: &x.Attestations} - return protoreflect.ValueOfList(value) case "did.v1.Profile.metadata": if x.Metadata == nil { x.Metadata = new(Metadata) @@ -4760,12 +5149,6 @@ func (x *fastReflection_Profile) NewField(fd protoreflect.FieldDescriptor) proto return protoreflect.ValueOfString("") case "did.v1.Profile.controller": return protoreflect.ValueOfString("") - case "did.v1.Profile.credentials": - list := []*Credential{} - return protoreflect.ValueOfList(&_Profile_4_list{list: &list}) - case "did.v1.Profile.attestations": - list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_Profile_5_list{list: &list}) case "did.v1.Profile.metadata": m := new(Metadata) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -4850,18 +5233,6 @@ func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Credentials) > 0 { - for _, e := range x.Credentials { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.Attestations) > 0 { - for _, e := range x.Attestations { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if x.Metadata != nil { l = options.Size(x.Metadata) n += 1 + l + runtime.Sov(uint64(l)) @@ -4907,39 +5278,7 @@ func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x32 - } - if len(x.Attestations) > 0 { - for iNdEx := len(x.Attestations) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Attestations[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - } - if len(x.Credentials) > 0 { - for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Credentials[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } + dAtA[i] = 0x22 } if len(x.Controller) > 0 { i -= len(x.Controller) @@ -5108,74 +5447,6 @@ func (x *fastReflection_Profile) ProtoMethods() *protoiface.Methods { x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Credentials = append(x.Credentials, &Credential{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Attestations = append(x.Attestations, &VerificationMethod{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Attestations[len(x.Attestations)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } @@ -5268,7 +5539,7 @@ func (x *Property) ProtoReflect() protoreflect.Message { } func (x *Property) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[6] + mi := &file_did_v1_models_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5734,20 +6005,20 @@ func (x *fastReflection_Property) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_PubKey_6_map)(nil) +var _ protoreflect.Map = (*_PubKey_7_map)(nil) -type _PubKey_6_map struct { +type _PubKey_7_map struct { m *map[string]string } -func (x *_PubKey_6_map) Len() int { +func (x *_PubKey_7_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_PubKey_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_PubKey_7_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } @@ -5760,7 +6031,7 @@ func (x *_PubKey_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bo } } -func (x *_PubKey_6_map) Has(key protoreflect.MapKey) bool { +func (x *_PubKey_7_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -5770,7 +6041,7 @@ func (x *_PubKey_6_map) Has(key protoreflect.MapKey) bool { return ok } -func (x *_PubKey_6_map) Clear(key protoreflect.MapKey) { +func (x *_PubKey_7_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -5779,7 +6050,7 @@ func (x *_PubKey_6_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_PubKey_6_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_PubKey_7_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -5792,7 +6063,7 @@ func (x *_PubKey_6_map) Get(key protoreflect.MapKey) protoreflect.Value { return protoreflect.ValueOfString(v) } -func (x *_PubKey_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_PubKey_7_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } @@ -5803,36 +6074,40 @@ func (x *_PubKey_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { (*x.m)[concreteKey] = concreteValue } -func (x *_PubKey_6_map) Mutable(key protoreflect.MapKey) protoreflect.Value { +func (x *_PubKey_7_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 *_PubKey_6_map) NewValue() protoreflect.Value { +func (x *_PubKey_7_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_PubKey_6_map) IsValid() bool { +func (x *_PubKey_7_map) IsValid() bool { return x.m != nil } var ( md_PubKey protoreflect.MessageDescriptor - fd_PubKey_namespace protoreflect.FieldDescriptor - fd_PubKey_key protoreflect.FieldDescriptor - fd_PubKey_kind protoreflect.FieldDescriptor + fd_PubKey_role protoreflect.FieldDescriptor + fd_PubKey_algorithm protoreflect.FieldDescriptor + fd_PubKey_encoding protoreflect.FieldDescriptor + fd_PubKey_raw protoreflect.FieldDescriptor + fd_PubKey_hex protoreflect.FieldDescriptor fd_PubKey_multibase protoreflect.FieldDescriptor - fd_PubKey_jwks protoreflect.FieldDescriptor + fd_PubKey_jwk protoreflect.FieldDescriptor ) func init() { file_did_v1_models_proto_init() md_PubKey = File_did_v1_models_proto.Messages().ByName("PubKey") - fd_PubKey_namespace = md_PubKey.Fields().ByName("namespace") - fd_PubKey_key = md_PubKey.Fields().ByName("key") - fd_PubKey_kind = md_PubKey.Fields().ByName("kind") + fd_PubKey_role = md_PubKey.Fields().ByName("role") + fd_PubKey_algorithm = md_PubKey.Fields().ByName("algorithm") + fd_PubKey_encoding = md_PubKey.Fields().ByName("encoding") + fd_PubKey_raw = md_PubKey.Fields().ByName("raw") + fd_PubKey_hex = md_PubKey.Fields().ByName("hex") fd_PubKey_multibase = md_PubKey.Fields().ByName("multibase") - fd_PubKey_jwks = md_PubKey.Fields().ByName("jwks") + fd_PubKey_jwk = md_PubKey.Fields().ByName("jwk") } var _ protoreflect.Message = (*fastReflection_PubKey)(nil) @@ -5844,7 +6119,7 @@ func (x *PubKey) ProtoReflect() protoreflect.Message { } func (x *PubKey) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[7] + mi := &file_did_v1_models_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5900,21 +6175,33 @@ func (x *fastReflection_PubKey) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Namespace != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Namespace)) - if !f(fd_PubKey_namespace, value) { + if x.Role != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Role)) + if !f(fd_PubKey_role, value) { return } } - if len(x.Key) != 0 { - value := protoreflect.ValueOfBytes(x.Key) - if !f(fd_PubKey_key, value) { + if x.Algorithm != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Algorithm)) + if !f(fd_PubKey_algorithm, value) { return } } - if x.Kind != 0 { - value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Kind)) - if !f(fd_PubKey_kind, value) { + if x.Encoding != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Encoding)) + if !f(fd_PubKey_encoding, value) { + return + } + } + if len(x.Raw) != 0 { + value := protoreflect.ValueOfBytes(x.Raw) + if !f(fd_PubKey_raw, value) { + return + } + } + if x.Hex != "" { + value := protoreflect.ValueOfString(x.Hex) + if !f(fd_PubKey_hex, value) { return } } @@ -5924,9 +6211,9 @@ func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, proto return } } - if len(x.Jwks) != 0 { - value := protoreflect.ValueOfMap(&_PubKey_6_map{m: &x.Jwks}) - if !f(fd_PubKey_jwks, value) { + if len(x.Jwk) != 0 { + value := protoreflect.ValueOfMap(&_PubKey_7_map{m: &x.Jwk}) + if !f(fd_PubKey_jwk, value) { return } } @@ -5945,16 +6232,20 @@ func (x *fastReflection_PubKey) Range(f func(protoreflect.FieldDescriptor, proto // a repeated field is populated if it is non-empty. func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.PubKey.namespace": - return x.Namespace != 0 - case "did.v1.PubKey.key": - return len(x.Key) != 0 - case "did.v1.PubKey.kind": - return x.Kind != 0 + case "did.v1.PubKey.role": + return x.Role != 0 + case "did.v1.PubKey.algorithm": + return x.Algorithm != 0 + case "did.v1.PubKey.encoding": + return x.Encoding != 0 + case "did.v1.PubKey.raw": + return len(x.Raw) != 0 + case "did.v1.PubKey.hex": + return x.Hex != "" case "did.v1.PubKey.multibase": return x.Multibase != "" - case "did.v1.PubKey.jwks": - return len(x.Jwks) != 0 + case "did.v1.PubKey.jwk": + return len(x.Jwk) != 0 default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -5971,16 +6262,20 @@ func (x *fastReflection_PubKey) Has(fd protoreflect.FieldDescriptor) bool { // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.PubKey.namespace": - x.Namespace = 0 - case "did.v1.PubKey.key": - x.Key = nil - case "did.v1.PubKey.kind": - x.Kind = 0 + case "did.v1.PubKey.role": + x.Role = 0 + case "did.v1.PubKey.algorithm": + x.Algorithm = 0 + case "did.v1.PubKey.encoding": + x.Encoding = 0 + case "did.v1.PubKey.raw": + x.Raw = nil + case "did.v1.PubKey.hex": + x.Hex = "" case "did.v1.PubKey.multibase": x.Multibase = "" - case "did.v1.PubKey.jwks": - x.Jwks = nil + case "did.v1.PubKey.jwk": + x.Jwk = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -5997,23 +6292,29 @@ func (x *fastReflection_PubKey) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.PubKey.namespace": - value := x.Namespace + case "did.v1.PubKey.role": + value := x.Role return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) - case "did.v1.PubKey.key": - value := x.Key + case "did.v1.PubKey.algorithm": + value := x.Algorithm + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.PubKey.encoding": + value := x.Encoding + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.PubKey.raw": + value := x.Raw return protoreflect.ValueOfBytes(value) - case "did.v1.PubKey.kind": - value := x.Kind - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) + case "did.v1.PubKey.hex": + value := x.Hex + return protoreflect.ValueOfString(value) case "did.v1.PubKey.multibase": value := x.Multibase return protoreflect.ValueOfString(value) - case "did.v1.PubKey.jwks": - if len(x.Jwks) == 0 { - return protoreflect.ValueOfMap(&_PubKey_6_map{}) + case "did.v1.PubKey.jwk": + if len(x.Jwk) == 0 { + return protoreflect.ValueOfMap(&_PubKey_7_map{}) } - mapValue := &_PubKey_6_map{m: &x.Jwks} + mapValue := &_PubKey_7_map{m: &x.Jwk} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { @@ -6035,18 +6336,22 @@ func (x *fastReflection_PubKey) Get(descriptor protoreflect.FieldDescriptor) pro // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.PubKey.namespace": - x.Namespace = (DIDNamespace)(value.Enum()) - case "did.v1.PubKey.key": - x.Key = value.Bytes() - case "did.v1.PubKey.kind": - x.Kind = (KeyType)(value.Enum()) + case "did.v1.PubKey.role": + x.Role = (KeyRole)(value.Enum()) + case "did.v1.PubKey.algorithm": + x.Algorithm = (KeyAlgorithm)(value.Enum()) + case "did.v1.PubKey.encoding": + x.Encoding = (KeyEncoding)(value.Enum()) + case "did.v1.PubKey.raw": + x.Raw = value.Bytes() + case "did.v1.PubKey.hex": + x.Hex = value.Interface().(string) case "did.v1.PubKey.multibase": x.Multibase = value.Interface().(string) - case "did.v1.PubKey.jwks": + case "did.v1.PubKey.jwk": mv := value.Map() - cmv := mv.(*_PubKey_6_map) - x.Jwks = *cmv.m + cmv := mv.(*_PubKey_7_map) + x.Jwk = *cmv.m default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -6067,18 +6372,22 @@ func (x *fastReflection_PubKey) Set(fd protoreflect.FieldDescriptor, value proto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.PubKey.jwks": - if x.Jwks == nil { - x.Jwks = make(map[string]string) + case "did.v1.PubKey.jwk": + if x.Jwk == nil { + x.Jwk = make(map[string]string) } - value := &_PubKey_6_map{m: &x.Jwks} + value := &_PubKey_7_map{m: &x.Jwk} return protoreflect.ValueOfMap(value) - case "did.v1.PubKey.namespace": - panic(fmt.Errorf("field namespace of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.key": - panic(fmt.Errorf("field key of message did.v1.PubKey is not mutable")) - case "did.v1.PubKey.kind": - panic(fmt.Errorf("field kind of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.role": + panic(fmt.Errorf("field role of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.algorithm": + panic(fmt.Errorf("field algorithm of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.encoding": + panic(fmt.Errorf("field encoding of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.raw": + panic(fmt.Errorf("field raw of message did.v1.PubKey is not mutable")) + case "did.v1.PubKey.hex": + panic(fmt.Errorf("field hex of message did.v1.PubKey is not mutable")) case "did.v1.PubKey.multibase": panic(fmt.Errorf("field multibase of message did.v1.PubKey is not mutable")) default: @@ -6094,17 +6403,21 @@ func (x *fastReflection_PubKey) Mutable(fd protoreflect.FieldDescriptor) protore // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_PubKey) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.PubKey.namespace": + case "did.v1.PubKey.role": return protoreflect.ValueOfEnum(0) - case "did.v1.PubKey.key": + case "did.v1.PubKey.algorithm": + return protoreflect.ValueOfEnum(0) + case "did.v1.PubKey.encoding": + return protoreflect.ValueOfEnum(0) + case "did.v1.PubKey.raw": return protoreflect.ValueOfBytes(nil) - case "did.v1.PubKey.kind": - return protoreflect.ValueOfEnum(0) + case "did.v1.PubKey.hex": + return protoreflect.ValueOfString("") case "did.v1.PubKey.multibase": return protoreflect.ValueOfString("") - case "did.v1.PubKey.jwks": + case "did.v1.PubKey.jwk": m := make(map[string]string) - return protoreflect.ValueOfMap(&_PubKey_6_map{m: &m}) + return protoreflect.ValueOfMap(&_PubKey_7_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.PubKey")) @@ -6174,37 +6487,44 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Namespace != 0 { - n += 1 + runtime.Sov(uint64(x.Namespace)) + if x.Role != 0 { + n += 1 + runtime.Sov(uint64(x.Role)) } - l = len(x.Key) + if x.Algorithm != 0 { + n += 1 + runtime.Sov(uint64(x.Algorithm)) + } + if x.Encoding != 0 { + n += 1 + runtime.Sov(uint64(x.Encoding)) + } + l = len(x.Raw) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.Kind != 0 { - n += 1 + runtime.Sov(uint64(x.Kind)) + l = len(x.Hex) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) } l = len(x.Multibase) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Jwks) > 0 { + if len(x.Jwk) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } if options.Deterministic { - sortme := make([]string, 0, len(x.Jwks)) - for k := range x.Jwks { + sortme := make([]string, 0, len(x.Jwk)) + for k := range x.Jwk { sortme = append(sortme, k) } sort.Strings(sortme) for _, k := range sortme { - v := x.Jwks[k] + v := x.Jwk[k] SiZeMaP(k, v) } } else { - for k, v := range x.Jwks { + for k, v := range x.Jwk { SiZeMaP(k, v) } } @@ -6238,7 +6558,7 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Jwks) > 0 { + if len(x.Jwk) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { baseI := i i -= len(v) @@ -6253,27 +6573,27 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a return protoiface.MarshalOutput{}, nil } if options.Deterministic { - keysForJwks := make([]string, 0, len(x.Jwks)) - for k := range x.Jwks { - keysForJwks = append(keysForJwks, string(k)) + keysForJwk := make([]string, 0, len(x.Jwk)) + for k := range x.Jwk { + keysForJwk = append(keysForJwk, string(k)) } - sort.Slice(keysForJwks, func(i, j int) bool { - return keysForJwks[i] < keysForJwks[j] + sort.Slice(keysForJwk, func(i, j int) bool { + return keysForJwk[i] < keysForJwk[j] }) - for iNdEx := len(keysForJwks) - 1; iNdEx >= 0; iNdEx-- { - v := x.Jwks[string(keysForJwks[iNdEx])] - out, err := MaRsHaLmAp(keysForJwks[iNdEx], v) + for iNdEx := len(keysForJwk) - 1; iNdEx >= 0; iNdEx-- { + v := x.Jwk[string(keysForJwk[iNdEx])] + out, err := MaRsHaLmAp(keysForJwk[iNdEx], v) if err != nil { return out, err } } } else { - for k := range x.Jwks { - v := x.Jwks[k] + for k := range x.Jwk { + v := x.Jwk[k] out, err := MaRsHaLmAp(k, v) if err != nil { return out, err @@ -6286,22 +6606,34 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], x.Multibase) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Multibase))) i-- + dAtA[i] = 0x32 + } + if len(x.Hex) > 0 { + i -= len(x.Hex) + copy(dAtA[i:], x.Hex) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Hex))) + i-- dAtA[i] = 0x2a } - if x.Kind != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Kind)) + if len(x.Raw) > 0 { + i -= len(x.Raw) + copy(dAtA[i:], x.Raw) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Raw))) + i-- + dAtA[i] = 0x22 + } + if x.Encoding != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Encoding)) i-- dAtA[i] = 0x18 } - if len(x.Key) > 0 { - i -= len(x.Key) - copy(dAtA[i:], x.Key) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Key))) + if x.Algorithm != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Algorithm)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x10 } - if x.Namespace != 0 { - i = runtime.EncodeVarint(dAtA, i, uint64(x.Namespace)) + if x.Role != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Role)) i-- dAtA[i] = 0x8 } @@ -6356,9 +6688,9 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) } - x.Namespace = 0 + x.Role = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6368,14 +6700,52 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Namespace |= DIDNamespace(b&0x7F) << shift + x.Role |= KeyRole(b&0x7F) << shift if b < 0x80 { break } } case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + x.Algorithm = 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.Algorithm |= KeyAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + x.Encoding = 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.Encoding |= KeyEncoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -6402,16 +6772,16 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Key = append(x.Key[:0], dAtA[iNdEx:postIndex]...) - if x.Key == nil { - x.Key = []byte{} + x.Raw = append(x.Raw[:0], dAtA[iNdEx:postIndex]...) + if x.Raw == nil { + x.Raw = []byte{} } iNdEx = postIndex - case 3: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hex", wireType) } - x.Kind = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -6421,12 +6791,25 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - x.Kind |= KeyType(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + 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.Hex = 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 Multibase", wireType) } @@ -6458,9 +6841,9 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { } x.Multibase = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jwks", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -6487,8 +6870,8 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Jwks == nil { - x.Jwks = make(map[string]string) + if x.Jwk == nil { + x.Jwk = make(map[string]string) } var mapkey string var mapvalue string @@ -6583,7 +6966,1342 @@ func (x *fastReflection_PubKey) ProtoMethods() *protoiface.Methods { iNdEx += skippy } } - x.Jwks[mapkey] = mapvalue + x.Jwk[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_Service protoreflect.MessageDescriptor + fd_Service_id protoreflect.FieldDescriptor + fd_Service_controller protoreflect.FieldDescriptor + fd_Service_origin protoreflect.FieldDescriptor + fd_Service_permissions protoreflect.FieldDescriptor + fd_Service_openid protoreflect.FieldDescriptor + fd_Service_metadata protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_Service = File_did_v1_models_proto.Messages().ByName("Service") + fd_Service_id = md_Service.Fields().ByName("id") + fd_Service_controller = md_Service.Fields().ByName("controller") + fd_Service_origin = md_Service.Fields().ByName("origin") + fd_Service_permissions = md_Service.Fields().ByName("permissions") + fd_Service_openid = md_Service.Fields().ByName("openid") + fd_Service_metadata = md_Service.Fields().ByName("metadata") +} + +var _ protoreflect.Message = (*fastReflection_Service)(nil) + +type fastReflection_Service Service + +func (x *Service) ProtoReflect() protoreflect.Message { + return (*fastReflection_Service)(x) +} + +func (x *Service) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_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_Service_messageType fastReflection_Service_messageType +var _ protoreflect.MessageType = fastReflection_Service_messageType{} + +type fastReflection_Service_messageType struct{} + +func (x fastReflection_Service_messageType) Zero() protoreflect.Message { + return (*fastReflection_Service)(nil) +} +func (x fastReflection_Service_messageType) New() protoreflect.Message { + return new(fastReflection_Service) +} +func (x fastReflection_Service_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Service +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Service) Descriptor() protoreflect.MessageDescriptor { + return md_Service +} + +// 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_Service) Type() protoreflect.MessageType { + return _fastReflection_Service_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Service) New() protoreflect.Message { + return new(fastReflection_Service) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Service) Interface() protoreflect.ProtoMessage { + return (*Service)(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_Service) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Service_id, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Service_controller, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Service_origin, value) { + return + } + } + if x.Permissions != nil { + value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) + if !f(fd_Service_permissions, value) { + return + } + } + if x.Openid != nil { + value := protoreflect.ValueOfMessage(x.Openid.ProtoReflect()) + if !f(fd_Service_openid, value) { + return + } + } + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_Service_metadata, 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_Service) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Service.id": + return x.Id != "" + case "did.v1.Service.controller": + return x.Controller != "" + case "did.v1.Service.origin": + return x.Origin != "" + case "did.v1.Service.permissions": + return x.Permissions != nil + case "did.v1.Service.openid": + return x.Openid != nil + case "did.v1.Service.metadata": + return x.Metadata != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + } + panic(fmt.Errorf("message did.v1.Service 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_Service) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Service.id": + x.Id = "" + case "did.v1.Service.controller": + x.Controller = "" + case "did.v1.Service.origin": + x.Origin = "" + case "did.v1.Service.permissions": + x.Permissions = nil + case "did.v1.Service.openid": + x.Openid = nil + case "did.v1.Service.metadata": + x.Metadata = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + } + panic(fmt.Errorf("message did.v1.Service 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_Service) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Service.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Service.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.Service.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.Service.permissions": + value := x.Permissions + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Service.openid": + value := x.Openid + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Service.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + } + panic(fmt.Errorf("message did.v1.Service 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_Service) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Service.id": + x.Id = value.Interface().(string) + case "did.v1.Service.controller": + x.Controller = value.Interface().(string) + case "did.v1.Service.origin": + x.Origin = value.Interface().(string) + case "did.v1.Service.permissions": + x.Permissions = value.Message().Interface().(*Permissions) + case "did.v1.Service.openid": + x.Openid = value.Message().Interface().(*OpenIDConfig) + case "did.v1.Service.metadata": + x.Metadata = value.Message().Interface().(*Metadata) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + } + panic(fmt.Errorf("message did.v1.Service 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_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Service.permissions": + if x.Permissions == nil { + x.Permissions = new(Permissions) + } + return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) + case "did.v1.Service.openid": + if x.Openid == nil { + x.Openid = new(OpenIDConfig) + } + return protoreflect.ValueOfMessage(x.Openid.ProtoReflect()) + case "did.v1.Service.metadata": + if x.Metadata == nil { + x.Metadata = new(Metadata) + } + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + case "did.v1.Service.id": + panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) + case "did.v1.Service.controller": + panic(fmt.Errorf("field controller of message did.v1.Service is not mutable")) + case "did.v1.Service.origin": + panic(fmt.Errorf("field origin of message did.v1.Service is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + } + panic(fmt.Errorf("message did.v1.Service 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_Service) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Service.id": + return protoreflect.ValueOfString("") + case "did.v1.Service.controller": + return protoreflect.ValueOfString("") + case "did.v1.Service.origin": + return protoreflect.ValueOfString("") + case "did.v1.Service.permissions": + m := new(Permissions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Service.openid": + m := new(OpenIDConfig) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Service.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + } + panic(fmt.Errorf("message did.v1.Service 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_Service) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Service", 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_Service) 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_Service) 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_Service) 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_Service) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Service) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Permissions != nil { + l = options.Size(x.Permissions) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Openid != nil { + l = options.Size(x.Openid) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Metadata != nil { + l = options.Size(x.Metadata) + 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().(*Service) + 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.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + 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] = 0x32 + } + if x.Openid != nil { + encoded, err := options.Marshal(x.Openid) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if x.Permissions != nil { + encoded, err := options.Marshal(x.Permissions) + 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.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + 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.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Service) + 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: Service: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 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 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", 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.Permissions == nil { + x.Permissions = &Permissions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Permissions); 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 Openid", 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.Openid == nil { + x.Openid = &OpenIDConfig{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Openid); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); 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_Token protoreflect.MessageDescriptor + fd_Token_id protoreflect.FieldDescriptor + fd_Token_controller protoreflect.FieldDescriptor + fd_Token_macron protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_Token = File_did_v1_models_proto.Messages().ByName("Token") + fd_Token_id = md_Token.Fields().ByName("id") + fd_Token_controller = md_Token.Fields().ByName("controller") + fd_Token_macron = md_Token.Fields().ByName("macron") +} + +var _ protoreflect.Message = (*fastReflection_Token)(nil) + +type fastReflection_Token Token + +func (x *Token) ProtoReflect() protoreflect.Message { + return (*fastReflection_Token)(x) +} + +func (x *Token) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_Token_messageType fastReflection_Token_messageType +var _ protoreflect.MessageType = fastReflection_Token_messageType{} + +type fastReflection_Token_messageType struct{} + +func (x fastReflection_Token_messageType) Zero() protoreflect.Message { + return (*fastReflection_Token)(nil) +} +func (x fastReflection_Token_messageType) New() protoreflect.Message { + return new(fastReflection_Token) +} +func (x fastReflection_Token_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Token +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Token) Descriptor() protoreflect.MessageDescriptor { + return md_Token +} + +// 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_Token) Type() protoreflect.MessageType { + return _fastReflection_Token_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Token) New() protoreflect.Message { + return new(fastReflection_Token) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Token) Interface() protoreflect.ProtoMessage { + return (*Token)(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_Token) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Id != "" { + value := protoreflect.ValueOfString(x.Id) + if !f(fd_Token_id, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_Token_controller, value) { + return + } + } + if len(x.Macron) != 0 { + value := protoreflect.ValueOfBytes(x.Macron) + if !f(fd_Token_macron, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Token) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Token.id": + return x.Id != "" + case "did.v1.Token.controller": + return x.Controller != "" + case "did.v1.Token.macron": + return len(x.Macron) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token")) + } + panic(fmt.Errorf("message did.v1.Token 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_Token) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Token.id": + x.Id = "" + case "did.v1.Token.controller": + x.Controller = "" + case "did.v1.Token.macron": + x.Macron = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token")) + } + panic(fmt.Errorf("message did.v1.Token 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_Token) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Token.id": + value := x.Id + return protoreflect.ValueOfString(value) + case "did.v1.Token.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.Token.macron": + value := x.Macron + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token")) + } + panic(fmt.Errorf("message did.v1.Token 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_Token) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Token.id": + x.Id = value.Interface().(string) + case "did.v1.Token.controller": + x.Controller = value.Interface().(string) + case "did.v1.Token.macron": + x.Macron = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token")) + } + panic(fmt.Errorf("message did.v1.Token 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_Token) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Token.id": + panic(fmt.Errorf("field id of message did.v1.Token is not mutable")) + case "did.v1.Token.controller": + panic(fmt.Errorf("field controller of message did.v1.Token is not mutable")) + case "did.v1.Token.macron": + panic(fmt.Errorf("field macron of message did.v1.Token is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token")) + } + panic(fmt.Errorf("message did.v1.Token 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_Token) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Token.id": + return protoreflect.ValueOfString("") + case "did.v1.Token.controller": + return protoreflect.ValueOfString("") + case "did.v1.Token.macron": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Token")) + } + panic(fmt.Errorf("message did.v1.Token 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_Token) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Token", 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_Token) 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_Token) 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_Token) 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_Token) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Token) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Id) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Macron) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Token) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Macron) > 0 { + i -= len(x.Macron) + copy(dAtA[i:], x.Macron) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macron))) + i-- + dAtA[i] = 0x1a + } + if len(x.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.Id) > 0 { + i -= len(x.Id) + copy(dAtA[i:], x.Id) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Id))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*Token) + 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: Token: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 Macron", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Macron = append(x.Macron[:0], dAtA[iNdEx:postIndex]...) + if x.Macron == nil { + x.Macron = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -6624,7 +8342,9 @@ var ( md_VerificationMethod protoreflect.MessageDescriptor fd_VerificationMethod_id protoreflect.FieldDescriptor fd_VerificationMethod_controller protoreflect.FieldDescriptor + fd_VerificationMethod_method protoreflect.FieldDescriptor fd_VerificationMethod_public_key protoreflect.FieldDescriptor + fd_VerificationMethod_service protoreflect.FieldDescriptor ) func init() { @@ -6632,7 +8352,9 @@ func init() { md_VerificationMethod = File_did_v1_models_proto.Messages().ByName("VerificationMethod") fd_VerificationMethod_id = md_VerificationMethod.Fields().ByName("id") fd_VerificationMethod_controller = md_VerificationMethod.Fields().ByName("controller") + fd_VerificationMethod_method = md_VerificationMethod.Fields().ByName("method") fd_VerificationMethod_public_key = md_VerificationMethod.Fields().ByName("public_key") + fd_VerificationMethod_service = md_VerificationMethod.Fields().ByName("service") } var _ protoreflect.Message = (*fastReflection_VerificationMethod)(nil) @@ -6644,7 +8366,7 @@ func (x *VerificationMethod) ProtoReflect() protoreflect.Message { } func (x *VerificationMethod) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_models_proto_msgTypes[8] + mi := &file_did_v1_models_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6712,12 +8434,24 @@ func (x *fastReflection_VerificationMethod) Range(f func(protoreflect.FieldDescr return } } + if x.Method != 0 { + value := protoreflect.ValueOfEnum((protoreflect.EnumNumber)(x.Method)) + if !f(fd_VerificationMethod_method, value) { + return + } + } if x.PublicKey != nil { value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) if !f(fd_VerificationMethod_public_key, value) { return } } + if x.Service != nil { + value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) + if !f(fd_VerificationMethod_service, value) { + return + } + } } // Has reports whether a field is populated. @@ -6737,8 +8471,12 @@ func (x *fastReflection_VerificationMethod) Has(fd protoreflect.FieldDescriptor) return x.Id != "" case "did.v1.VerificationMethod.controller": return x.Controller != "" + case "did.v1.VerificationMethod.method": + return x.Method != 0 case "did.v1.VerificationMethod.public_key": return x.PublicKey != nil + case "did.v1.VerificationMethod.service": + return x.Service != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -6759,8 +8497,12 @@ func (x *fastReflection_VerificationMethod) Clear(fd protoreflect.FieldDescripto x.Id = "" case "did.v1.VerificationMethod.controller": x.Controller = "" + case "did.v1.VerificationMethod.method": + x.Method = 0 case "did.v1.VerificationMethod.public_key": x.PublicKey = nil + case "did.v1.VerificationMethod.service": + x.Service = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -6783,9 +8525,15 @@ func (x *fastReflection_VerificationMethod) Get(descriptor protoreflect.FieldDes case "did.v1.VerificationMethod.controller": value := x.Controller return protoreflect.ValueOfString(value) + case "did.v1.VerificationMethod.method": + value := x.Method + return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(value)) case "did.v1.VerificationMethod.public_key": value := x.PublicKey return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.VerificationMethod.service": + value := x.Service + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -6810,8 +8558,12 @@ func (x *fastReflection_VerificationMethod) Set(fd protoreflect.FieldDescriptor, x.Id = value.Interface().(string) case "did.v1.VerificationMethod.controller": x.Controller = value.Interface().(string) + case "did.v1.VerificationMethod.method": + x.Method = (DIDNamespace)(value.Enum()) case "did.v1.VerificationMethod.public_key": x.PublicKey = value.Message().Interface().(*PubKey) + case "did.v1.VerificationMethod.service": + x.Service = value.Message().Interface().(*Service) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -6837,10 +8589,17 @@ func (x *fastReflection_VerificationMethod) Mutable(fd protoreflect.FieldDescrip x.PublicKey = new(PubKey) } return protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) + case "did.v1.VerificationMethod.service": + if x.Service == nil { + x.Service = new(Service) + } + return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) case "did.v1.VerificationMethod.id": panic(fmt.Errorf("field id of message did.v1.VerificationMethod is not mutable")) case "did.v1.VerificationMethod.controller": panic(fmt.Errorf("field controller of message did.v1.VerificationMethod is not mutable")) + case "did.v1.VerificationMethod.method": + panic(fmt.Errorf("field method of message did.v1.VerificationMethod is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -6858,9 +8617,14 @@ func (x *fastReflection_VerificationMethod) NewField(fd protoreflect.FieldDescri return protoreflect.ValueOfString("") case "did.v1.VerificationMethod.controller": return protoreflect.ValueOfString("") + case "did.v1.VerificationMethod.method": + return protoreflect.ValueOfEnum(0) case "did.v1.VerificationMethod.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.VerificationMethod.service": + m := new(Service) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.VerificationMethod")) @@ -6938,10 +8702,17 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.Method != 0 { + n += 1 + runtime.Sov(uint64(x.Method)) + } if x.PublicKey != nil { l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } + if x.Service != nil { + l = options.Size(x.Service) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -6971,6 +8742,20 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Service != nil { + encoded, err := options.Marshal(x.Service) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } if x.PublicKey != nil { encoded, err := options.Marshal(x.PublicKey) if err != nil { @@ -6983,7 +8768,12 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 + } + if x.Method != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.Method)) + i-- + dAtA[i] = 0x18 } if len(x.Controller) > 0 { i -= len(x.Controller) @@ -7113,6 +8903,25 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + x.Method = 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.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } @@ -7148,6 +8957,464 @@ func (x *fastReflection_VerificationMethod) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", 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.Service == nil { + x.Service = &Service{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); 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_Witness protoreflect.MessageDescriptor + fd_Witness_witness protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_models_proto_init() + md_Witness = File_did_v1_models_proto.Messages().ByName("Witness") + fd_Witness_witness = md_Witness.Fields().ByName("witness") +} + +var _ protoreflect.Message = (*fastReflection_Witness)(nil) + +type fastReflection_Witness Witness + +func (x *Witness) ProtoReflect() protoreflect.Message { + return (*fastReflection_Witness)(x) +} + +func (x *Witness) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_models_proto_msgTypes[12] + 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_Witness_messageType fastReflection_Witness_messageType +var _ protoreflect.MessageType = fastReflection_Witness_messageType{} + +type fastReflection_Witness_messageType struct{} + +func (x fastReflection_Witness_messageType) Zero() protoreflect.Message { + return (*fastReflection_Witness)(nil) +} +func (x fastReflection_Witness_messageType) New() protoreflect.Message { + return new(fastReflection_Witness) +} +func (x fastReflection_Witness_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_Witness +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_Witness) Descriptor() protoreflect.MessageDescriptor { + return md_Witness +} + +// 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_Witness) Type() protoreflect.MessageType { + return _fastReflection_Witness_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_Witness) New() protoreflect.Message { + return new(fastReflection_Witness) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_Witness) Interface() protoreflect.ProtoMessage { + return (*Witness)(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_Witness) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.Witness) != 0 { + value := protoreflect.ValueOfBytes(x.Witness) + if !f(fd_Witness_witness, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_Witness) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.Witness.witness": + return len(x.Witness) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) + } + panic(fmt.Errorf("message did.v1.Witness 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_Witness) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.Witness.witness": + x.Witness = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) + } + panic(fmt.Errorf("message did.v1.Witness 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_Witness) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.Witness.witness": + value := x.Witness + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) + } + panic(fmt.Errorf("message did.v1.Witness 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_Witness) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.Witness.witness": + x.Witness = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) + } + panic(fmt.Errorf("message did.v1.Witness 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_Witness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Witness.witness": + panic(fmt.Errorf("field witness of message did.v1.Witness is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) + } + panic(fmt.Errorf("message did.v1.Witness 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_Witness) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.Witness.witness": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Witness")) + } + panic(fmt.Errorf("message did.v1.Witness 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_Witness) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.Witness", 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_Witness) 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_Witness) 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_Witness) 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_Witness) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*Witness) + 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.Witness) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*Witness) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.Witness) > 0 { + i -= len(x.Witness) + copy(dAtA[i:], x.Witness) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Witness))) + i-- + dAtA[i] = 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().(*Witness) + 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: Witness: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Witness: 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 Witness", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Witness = append(x.Witness[:0], dAtA[iNdEx:postIndex]...) + if x.Witness == nil { + x.Witness = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -7196,21 +9463,17 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// DID defines a parsed DID string -type DID struct { +// Accumulator defines a BLS accumulator +type Accumulator struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Method DIDNamespace `protobuf:"varint,2,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` - Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` - Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` - Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` + Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` } -func (x *DID) Reset() { - *x = DID{} +func (x *Accumulator) Reset() { + *x = Accumulator{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_models_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -7218,48 +9481,20 @@ func (x *DID) Reset() { } } -func (x *DID) String() string { +func (x *Accumulator) String() string { return protoimpl.X.MessageStringOf(x) } -func (*DID) ProtoMessage() {} +func (*Accumulator) ProtoMessage() {} -// Deprecated: Use DID.ProtoReflect.Descriptor instead. -func (*DID) Descriptor() ([]byte, []int) { +// Deprecated: Use Accumulator.ProtoReflect.Descriptor instead. +func (*Accumulator) Descriptor() ([]byte, []int) { return file_did_v1_models_proto_rawDescGZIP(), []int{0} } -func (x *DID) GetId() string { +func (x *Accumulator) GetAccumulator() []byte { if x != nil { - return x.Id - } - return "" -} - -func (x *DID) GetMethod() DIDNamespace { - if x != nil { - return x.Method - } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED -} - -func (x *DID) GetNetwork() string { - if x != nil { - return x.Network - } - return "" -} - -func (x *DID) GetIdentifier() string { - if x != nil { - return x.Identifier - } - return "" -} - -func (x *DID) GetPaths() []string { - if x != nil { - return x.Paths + return x.Accumulator } return nil } @@ -7340,6 +9575,74 @@ func (x *Credential) GetController() string { return "" } +// DID defines a parsed DID string +type DID struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` + Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` +} + +func (x *DID) Reset() { + *x = DID{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *DID) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*DID) ProtoMessage() {} + +// Deprecated: Use DID.ProtoReflect.Descriptor instead. +func (*DID) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{2} +} + +func (x *DID) GetMethod() DIDNamespace { + if x != nil { + return x.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (x *DID) GetNetwork() string { + if x != nil { + return x.Network + } + return "" +} + +func (x *DID) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *DID) GetIdentifier() string { + if x != nil { + return x.Identifier + } + return "" +} + +func (x *DID) GetPaths() []string { + if x != nil { + return x.Paths + } + return nil +} + // Document defines a DID document type Document struct { state protoimpl.MessageState @@ -7352,12 +9655,13 @@ type Document struct { AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` + Service []string `protobuf:"bytes,9,rep,name=service,proto3" json:"service,omitempty"` } func (x *Document) Reset() { *x = Document{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[2] + mi := &file_did_v1_models_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7371,7 +9675,7 @@ func (*Document) ProtoMessage() {} // Deprecated: Use Document.ProtoReflect.Descriptor instead. func (*Document) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{2} + return file_did_v1_models_proto_rawDescGZIP(), []int{3} } func (x *Document) GetId() string { @@ -7416,6 +9720,13 @@ func (x *Document) GetCapabilityInvocation() []string { return nil } +func (x *Document) GetService() []string { + if x != nil { + return x.Service + } + return nil +} + // Metadata defines additional information provided to a did type Metadata struct { state protoimpl.MessageState @@ -7430,7 +9741,7 @@ type Metadata struct { func (x *Metadata) Reset() { *x = Metadata{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[3] + mi := &file_did_v1_models_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7444,7 +9755,7 @@ func (*Metadata) ProtoMessage() {} // Deprecated: Use Metadata.ProtoReflect.Descriptor instead. func (*Metadata) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{3} + return file_did_v1_models_proto_rawDescGZIP(), []int{4} } func (x *Metadata) GetOriginUri() string { @@ -7482,7 +9793,7 @@ type Permissions struct { func (x *Permissions) Reset() { *x = Permissions{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[4] + mi := &file_did_v1_models_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7496,7 +9807,7 @@ func (*Permissions) ProtoMessage() {} // Deprecated: Use Permissions.ProtoReflect.Descriptor instead. func (*Permissions) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{4} + return file_did_v1_models_proto_rawDescGZIP(), []int{5} } func (x *Permissions) GetGrants() []DIDNamespace { @@ -7519,18 +9830,16 @@ type Profile struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - Attestations []*VerificationMethod `protobuf:"bytes,5,rep,name=attestations,proto3" json:"attestations,omitempty"` - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *Profile) Reset() { *x = Profile{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[5] + mi := &file_did_v1_models_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7544,7 +9853,7 @@ func (*Profile) ProtoMessage() {} // Deprecated: Use Profile.ProtoReflect.Descriptor instead. func (*Profile) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{5} + return file_did_v1_models_proto_rawDescGZIP(), []int{6} } func (x *Profile) GetId() string { @@ -7568,20 +9877,6 @@ func (x *Profile) GetController() string { return "" } -func (x *Profile) GetCredentials() []*Credential { - if x != nil { - return x.Credentials - } - return nil -} - -func (x *Profile) GetAttestations() []*VerificationMethod { - if x != nil { - return x.Attestations - } - return nil -} - func (x *Profile) GetMetadata() *Metadata { if x != nil { return x.Metadata @@ -7603,7 +9898,7 @@ type Property struct { func (x *Property) Reset() { *x = Property{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[6] + mi := &file_did_v1_models_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7617,7 +9912,7 @@ func (*Property) ProtoMessage() {} // Deprecated: Use Property.ProtoReflect.Descriptor instead. func (*Property) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{6} + return file_did_v1_models_proto_rawDescGZIP(), []int{7} } func (x *Property) GetAccumulator() []byte { @@ -7640,17 +9935,19 @@ type PubKey struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Namespace DIDNamespace `protobuf:"varint,1,opt,name=namespace,proto3,enum=did.v1.DIDNamespace" json:"namespace,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Kind KeyType `protobuf:"varint,3,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` - Multibase string `protobuf:"bytes,5,opt,name=multibase,proto3" json:"multibase,omitempty"` - Jwks map[string]string `protobuf:"bytes,6,rep,name=jwks,proto3" json:"jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"` + Algorithm KeyAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=did.v1.KeyAlgorithm" json:"algorithm,omitempty"` + Encoding KeyEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=did.v1.KeyEncoding" json:"encoding,omitempty"` + Raw []byte `protobuf:"bytes,4,opt,name=raw,proto3" json:"raw,omitempty"` + Hex string `protobuf:"bytes,5,opt,name=hex,proto3" json:"hex,omitempty"` + Multibase string `protobuf:"bytes,6,opt,name=multibase,proto3" json:"multibase,omitempty"` + Jwk map[string]string `protobuf:"bytes,7,rep,name=jwk,proto3" json:"jwk,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *PubKey) Reset() { *x = PubKey{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[7] + mi := &file_did_v1_models_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7664,28 +9961,42 @@ func (*PubKey) ProtoMessage() {} // Deprecated: Use PubKey.ProtoReflect.Descriptor instead. func (*PubKey) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{7} + return file_did_v1_models_proto_rawDescGZIP(), []int{8} } -func (x *PubKey) GetNamespace() DIDNamespace { +func (x *PubKey) GetRole() KeyRole { if x != nil { - return x.Namespace + return x.Role } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED + return KeyRole_KEY_ROLE_UNSPECIFIED } -func (x *PubKey) GetKey() []byte { +func (x *PubKey) GetAlgorithm() KeyAlgorithm { if x != nil { - return x.Key + return x.Algorithm + } + return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED +} + +func (x *PubKey) GetEncoding() KeyEncoding { + if x != nil { + return x.Encoding + } + return KeyEncoding_KEY_ENCODING_UNSPECIFIED +} + +func (x *PubKey) GetRaw() []byte { + if x != nil { + return x.Raw } return nil } -func (x *PubKey) GetKind() KeyType { +func (x *PubKey) GetHex() string { if x != nil { - return x.Kind + return x.Hex } - return KeyType_KEY_TYPE_UNSPECIFIED + return "" } func (x *PubKey) GetMultibase() string { @@ -7695,9 +10006,137 @@ func (x *PubKey) GetMultibase() string { return "" } -func (x *PubKey) GetJwks() map[string]string { +func (x *PubKey) GetJwk() map[string]string { if x != nil { - return x.Jwks + return x.Jwk + } + return nil +} + +// Service defines a Decentralized Service on the Sonr Blockchain +type Service struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + Permissions *Permissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` + Openid *OpenIDConfig `protobuf:"bytes,5,opt,name=openid,proto3" json:"openid,omitempty"` + Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (x *Service) Reset() { + *x = Service{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[9] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Service) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Service) ProtoMessage() {} + +// Deprecated: Use Service.ProtoReflect.Descriptor instead. +func (*Service) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{9} +} + +func (x *Service) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Service) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Service) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Service) GetPermissions() *Permissions { + if x != nil { + return x.Permissions + } + return nil +} + +func (x *Service) GetOpenid() *OpenIDConfig { + if x != nil { + return x.Openid + } + return nil +} + +func (x *Service) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +// Token defines a macron token +type Token struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` +} + +func (x *Token) Reset() { + *x = Token{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Token) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Token) ProtoMessage() {} + +// Deprecated: Use Token.ProtoReflect.Descriptor instead. +func (*Token) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{10} +} + +func (x *Token) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *Token) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *Token) GetMacron() []byte { + if x != nil { + return x.Macron } return nil } @@ -7708,15 +10147,17 @@ type VerificationMethod struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Service *Service `protobuf:"bytes,7,opt,name=service,proto3" json:"service,omitempty"` } func (x *VerificationMethod) Reset() { *x = VerificationMethod{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_models_proto_msgTypes[8] + mi := &file_did_v1_models_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -7730,7 +10171,7 @@ func (*VerificationMethod) ProtoMessage() {} // Deprecated: Use VerificationMethod.ProtoReflect.Descriptor instead. func (*VerificationMethod) Descriptor() ([]byte, []int) { - return file_did_v1_models_proto_rawDescGZIP(), []int{8} + return file_did_v1_models_proto_rawDescGZIP(), []int{11} } func (x *VerificationMethod) GetId() string { @@ -7747,6 +10188,13 @@ func (x *VerificationMethod) GetController() string { return "" } +func (x *VerificationMethod) GetMethod() DIDNamespace { + if x != nil { + return x.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + func (x *VerificationMethod) GetPublicKey() *PubKey { if x != nil { return x.PublicKey @@ -7754,129 +10202,204 @@ func (x *VerificationMethod) GetPublicKey() *PubKey { return nil } +func (x *VerificationMethod) GetService() *Service { + if x != nil { + return x.Service + } + return nil +} + +// Witness defines a BLS witness +type Witness struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Witness []byte `protobuf:"bytes,1,opt,name=witness,proto3" json:"witness,omitempty"` +} + +func (x *Witness) Reset() { + *x = Witness{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_models_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Witness) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Witness) ProtoMessage() {} + +// Deprecated: Use Witness.ProtoReflect.Descriptor instead. +func (*Witness) Descriptor() ([]byte, []int) { + return file_did_v1_models_proto_rawDescGZIP(), []int{12} +} + +func (x *Witness) GetWitness() []byte { + if x != nil { + return x.Witness + } + return nil +} + var File_did_v1_models_proto protoreflect.FileDescriptor var file_did_v1_models_proto_rawDesc = []byte{ 0x0a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x64, - 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x22, 0x93, 0x01, 0x0a, 0x03, 0x44, 0x49, 0x44, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x06, 0x6d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, - 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x74, - 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x74, 0x77, - 0x6f, 0x72, 0x6b, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, - 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, - 0x69, 0x65, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, - 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, - 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, - 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, - 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0xa6, - 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, 0x14, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, - 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, - 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, - 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, - 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, - 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x4d, 0x65, 0x74, 0x61, - 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, - 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x55, 0x72, 0x69, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x37, 0x0a, 0x07, 0x70, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x72, 0x69, - 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, 0x69, 0x76, 0x61, - 0x74, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 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, 0x1a, 0x4c, 0x0a, - 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, - 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, - 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, 0x0a, 0x0b, 0x50, - 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x67, 0x72, - 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, - 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, - 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x63, 0x6f, 0x70, - 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0xf7, 0x01, 0x0a, 0x07, 0x50, 0x72, - 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, - 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, - 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x3e, 0x0a, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x0c, 0x61, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0x22, 0x3e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, - 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, - 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x22, 0xf8, 0x01, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x32, - 0x0a, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, - 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x09, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, - 0x63, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x54, - 0x79, 0x70, 0x65, 0x52, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, - 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, - 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x18, - 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x75, 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x04, 0x6a, 0x77, 0x6b, 0x73, 0x1a, 0x37, 0x0a, 0x09, 0x4a, 0x77, 0x6b, 0x73, 0x45, 0x6e, 0x74, - 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x73, - 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, - 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, - 0x65, 0x79, 0x18, 0x03, 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, 0x42, 0x7b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, - 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, - 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, - 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, - 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, - 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x16, 0x64, + 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 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, 0x2f, 0x0a, 0x0b, 0x41, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, + 0x12, 0x20, 0x0a, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, + 0x6f, 0x72, 0x22, 0xc2, 0x01, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x64, + 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x49, 0x64, 0x12, + 0x1c, 0x0a, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x04, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x9d, 0x01, 0x0a, 0x03, 0x44, 0x49, 0x44, 0x12, + 0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, + 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x18, 0x0a, + 0x07, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, + 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, + 0x72, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, + 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x22, 0xc0, 0x02, 0x0a, 0x08, 0x44, 0x6f, 0x63, 0x75, + 0x6d, 0x65, 0x6e, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x4d, 0x0a, 0x14, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, + 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x13, + 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, + 0x6f, 0x64, 0x73, 0x12, 0x26, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x75, 0x74, + 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x0a, 0x10, 0x61, + 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x33, 0x0a, 0x15, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, + 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x07, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, + 0x79, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x33, 0x0a, 0x15, 0x63, + 0x61, 0x70, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x03, 0x28, 0x09, 0x52, 0x14, 0x63, 0x61, 0x70, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x09, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0xa1, 0x02, 0x0a, 0x08, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, + 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x34, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, + 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x52, 0x06, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x12, 0x37, 0x0a, 0x07, + 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x2e, + 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x70, 0x72, + 0x69, 0x76, 0x61, 0x74, 0x65, 0x1a, 0x39, 0x0a, 0x0b, 0x50, 0x75, 0x62, 0x6c, 0x69, 0x63, 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, + 0x1a, 0x4c, 0x0a, 0x0c, 0x50, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, + 0x65, 0x79, 0x12, 0x26, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x72, 0x6f, 0x70, 0x65, + 0x72, 0x74, 0x79, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x6c, + 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, + 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x14, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, + 0x61, 0x63, 0x65, 0x52, 0x06, 0x67, 0x72, 0x61, 0x6e, 0x74, 0x73, 0x12, 0x2f, 0x0a, 0x06, 0x73, + 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, + 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x22, 0x81, 0x01, 0x0a, + 0x07, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, + 0x65, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, + 0x63, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, + 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x22, 0x3e, 0x0a, 0x08, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x20, 0x0a, 0x0b, + 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x61, 0x63, 0x63, 0x75, 0x6d, 0x75, 0x6c, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x22, 0xb7, 0x02, 0x0a, 0x06, 0x50, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x23, 0x0a, 0x04, 0x72, + 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, + 0x12, 0x32, 0x0a, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4b, 0x65, 0x79, + 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x09, 0x61, 0x6c, 0x67, 0x6f, 0x72, + 0x69, 0x74, 0x68, 0x6d, 0x12, 0x2f, 0x0a, 0x08, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4b, 0x65, 0x79, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x65, 0x6e, 0x63, + 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x12, 0x10, 0x0a, 0x03, 0x72, 0x61, 0x77, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x03, 0x72, 0x61, 0x77, 0x12, 0x10, 0x0a, 0x03, 0x68, 0x65, 0x78, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x68, 0x65, 0x78, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x75, 0x6c, + 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6d, 0x75, + 0x6c, 0x74, 0x69, 0x62, 0x61, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x03, 0x6a, 0x77, 0x6b, 0x18, 0x07, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x2e, 0x4a, 0x77, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x03, 0x6a, + 0x77, 0x6b, 0x1a, 0x36, 0x0a, 0x08, 0x4a, 0x77, 0x6b, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xe4, 0x01, 0x0a, 0x07, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 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, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x35, + 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x06, 0x6f, 0x70, 0x65, 0x6e, 0x69, 0x64, 0x18, + 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4f, + 0x70, 0x65, 0x6e, 0x49, 0x44, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x06, 0x6f, 0x70, 0x65, + 0x6e, 0x69, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, + 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, + 0x61, 0x22, 0x4f, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, + 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6d, 0x61, 0x63, 0x72, + 0x6f, 0x6e, 0x22, 0xcc, 0x01, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x06, 0x6d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x44, 0x49, 0x44, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x52, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 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, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x22, 0x23, 0x0a, 0x07, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, + 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, + 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x42, 0x7b, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 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 ( @@ -7891,44 +10414,55 @@ func file_did_v1_models_proto_rawDescGZIP() []byte { return file_did_v1_models_proto_rawDescData } -var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 12) +var file_did_v1_models_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_did_v1_models_proto_goTypes = []interface{}{ - (*DID)(nil), // 0: did.v1.DID + (*Accumulator)(nil), // 0: did.v1.Accumulator (*Credential)(nil), // 1: did.v1.Credential - (*Document)(nil), // 2: did.v1.Document - (*Metadata)(nil), // 3: did.v1.Metadata - (*Permissions)(nil), // 4: did.v1.Permissions - (*Profile)(nil), // 5: did.v1.Profile - (*Property)(nil), // 6: did.v1.Property - (*PubKey)(nil), // 7: did.v1.PubKey - (*VerificationMethod)(nil), // 8: did.v1.VerificationMethod - nil, // 9: did.v1.Metadata.PublicEntry - nil, // 10: did.v1.Metadata.PrivateEntry - nil, // 11: did.v1.PubKey.JwksEntry - (DIDNamespace)(0), // 12: did.v1.DIDNamespace - (PermissionScope)(0), // 13: did.v1.PermissionScope - (KeyType)(0), // 14: did.v1.KeyType + (*DID)(nil), // 2: did.v1.DID + (*Document)(nil), // 3: did.v1.Document + (*Metadata)(nil), // 4: did.v1.Metadata + (*Permissions)(nil), // 5: did.v1.Permissions + (*Profile)(nil), // 6: did.v1.Profile + (*Property)(nil), // 7: did.v1.Property + (*PubKey)(nil), // 8: did.v1.PubKey + (*Service)(nil), // 9: did.v1.Service + (*Token)(nil), // 10: did.v1.Token + (*VerificationMethod)(nil), // 11: did.v1.VerificationMethod + (*Witness)(nil), // 12: did.v1.Witness + nil, // 13: did.v1.Metadata.PublicEntry + nil, // 14: did.v1.Metadata.PrivateEntry + nil, // 15: did.v1.PubKey.JwkEntry + (DIDNamespace)(0), // 16: did.v1.DIDNamespace + (PermissionScope)(0), // 17: did.v1.PermissionScope + (KeyRole)(0), // 18: did.v1.KeyRole + (KeyAlgorithm)(0), // 19: did.v1.KeyAlgorithm + (KeyEncoding)(0), // 20: did.v1.KeyEncoding + (*OpenIDConfig)(nil), // 21: did.v1.OpenIDConfig } var file_did_v1_models_proto_depIdxs = []int32{ - 12, // 0: did.v1.DID.method:type_name -> did.v1.DIDNamespace - 8, // 1: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod - 9, // 2: did.v1.Metadata.public:type_name -> did.v1.Metadata.PublicEntry - 10, // 3: did.v1.Metadata.private:type_name -> did.v1.Metadata.PrivateEntry - 12, // 4: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace - 13, // 5: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope - 1, // 6: did.v1.Profile.credentials:type_name -> did.v1.Credential - 8, // 7: did.v1.Profile.attestations:type_name -> did.v1.VerificationMethod - 3, // 8: did.v1.Profile.metadata:type_name -> did.v1.Metadata - 12, // 9: did.v1.PubKey.namespace:type_name -> did.v1.DIDNamespace - 14, // 10: did.v1.PubKey.kind:type_name -> did.v1.KeyType - 11, // 11: did.v1.PubKey.jwks:type_name -> did.v1.PubKey.JwksEntry - 7, // 12: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey - 6, // 13: did.v1.Metadata.PrivateEntry.value:type_name -> did.v1.Property - 14, // [14:14] is the sub-list for method output_type - 14, // [14:14] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 16, // 0: did.v1.DID.method:type_name -> did.v1.DIDNamespace + 11, // 1: did.v1.Document.verification_methods:type_name -> did.v1.VerificationMethod + 13, // 2: did.v1.Metadata.public:type_name -> did.v1.Metadata.PublicEntry + 14, // 3: did.v1.Metadata.private:type_name -> did.v1.Metadata.PrivateEntry + 16, // 4: did.v1.Permissions.grants:type_name -> did.v1.DIDNamespace + 17, // 5: did.v1.Permissions.scopes:type_name -> did.v1.PermissionScope + 4, // 6: did.v1.Profile.metadata:type_name -> did.v1.Metadata + 18, // 7: did.v1.PubKey.role:type_name -> did.v1.KeyRole + 19, // 8: did.v1.PubKey.algorithm:type_name -> did.v1.KeyAlgorithm + 20, // 9: did.v1.PubKey.encoding:type_name -> did.v1.KeyEncoding + 15, // 10: did.v1.PubKey.jwk:type_name -> did.v1.PubKey.JwkEntry + 5, // 11: did.v1.Service.permissions:type_name -> did.v1.Permissions + 21, // 12: did.v1.Service.openid:type_name -> did.v1.OpenIDConfig + 4, // 13: did.v1.Service.metadata:type_name -> did.v1.Metadata + 16, // 14: did.v1.VerificationMethod.method:type_name -> did.v1.DIDNamespace + 8, // 15: did.v1.VerificationMethod.public_key:type_name -> did.v1.PubKey + 9, // 16: did.v1.VerificationMethod.service:type_name -> did.v1.Service + 7, // 17: did.v1.Metadata.PrivateEntry.value:type_name -> did.v1.Property + 18, // [18:18] is the sub-list for method output_type + 18, // [18:18] is the sub-list for method input_type + 18, // [18:18] is the sub-list for extension type_name + 18, // [18:18] is the sub-list for extension extendee + 0, // [0:18] is the sub-list for field type_name } func init() { file_did_v1_models_proto_init() } @@ -7936,10 +10470,11 @@ func file_did_v1_models_proto_init() { if File_did_v1_models_proto != nil { return } + file_did_v1_constants_proto_init() file_did_v1_genesis_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DID); i { + switch v := v.(*Accumulator); i { case 0: return &v.state case 1: @@ -7963,7 +10498,7 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Document); i { + switch v := v.(*DID); i { case 0: return &v.state case 1: @@ -7975,7 +10510,7 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Metadata); i { + switch v := v.(*Document); i { case 0: return &v.state case 1: @@ -7987,7 +10522,7 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Permissions); i { + switch v := v.(*Metadata); i { case 0: return &v.state case 1: @@ -7999,7 +10534,7 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Profile); i { + switch v := v.(*Permissions); i { case 0: return &v.state case 1: @@ -8011,7 +10546,7 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Property); i { + switch v := v.(*Profile); i { case 0: return &v.state case 1: @@ -8023,7 +10558,7 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PubKey); i { + switch v := v.(*Property); i { case 0: return &v.state case 1: @@ -8035,6 +10570,42 @@ func file_did_v1_models_proto_init() { } } file_did_v1_models_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*PubKey); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_models_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Service); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_models_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Token); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_models_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*VerificationMethod); i { case 0: return &v.state @@ -8046,6 +10617,18 @@ func file_did_v1_models_proto_init() { return nil } } + file_did_v1_models_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Witness); 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{ @@ -8053,7 +10636,7 @@ func file_did_v1_models_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_models_proto_rawDesc, NumEnums: 0, - NumMessages: 12, + NumMessages: 16, NumExtensions: 0, NumServices: 0, }, diff --git a/api/did/v1/query.pulsar.go b/api/did/v1/query.pulsar.go index 3d81ca0da..1cc237c18 100644 --- a/api/did/v1/query.pulsar.go +++ b/api/did/v1/query.pulsar.go @@ -10,28 +10,86 @@ import ( protoimpl "google.golang.org/protobuf/runtime/protoimpl" io "io" reflect "reflect" - sort "sort" sync "sync" ) +var _ protoreflect.List = (*_QueryRequest_4_list)(nil) + +type _QueryRequest_4_list struct { + list *[]*Credential +} + +func (x *_QueryRequest_4_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_QueryRequest_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryRequest_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + (*x.list)[i] = concreteValue +} + +func (x *_QueryRequest_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryRequest_4_list) AppendMutable() protoreflect.Value { + v := new(Credential) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRequest_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_QueryRequest_4_list) NewElement() protoreflect.Value { + v := new(Credential) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryRequest_4_list) IsValid() bool { + return x.list != nil +} + var ( - md_QueryParamsRequest protoreflect.MessageDescriptor + md_QueryRequest protoreflect.MessageDescriptor + fd_QueryRequest_did protoreflect.FieldDescriptor + fd_QueryRequest_origin protoreflect.FieldDescriptor + fd_QueryRequest_subject protoreflect.FieldDescriptor + fd_QueryRequest_credentials protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() - md_QueryParamsRequest = File_did_v1_query_proto.Messages().ByName("QueryParamsRequest") + md_QueryRequest = File_did_v1_query_proto.Messages().ByName("QueryRequest") + fd_QueryRequest_did = md_QueryRequest.Fields().ByName("did") + fd_QueryRequest_origin = md_QueryRequest.Fields().ByName("origin") + fd_QueryRequest_subject = md_QueryRequest.Fields().ByName("subject") + fd_QueryRequest_credentials = md_QueryRequest.Fields().ByName("credentials") } -var _ protoreflect.Message = (*fastReflection_QueryParamsRequest)(nil) +var _ protoreflect.Message = (*fastReflection_QueryRequest)(nil) -type fastReflection_QueryParamsRequest QueryParamsRequest +type fastReflection_QueryRequest QueryRequest -func (x *QueryParamsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(x) +func (x *QueryRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryRequest)(x) } -func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { +func (x *QueryRequest) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_query_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -43,43 +101,43 @@ func (x *QueryParamsRequest) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_QueryParamsRequest_messageType fastReflection_QueryParamsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryParamsRequest_messageType{} +var _fastReflection_QueryRequest_messageType fastReflection_QueryRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryRequest_messageType{} -type fastReflection_QueryParamsRequest_messageType struct{} +type fastReflection_QueryRequest_messageType struct{} -func (x fastReflection_QueryParamsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryParamsRequest)(nil) +func (x fastReflection_QueryRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryRequest)(nil) } -func (x fastReflection_QueryParamsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x fastReflection_QueryRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryRequest) } -func (x fastReflection_QueryParamsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x fastReflection_QueryRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRequest } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_QueryParamsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryParamsRequest +func (x *fastReflection_QueryRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryRequest } // 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_QueryParamsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryParamsRequest_messageType +func (x *fastReflection_QueryRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryRequest_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryParamsRequest) New() protoreflect.Message { - return new(fastReflection_QueryParamsRequest) +func (x *fastReflection_QueryRequest) New() protoreflect.Message { + return new(fastReflection_QueryRequest) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryParamsRequest)(x) +func (x *fastReflection_QueryRequest) Interface() protoreflect.ProtoMessage { + return (*QueryRequest)(x) } // Range iterates over every populated field in an undefined order, @@ -87,7 +145,31 @@ func (x *fastReflection_QueryParamsRequest) Interface() protoreflect.ProtoMessag // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_QueryRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_QueryRequest_did, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_QueryRequest_origin, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_QueryRequest_subject, value) { + return + } + } + if len(x.Credentials) != 0 { + value := protoreflect.ValueOfList(&_QueryRequest_4_list{list: &x.Credentials}) + if !f(fd_QueryRequest_credentials, value) { + return + } + } } // Has reports whether a field is populated. @@ -101,13 +183,21 @@ func (x *fastReflection_QueryParamsRequest) Range(f func(protoreflect.FieldDescr // In other cases (aside from the nullable cases above), // a proto3 scalar field is populated if it contains a non-zero value, and // a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_QueryRequest) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "did.v1.QueryRequest.did": + return x.Did != "" + case "did.v1.QueryRequest.origin": + return x.Origin != "" + case "did.v1.QueryRequest.subject": + return x.Subject != "" + case "did.v1.QueryRequest.credentials": + return len(x.Credentials) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryRequest does not contain field %s", fd.FullName())) } } @@ -117,13 +207,21 @@ func (x *fastReflection_QueryParamsRequest) Has(fd protoreflect.FieldDescriptor) // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_QueryRequest) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "did.v1.QueryRequest.did": + x.Did = "" + case "did.v1.QueryRequest.origin": + x.Origin = "" + case "did.v1.QueryRequest.subject": + x.Subject = "" + case "did.v1.QueryRequest.credentials": + x.Credentials = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryRequest does not contain field %s", fd.FullName())) } } @@ -133,13 +231,28 @@ func (x *fastReflection_QueryParamsRequest) Clear(fd protoreflect.FieldDescripto // the default value of a bytes scalar is guaranteed to be a copy. // For unpopulated composite types, it returns an empty, read-only view // of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "did.v1.QueryRequest.did": + value := x.Did + return protoreflect.ValueOfString(value) + case "did.v1.QueryRequest.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.QueryRequest.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.QueryRequest.credentials": + if len(x.Credentials) == 0 { + return protoreflect.ValueOfList(&_QueryRequest_4_list{}) + } + listValue := &_QueryRequest_4_list{list: &x.Credentials} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsRequest does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.QueryRequest does not contain field %s", descriptor.FullName())) } } @@ -153,13 +266,23 @@ func (x *fastReflection_QueryParamsRequest) Get(descriptor protoreflect.FieldDes // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_QueryRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "did.v1.QueryRequest.did": + x.Did = value.Interface().(string) + case "did.v1.QueryRequest.origin": + x.Origin = value.Interface().(string) + case "did.v1.QueryRequest.subject": + x.Subject = value.Interface().(string) + case "did.v1.QueryRequest.credentials": + lv := value.List() + clv := lv.(*_QueryRequest_4_list) + x.Credentials = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryRequest does not contain field %s", fd.FullName())) } } @@ -173,36 +296,57 @@ func (x *fastReflection_QueryParamsRequest) Set(fd protoreflect.FieldDescriptor, // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryParamsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.QueryRequest.credentials": + if x.Credentials == nil { + x.Credentials = []*Credential{} + } + value := &_QueryRequest_4_list{list: &x.Credentials} + return protoreflect.ValueOfList(value) + case "did.v1.QueryRequest.did": + panic(fmt.Errorf("field did of message did.v1.QueryRequest is not mutable")) + case "did.v1.QueryRequest.origin": + panic(fmt.Errorf("field origin of message did.v1.QueryRequest is not mutable")) + case "did.v1.QueryRequest.subject": + panic(fmt.Errorf("field subject of message did.v1.QueryRequest is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryRequest 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_QueryParamsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_QueryRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.QueryRequest.did": + return protoreflect.ValueOfString("") + case "did.v1.QueryRequest.origin": + return protoreflect.ValueOfString("") + case "did.v1.QueryRequest.subject": + return protoreflect.ValueOfString("") + case "did.v1.QueryRequest.credentials": + list := []*Credential{} + return protoreflect.ValueOfList(&_QueryRequest_4_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryParamsRequest")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryRequest")) } - panic(fmt.Errorf("message did.v1.QueryParamsRequest does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.QueryRequest 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_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_QueryRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryParamsRequest", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryRequest", d.FullName())) } panic("unreachable") } @@ -210,7 +354,7 @@ func (x *fastReflection_QueryParamsRequest) WhichOneof(d protoreflect.OneofDescr // GetUnknown retrieves the entire list of unknown fields. // The caller may only mutate the contents of the RawFields // if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryParamsRequest) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_QueryRequest) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -221,7 +365,7 @@ func (x *fastReflection_QueryParamsRequest) 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_QueryParamsRequest) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_QueryRequest) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -233,7 +377,7 @@ func (x *fastReflection_QueryParamsRequest) SetUnknown(fields protoreflect.RawFi // message type, but the details are implementation dependent. // Validity is not part of the protobuf data model, and may not // be preserved in marshaling or other operations. -func (x *fastReflection_QueryParamsRequest) IsValid() bool { +func (x *fastReflection_QueryRequest) IsValid() bool { return x != nil } @@ -243,9 +387,9 @@ func (x *fastReflection_QueryParamsRequest) 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_QueryParamsRequest) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_QueryRequest) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryRequest) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -257,6 +401,24 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { var n int var l int _ = l + l = len(x.Did) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Credentials) > 0 { + for _, e := range x.Credentials { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -267,7 +429,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryRequest) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -286,6 +448,43 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Credentials) > 0 { + for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Credentials[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x22 + } + } + if len(x.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.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(x.Did) > 0 { + i -= len(x.Did) + copy(dAtA[i:], x.Did) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -297,7 +496,7 @@ func (x *fastReflection_QueryParamsRequest) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryParamsRequest) + x := input.Message.Interface().(*QueryRequest) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -329,12 +528,142 @@ func (x *fastReflection_QueryParamsRequest) 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: QueryParamsRequest: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + 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 Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Credentials = append(x.Credentials, &Credential{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -805,426 +1134,6 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } -var ( - md_QueryAccountsRequest protoreflect.MessageDescriptor - fd_QueryAccountsRequest_did protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryAccountsRequest = File_did_v1_query_proto.Messages().ByName("QueryAccountsRequest") - fd_QueryAccountsRequest_did = md_QueryAccountsRequest.Fields().ByName("did") -} - -var _ protoreflect.Message = (*fastReflection_QueryAccountsRequest)(nil) - -type fastReflection_QueryAccountsRequest QueryAccountsRequest - -func (x *QueryAccountsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryAccountsRequest)(x) -} - -func (x *QueryAccountsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryAccountsRequest_messageType fastReflection_QueryAccountsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryAccountsRequest_messageType{} - -type fastReflection_QueryAccountsRequest_messageType struct{} - -func (x fastReflection_QueryAccountsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryAccountsRequest)(nil) -} -func (x fastReflection_QueryAccountsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryAccountsRequest) -} -func (x fastReflection_QueryAccountsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryAccountsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryAccountsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryAccountsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryAccountsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryAccountsRequest) New() protoreflect.Message { - return new(fastReflection_QueryAccountsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryAccountsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryAccountsRequest)(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_QueryAccountsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_QueryAccountsRequest_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_QueryAccountsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryAccountsRequest.did": - return x.Did != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryAccountsRequest 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_QueryAccountsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryAccountsRequest.did": - x.Did = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryAccountsRequest 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_QueryAccountsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryAccountsRequest.did": - value := x.Did - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryAccountsRequest 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_QueryAccountsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryAccountsRequest.did": - x.Did = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryAccountsRequest 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_QueryAccountsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryAccountsRequest.did": - panic(fmt.Errorf("field did of message did.v1.QueryAccountsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryAccountsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryAccountsRequest.did": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryAccountsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryAccountsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryAccountsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryAccountsRequest", 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) 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_QueryAccountsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryAccountsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryAccountsRequest) - 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: QueryAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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_QueryAccountsResponse protoreflect.MessageDescriptor fd_QueryAccountsResponse_exists protoreflect.FieldDescriptor @@ -1245,7 +1154,7 @@ func (x *QueryAccountsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryAccountsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[3] + mi := &file_did_v1_query_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1635,581 +1544,74 @@ func (x *fastReflection_QueryAccountsResponse) ProtoMethods() *protoiface.Method } } -var ( - md_QueryCredentialsRequest protoreflect.MessageDescriptor - fd_QueryCredentialsRequest_did protoreflect.FieldDescriptor - fd_QueryCredentialsRequest_origin protoreflect.FieldDescriptor -) +var _ protoreflect.List = (*_QueryCredentialsResponse_4_list)(nil) -func init() { - file_did_v1_query_proto_init() - md_QueryCredentialsRequest = File_did_v1_query_proto.Messages().ByName("QueryCredentialsRequest") - fd_QueryCredentialsRequest_did = md_QueryCredentialsRequest.Fields().ByName("did") - fd_QueryCredentialsRequest_origin = md_QueryCredentialsRequest.Fields().ByName("origin") +type _QueryCredentialsResponse_4_list struct { + list *[]*Credential } -var _ protoreflect.Message = (*fastReflection_QueryCredentialsRequest)(nil) - -type fastReflection_QueryCredentialsRequest QueryCredentialsRequest - -func (x *QueryCredentialsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryCredentialsRequest)(x) -} - -func (x *QueryCredentialsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryCredentialsRequest_messageType fastReflection_QueryCredentialsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryCredentialsRequest_messageType{} - -type fastReflection_QueryCredentialsRequest_messageType struct{} - -func (x fastReflection_QueryCredentialsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryCredentialsRequest)(nil) -} -func (x fastReflection_QueryCredentialsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryCredentialsRequest) -} -func (x fastReflection_QueryCredentialsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCredentialsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryCredentialsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryCredentialsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryCredentialsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryCredentialsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryCredentialsRequest) New() protoreflect.Message { - return new(fastReflection_QueryCredentialsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryCredentialsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryCredentialsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryCredentialsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_QueryCredentialsRequest_did, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryCredentialsRequest_origin, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryCredentialsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryCredentialsRequest.did": - return x.Did != "" - case "did.v1.QueryCredentialsRequest.origin": - return x.Origin != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCredentialsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryCredentialsRequest.did": - x.Did = "" - case "did.v1.QueryCredentialsRequest.origin": - x.Origin = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryCredentialsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryCredentialsRequest.did": - value := x.Did - return protoreflect.ValueOfString(value) - case "did.v1.QueryCredentialsRequest.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCredentialsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryCredentialsRequest.did": - x.Did = value.Interface().(string) - case "did.v1.QueryCredentialsRequest.origin": - x.Origin = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCredentialsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryCredentialsRequest.did": - panic(fmt.Errorf("field did of message did.v1.QueryCredentialsRequest is not mutable")) - case "did.v1.QueryCredentialsRequest.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryCredentialsRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryCredentialsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryCredentialsRequest.did": - return protoreflect.ValueOfString("") - case "did.v1.QueryCredentialsRequest.origin": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsRequest")) - } - panic(fmt.Errorf("message did.v1.QueryCredentialsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryCredentialsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryCredentialsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryCredentialsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryCredentialsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryCredentialsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryCredentialsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryCredentialsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryCredentialsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x12 - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryCredentialsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCredentialsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryCredentialsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.Map = (*_QueryCredentialsResponse_1_map)(nil) - -type _QueryCredentialsResponse_1_map struct { - m *map[string][]byte -} - -func (x *_QueryCredentialsResponse_1_map) Len() int { - if x.m == nil { +func (x *_QueryCredentialsResponse_4_list) Len() int { + if x.list == nil { return 0 } - return len(*x.m) + return len(*x.list) } -func (x *_QueryCredentialsResponse_1_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { - if x.m == nil { - return - } - for k, v := range *x.m { - mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) - mapValue := protoreflect.ValueOfBytes(v) - if !f(mapKey, mapValue) { - break - } +func (x *_QueryCredentialsResponse_4_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_QueryCredentialsResponse_4_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + (*x.list)[i] = concreteValue +} + +func (x *_QueryCredentialsResponse_4_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) + *x.list = append(*x.list, concreteValue) +} + +func (x *_QueryCredentialsResponse_4_list) AppendMutable() protoreflect.Value { + v := new(Credential) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_QueryCredentialsResponse_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil } + *x.list = (*x.list)[:n] } -func (x *_QueryCredentialsResponse_1_map) Has(key protoreflect.MapKey) bool { - if x.m == nil { - return false - } - keyUnwrapped := key.String() - concreteValue := keyUnwrapped - _, ok := (*x.m)[concreteValue] - return ok +func (x *_QueryCredentialsResponse_4_list) NewElement() protoreflect.Value { + v := new(Credential) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_QueryCredentialsResponse_1_map) Clear(key protoreflect.MapKey) { - if x.m == nil { - return - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - delete(*x.m, concreteKey) -} - -func (x *_QueryCredentialsResponse_1_map) Get(key protoreflect.MapKey) protoreflect.Value { - if x.m == nil { - return protoreflect.Value{} - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - v, ok := (*x.m)[concreteKey] - if !ok { - return protoreflect.Value{} - } - return protoreflect.ValueOfBytes(v) -} - -func (x *_QueryCredentialsResponse_1_map) Set(key protoreflect.MapKey, value protoreflect.Value) { - if !key.IsValid() || !value.IsValid() { - panic("invalid key or value provided") - } - keyUnwrapped := key.String() - concreteKey := keyUnwrapped - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.m)[concreteKey] = concreteValue -} - -func (x *_QueryCredentialsResponse_1_map) Mutable(key protoreflect.MapKey) protoreflect.Value { - panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") -} - -func (x *_QueryCredentialsResponse_1_map) NewValue() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_QueryCredentialsResponse_1_map) IsValid() bool { - return x.m != nil +func (x *_QueryCredentialsResponse_4_list) IsValid() bool { + return x.list != nil } var ( md_QueryCredentialsResponse protoreflect.MessageDescriptor + fd_QueryCredentialsResponse_success protoreflect.FieldDescriptor + fd_QueryCredentialsResponse_subject protoreflect.FieldDescriptor + fd_QueryCredentialsResponse_origin protoreflect.FieldDescriptor fd_QueryCredentialsResponse_credentials protoreflect.FieldDescriptor + fd_QueryCredentialsResponse_error protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() md_QueryCredentialsResponse = File_did_v1_query_proto.Messages().ByName("QueryCredentialsResponse") + fd_QueryCredentialsResponse_success = md_QueryCredentialsResponse.Fields().ByName("success") + fd_QueryCredentialsResponse_subject = md_QueryCredentialsResponse.Fields().ByName("subject") + fd_QueryCredentialsResponse_origin = md_QueryCredentialsResponse.Fields().ByName("origin") fd_QueryCredentialsResponse_credentials = md_QueryCredentialsResponse.Fields().ByName("credentials") + fd_QueryCredentialsResponse_error = md_QueryCredentialsResponse.Fields().ByName("error") } var _ protoreflect.Message = (*fastReflection_QueryCredentialsResponse)(nil) @@ -2221,7 +1623,7 @@ func (x *QueryCredentialsResponse) ProtoReflect() protoreflect.Message { } func (x *QueryCredentialsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[5] + mi := &file_did_v1_query_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2277,12 +1679,36 @@ func (x *fastReflection_QueryCredentialsResponse) Interface() protoreflect.Proto // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryCredentialsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_QueryCredentialsResponse_success, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_QueryCredentialsResponse_subject, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_QueryCredentialsResponse_origin, value) { + return + } + } if len(x.Credentials) != 0 { - value := protoreflect.ValueOfMap(&_QueryCredentialsResponse_1_map{m: &x.Credentials}) + value := protoreflect.ValueOfList(&_QueryCredentialsResponse_4_list{list: &x.Credentials}) if !f(fd_QueryCredentialsResponse_credentials, value) { return } } + if x.Error != "" { + value := protoreflect.ValueOfString(x.Error) + if !f(fd_QueryCredentialsResponse_error, value) { + return + } + } } // Has reports whether a field is populated. @@ -2298,8 +1724,16 @@ func (x *fastReflection_QueryCredentialsResponse) Range(f func(protoreflect.Fiel // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryCredentialsResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.success": + return x.Success != false + case "did.v1.QueryCredentialsResponse.subject": + return x.Subject != "" + case "did.v1.QueryCredentialsResponse.origin": + return x.Origin != "" case "did.v1.QueryCredentialsResponse.credentials": return len(x.Credentials) != 0 + case "did.v1.QueryCredentialsResponse.error": + return x.Error != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) @@ -2316,8 +1750,16 @@ func (x *fastReflection_QueryCredentialsResponse) Has(fd protoreflect.FieldDescr // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCredentialsResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.success": + x.Success = false + case "did.v1.QueryCredentialsResponse.subject": + x.Subject = "" + case "did.v1.QueryCredentialsResponse.origin": + x.Origin = "" case "did.v1.QueryCredentialsResponse.credentials": x.Credentials = nil + case "did.v1.QueryCredentialsResponse.error": + x.Error = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) @@ -2334,12 +1776,24 @@ func (x *fastReflection_QueryCredentialsResponse) Clear(fd protoreflect.FieldDes // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryCredentialsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "did.v1.QueryCredentialsResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.QueryCredentialsResponse.subject": + value := x.Subject + return protoreflect.ValueOfString(value) + case "did.v1.QueryCredentialsResponse.origin": + value := x.Origin + return protoreflect.ValueOfString(value) case "did.v1.QueryCredentialsResponse.credentials": if len(x.Credentials) == 0 { - return protoreflect.ValueOfMap(&_QueryCredentialsResponse_1_map{}) + return protoreflect.ValueOfList(&_QueryCredentialsResponse_4_list{}) } - mapValue := &_QueryCredentialsResponse_1_map{m: &x.Credentials} - return protoreflect.ValueOfMap(mapValue) + listValue := &_QueryCredentialsResponse_4_list{list: &x.Credentials} + return protoreflect.ValueOfList(listValue) + case "did.v1.QueryCredentialsResponse.error": + value := x.Error + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) @@ -2360,10 +1814,18 @@ func (x *fastReflection_QueryCredentialsResponse) Get(descriptor protoreflect.Fi // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryCredentialsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.success": + x.Success = value.Bool() + case "did.v1.QueryCredentialsResponse.subject": + x.Subject = value.Interface().(string) + case "did.v1.QueryCredentialsResponse.origin": + x.Origin = value.Interface().(string) case "did.v1.QueryCredentialsResponse.credentials": - mv := value.Map() - cmv := mv.(*_QueryCredentialsResponse_1_map) - x.Credentials = *cmv.m + lv := value.List() + clv := lv.(*_QueryCredentialsResponse_4_list) + x.Credentials = *clv.list + case "did.v1.QueryCredentialsResponse.error": + x.Error = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) @@ -2386,10 +1848,18 @@ func (x *fastReflection_QueryCredentialsResponse) Mutable(fd protoreflect.FieldD switch fd.FullName() { case "did.v1.QueryCredentialsResponse.credentials": if x.Credentials == nil { - x.Credentials = make(map[string][]byte) + x.Credentials = []*Credential{} } - value := &_QueryCredentialsResponse_1_map{m: &x.Credentials} - return protoreflect.ValueOfMap(value) + value := &_QueryCredentialsResponse_4_list{list: &x.Credentials} + return protoreflect.ValueOfList(value) + case "did.v1.QueryCredentialsResponse.success": + panic(fmt.Errorf("field success of message did.v1.QueryCredentialsResponse is not mutable")) + case "did.v1.QueryCredentialsResponse.subject": + panic(fmt.Errorf("field subject of message did.v1.QueryCredentialsResponse is not mutable")) + case "did.v1.QueryCredentialsResponse.origin": + panic(fmt.Errorf("field origin of message did.v1.QueryCredentialsResponse is not mutable")) + case "did.v1.QueryCredentialsResponse.error": + panic(fmt.Errorf("field error of message did.v1.QueryCredentialsResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) @@ -2403,9 +1873,17 @@ func (x *fastReflection_QueryCredentialsResponse) Mutable(fd protoreflect.FieldD // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryCredentialsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.QueryCredentialsResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.QueryCredentialsResponse.subject": + return protoreflect.ValueOfString("") + case "did.v1.QueryCredentialsResponse.origin": + return protoreflect.ValueOfString("") case "did.v1.QueryCredentialsResponse.credentials": - m := make(map[string][]byte) - return protoreflect.ValueOfMap(&_QueryCredentialsResponse_1_map{m: &m}) + list := []*Credential{} + return protoreflect.ValueOfList(&_QueryCredentialsResponse_4_list{list: &list}) + case "did.v1.QueryCredentialsResponse.error": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryCredentialsResponse")) @@ -2475,28 +1953,27 @@ func (x *fastReflection_QueryCredentialsResponse) ProtoMethods() *protoiface.Met var n int var l int _ = l + if x.Success { + n += 2 + } + l = len(x.Subject) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if len(x.Credentials) > 0 { - SiZeMaP := func(k string, v []byte) { - l = 1 + len(v) + runtime.Sov(uint64(len(v))) - mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + l - n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) - } - if options.Deterministic { - sortme := make([]string, 0, len(x.Credentials)) - for k := range x.Credentials { - sortme = append(sortme, k) - } - sort.Strings(sortme) - for _, k := range sortme { - v := x.Credentials[k] - SiZeMaP(k, v) - } - } else { - for k, v := range x.Credentials { - SiZeMaP(k, v) - } + for _, e := range x.Credentials { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) } } + l = len(x.Error) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2526,48 +2003,52 @@ func (x *fastReflection_QueryCredentialsResponse) ProtoMethods() *protoiface.Met i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if len(x.Error) > 0 { + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x2a + } if len(x.Credentials) > 0 { - MaRsHaLmAp := func(k string, v []byte) (protoiface.MarshalOutput, error) { - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + for iNdEx := len(x.Credentials) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Credentials[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - return protoiface.MarshalOutput{}, nil + dAtA[i] = 0x22 } - if options.Deterministic { - keysForCredentials := make([]string, 0, len(x.Credentials)) - for k := range x.Credentials { - keysForCredentials = append(keysForCredentials, string(k)) - } - sort.Slice(keysForCredentials, func(i, j int) bool { - return keysForCredentials[i] < keysForCredentials[j] - }) - for iNdEx := len(keysForCredentials) - 1; iNdEx >= 0; iNdEx-- { - v := x.Credentials[string(keysForCredentials[iNdEx])] - out, err := MaRsHaLmAp(keysForCredentials[iNdEx], v) - if err != nil { - return out, err - } - } + } + 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] = 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 x.Success { + i-- + if x.Success { + dAtA[i] = 1 } else { - for k := range x.Credentials { - v := x.Credentials[k] - out, err := MaRsHaLmAp(k, v) - if err != nil { - return out, err - } - } + dAtA[i] = 0 } + i-- + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -2619,6 +2100,90 @@ func (x *fastReflection_QueryCredentialsResponse) ProtoMethods() *protoiface.Met } 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 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 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 4: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) } @@ -2647,496 +2212,14 @@ func (x *fastReflection_QueryCredentialsResponse) ProtoMethods() *protoiface.Met if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.Credentials == nil { - x.Credentials = make(map[string][]byte) - } - var mapkey string - var mapvalue []byte - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postStringIndexmapkey > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postbytesIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > postIndex { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - x.Credentials[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { + x.Credentials = append(x.Credentials, &Credential{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Credentials[len(x.Credentials)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryIdentitiesRequest protoreflect.MessageDescriptor - fd_QueryIdentitiesRequest_did protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryIdentitiesRequest = File_did_v1_query_proto.Messages().ByName("QueryIdentitiesRequest") - fd_QueryIdentitiesRequest_did = md_QueryIdentitiesRequest.Fields().ByName("did") -} - -var _ protoreflect.Message = (*fastReflection_QueryIdentitiesRequest)(nil) - -type fastReflection_QueryIdentitiesRequest QueryIdentitiesRequest - -func (x *QueryIdentitiesRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryIdentitiesRequest)(x) -} - -func (x *QueryIdentitiesRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryIdentitiesRequest_messageType fastReflection_QueryIdentitiesRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryIdentitiesRequest_messageType{} - -type fastReflection_QueryIdentitiesRequest_messageType struct{} - -func (x fastReflection_QueryIdentitiesRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryIdentitiesRequest)(nil) -} -func (x fastReflection_QueryIdentitiesRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryIdentitiesRequest) -} -func (x fastReflection_QueryIdentitiesRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIdentitiesRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryIdentitiesRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIdentitiesRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryIdentitiesRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryIdentitiesRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryIdentitiesRequest) New() protoreflect.Message { - return new(fastReflection_QueryIdentitiesRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryIdentitiesRequest) Interface() protoreflect.ProtoMessage { - return (*QueryIdentitiesRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryIdentitiesRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_QueryIdentitiesRequest_did, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryIdentitiesRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryIdentitiesRequest.did": - return x.Did != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryIdentitiesRequest.did": - x.Did = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryIdentitiesRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryIdentitiesRequest.did": - value := x.Did - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryIdentitiesRequest.did": - x.Did = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryIdentitiesRequest.did": - panic(fmt.Errorf("field did of message did.v1.QueryIdentitiesRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryIdentitiesRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryIdentitiesRequest.did": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesRequest")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryIdentitiesRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryIdentitiesRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryIdentitiesRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryIdentitiesRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryIdentitiesRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryIdentitiesRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryIdentitiesRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryIdentitiesRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3164,975 +2247,7 @@ func (x *fastReflection_QueryIdentitiesRequest) ProtoMethods() *protoiface.Metho if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryIdentitiesResponse_2_list)(nil) - -type _QueryIdentitiesResponse_2_list struct { - list *[]*VerificationMethod -} - -func (x *_QueryIdentitiesResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryIdentitiesResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryIdentitiesResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - (*x.list)[i] = concreteValue -} - -func (x *_QueryIdentitiesResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*VerificationMethod) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryIdentitiesResponse_2_list) AppendMutable() protoreflect.Value { - v := new(VerificationMethod) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryIdentitiesResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryIdentitiesResponse_2_list) NewElement() protoreflect.Value { - v := new(VerificationMethod) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryIdentitiesResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryIdentitiesResponse protoreflect.MessageDescriptor - fd_QueryIdentitiesResponse_exists protoreflect.FieldDescriptor - fd_QueryIdentitiesResponse_verificationMethod protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryIdentitiesResponse = File_did_v1_query_proto.Messages().ByName("QueryIdentitiesResponse") - fd_QueryIdentitiesResponse_exists = md_QueryIdentitiesResponse.Fields().ByName("exists") - fd_QueryIdentitiesResponse_verificationMethod = md_QueryIdentitiesResponse.Fields().ByName("verificationMethod") -} - -var _ protoreflect.Message = (*fastReflection_QueryIdentitiesResponse)(nil) - -type fastReflection_QueryIdentitiesResponse QueryIdentitiesResponse - -func (x *QueryIdentitiesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryIdentitiesResponse)(x) -} - -func (x *QueryIdentitiesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryIdentitiesResponse_messageType fastReflection_QueryIdentitiesResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryIdentitiesResponse_messageType{} - -type fastReflection_QueryIdentitiesResponse_messageType struct{} - -func (x fastReflection_QueryIdentitiesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryIdentitiesResponse)(nil) -} -func (x fastReflection_QueryIdentitiesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryIdentitiesResponse) -} -func (x fastReflection_QueryIdentitiesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIdentitiesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryIdentitiesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryIdentitiesResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryIdentitiesResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryIdentitiesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryIdentitiesResponse) New() protoreflect.Message { - return new(fastReflection_QueryIdentitiesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryIdentitiesResponse) Interface() protoreflect.ProtoMessage { - return (*QueryIdentitiesResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryIdentitiesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Exists != false { - value := protoreflect.ValueOfBool(x.Exists) - if !f(fd_QueryIdentitiesResponse_exists, value) { - return - } - } - if len(x.VerificationMethod) != 0 { - value := protoreflect.ValueOfList(&_QueryIdentitiesResponse_2_list{list: &x.VerificationMethod}) - if !f(fd_QueryIdentitiesResponse_verificationMethod, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryIdentitiesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryIdentitiesResponse.exists": - return x.Exists != false - case "did.v1.QueryIdentitiesResponse.verificationMethod": - return len(x.VerificationMethod) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryIdentitiesResponse.exists": - x.Exists = false - case "did.v1.QueryIdentitiesResponse.verificationMethod": - x.VerificationMethod = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryIdentitiesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryIdentitiesResponse.exists": - value := x.Exists - return protoreflect.ValueOfBool(value) - case "did.v1.QueryIdentitiesResponse.verificationMethod": - if len(x.VerificationMethod) == 0 { - return protoreflect.ValueOfList(&_QueryIdentitiesResponse_2_list{}) - } - listValue := &_QueryIdentitiesResponse_2_list{list: &x.VerificationMethod} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryIdentitiesResponse.exists": - x.Exists = value.Bool() - case "did.v1.QueryIdentitiesResponse.verificationMethod": - lv := value.List() - clv := lv.(*_QueryIdentitiesResponse_2_list) - x.VerificationMethod = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryIdentitiesResponse.verificationMethod": - if x.VerificationMethod == nil { - x.VerificationMethod = []*VerificationMethod{} - } - value := &_QueryIdentitiesResponse_2_list{list: &x.VerificationMethod} - return protoreflect.ValueOfList(value) - case "did.v1.QueryIdentitiesResponse.exists": - panic(fmt.Errorf("field exists of message did.v1.QueryIdentitiesResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryIdentitiesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryIdentitiesResponse.exists": - return protoreflect.ValueOfBool(false) - case "did.v1.QueryIdentitiesResponse.verificationMethod": - list := []*VerificationMethod{} - return protoreflect.ValueOfList(&_QueryIdentitiesResponse_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryIdentitiesResponse")) - } - panic(fmt.Errorf("message did.v1.QueryIdentitiesResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryIdentitiesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryIdentitiesResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryIdentitiesResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryIdentitiesResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryIdentitiesResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryIdentitiesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryIdentitiesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Exists { - n += 2 - } - if len(x.VerificationMethod) > 0 { - for _, e := range x.VerificationMethod { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryIdentitiesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.VerificationMethod) > 0 { - for iNdEx := len(x.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.VerificationMethod[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Exists { - i-- - if x.Exists { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryIdentitiesResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryIdentitiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.Exists = bool(v != 0) - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.VerificationMethod = append(x.VerificationMethod, &VerificationMethod{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.VerificationMethod[len(x.VerificationMethod)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryResolveRequest protoreflect.MessageDescriptor - fd_QueryResolveRequest_did protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryResolveRequest = File_did_v1_query_proto.Messages().ByName("QueryResolveRequest") - fd_QueryResolveRequest_did = md_QueryResolveRequest.Fields().ByName("did") -} - -var _ protoreflect.Message = (*fastReflection_QueryResolveRequest)(nil) - -type fastReflection_QueryResolveRequest QueryResolveRequest - -func (x *QueryResolveRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryResolveRequest)(x) -} - -func (x *QueryResolveRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_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_QueryResolveRequest_messageType fastReflection_QueryResolveRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryResolveRequest_messageType{} - -type fastReflection_QueryResolveRequest_messageType struct{} - -func (x fastReflection_QueryResolveRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryResolveRequest)(nil) -} -func (x fastReflection_QueryResolveRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryResolveRequest) -} -func (x fastReflection_QueryResolveRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryResolveRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryResolveRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryResolveRequest -} - -// 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_QueryResolveRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryResolveRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryResolveRequest) New() protoreflect.Message { - return new(fastReflection_QueryResolveRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryResolveRequest) Interface() protoreflect.ProtoMessage { - return (*QueryResolveRequest)(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_QueryResolveRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Did != "" { - value := protoreflect.ValueOfString(x.Did) - if !f(fd_QueryResolveRequest_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_QueryResolveRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryResolveRequest.did": - return x.Did != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) - } - panic(fmt.Errorf("message did.v1.QueryResolveRequest 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_QueryResolveRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryResolveRequest.did": - x.Did = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) - } - panic(fmt.Errorf("message did.v1.QueryResolveRequest 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_QueryResolveRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryResolveRequest.did": - value := x.Did - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) - } - panic(fmt.Errorf("message did.v1.QueryResolveRequest 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_QueryResolveRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryResolveRequest.did": - x.Did = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) - } - panic(fmt.Errorf("message did.v1.QueryResolveRequest 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_QueryResolveRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryResolveRequest.did": - panic(fmt.Errorf("field did of message did.v1.QueryResolveRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) - } - panic(fmt.Errorf("message did.v1.QueryResolveRequest 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_QueryResolveRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryResolveRequest.did": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryResolveRequest")) - } - panic(fmt.Errorf("message did.v1.QueryResolveRequest 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_QueryResolveRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryResolveRequest", 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_QueryResolveRequest) 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_QueryResolveRequest) 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_QueryResolveRequest) 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_QueryResolveRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryResolveRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Did) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryResolveRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Did) > 0 { - i -= len(x.Did) - copy(dAtA[i:], x.Did) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Did))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryResolveRequest) - 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: QueryResolveRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryResolveRequest: 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]) + x.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -4189,7 +2304,7 @@ func (x *QueryResolveResponse) ProtoReflect() protoreflect.Message { } func (x *QueryResolveResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[9] + mi := &file_did_v1_query_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -4604,435 +2719,15 @@ func (x *fastReflection_QueryResolveResponse) ProtoMethods() *protoiface.Methods } } -var ( - md_QueryServiceRequest protoreflect.MessageDescriptor - fd_QueryServiceRequest_origin protoreflect.FieldDescriptor -) - -func init() { - file_did_v1_query_proto_init() - md_QueryServiceRequest = File_did_v1_query_proto.Messages().ByName("QueryServiceRequest") - fd_QueryServiceRequest_origin = md_QueryServiceRequest.Fields().ByName("origin") -} - -var _ protoreflect.Message = (*fastReflection_QueryServiceRequest)(nil) - -type fastReflection_QueryServiceRequest QueryServiceRequest - -func (x *QueryServiceRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryServiceRequest)(x) -} - -func (x *QueryServiceRequest) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryServiceRequest_messageType fastReflection_QueryServiceRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryServiceRequest_messageType{} - -type fastReflection_QueryServiceRequest_messageType struct{} - -func (x fastReflection_QueryServiceRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryServiceRequest)(nil) -} -func (x fastReflection_QueryServiceRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryServiceRequest) -} -func (x fastReflection_QueryServiceRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryServiceRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryServiceRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryServiceRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryServiceRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryServiceRequest) New() protoreflect.Message { - return new(fastReflection_QueryServiceRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryServiceRequest) Interface() protoreflect.ProtoMessage { - return (*QueryServiceRequest)(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_QueryServiceRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_QueryServiceRequest_origin, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryServiceRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "did.v1.QueryServiceRequest.origin": - return x.Origin != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) - } - panic(fmt.Errorf("message did.v1.QueryServiceRequest 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_QueryServiceRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "did.v1.QueryServiceRequest.origin": - x.Origin = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) - } - panic(fmt.Errorf("message did.v1.QueryServiceRequest 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_QueryServiceRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "did.v1.QueryServiceRequest.origin": - value := x.Origin - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) - } - panic(fmt.Errorf("message did.v1.QueryServiceRequest 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_QueryServiceRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "did.v1.QueryServiceRequest.origin": - x.Origin = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) - } - panic(fmt.Errorf("message did.v1.QueryServiceRequest 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_QueryServiceRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryServiceRequest.origin": - panic(fmt.Errorf("field origin of message did.v1.QueryServiceRequest is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) - } - panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryServiceRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "did.v1.QueryServiceRequest.origin": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceRequest")) - } - panic(fmt.Errorf("message did.v1.QueryServiceRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryServiceRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryServiceRequest", 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_QueryServiceRequest) 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_QueryServiceRequest) 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_QueryServiceRequest) 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_QueryServiceRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryServiceRequest) - 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)) - } - 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().(*QueryServiceRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 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().(*QueryServiceRequest) - 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: QueryServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - var ( md_QueryServiceResponse protoreflect.MessageDescriptor - fd_QueryServiceResponse_options protoreflect.FieldDescriptor + fd_QueryServiceResponse_service protoreflect.FieldDescriptor ) func init() { file_did_v1_query_proto_init() md_QueryServiceResponse = File_did_v1_query_proto.Messages().ByName("QueryServiceResponse") - fd_QueryServiceResponse_options = md_QueryServiceResponse.Fields().ByName("options") + fd_QueryServiceResponse_service = md_QueryServiceResponse.Fields().ByName("service") } var _ protoreflect.Message = (*fastReflection_QueryServiceResponse)(nil) @@ -5044,7 +2739,7 @@ func (x *QueryServiceResponse) ProtoReflect() protoreflect.Message { } func (x *QueryServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_query_proto_msgTypes[11] + mi := &file_did_v1_query_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5100,9 +2795,9 @@ func (x *fastReflection_QueryServiceResponse) Interface() protoreflect.ProtoMess // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_QueryServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Options != "" { - value := protoreflect.ValueOfString(x.Options) - if !f(fd_QueryServiceResponse_options, value) { + if x.Service != nil { + value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) + if !f(fd_QueryServiceResponse_service, value) { return } } @@ -5121,8 +2816,8 @@ func (x *fastReflection_QueryServiceResponse) Range(f func(protoreflect.FieldDes // a repeated field is populated if it is non-empty. func (x *fastReflection_QueryServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - return x.Options != "" + case "did.v1.QueryServiceResponse.service": + return x.Service != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) @@ -5139,8 +2834,8 @@ func (x *fastReflection_QueryServiceResponse) Has(fd protoreflect.FieldDescripto // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryServiceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - x.Options = "" + case "did.v1.QueryServiceResponse.service": + x.Service = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) @@ -5157,9 +2852,9 @@ func (x *fastReflection_QueryServiceResponse) Clear(fd protoreflect.FieldDescrip // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_QueryServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.QueryServiceResponse.options": - value := x.Options - return protoreflect.ValueOfString(value) + case "did.v1.QueryServiceResponse.service": + value := x.Service + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) @@ -5180,8 +2875,8 @@ func (x *fastReflection_QueryServiceResponse) Get(descriptor protoreflect.FieldD // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - x.Options = value.Interface().(string) + case "did.v1.QueryServiceResponse.service": + x.Service = value.Message().Interface().(*Service) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) @@ -5202,8 +2897,11 @@ func (x *fastReflection_QueryServiceResponse) Set(fd protoreflect.FieldDescripto // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_QueryServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - panic(fmt.Errorf("field options of message did.v1.QueryServiceResponse is not mutable")) + case "did.v1.QueryServiceResponse.service": + if x.Service == nil { + x.Service = new(Service) + } + return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) @@ -5217,8 +2915,9 @@ func (x *fastReflection_QueryServiceResponse) Mutable(fd protoreflect.FieldDescr // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_QueryServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.QueryServiceResponse.options": - return protoreflect.ValueOfString("") + case "did.v1.QueryServiceResponse.service": + m := new(Service) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryServiceResponse")) @@ -5288,8 +2987,8 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods var n int var l int _ = l - l = len(x.Options) - if l > 0 { + if x.Service != nil { + l = options.Size(x.Service) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -5321,10 +3020,17 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Options) > 0 { - i -= len(x.Options) - copy(dAtA[i:], x.Options) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Options))) + if x.Service != nil { + encoded, err := options.Marshal(x.Service) + 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 } @@ -5379,7 +3085,564 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", 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.Service == nil { + x.Service = &Service{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); 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_QueryTokenResponse protoreflect.MessageDescriptor + fd_QueryTokenResponse_success protoreflect.FieldDescriptor + fd_QueryTokenResponse_token protoreflect.FieldDescriptor + fd_QueryTokenResponse_error protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_query_proto_init() + md_QueryTokenResponse = File_did_v1_query_proto.Messages().ByName("QueryTokenResponse") + fd_QueryTokenResponse_success = md_QueryTokenResponse.Fields().ByName("success") + fd_QueryTokenResponse_token = md_QueryTokenResponse.Fields().ByName("token") + fd_QueryTokenResponse_error = md_QueryTokenResponse.Fields().ByName("error") +} + +var _ protoreflect.Message = (*fastReflection_QueryTokenResponse)(nil) + +type fastReflection_QueryTokenResponse QueryTokenResponse + +func (x *QueryTokenResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryTokenResponse)(x) +} + +func (x *QueryTokenResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_query_proto_msgTypes[6] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_QueryTokenResponse_messageType fastReflection_QueryTokenResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryTokenResponse_messageType{} + +type fastReflection_QueryTokenResponse_messageType struct{} + +func (x fastReflection_QueryTokenResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryTokenResponse)(nil) +} +func (x fastReflection_QueryTokenResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryTokenResponse) +} +func (x fastReflection_QueryTokenResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTokenResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryTokenResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryTokenResponse +} + +// 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_QueryTokenResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryTokenResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryTokenResponse) New() protoreflect.Message { + return new(fastReflection_QueryTokenResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryTokenResponse) Interface() protoreflect.ProtoMessage { + return (*QueryTokenResponse)(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_QueryTokenResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_QueryTokenResponse_success, value) { + return + } + } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_QueryTokenResponse_token, value) { + return + } + } + if x.Error != "" { + value := protoreflect.ValueOfString(x.Error) + if !f(fd_QueryTokenResponse_error, 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_QueryTokenResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.QueryTokenResponse.success": + return x.Success != false + case "did.v1.QueryTokenResponse.token": + return x.Token != nil + case "did.v1.QueryTokenResponse.error": + return x.Error != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryTokenResponse")) + } + panic(fmt.Errorf("message did.v1.QueryTokenResponse 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_QueryTokenResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.QueryTokenResponse.success": + x.Success = false + case "did.v1.QueryTokenResponse.token": + x.Token = nil + case "did.v1.QueryTokenResponse.error": + x.Error = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryTokenResponse")) + } + panic(fmt.Errorf("message did.v1.QueryTokenResponse 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_QueryTokenResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.QueryTokenResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.QueryTokenResponse.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.QueryTokenResponse.error": + value := x.Error + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryTokenResponse")) + } + panic(fmt.Errorf("message did.v1.QueryTokenResponse 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_QueryTokenResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.QueryTokenResponse.success": + x.Success = value.Bool() + case "did.v1.QueryTokenResponse.token": + x.Token = value.Message().Interface().(*Token) + case "did.v1.QueryTokenResponse.error": + x.Error = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryTokenResponse")) + } + panic(fmt.Errorf("message did.v1.QueryTokenResponse 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_QueryTokenResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryTokenResponse.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + case "did.v1.QueryTokenResponse.success": + panic(fmt.Errorf("field success of message did.v1.QueryTokenResponse is not mutable")) + case "did.v1.QueryTokenResponse.error": + panic(fmt.Errorf("field error of message did.v1.QueryTokenResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryTokenResponse")) + } + panic(fmt.Errorf("message did.v1.QueryTokenResponse 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_QueryTokenResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.QueryTokenResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.QueryTokenResponse.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.QueryTokenResponse.error": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.QueryTokenResponse")) + } + panic(fmt.Errorf("message did.v1.QueryTokenResponse 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_QueryTokenResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.QueryTokenResponse", 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_QueryTokenResponse) 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_QueryTokenResponse) 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_QueryTokenResponse) 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_QueryTokenResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryTokenResponse) + 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.Token != nil { + l = options.Size(x.Token) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Error) + 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().(*QueryTokenResponse) + 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.Error) > 0 { + i -= len(x.Error) + copy(dAtA[i:], x.Error) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Error))) + i-- + dAtA[i] = 0x1a + } + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + 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().(*QueryTokenResponse) + 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: QueryTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryTokenResponse: 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 Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); 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 Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -5407,7 +3670,7 @@ func (x *fastReflection_QueryServiceResponse) ProtoMethods() *protoiface.Methods if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Options = string(dAtA[iNdEx:postIndex]) + x.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -5457,15 +3720,20 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// Queryequest is the request type for the Query/Params RPC method. +type QueryRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` } -func (x *QueryParamsRequest) Reset() { - *x = QueryParamsRequest{} +func (x *QueryRequest) Reset() { + *x = QueryRequest{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_query_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -5473,17 +3741,45 @@ func (x *QueryParamsRequest) Reset() { } } -func (x *QueryParamsRequest) String() string { +func (x *QueryRequest) String() string { return protoimpl.X.MessageStringOf(x) } -func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryRequest) ProtoMessage() {} -// Deprecated: Use QueryParamsRequest.ProtoReflect.Descriptor instead. -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { +// Deprecated: Use QueryRequest.ProtoReflect.Descriptor instead. +func (*QueryRequest) Descriptor() ([]byte, []int) { return file_did_v1_query_proto_rawDescGZIP(), []int{0} } +func (x *QueryRequest) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + +func (x *QueryRequest) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *QueryRequest) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *QueryRequest) GetCredentials() []*Credential { + if x != nil { + return x.Credentials + } + return nil +} + // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { state protoimpl.MessageState @@ -5521,42 +3817,6 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } -// QueryAccountsRequest is the request type for the Query/Exists RPC method. -type QueryAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *QueryAccountsRequest) Reset() { - *x = QueryAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryAccountsRequest) ProtoMessage() {} - -// Deprecated: Use QueryAccountsRequest.ProtoReflect.Descriptor instead. -func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{2} -} - -func (x *QueryAccountsRequest) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - // QueryAccountsResponse is the response type for the Query/Exists RPC method. type QueryAccountsResponse struct { state protoimpl.MessageState @@ -5569,7 +3829,7 @@ type QueryAccountsResponse struct { func (x *QueryAccountsResponse) Reset() { *x = QueryAccountsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[3] + mi := &file_did_v1_query_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5583,7 +3843,7 @@ func (*QueryAccountsResponse) ProtoMessage() {} // Deprecated: Use QueryAccountsResponse.ProtoReflect.Descriptor instead. func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{3} + return file_did_v1_query_proto_rawDescGZIP(), []int{2} } func (x *QueryAccountsResponse) GetExists() bool { @@ -5593,63 +3853,23 @@ func (x *QueryAccountsResponse) GetExists() bool { return false } -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -type QueryCredentialsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (x *QueryCredentialsRequest) Reset() { - *x = QueryCredentialsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryCredentialsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryCredentialsRequest) ProtoMessage() {} - -// Deprecated: Use QueryCredentialsRequest.ProtoReflect.Descriptor instead. -func (*QueryCredentialsRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{4} -} - -func (x *QueryCredentialsRequest) GetDid() string { - if x != nil { - return x.Did - } - return "" -} - -func (x *QueryCredentialsRequest) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - // QueryCredentialsResponse is the response type for the Query/Exists RPC method. type QueryCredentialsResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Credentials map[string][]byte `protobuf:"bytes,1,rep,name=credentials,proto3" json:"credentials,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` } func (x *QueryCredentialsResponse) Reset() { *x = QueryCredentialsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[5] + mi := &file_did_v1_query_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5663,128 +3883,40 @@ func (*QueryCredentialsResponse) ProtoMessage() {} // Deprecated: Use QueryCredentialsResponse.ProtoReflect.Descriptor instead. func (*QueryCredentialsResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{5} + return file_did_v1_query_proto_rawDescGZIP(), []int{3} } -func (x *QueryCredentialsResponse) GetCredentials() map[string][]byte { +func (x *QueryCredentialsResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *QueryCredentialsResponse) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + +func (x *QueryCredentialsResponse) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *QueryCredentialsResponse) GetCredentials() []*Credential { if x != nil { return x.Credentials } return nil } -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -type QueryIdentitiesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *QueryIdentitiesRequest) Reset() { - *x = QueryIdentitiesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryIdentitiesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryIdentitiesRequest) ProtoMessage() {} - -// Deprecated: Use QueryIdentitiesRequest.ProtoReflect.Descriptor instead. -func (*QueryIdentitiesRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{6} -} - -func (x *QueryIdentitiesRequest) GetDid() string { +func (x *QueryCredentialsResponse) GetError() string { if x != nil { - return x.Did - } - return "" -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -type QueryIdentitiesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,2,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"` -} - -func (x *QueryIdentitiesResponse) Reset() { - *x = QueryIdentitiesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryIdentitiesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryIdentitiesResponse) ProtoMessage() {} - -// Deprecated: Use QueryIdentitiesResponse.ProtoReflect.Descriptor instead. -func (*QueryIdentitiesResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{7} -} - -func (x *QueryIdentitiesResponse) GetExists() bool { - if x != nil { - return x.Exists - } - return false -} - -func (x *QueryIdentitiesResponse) GetVerificationMethod() []*VerificationMethod { - if x != nil { - return x.VerificationMethod - } - return nil -} - -// QueryResolveRequest is the request type for the Query/Resolve RPC method. -type QueryResolveRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (x *QueryResolveRequest) Reset() { - *x = QueryResolveRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryResolveRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryResolveRequest) ProtoMessage() {} - -// Deprecated: Use QueryResolveRequest.ProtoReflect.Descriptor instead. -func (*QueryResolveRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{8} -} - -func (x *QueryResolveRequest) GetDid() string { - if x != nil { - return x.Did + return x.Error } return "" } @@ -5802,7 +3934,7 @@ type QueryResolveResponse struct { func (x *QueryResolveResponse) Reset() { *x = QueryResolveResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[9] + mi := &file_did_v1_query_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5816,7 +3948,7 @@ func (*QueryResolveResponse) ProtoMessage() {} // Deprecated: Use QueryResolveResponse.ProtoReflect.Descriptor instead. func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{9} + return file_did_v1_query_proto_rawDescGZIP(), []int{4} } func (x *QueryResolveResponse) GetDocument() *Document { @@ -5826,56 +3958,19 @@ func (x *QueryResolveResponse) GetDocument() *Document { return nil } -// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. -type QueryServiceRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (x *QueryServiceRequest) Reset() { - *x = QueryServiceRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryServiceRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryServiceRequest) ProtoMessage() {} - -// Deprecated: Use QueryServiceRequest.ProtoReflect.Descriptor instead. -func (*QueryServiceRequest) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{10} -} - -func (x *QueryServiceRequest) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. type QueryServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // options is the PublicKeyCredentialAttestationOptions - Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` + Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` } func (x *QueryServiceResponse) Reset() { *x = QueryServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_query_proto_msgTypes[11] + mi := &file_did_v1_query_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -5889,12 +3984,64 @@ func (*QueryServiceResponse) ProtoMessage() {} // Deprecated: Use QueryServiceResponse.ProtoReflect.Descriptor instead. func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_query_proto_rawDescGZIP(), []int{11} + return file_did_v1_query_proto_rawDescGZIP(), []int{5} } -func (x *QueryServiceResponse) GetOptions() string { +func (x *QueryServiceResponse) GetService() *Service { if x != nil { - return x.Options + return x.Service + } + return nil +} + +// QueryTokenResponse is the response type for the Query/LoginOptions RPC method. +type QueryTokenResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Token *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *QueryTokenResponse) Reset() { + *x = QueryTokenResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_query_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryTokenResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryTokenResponse) ProtoMessage() {} + +// Deprecated: Use QueryTokenResponse.ProtoReflect.Descriptor instead. +func (*QueryTokenResponse) Descriptor() ([]byte, []int) { + return file_did_v1_query_proto_rawDescGZIP(), []int{6} +} + +func (x *QueryTokenResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *QueryTokenResponse) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + +func (x *QueryTokenResponse) GetError() string { + if x != nil { + return x.Error } return "" } @@ -5903,110 +4050,97 @@ var File_did_v1_query_proto protoreflect.FileDescriptor var file_did_v1_query_proto_rawDesc = []byte{ 0x0a, 0x12, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 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, 0x14, 0x64, 0x69, 0x64, 0x2f, - 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3d, 0x0a, 0x13, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x28, 0x0a, 0x14, 0x51, 0x75, - 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x03, 0x64, 0x69, 0x64, 0x22, 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, - 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, - 0x78, 0x69, 0x73, 0x74, 0x73, 0x22, 0x43, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, - 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0xaf, 0x01, 0x0a, 0x18, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, - 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, - 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x1a, 0x3e, 0x0a, 0x10, - 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, - 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, - 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0c, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x2a, 0x0a, 0x16, - 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, + 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x64, 0x69, + 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, + 0x73, 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, 0x22, 0x88, 0x01, 0x0a, 0x0c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x22, 0x7d, 0x0a, 0x17, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, 0x12, 0x4a, 0x0a, 0x12, 0x76, - 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x22, 0x27, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, - 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, - 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, - 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x64, 0x6f, 0x63, 0x75, - 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x52, 0x08, 0x64, 0x6f, - 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x2d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, - 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x22, 0x30, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x32, 0xf5, 0x04, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x12, 0x56, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x1a, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, - 0x69, 0x64, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x08, 0x41, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, 0x2f, 0x64, 0x69, 0x64, - 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, - 0x79, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x1f, - 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, - 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, - 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x12, 0x1f, 0x2f, 0x64, 0x69, 0x64, 0x2f, - 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x63, - 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x6c, 0x0a, 0x0a, 0x49, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, - 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x17, 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x69, 0x64, - 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x60, 0x0a, 0x07, 0x52, 0x65, 0x73, 0x6f, - 0x6c, 0x76, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, - 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, - 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1a, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x14, 0x12, 0x12, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x72, 0x65, 0x73, - 0x6f, 0x6c, 0x76, 0x65, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x63, 0x0a, 0x07, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x17, 0x12, 0x15, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x42, - 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, - 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, - 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, - 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, - 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, - 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x64, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, + 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 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, 0x34, 0x0a, 0x0b, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x12, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, + 0x22, 0x3d, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x26, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, + 0x2f, 0x0a, 0x15, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x69, 0x73, + 0x74, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x65, 0x78, 0x69, 0x73, 0x74, 0x73, + 0x22, 0xb2, 0x01, 0x0a, 0x18, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x61, 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 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, 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, 0x12, 0x34, 0x0a, 0x0b, 0x63, 0x72, 0x65, + 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, + 0x61, 0x6c, 0x52, 0x0b, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x44, 0x0a, 0x14, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, + 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2c, 0x0a, + 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, + 0x74, 0x52, 0x08, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x22, 0x41, 0x0a, 0x14, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x29, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x69, + 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 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, 0x23, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x32, 0xa7, 0x04, 0x0a, 0x05, 0x51, 0x75, + 0x65, 0x72, 0x79, 0x12, 0x50, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x14, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x22, 0x13, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x0d, 0x12, 0x0b, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x70, + 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x5c, 0x0a, 0x08, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x1b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x12, 0x13, + 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x73, 0x12, 0x76, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, + 0x6c, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x29, 0x12, 0x27, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, 0x7b, 0x6f, 0x72, + 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x2f, 0x7b, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x7d, 0x2f, + 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x73, 0x12, 0x51, 0x0a, 0x07, 0x52, + 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x73, 0x6f, 0x6c, + 0x76, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x12, 0x82, 0xd3, 0xe4, 0x93, + 0x02, 0x0c, 0x12, 0x0a, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x7b, 0x64, 0x69, 0x64, 0x7d, 0x12, 0x58, + 0x0a, 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x19, 0x82, + 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x12, 0x11, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2f, + 0x7b, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x7d, 0x12, 0x49, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65, + 0x6e, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x0e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x08, 0x22, 0x06, 0x2f, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, + 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 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 ( @@ -6021,47 +4155,45 @@ func file_did_v1_query_proto_rawDescGZIP() []byte { return file_did_v1_query_proto_rawDescData } -var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_did_v1_query_proto_msgTypes = make([]protoimpl.MessageInfo, 7) var file_did_v1_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: did.v1.QueryParamsRequest + (*QueryRequest)(nil), // 0: did.v1.QueryRequest (*QueryParamsResponse)(nil), // 1: did.v1.QueryParamsResponse - (*QueryAccountsRequest)(nil), // 2: did.v1.QueryAccountsRequest - (*QueryAccountsResponse)(nil), // 3: did.v1.QueryAccountsResponse - (*QueryCredentialsRequest)(nil), // 4: did.v1.QueryCredentialsRequest - (*QueryCredentialsResponse)(nil), // 5: did.v1.QueryCredentialsResponse - (*QueryIdentitiesRequest)(nil), // 6: did.v1.QueryIdentitiesRequest - (*QueryIdentitiesResponse)(nil), // 7: did.v1.QueryIdentitiesResponse - (*QueryResolveRequest)(nil), // 8: did.v1.QueryResolveRequest - (*QueryResolveResponse)(nil), // 9: did.v1.QueryResolveResponse - (*QueryServiceRequest)(nil), // 10: did.v1.QueryServiceRequest - (*QueryServiceResponse)(nil), // 11: did.v1.QueryServiceResponse - nil, // 12: did.v1.QueryCredentialsResponse.CredentialsEntry - (*Params)(nil), // 13: did.v1.Params - (*VerificationMethod)(nil), // 14: did.v1.VerificationMethod - (*Document)(nil), // 15: did.v1.Document + (*QueryAccountsResponse)(nil), // 2: did.v1.QueryAccountsResponse + (*QueryCredentialsResponse)(nil), // 3: did.v1.QueryCredentialsResponse + (*QueryResolveResponse)(nil), // 4: did.v1.QueryResolveResponse + (*QueryServiceResponse)(nil), // 5: did.v1.QueryServiceResponse + (*QueryTokenResponse)(nil), // 6: did.v1.QueryTokenResponse + (*Credential)(nil), // 7: did.v1.Credential + (*Params)(nil), // 8: did.v1.Params + (*Document)(nil), // 9: did.v1.Document + (*Service)(nil), // 10: did.v1.Service + (*Token)(nil), // 11: did.v1.Token } var file_did_v1_query_proto_depIdxs = []int32{ - 13, // 0: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params - 12, // 1: did.v1.QueryCredentialsResponse.credentials:type_name -> did.v1.QueryCredentialsResponse.CredentialsEntry - 14, // 2: did.v1.QueryIdentitiesResponse.verificationMethod:type_name -> did.v1.VerificationMethod - 15, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document - 0, // 4: did.v1.Query.Params:input_type -> did.v1.QueryParamsRequest - 2, // 5: did.v1.Query.Accounts:input_type -> did.v1.QueryAccountsRequest - 4, // 6: did.v1.Query.Credentials:input_type -> did.v1.QueryCredentialsRequest - 6, // 7: did.v1.Query.Identities:input_type -> did.v1.QueryIdentitiesRequest - 8, // 8: did.v1.Query.Resolve:input_type -> did.v1.QueryResolveRequest - 10, // 9: did.v1.Query.Service:input_type -> did.v1.QueryServiceRequest - 1, // 10: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse - 3, // 11: did.v1.Query.Accounts:output_type -> did.v1.QueryAccountsResponse - 5, // 12: did.v1.Query.Credentials:output_type -> did.v1.QueryCredentialsResponse - 7, // 13: did.v1.Query.Identities:output_type -> did.v1.QueryIdentitiesResponse - 9, // 14: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse - 11, // 15: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse - 10, // [10:16] is the sub-list for method output_type - 4, // [4:10] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 7, // 0: did.v1.QueryRequest.credentials:type_name -> did.v1.Credential + 8, // 1: did.v1.QueryParamsResponse.params:type_name -> did.v1.Params + 7, // 2: did.v1.QueryCredentialsResponse.credentials:type_name -> did.v1.Credential + 9, // 3: did.v1.QueryResolveResponse.document:type_name -> did.v1.Document + 10, // 4: did.v1.QueryServiceResponse.service:type_name -> did.v1.Service + 11, // 5: did.v1.QueryTokenResponse.token:type_name -> did.v1.Token + 0, // 6: did.v1.Query.Params:input_type -> did.v1.QueryRequest + 0, // 7: did.v1.Query.Accounts:input_type -> did.v1.QueryRequest + 0, // 8: did.v1.Query.Credentials:input_type -> did.v1.QueryRequest + 0, // 9: did.v1.Query.Resolve:input_type -> did.v1.QueryRequest + 0, // 10: did.v1.Query.Service:input_type -> did.v1.QueryRequest + 0, // 11: did.v1.Query.Token:input_type -> did.v1.QueryRequest + 1, // 12: did.v1.Query.Params:output_type -> did.v1.QueryParamsResponse + 2, // 13: did.v1.Query.Accounts:output_type -> did.v1.QueryAccountsResponse + 3, // 14: did.v1.Query.Credentials:output_type -> did.v1.QueryCredentialsResponse + 4, // 15: did.v1.Query.Resolve:output_type -> did.v1.QueryResolveResponse + 5, // 16: did.v1.Query.Service:output_type -> did.v1.QueryServiceResponse + 6, // 17: did.v1.Query.Token:output_type -> did.v1.QueryTokenResponse + 12, // [12:18] is the sub-list for method output_type + 6, // [6:12] 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_did_v1_query_proto_init() } @@ -6073,7 +4205,7 @@ func file_did_v1_query_proto_init() { file_did_v1_models_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryParamsRequest); i { + switch v := v.(*QueryRequest); i { case 0: return &v.state case 1: @@ -6097,18 +4229,6 @@ func file_did_v1_query_proto_init() { } } file_did_v1_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryAccountsResponse); i { case 0: return &v.state @@ -6120,19 +4240,7 @@ func file_did_v1_query_proto_init() { return nil } } - file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryCredentialsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryCredentialsResponse); i { case 0: return &v.state @@ -6144,43 +4252,7 @@ func file_did_v1_query_proto_init() { return nil } } - file_did_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryIdentitiesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryIdentitiesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryResolveRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_did_v1_query_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { + file_did_v1_query_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryResolveResponse); i { case 0: return &v.state @@ -6192,8 +4264,8 @@ func file_did_v1_query_proto_init() { return nil } } - file_did_v1_query_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryServiceRequest); i { + file_did_v1_query_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryServiceResponse); i { case 0: return &v.state case 1: @@ -6204,8 +4276,8 @@ func file_did_v1_query_proto_init() { return nil } } - file_did_v1_query_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryServiceResponse); i { + file_did_v1_query_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryTokenResponse); i { case 0: return &v.state case 1: @@ -6223,7 +4295,7 @@ func file_did_v1_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_query_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 7, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/query_grpc.pb.go b/api/did/v1/query_grpc.pb.go index d51ed3c02..374985a29 100644 --- a/api/did/v1/query_grpc.pb.go +++ b/api/did/v1/query_grpc.pb.go @@ -22,9 +22,9 @@ const ( Query_Params_FullMethodName = "/did.v1.Query/Params" Query_Accounts_FullMethodName = "/did.v1.Query/Accounts" Query_Credentials_FullMethodName = "/did.v1.Query/Credentials" - Query_Identities_FullMethodName = "/did.v1.Query/Identities" Query_Resolve_FullMethodName = "/did.v1.Query/Resolve" Query_Service_FullMethodName = "/did.v1.Query/Service" + Query_Token_FullMethodName = "/did.v1.Query/Token" ) // QueryClient is the client API for Query service. @@ -32,17 +32,17 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type QueryClient interface { // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Accounts returns associated wallet accounts with the DID. - Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + Accounts(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) // Credentials returns associated credentials with the DID and Service Origin. - Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) - // Identities returns associated identity with the DID. - Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) + Credentials(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + // Token returns the current authentication token for the client. + Token(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryTokenResponse, error) } type queryClient struct { @@ -53,7 +53,7 @@ func NewQueryClient(cc grpc.ClientConnInterface) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { +func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, Query_Params_FullMethodName, in, out, opts...) if err != nil { @@ -62,7 +62,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { +func (c *queryClient) Accounts(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { out := new(QueryAccountsResponse) err := c.cc.Invoke(ctx, Query_Accounts_FullMethodName, in, out, opts...) if err != nil { @@ -71,7 +71,7 @@ func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, op return out, nil } -func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { +func (c *queryClient) Credentials(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { out := new(QueryCredentialsResponse) err := c.cc.Invoke(ctx, Query_Credentials_FullMethodName, in, out, opts...) if err != nil { @@ -80,16 +80,7 @@ func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsReque return out, nil } -func (c *queryClient) Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) { - out := new(QueryIdentitiesResponse) - err := c.cc.Invoke(ctx, Query_Identities_FullMethodName, in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { +func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { out := new(QueryResolveResponse) err := c.cc.Invoke(ctx, Query_Resolve_FullMethodName, in, out, opts...) if err != nil { @@ -98,7 +89,7 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts return out, nil } -func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { +func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { out := new(QueryServiceResponse) err := c.cc.Invoke(ctx, Query_Service_FullMethodName, in, out, opts...) if err != nil { @@ -107,22 +98,31 @@ func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts return out, nil } +func (c *queryClient) Token(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryTokenResponse, error) { + out := new(QueryTokenResponse) + err := c.cc.Invoke(ctx, Query_Token_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility type QueryServer interface { // Params queries all parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) // Accounts returns associated wallet accounts with the DID. - Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + Accounts(context.Context, *QueryRequest) (*QueryAccountsResponse, error) // Credentials returns associated credentials with the DID and Service Origin. - Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) - // Identities returns associated identity with the DID. - Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) + Credentials(context.Context, *QueryRequest) (*QueryCredentialsResponse, error) // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) + Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) + Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) + // Token returns the current authentication token for the client. + Token(context.Context, *QueryRequest) (*QueryTokenResponse, error) mustEmbedUnimplementedQueryServer() } @@ -130,24 +130,24 @@ type QueryServer interface { type UnimplementedQueryServer struct { } -func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { +func (UnimplementedQueryServer) Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (UnimplementedQueryServer) Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) { +func (UnimplementedQueryServer) Accounts(context.Context, *QueryRequest) (*QueryAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") } -func (UnimplementedQueryServer) Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) { +func (UnimplementedQueryServer) Credentials(context.Context, *QueryRequest) (*QueryCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Credentials not implemented") } -func (UnimplementedQueryServer) Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Identities not implemented") -} -func (UnimplementedQueryServer) Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) { +func (UnimplementedQueryServer) Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } -func (UnimplementedQueryServer) Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) { +func (UnimplementedQueryServer) Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } +func (UnimplementedQueryServer) Token(context.Context, *QueryRequest) (*QueryTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Token not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -162,7 +162,7 @@ func RegisterQueryServer(s grpc.ServiceRegistrar, srv QueryServer) { } func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -174,13 +174,13 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: Query_Params_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + return srv.(QueryServer).Params(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountsRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -192,13 +192,13 @@ func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: Query_Accounts_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + return srv.(QueryServer).Accounts(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCredentialsRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -210,31 +210,13 @@ func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: Query_Credentials_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Credentials(ctx, req.(*QueryCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Identities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIdentitiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Identities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: Query_Identities_FullMethodName, - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Identities(ctx, req.(*QueryIdentitiesRequest)) + return srv.(QueryServer).Credentials(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryResolveRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -246,13 +228,13 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Query_Resolve_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Resolve(ctx, req.(*QueryResolveRequest)) + return srv.(QueryServer).Resolve(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryServiceRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -264,7 +246,25 @@ func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: Query_Service_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest)) + return srv.(QueryServer).Service(ctx, req.(*QueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Token_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Token(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_Token_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Token(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } @@ -288,10 +288,6 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Credentials", Handler: _Query_Credentials_Handler, }, - { - MethodName: "Identities", - Handler: _Query_Identities_Handler, - }, { MethodName: "Resolve", Handler: _Query_Resolve_Handler, @@ -300,6 +296,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Service", Handler: _Query_Service_Handler, }, + { + MethodName: "Token", + Handler: _Query_Token_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "did/v1/query.proto", diff --git a/api/did/v1/state.cosmos_orm.go b/api/did/v1/state.cosmos_orm.go index 2b828873f..dacdc2a70 100644 --- a/api/did/v1/state.cosmos_orm.go +++ b/api/did/v1/state.cosmos_orm.go @@ -17,6 +17,15 @@ type AssertionTable interface { Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id string) (*Assertion, error) + HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) + // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Assertion, error) + HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) + // GetByControllerOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Assertion, error) + HasByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (found bool, err error) + // GetByControllerCredentialLabel returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerCredentialLabel(ctx context.Context, controller string, credential_label 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 @@ -57,6 +66,60 @@ func (this AssertionIdIndexKey) WithId(id string) AssertionIdIndexKey { return this } +type AssertionSubjectOriginIndexKey struct { + vs []interface{} +} + +func (x AssertionSubjectOriginIndexKey) id() uint32 { return 1 } +func (x AssertionSubjectOriginIndexKey) values() []interface{} { return x.vs } +func (x AssertionSubjectOriginIndexKey) assertionIndexKey() {} + +func (this AssertionSubjectOriginIndexKey) WithSubject(subject string) AssertionSubjectOriginIndexKey { + this.vs = []interface{}{subject} + return this +} + +func (this AssertionSubjectOriginIndexKey) WithSubjectOrigin(subject string, origin string) AssertionSubjectOriginIndexKey { + this.vs = []interface{}{subject, origin} + return this +} + +type AssertionControllerOriginIndexKey struct { + vs []interface{} +} + +func (x AssertionControllerOriginIndexKey) id() uint32 { return 2 } +func (x AssertionControllerOriginIndexKey) values() []interface{} { return x.vs } +func (x AssertionControllerOriginIndexKey) assertionIndexKey() {} + +func (this AssertionControllerOriginIndexKey) WithController(controller string) AssertionControllerOriginIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this AssertionControllerOriginIndexKey) WithControllerOrigin(controller string, origin string) AssertionControllerOriginIndexKey { + this.vs = []interface{}{controller, origin} + return this +} + +type AssertionControllerCredentialLabelIndexKey struct { + vs []interface{} +} + +func (x AssertionControllerCredentialLabelIndexKey) id() uint32 { return 3 } +func (x AssertionControllerCredentialLabelIndexKey) values() []interface{} { return x.vs } +func (x AssertionControllerCredentialLabelIndexKey) assertionIndexKey() {} + +func (this AssertionControllerCredentialLabelIndexKey) WithController(controller string) AssertionControllerCredentialLabelIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this AssertionControllerCredentialLabelIndexKey) WithControllerCredentialLabel(controller string, credential_label string) AssertionControllerCredentialLabelIndexKey { + this.vs = []interface{}{controller, credential_label} + return this +} + type assertionTable struct { table ormtable.Table } @@ -93,6 +156,72 @@ func (this assertionTable) Get(ctx context.Context, id string) (*Assertion, erro return &assertion, nil } +func (this assertionTable) HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + subject, + origin, + ) +} + +func (this assertionTable) GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Assertion, error) { + var assertion Assertion + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &assertion, + subject, + origin, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &assertion, nil +} + +func (this assertionTable) HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + controller, + origin, + ) +} + +func (this assertionTable) GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Assertion, error) { + var assertion Assertion + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &assertion, + controller, + origin, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &assertion, nil +} + +func (this assertionTable) HasByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (found bool, err error) { + return this.table.GetIndexByID(3).(ormtable.UniqueIndex).Has(ctx, + controller, + credential_label, + ) +} + +func (this assertionTable) GetByControllerCredentialLabel(ctx context.Context, controller string, credential_label string) (*Assertion, error) { + var assertion Assertion + found, err := this.table.GetIndexByID(3).(ormtable.UniqueIndex).Get(ctx, &assertion, + controller, + credential_label, + ) + 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 @@ -134,6 +263,9 @@ type AttestationTable interface { HasBySubjectOrigin(ctx context.Context, subject string, origin string) (found bool, err error) // GetBySubjectOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. GetBySubjectOrigin(ctx context.Context, subject string, origin string) (*Attestation, error) + HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) + // GetByControllerOrigin returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Attestation, error) List(ctx context.Context, prefixKey AttestationIndexKey, opts ...ormlist.Option) (AttestationIterator, error) ListRange(ctx context.Context, from, to AttestationIndexKey, opts ...ormlist.Option) (AttestationIterator, error) DeleteBy(ctx context.Context, prefixKey AttestationIndexKey) error @@ -192,6 +324,24 @@ func (this AttestationSubjectOriginIndexKey) WithSubjectOrigin(subject string, o return this } +type AttestationControllerOriginIndexKey struct { + vs []interface{} +} + +func (x AttestationControllerOriginIndexKey) id() uint32 { return 2 } +func (x AttestationControllerOriginIndexKey) values() []interface{} { return x.vs } +func (x AttestationControllerOriginIndexKey) attestationIndexKey() {} + +func (this AttestationControllerOriginIndexKey) WithController(controller string) AttestationControllerOriginIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this AttestationControllerOriginIndexKey) WithControllerOrigin(controller string, origin string) AttestationControllerOriginIndexKey { + this.vs = []interface{}{controller, origin} + return this +} + type attestationTable struct { table ormtable.Table } @@ -250,6 +400,28 @@ func (this attestationTable) GetBySubjectOrigin(ctx context.Context, subject str return &attestation, nil } +func (this attestationTable) HasByControllerOrigin(ctx context.Context, controller string, origin string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + controller, + origin, + ) +} + +func (this attestationTable) GetByControllerOrigin(ctx context.Context, controller string, origin string) (*Attestation, error) { + var attestation Attestation + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &attestation, + controller, + origin, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &attestation, nil +} + func (this attestationTable) List(ctx context.Context, prefixKey AttestationIndexKey, opts ...ormlist.Option) (AttestationIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) return AttestationIterator{it}, err @@ -288,6 +460,12 @@ type ControllerTable interface { Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id string) (*Controller, error) + HasByAddress(ctx context.Context, address string) (found bool, err error) + // GetByAddress returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByAddress(ctx context.Context, address string) (*Controller, error) + HasByVaultCid(ctx context.Context, vault_cid string) (found bool, err error) + // GetByVaultCid returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByVaultCid(ctx context.Context, vault_cid string) (*Controller, error) List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) ListRange(ctx context.Context, from, to ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) DeleteBy(ctx context.Context, prefixKey ControllerIndexKey) error @@ -328,6 +506,32 @@ func (this ControllerIdIndexKey) WithId(id string) ControllerIdIndexKey { return this } +type ControllerAddressIndexKey struct { + vs []interface{} +} + +func (x ControllerAddressIndexKey) id() uint32 { return 1 } +func (x ControllerAddressIndexKey) values() []interface{} { return x.vs } +func (x ControllerAddressIndexKey) controllerIndexKey() {} + +func (this ControllerAddressIndexKey) WithAddress(address string) ControllerAddressIndexKey { + this.vs = []interface{}{address} + return this +} + +type ControllerVaultCidIndexKey struct { + vs []interface{} +} + +func (x ControllerVaultCidIndexKey) id() uint32 { return 2 } +func (x ControllerVaultCidIndexKey) values() []interface{} { return x.vs } +func (x ControllerVaultCidIndexKey) controllerIndexKey() {} + +func (this ControllerVaultCidIndexKey) WithVaultCid(vault_cid string) ControllerVaultCidIndexKey { + this.vs = []interface{}{vault_cid} + return this +} + type controllerTable struct { table ormtable.Table } @@ -364,6 +568,46 @@ func (this controllerTable) Get(ctx context.Context, id string) (*Controller, er return &controller, nil } +func (this controllerTable) HasByAddress(ctx context.Context, address string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + address, + ) +} + +func (this controllerTable) GetByAddress(ctx context.Context, address string) (*Controller, error) { + var controller Controller + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &controller, + address, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &controller, nil +} + +func (this controllerTable) HasByVaultCid(ctx context.Context, vault_cid string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + vault_cid, + ) +} + +func (this controllerTable) GetByVaultCid(ctx context.Context, vault_cid string) (*Controller, error) { + var controller Controller + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &controller, + vault_cid, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &controller, nil +} + func (this controllerTable) List(ctx context.Context, prefixKey ControllerIndexKey, opts ...ormlist.Option) (ControllerIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) return ControllerIterator{it}, err @@ -402,6 +646,12 @@ type DelegationTable interface { Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. Get(ctx context.Context, id string) (*Delegation, error) + HasByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (found bool, err error) + // GetByAccountAddressChainId returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (*Delegation, error) + HasByControllerAccountLabel(ctx context.Context, controller string, account_label string) (found bool, err error) + // GetByControllerAccountLabel returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerAccountLabel(ctx context.Context, controller string, account_label string) (*Delegation, error) List(ctx context.Context, prefixKey DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) ListRange(ctx context.Context, from, to DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) DeleteBy(ctx context.Context, prefixKey DelegationIndexKey) error @@ -442,6 +692,60 @@ func (this DelegationIdIndexKey) WithId(id string) DelegationIdIndexKey { return this } +type DelegationAccountAddressChainIdIndexKey struct { + vs []interface{} +} + +func (x DelegationAccountAddressChainIdIndexKey) id() uint32 { return 1 } +func (x DelegationAccountAddressChainIdIndexKey) values() []interface{} { return x.vs } +func (x DelegationAccountAddressChainIdIndexKey) delegationIndexKey() {} + +func (this DelegationAccountAddressChainIdIndexKey) WithAccountAddress(account_address string) DelegationAccountAddressChainIdIndexKey { + this.vs = []interface{}{account_address} + return this +} + +func (this DelegationAccountAddressChainIdIndexKey) WithAccountAddressChainId(account_address string, chain_id string) DelegationAccountAddressChainIdIndexKey { + this.vs = []interface{}{account_address, chain_id} + return this +} + +type DelegationControllerAccountLabelIndexKey struct { + vs []interface{} +} + +func (x DelegationControllerAccountLabelIndexKey) id() uint32 { return 2 } +func (x DelegationControllerAccountLabelIndexKey) values() []interface{} { return x.vs } +func (x DelegationControllerAccountLabelIndexKey) delegationIndexKey() {} + +func (this DelegationControllerAccountLabelIndexKey) WithController(controller string) DelegationControllerAccountLabelIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this DelegationControllerAccountLabelIndexKey) WithControllerAccountLabel(controller string, account_label string) DelegationControllerAccountLabelIndexKey { + this.vs = []interface{}{controller, account_label} + return this +} + +type DelegationControllerChainIdIndexKey struct { + vs []interface{} +} + +func (x DelegationControllerChainIdIndexKey) id() uint32 { return 3 } +func (x DelegationControllerChainIdIndexKey) values() []interface{} { return x.vs } +func (x DelegationControllerChainIdIndexKey) delegationIndexKey() {} + +func (this DelegationControllerChainIdIndexKey) WithController(controller string) DelegationControllerChainIdIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this DelegationControllerChainIdIndexKey) WithControllerChainId(controller string, chain_id string) DelegationControllerChainIdIndexKey { + this.vs = []interface{}{controller, chain_id} + return this +} + type delegationTable struct { table ormtable.Table } @@ -478,6 +782,50 @@ func (this delegationTable) Get(ctx context.Context, id string) (*Delegation, er return &delegation, nil } +func (this delegationTable) HasByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + account_address, + chain_id, + ) +} + +func (this delegationTable) GetByAccountAddressChainId(ctx context.Context, account_address string, chain_id string) (*Delegation, error) { + var delegation Delegation + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &delegation, + account_address, + chain_id, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &delegation, nil +} + +func (this delegationTable) HasByControllerAccountLabel(ctx context.Context, controller string, account_label string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + controller, + account_label, + ) +} + +func (this delegationTable) GetByControllerAccountLabel(ctx context.Context, controller string, account_label string) (*Delegation, error) { + var delegation Delegation + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &delegation, + controller, + account_label, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &delegation, nil +} + func (this delegationTable) List(ctx context.Context, prefixKey DelegationIndexKey, opts ...ormlist.Option) (DelegationIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) return DelegationIterator{it}, err @@ -508,118 +856,197 @@ func NewDelegationTable(db ormtable.Schema) (DelegationTable, error) { return delegationTable{table}, nil } -type ServiceTable interface { - Insert(ctx context.Context, service *Service) error - Update(ctx context.Context, service *Service) error - Save(ctx context.Context, service *Service) error - Delete(ctx context.Context, service *Service) error +type ServiceRecordTable interface { + Insert(ctx context.Context, serviceRecord *ServiceRecord) error + Update(ctx context.Context, serviceRecord *ServiceRecord) error + Save(ctx context.Context, serviceRecord *ServiceRecord) error + Delete(ctx context.Context, serviceRecord *ServiceRecord) error Has(ctx context.Context, id string) (found bool, err error) // Get returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. - Get(ctx context.Context, id string) (*Service, error) - List(ctx context.Context, prefixKey ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error) - ListRange(ctx context.Context, from, to ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error) - DeleteBy(ctx context.Context, prefixKey ServiceIndexKey) error - DeleteRange(ctx context.Context, from, to ServiceIndexKey) error + Get(ctx context.Context, id string) (*ServiceRecord, error) + HasByOriginUri(ctx context.Context, origin_uri string) (found bool, err error) + // GetByOriginUri returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByOriginUri(ctx context.Context, origin_uri string) (*ServiceRecord, error) + HasByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (found bool, err error) + // GetByControllerOriginUri returns nil and an error which responds true to ormerrors.IsNotFound() if the record was not found. + GetByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (*ServiceRecord, error) + List(ctx context.Context, prefixKey ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) + ListRange(ctx context.Context, from, to ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) + DeleteBy(ctx context.Context, prefixKey ServiceRecordIndexKey) error + DeleteRange(ctx context.Context, from, to ServiceRecordIndexKey) error doNotImplement() } -type ServiceIterator struct { +type ServiceRecordIterator struct { ormtable.Iterator } -func (i ServiceIterator) Value() (*Service, error) { - var service Service - err := i.UnmarshalMessage(&service) - return &service, err +func (i ServiceRecordIterator) Value() (*ServiceRecord, error) { + var serviceRecord ServiceRecord + err := i.UnmarshalMessage(&serviceRecord) + return &serviceRecord, err } -type ServiceIndexKey interface { +type ServiceRecordIndexKey interface { id() uint32 values() []interface{} - serviceIndexKey() + serviceRecordIndexKey() } // primary key starting index.. -type ServicePrimaryKey = ServiceIdIndexKey +type ServiceRecordPrimaryKey = ServiceRecordIdIndexKey -type ServiceIdIndexKey struct { +type ServiceRecordIdIndexKey struct { vs []interface{} } -func (x ServiceIdIndexKey) id() uint32 { return 0 } -func (x ServiceIdIndexKey) values() []interface{} { return x.vs } -func (x ServiceIdIndexKey) serviceIndexKey() {} +func (x ServiceRecordIdIndexKey) id() uint32 { return 0 } +func (x ServiceRecordIdIndexKey) values() []interface{} { return x.vs } +func (x ServiceRecordIdIndexKey) serviceRecordIndexKey() {} -func (this ServiceIdIndexKey) WithId(id string) ServiceIdIndexKey { +func (this ServiceRecordIdIndexKey) WithId(id string) ServiceRecordIdIndexKey { this.vs = []interface{}{id} return this } -type serviceTable struct { +type ServiceRecordOriginUriIndexKey struct { + vs []interface{} +} + +func (x ServiceRecordOriginUriIndexKey) id() uint32 { return 1 } +func (x ServiceRecordOriginUriIndexKey) values() []interface{} { return x.vs } +func (x ServiceRecordOriginUriIndexKey) serviceRecordIndexKey() {} + +func (this ServiceRecordOriginUriIndexKey) WithOriginUri(origin_uri string) ServiceRecordOriginUriIndexKey { + this.vs = []interface{}{origin_uri} + return this +} + +type ServiceRecordControllerOriginUriIndexKey struct { + vs []interface{} +} + +func (x ServiceRecordControllerOriginUriIndexKey) id() uint32 { return 2 } +func (x ServiceRecordControllerOriginUriIndexKey) values() []interface{} { return x.vs } +func (x ServiceRecordControllerOriginUriIndexKey) serviceRecordIndexKey() {} + +func (this ServiceRecordControllerOriginUriIndexKey) WithController(controller string) ServiceRecordControllerOriginUriIndexKey { + this.vs = []interface{}{controller} + return this +} + +func (this ServiceRecordControllerOriginUriIndexKey) WithControllerOriginUri(controller string, origin_uri string) ServiceRecordControllerOriginUriIndexKey { + this.vs = []interface{}{controller, origin_uri} + return this +} + +type serviceRecordTable struct { table ormtable.Table } -func (this serviceTable) Insert(ctx context.Context, service *Service) error { - return this.table.Insert(ctx, service) +func (this serviceRecordTable) Insert(ctx context.Context, serviceRecord *ServiceRecord) error { + return this.table.Insert(ctx, serviceRecord) } -func (this serviceTable) Update(ctx context.Context, service *Service) error { - return this.table.Update(ctx, service) +func (this serviceRecordTable) Update(ctx context.Context, serviceRecord *ServiceRecord) error { + return this.table.Update(ctx, serviceRecord) } -func (this serviceTable) Save(ctx context.Context, service *Service) error { - return this.table.Save(ctx, service) +func (this serviceRecordTable) Save(ctx context.Context, serviceRecord *ServiceRecord) error { + return this.table.Save(ctx, serviceRecord) } -func (this serviceTable) Delete(ctx context.Context, service *Service) error { - return this.table.Delete(ctx, service) +func (this serviceRecordTable) Delete(ctx context.Context, serviceRecord *ServiceRecord) error { + return this.table.Delete(ctx, serviceRecord) } -func (this serviceTable) Has(ctx context.Context, id string) (found bool, err error) { +func (this serviceRecordTable) Has(ctx context.Context, id string) (found bool, err error) { return this.table.PrimaryKey().Has(ctx, id) } -func (this serviceTable) Get(ctx context.Context, id string) (*Service, error) { - var service Service - found, err := this.table.PrimaryKey().Get(ctx, &service, id) +func (this serviceRecordTable) Get(ctx context.Context, id string) (*ServiceRecord, error) { + var serviceRecord ServiceRecord + found, err := this.table.PrimaryKey().Get(ctx, &serviceRecord, id) if err != nil { return nil, err } if !found { return nil, ormerrors.NotFound } - return &service, nil + return &serviceRecord, nil } -func (this serviceTable) List(ctx context.Context, prefixKey ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error) { +func (this serviceRecordTable) HasByOriginUri(ctx context.Context, origin_uri string) (found bool, err error) { + return this.table.GetIndexByID(1).(ormtable.UniqueIndex).Has(ctx, + origin_uri, + ) +} + +func (this serviceRecordTable) GetByOriginUri(ctx context.Context, origin_uri string) (*ServiceRecord, error) { + var serviceRecord ServiceRecord + found, err := this.table.GetIndexByID(1).(ormtable.UniqueIndex).Get(ctx, &serviceRecord, + origin_uri, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &serviceRecord, nil +} + +func (this serviceRecordTable) HasByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (found bool, err error) { + return this.table.GetIndexByID(2).(ormtable.UniqueIndex).Has(ctx, + controller, + origin_uri, + ) +} + +func (this serviceRecordTable) GetByControllerOriginUri(ctx context.Context, controller string, origin_uri string) (*ServiceRecord, error) { + var serviceRecord ServiceRecord + found, err := this.table.GetIndexByID(2).(ormtable.UniqueIndex).Get(ctx, &serviceRecord, + controller, + origin_uri, + ) + if err != nil { + return nil, err + } + if !found { + return nil, ormerrors.NotFound + } + return &serviceRecord, nil +} + +func (this serviceRecordTable) List(ctx context.Context, prefixKey ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) { it, err := this.table.GetIndexByID(prefixKey.id()).List(ctx, prefixKey.values(), opts...) - return ServiceIterator{it}, err + return ServiceRecordIterator{it}, err } -func (this serviceTable) ListRange(ctx context.Context, from, to ServiceIndexKey, opts ...ormlist.Option) (ServiceIterator, error) { +func (this serviceRecordTable) ListRange(ctx context.Context, from, to ServiceRecordIndexKey, opts ...ormlist.Option) (ServiceRecordIterator, error) { it, err := this.table.GetIndexByID(from.id()).ListRange(ctx, from.values(), to.values(), opts...) - return ServiceIterator{it}, err + return ServiceRecordIterator{it}, err } -func (this serviceTable) DeleteBy(ctx context.Context, prefixKey ServiceIndexKey) error { +func (this serviceRecordTable) DeleteBy(ctx context.Context, prefixKey ServiceRecordIndexKey) error { return this.table.GetIndexByID(prefixKey.id()).DeleteBy(ctx, prefixKey.values()...) } -func (this serviceTable) DeleteRange(ctx context.Context, from, to ServiceIndexKey) error { +func (this serviceRecordTable) DeleteRange(ctx context.Context, from, to ServiceRecordIndexKey) error { return this.table.GetIndexByID(from.id()).DeleteRange(ctx, from.values(), to.values()) } -func (this serviceTable) doNotImplement() {} +func (this serviceRecordTable) doNotImplement() {} -var _ ServiceTable = serviceTable{} +var _ ServiceRecordTable = serviceRecordTable{} -func NewServiceTable(db ormtable.Schema) (ServiceTable, error) { - table := db.GetTable(&Service{}) +func NewServiceRecordTable(db ormtable.Schema) (ServiceRecordTable, error) { + table := db.GetTable(&ServiceRecord{}) if table == nil { - return nil, ormerrors.TableNotFound.Wrap(string((&Service{}).ProtoReflect().Descriptor().FullName())) + return nil, ormerrors.TableNotFound.Wrap(string((&ServiceRecord{}).ProtoReflect().Descriptor().FullName())) } - return serviceTable{table}, nil + return serviceRecordTable{table}, nil } type StateStore interface { @@ -627,17 +1054,17 @@ type StateStore interface { AttestationTable() AttestationTable ControllerTable() ControllerTable DelegationTable() DelegationTable - ServiceTable() ServiceTable + ServiceRecordTable() ServiceRecordTable doNotImplement() } type stateStore struct { - assertion AssertionTable - attestation AttestationTable - controller ControllerTable - delegation DelegationTable - service ServiceTable + assertion AssertionTable + attestation AttestationTable + controller ControllerTable + delegation DelegationTable + serviceRecord ServiceRecordTable } func (x stateStore) AssertionTable() AssertionTable { @@ -656,8 +1083,8 @@ func (x stateStore) DelegationTable() DelegationTable { return x.delegation } -func (x stateStore) ServiceTable() ServiceTable { - return x.service +func (x stateStore) ServiceRecordTable() ServiceRecordTable { + return x.serviceRecord } func (stateStore) doNotImplement() {} @@ -685,7 +1112,7 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { return nil, err } - serviceTable, err := NewServiceTable(db) + serviceRecordTable, err := NewServiceRecordTable(db) if err != nil { return nil, err } @@ -695,6 +1122,6 @@ func NewStateStore(db ormtable.Schema) (StateStore, error) { attestationTable, controllerTable, delegationTable, - serviceTable, + serviceRecordTable, }, nil } diff --git a/api/did/v1/state.pulsar.go b/api/did/v1/state.pulsar.go index 54f783844..069e8f3bc 100644 --- a/api/did/v1/state.pulsar.go +++ b/api/did/v1/state.pulsar.go @@ -15,12 +15,15 @@ import ( ) var ( - md_Assertion protoreflect.MessageDescriptor - fd_Assertion_id protoreflect.FieldDescriptor - fd_Assertion_controller protoreflect.FieldDescriptor - fd_Assertion_public_key protoreflect.FieldDescriptor - fd_Assertion_credential_id protoreflect.FieldDescriptor - fd_Assertion_metadata protoreflect.FieldDescriptor + md_Assertion protoreflect.MessageDescriptor + fd_Assertion_id protoreflect.FieldDescriptor + fd_Assertion_controller protoreflect.FieldDescriptor + fd_Assertion_public_key protoreflect.FieldDescriptor + fd_Assertion_credential_id protoreflect.FieldDescriptor + fd_Assertion_credential_label protoreflect.FieldDescriptor + fd_Assertion_origin protoreflect.FieldDescriptor + fd_Assertion_subject protoreflect.FieldDescriptor + fd_Assertion_metadata protoreflect.FieldDescriptor ) func init() { @@ -30,6 +33,9 @@ func init() { fd_Assertion_controller = md_Assertion.Fields().ByName("controller") fd_Assertion_public_key = md_Assertion.Fields().ByName("public_key") fd_Assertion_credential_id = md_Assertion.Fields().ByName("credential_id") + fd_Assertion_credential_label = md_Assertion.Fields().ByName("credential_label") + fd_Assertion_origin = md_Assertion.Fields().ByName("origin") + fd_Assertion_subject = md_Assertion.Fields().ByName("subject") fd_Assertion_metadata = md_Assertion.Fields().ByName("metadata") } @@ -122,6 +128,24 @@ func (x *fastReflection_Assertion) Range(f func(protoreflect.FieldDescriptor, pr return } } + if x.CredentialLabel != "" { + value := protoreflect.ValueOfString(x.CredentialLabel) + if !f(fd_Assertion_credential_label, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_Assertion_origin, value) { + return + } + } + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_Assertion_subject, value) { + return + } + } if x.Metadata != nil { value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) if !f(fd_Assertion_metadata, value) { @@ -151,6 +175,12 @@ func (x *fastReflection_Assertion) Has(fd protoreflect.FieldDescriptor) bool { return x.PublicKey != nil case "did.v1.Assertion.credential_id": return len(x.CredentialId) != 0 + case "did.v1.Assertion.credential_label": + return x.CredentialLabel != "" + case "did.v1.Assertion.origin": + return x.Origin != "" + case "did.v1.Assertion.subject": + return x.Subject != "" case "did.v1.Assertion.metadata": return x.Metadata != nil default: @@ -177,6 +207,12 @@ func (x *fastReflection_Assertion) Clear(fd protoreflect.FieldDescriptor) { x.PublicKey = nil case "did.v1.Assertion.credential_id": x.CredentialId = nil + case "did.v1.Assertion.credential_label": + x.CredentialLabel = "" + case "did.v1.Assertion.origin": + x.Origin = "" + case "did.v1.Assertion.subject": + x.Subject = "" case "did.v1.Assertion.metadata": x.Metadata = nil default: @@ -207,6 +243,15 @@ func (x *fastReflection_Assertion) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Assertion.credential_id": value := x.CredentialId return protoreflect.ValueOfBytes(value) + case "did.v1.Assertion.credential_label": + value := x.CredentialLabel + return protoreflect.ValueOfString(value) + case "did.v1.Assertion.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.Assertion.subject": + value := x.Subject + return protoreflect.ValueOfString(value) case "did.v1.Assertion.metadata": value := x.Metadata return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -238,6 +283,12 @@ func (x *fastReflection_Assertion) Set(fd protoreflect.FieldDescriptor, value pr x.PublicKey = value.Message().Interface().(*PubKey) case "did.v1.Assertion.credential_id": x.CredentialId = value.Bytes() + case "did.v1.Assertion.credential_label": + x.CredentialLabel = value.Interface().(string) + case "did.v1.Assertion.origin": + x.Origin = value.Interface().(string) + case "did.v1.Assertion.subject": + x.Subject = value.Interface().(string) case "did.v1.Assertion.metadata": x.Metadata = value.Message().Interface().(*Metadata) default: @@ -276,6 +327,12 @@ func (x *fastReflection_Assertion) Mutable(fd protoreflect.FieldDescriptor) prot panic(fmt.Errorf("field controller of message did.v1.Assertion is not mutable")) case "did.v1.Assertion.credential_id": panic(fmt.Errorf("field credential_id of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.credential_label": + panic(fmt.Errorf("field credential_label of message did.v1.Assertion is not mutable")) + case "did.v1.Assertion.origin": + panic(fmt.Errorf("field origin 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")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Assertion")) @@ -298,6 +355,12 @@ func (x *fastReflection_Assertion) NewField(fd protoreflect.FieldDescriptor) pro return protoreflect.ValueOfMessage(m.ProtoReflect()) case "did.v1.Assertion.credential_id": return protoreflect.ValueOfBytes(nil) + case "did.v1.Assertion.credential_label": + return protoreflect.ValueOfString("") + case "did.v1.Assertion.origin": + return protoreflect.ValueOfString("") + case "did.v1.Assertion.subject": + return protoreflect.ValueOfString("") case "did.v1.Assertion.metadata": m := new(Metadata) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -386,6 +449,18 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.CredentialLabel) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(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.Metadata != nil { l = options.Size(x.Metadata) n += 1 + l + runtime.Sov(uint64(l)) @@ -431,6 +506,27 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- + dAtA[i] = 0x42 + } + 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] = 0x3a + } + 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] = 0x32 + } + if len(x.CredentialLabel) > 0 { + i -= len(x.CredentialLabel) + copy(dAtA[i:], x.CredentialLabel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CredentialLabel))) + i-- dAtA[i] = 0x2a } if len(x.CredentialId) > 0 { @@ -652,6 +748,102 @@ func (x *fastReflection_Assertion) ProtoMethods() *protoiface.Methods { } iNdEx = postIndex case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field CredentialLabel", 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.CredentialLabel = 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 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 7: + 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 8: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } @@ -1492,10 +1684,57 @@ func (x *fastReflection_Attestation) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_Controller_3_list)(nil) + +type _Controller_3_list struct { + list *[]string +} + +func (x *_Controller_3_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_Controller_3_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfString((*x.list)[i]) +} + +func (x *_Controller_3_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.list)[i] = concreteValue +} + +func (x *_Controller_3_list) Append(value protoreflect.Value) { + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + *x.list = append(*x.list, concreteValue) +} + +func (x *_Controller_3_list) AppendMutable() protoreflect.Value { + panic(fmt.Errorf("AppendMutable can not be called on message Controller at list field Aliases as it is not of Message kind")) +} + +func (x *_Controller_3_list) Truncate(n int) { + *x.list = (*x.list)[:n] +} + +func (x *_Controller_3_list) NewElement() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_Controller_3_list) IsValid() bool { + return x.list != nil +} + var ( md_Controller protoreflect.MessageDescriptor fd_Controller_id protoreflect.FieldDescriptor fd_Controller_address protoreflect.FieldDescriptor + fd_Controller_aliases protoreflect.FieldDescriptor fd_Controller_public_key protoreflect.FieldDescriptor fd_Controller_vault_cid protoreflect.FieldDescriptor ) @@ -1505,6 +1744,7 @@ func init() { md_Controller = File_did_v1_state_proto.Messages().ByName("Controller") fd_Controller_id = md_Controller.Fields().ByName("id") fd_Controller_address = md_Controller.Fields().ByName("address") + fd_Controller_aliases = md_Controller.Fields().ByName("aliases") fd_Controller_public_key = md_Controller.Fields().ByName("public_key") fd_Controller_vault_cid = md_Controller.Fields().ByName("vault_cid") } @@ -1586,6 +1826,12 @@ func (x *fastReflection_Controller) Range(f func(protoreflect.FieldDescriptor, p return } } + if len(x.Aliases) != 0 { + value := protoreflect.ValueOfList(&_Controller_3_list{list: &x.Aliases}) + if !f(fd_Controller_aliases, value) { + return + } + } if x.PublicKey != nil { value := protoreflect.ValueOfMessage(x.PublicKey.ProtoReflect()) if !f(fd_Controller_public_key, value) { @@ -1617,6 +1863,8 @@ func (x *fastReflection_Controller) Has(fd protoreflect.FieldDescriptor) bool { return x.Id != "" case "did.v1.Controller.address": return x.Address != "" + case "did.v1.Controller.aliases": + return len(x.Aliases) != 0 case "did.v1.Controller.public_key": return x.PublicKey != nil case "did.v1.Controller.vault_cid": @@ -1641,6 +1889,8 @@ func (x *fastReflection_Controller) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "did.v1.Controller.address": x.Address = "" + case "did.v1.Controller.aliases": + x.Aliases = nil case "did.v1.Controller.public_key": x.PublicKey = nil case "did.v1.Controller.vault_cid": @@ -1667,6 +1917,12 @@ func (x *fastReflection_Controller) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Controller.address": value := x.Address return protoreflect.ValueOfString(value) + case "did.v1.Controller.aliases": + if len(x.Aliases) == 0 { + return protoreflect.ValueOfList(&_Controller_3_list{}) + } + listValue := &_Controller_3_list{list: &x.Aliases} + return protoreflect.ValueOfList(listValue) case "did.v1.Controller.public_key": value := x.PublicKey return protoreflect.ValueOfMessage(value.ProtoReflect()) @@ -1697,6 +1953,10 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p x.Id = value.Interface().(string) case "did.v1.Controller.address": x.Address = value.Interface().(string) + case "did.v1.Controller.aliases": + lv := value.List() + clv := lv.(*_Controller_3_list) + x.Aliases = *clv.list case "did.v1.Controller.public_key": x.PublicKey = value.Message().Interface().(*PubKey) case "did.v1.Controller.vault_cid": @@ -1721,6 +1981,12 @@ func (x *fastReflection_Controller) Set(fd protoreflect.FieldDescriptor, value p // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_Controller) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.Controller.aliases": + if x.Aliases == nil { + x.Aliases = []string{} + } + value := &_Controller_3_list{list: &x.Aliases} + return protoreflect.ValueOfList(value) case "did.v1.Controller.public_key": if x.PublicKey == nil { x.PublicKey = new(PubKey) @@ -1749,6 +2015,9 @@ func (x *fastReflection_Controller) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfString("") case "did.v1.Controller.address": return protoreflect.ValueOfString("") + case "did.v1.Controller.aliases": + list := []string{} + return protoreflect.ValueOfList(&_Controller_3_list{list: &list}) case "did.v1.Controller.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) @@ -1831,6 +2100,12 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if len(x.Aliases) > 0 { + for _, s := range x.Aliases { + l = len(s) + n += 1 + l + runtime.Sov(uint64(l)) + } + } if x.PublicKey != nil { l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) @@ -1889,6 +2164,15 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } + if len(x.Aliases) > 0 { + for iNdEx := len(x.Aliases) - 1; iNdEx >= 0; iNdEx-- { + i -= len(x.Aliases[iNdEx]) + copy(dAtA[i:], x.Aliases[iNdEx]) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Aliases[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(x.Address) > 0 { i -= len(x.Address) copy(dAtA[i:], x.Address) @@ -2016,6 +2300,38 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } x.Address = 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 Aliases", 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.Aliases = append(x.Aliases, 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) @@ -2120,11 +2436,14 @@ func (x *fastReflection_Controller) ProtoMethods() *protoiface.Methods { } var ( - md_Delegation protoreflect.MessageDescriptor - fd_Delegation_id protoreflect.FieldDescriptor - fd_Delegation_controller protoreflect.FieldDescriptor - fd_Delegation_chain_info_id protoreflect.FieldDescriptor - fd_Delegation_public_key protoreflect.FieldDescriptor + md_Delegation protoreflect.MessageDescriptor + fd_Delegation_id protoreflect.FieldDescriptor + fd_Delegation_controller protoreflect.FieldDescriptor + fd_Delegation_chain_index protoreflect.FieldDescriptor + fd_Delegation_public_key protoreflect.FieldDescriptor + fd_Delegation_account_address protoreflect.FieldDescriptor + fd_Delegation_account_label protoreflect.FieldDescriptor + fd_Delegation_chain_id protoreflect.FieldDescriptor ) func init() { @@ -2132,8 +2451,11 @@ func init() { md_Delegation = File_did_v1_state_proto.Messages().ByName("Delegation") fd_Delegation_id = md_Delegation.Fields().ByName("id") fd_Delegation_controller = md_Delegation.Fields().ByName("controller") - fd_Delegation_chain_info_id = md_Delegation.Fields().ByName("chain_info_id") + fd_Delegation_chain_index = md_Delegation.Fields().ByName("chain_index") fd_Delegation_public_key = md_Delegation.Fields().ByName("public_key") + fd_Delegation_account_address = md_Delegation.Fields().ByName("account_address") + fd_Delegation_account_label = md_Delegation.Fields().ByName("account_label") + fd_Delegation_chain_id = md_Delegation.Fields().ByName("chain_id") } var _ protoreflect.Message = (*fastReflection_Delegation)(nil) @@ -2213,9 +2535,9 @@ func (x *fastReflection_Delegation) Range(f func(protoreflect.FieldDescriptor, p return } } - if x.ChainInfoId != "" { - value := protoreflect.ValueOfString(x.ChainInfoId) - if !f(fd_Delegation_chain_info_id, value) { + if x.ChainIndex != "" { + value := protoreflect.ValueOfString(x.ChainIndex) + if !f(fd_Delegation_chain_index, value) { return } } @@ -2225,6 +2547,24 @@ func (x *fastReflection_Delegation) Range(f func(protoreflect.FieldDescriptor, p return } } + if x.AccountAddress != "" { + value := protoreflect.ValueOfString(x.AccountAddress) + if !f(fd_Delegation_account_address, value) { + return + } + } + if x.AccountLabel != "" { + value := protoreflect.ValueOfString(x.AccountLabel) + if !f(fd_Delegation_account_label, value) { + return + } + } + if x.ChainId != "" { + value := protoreflect.ValueOfString(x.ChainId) + if !f(fd_Delegation_chain_id, value) { + return + } + } } // Has reports whether a field is populated. @@ -2244,10 +2584,16 @@ func (x *fastReflection_Delegation) Has(fd protoreflect.FieldDescriptor) bool { return x.Id != "" case "did.v1.Delegation.controller": return x.Controller != "" - case "did.v1.Delegation.chain_info_id": - return x.ChainInfoId != "" + case "did.v1.Delegation.chain_index": + return x.ChainIndex != "" case "did.v1.Delegation.public_key": return x.PublicKey != nil + case "did.v1.Delegation.account_address": + return x.AccountAddress != "" + case "did.v1.Delegation.account_label": + return x.AccountLabel != "" + case "did.v1.Delegation.chain_id": + return x.ChainId != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -2268,10 +2614,16 @@ func (x *fastReflection_Delegation) Clear(fd protoreflect.FieldDescriptor) { x.Id = "" case "did.v1.Delegation.controller": x.Controller = "" - case "did.v1.Delegation.chain_info_id": - x.ChainInfoId = "" + case "did.v1.Delegation.chain_index": + x.ChainIndex = "" case "did.v1.Delegation.public_key": x.PublicKey = nil + case "did.v1.Delegation.account_address": + x.AccountAddress = "" + case "did.v1.Delegation.account_label": + x.AccountLabel = "" + case "did.v1.Delegation.chain_id": + x.ChainId = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -2294,12 +2646,21 @@ func (x *fastReflection_Delegation) Get(descriptor protoreflect.FieldDescriptor) case "did.v1.Delegation.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Delegation.chain_info_id": - value := x.ChainInfoId + case "did.v1.Delegation.chain_index": + value := x.ChainIndex return protoreflect.ValueOfString(value) case "did.v1.Delegation.public_key": value := x.PublicKey return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.Delegation.account_address": + value := x.AccountAddress + return protoreflect.ValueOfString(value) + case "did.v1.Delegation.account_label": + value := x.AccountLabel + return protoreflect.ValueOfString(value) + case "did.v1.Delegation.chain_id": + value := x.ChainId + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -2324,10 +2685,16 @@ func (x *fastReflection_Delegation) Set(fd protoreflect.FieldDescriptor, value p x.Id = value.Interface().(string) case "did.v1.Delegation.controller": x.Controller = value.Interface().(string) - case "did.v1.Delegation.chain_info_id": - x.ChainInfoId = value.Interface().(string) + case "did.v1.Delegation.chain_index": + x.ChainIndex = value.Interface().(string) case "did.v1.Delegation.public_key": x.PublicKey = value.Message().Interface().(*PubKey) + case "did.v1.Delegation.account_address": + x.AccountAddress = value.Interface().(string) + case "did.v1.Delegation.account_label": + x.AccountLabel = value.Interface().(string) + case "did.v1.Delegation.chain_id": + x.ChainId = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -2357,8 +2724,14 @@ func (x *fastReflection_Delegation) Mutable(fd protoreflect.FieldDescriptor) pro panic(fmt.Errorf("field id of message did.v1.Delegation is not mutable")) case "did.v1.Delegation.controller": panic(fmt.Errorf("field controller of message did.v1.Delegation is not mutable")) - case "did.v1.Delegation.chain_info_id": - panic(fmt.Errorf("field chain_info_id of message did.v1.Delegation is not mutable")) + case "did.v1.Delegation.chain_index": + panic(fmt.Errorf("field chain_index of message did.v1.Delegation is not mutable")) + case "did.v1.Delegation.account_address": + panic(fmt.Errorf("field account_address of message did.v1.Delegation is not mutable")) + case "did.v1.Delegation.account_label": + panic(fmt.Errorf("field account_label of message did.v1.Delegation is not mutable")) + case "did.v1.Delegation.chain_id": + panic(fmt.Errorf("field chain_id of message did.v1.Delegation is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -2376,11 +2749,17 @@ func (x *fastReflection_Delegation) NewField(fd protoreflect.FieldDescriptor) pr return protoreflect.ValueOfString("") case "did.v1.Delegation.controller": return protoreflect.ValueOfString("") - case "did.v1.Delegation.chain_info_id": + case "did.v1.Delegation.chain_index": return protoreflect.ValueOfString("") case "did.v1.Delegation.public_key": m := new(PubKey) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.Delegation.account_address": + return protoreflect.ValueOfString("") + case "did.v1.Delegation.account_label": + return protoreflect.ValueOfString("") + case "did.v1.Delegation.chain_id": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Delegation")) @@ -2458,7 +2837,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ChainInfoId) + l = len(x.ChainIndex) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -2466,6 +2845,18 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { l = options.Size(x.PublicKey) n += 1 + l + runtime.Sov(uint64(l)) } + l = len(x.AccountAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.AccountLabel) + 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) } @@ -2495,6 +2886,27 @@ func (x *fastReflection_Delegation) 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] = 0x3a + } + if len(x.AccountLabel) > 0 { + i -= len(x.AccountLabel) + copy(dAtA[i:], x.AccountLabel) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountLabel))) + i-- + dAtA[i] = 0x32 + } + if len(x.AccountAddress) > 0 { + i -= len(x.AccountAddress) + copy(dAtA[i:], x.AccountAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.AccountAddress))) + i-- + dAtA[i] = 0x2a + } if x.PublicKey != nil { encoded, err := options.Marshal(x.PublicKey) if err != nil { @@ -2509,10 +2921,10 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if len(x.ChainInfoId) > 0 { - i -= len(x.ChainInfoId) - copy(dAtA[i:], x.ChainInfoId) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainInfoId))) + if len(x.ChainIndex) > 0 { + i -= len(x.ChainIndex) + copy(dAtA[i:], x.ChainIndex) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ChainIndex))) i-- dAtA[i] = 0x1a } @@ -2645,7 +3057,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainInfoId", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ChainIndex", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2673,7 +3085,7 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ChainInfoId = string(dAtA[iNdEx:postIndex]) + x.ChainIndex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -2711,6 +3123,102 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { 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 AccountAddress", 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.AccountAddress = 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 AccountLabel", 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.AccountLabel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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:]) @@ -2746,20 +3254,20 @@ func (x *fastReflection_Delegation) ProtoMethods() *protoiface.Methods { } } -var _ protoreflect.Map = (*_Service_5_map)(nil) +var _ protoreflect.Map = (*_ServiceRecord_6_map)(nil) -type _Service_5_map struct { +type _ServiceRecord_6_map struct { m *map[string]string } -func (x *_Service_5_map) Len() int { +func (x *_ServiceRecord_6_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_Service_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_ServiceRecord_6_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } @@ -2772,7 +3280,7 @@ func (x *_Service_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) b } } -func (x *_Service_5_map) Has(key protoreflect.MapKey) bool { +func (x *_ServiceRecord_6_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -2782,7 +3290,7 @@ func (x *_Service_5_map) Has(key protoreflect.MapKey) bool { return ok } -func (x *_Service_5_map) Clear(key protoreflect.MapKey) { +func (x *_ServiceRecord_6_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -2791,7 +3299,7 @@ func (x *_Service_5_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_Service_5_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_ServiceRecord_6_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -2804,7 +3312,7 @@ func (x *_Service_5_map) Get(key protoreflect.MapKey) protoreflect.Value { return protoreflect.ValueOfString(v) } -func (x *_Service_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_ServiceRecord_6_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } @@ -2815,49 +3323,53 @@ func (x *_Service_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) (*x.m)[concreteKey] = concreteValue } -func (x *_Service_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { +func (x *_ServiceRecord_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 *_Service_5_map) NewValue() protoreflect.Value { +func (x *_ServiceRecord_6_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_Service_5_map) IsValid() bool { +func (x *_ServiceRecord_6_map) IsValid() bool { return x.m != nil } var ( - md_Service protoreflect.MessageDescriptor - fd_Service_id protoreflect.FieldDescriptor - fd_Service_service_type protoreflect.FieldDescriptor - fd_Service_controller_did protoreflect.FieldDescriptor - fd_Service_origin_uri protoreflect.FieldDescriptor - fd_Service_service_endpoints protoreflect.FieldDescriptor - fd_Service_permissions protoreflect.FieldDescriptor + md_ServiceRecord protoreflect.MessageDescriptor + fd_ServiceRecord_id protoreflect.FieldDescriptor + fd_ServiceRecord_service_type protoreflect.FieldDescriptor + fd_ServiceRecord_controller protoreflect.FieldDescriptor + fd_ServiceRecord_origin_uri protoreflect.FieldDescriptor + fd_ServiceRecord_description protoreflect.FieldDescriptor + fd_ServiceRecord_service_endpoints protoreflect.FieldDescriptor + fd_ServiceRecord_permissions protoreflect.FieldDescriptor + fd_ServiceRecord_metadata protoreflect.FieldDescriptor ) func init() { file_did_v1_state_proto_init() - md_Service = File_did_v1_state_proto.Messages().ByName("Service") - fd_Service_id = md_Service.Fields().ByName("id") - fd_Service_service_type = md_Service.Fields().ByName("service_type") - fd_Service_controller_did = md_Service.Fields().ByName("controller_did") - fd_Service_origin_uri = md_Service.Fields().ByName("origin_uri") - fd_Service_service_endpoints = md_Service.Fields().ByName("service_endpoints") - fd_Service_permissions = md_Service.Fields().ByName("permissions") + md_ServiceRecord = File_did_v1_state_proto.Messages().ByName("ServiceRecord") + fd_ServiceRecord_id = md_ServiceRecord.Fields().ByName("id") + fd_ServiceRecord_service_type = md_ServiceRecord.Fields().ByName("service_type") + fd_ServiceRecord_controller = md_ServiceRecord.Fields().ByName("controller") + fd_ServiceRecord_origin_uri = md_ServiceRecord.Fields().ByName("origin_uri") + fd_ServiceRecord_description = md_ServiceRecord.Fields().ByName("description") + fd_ServiceRecord_service_endpoints = md_ServiceRecord.Fields().ByName("service_endpoints") + fd_ServiceRecord_permissions = md_ServiceRecord.Fields().ByName("permissions") + fd_ServiceRecord_metadata = md_ServiceRecord.Fields().ByName("metadata") } -var _ protoreflect.Message = (*fastReflection_Service)(nil) +var _ protoreflect.Message = (*fastReflection_ServiceRecord)(nil) -type fastReflection_Service Service +type fastReflection_ServiceRecord ServiceRecord -func (x *Service) ProtoReflect() protoreflect.Message { - return (*fastReflection_Service)(x) +func (x *ServiceRecord) ProtoReflect() protoreflect.Message { + return (*fastReflection_ServiceRecord)(x) } -func (x *Service) slowProtoReflect() protoreflect.Message { +func (x *ServiceRecord) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_state_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2869,43 +3381,43 @@ func (x *Service) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_Service_messageType fastReflection_Service_messageType -var _ protoreflect.MessageType = fastReflection_Service_messageType{} +var _fastReflection_ServiceRecord_messageType fastReflection_ServiceRecord_messageType +var _ protoreflect.MessageType = fastReflection_ServiceRecord_messageType{} -type fastReflection_Service_messageType struct{} +type fastReflection_ServiceRecord_messageType struct{} -func (x fastReflection_Service_messageType) Zero() protoreflect.Message { - return (*fastReflection_Service)(nil) +func (x fastReflection_ServiceRecord_messageType) Zero() protoreflect.Message { + return (*fastReflection_ServiceRecord)(nil) } -func (x fastReflection_Service_messageType) New() protoreflect.Message { - return new(fastReflection_Service) +func (x fastReflection_ServiceRecord_messageType) New() protoreflect.Message { + return new(fastReflection_ServiceRecord) } -func (x fastReflection_Service_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Service +func (x fastReflection_ServiceRecord_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_ServiceRecord } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_Service) Descriptor() protoreflect.MessageDescriptor { - return md_Service +func (x *fastReflection_ServiceRecord) Descriptor() protoreflect.MessageDescriptor { + return md_ServiceRecord } // 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_Service) Type() protoreflect.MessageType { - return _fastReflection_Service_messageType +func (x *fastReflection_ServiceRecord) Type() protoreflect.MessageType { + return _fastReflection_ServiceRecord_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_Service) New() protoreflect.Message { - return new(fastReflection_Service) +func (x *fastReflection_ServiceRecord) New() protoreflect.Message { + return new(fastReflection_ServiceRecord) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_Service) Interface() protoreflect.ProtoMessage { - return (*Service)(x) +func (x *fastReflection_ServiceRecord) Interface() protoreflect.ProtoMessage { + return (*ServiceRecord)(x) } // Range iterates over every populated field in an undefined order, @@ -2913,40 +3425,52 @@ func (x *fastReflection_Service) 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_Service) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_ServiceRecord) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Id != "" { value := protoreflect.ValueOfString(x.Id) - if !f(fd_Service_id, value) { + if !f(fd_ServiceRecord_id, value) { return } } if x.ServiceType != "" { value := protoreflect.ValueOfString(x.ServiceType) - if !f(fd_Service_service_type, value) { + if !f(fd_ServiceRecord_service_type, value) { return } } - if x.ControllerDid != "" { - value := protoreflect.ValueOfString(x.ControllerDid) - if !f(fd_Service_controller_did, value) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_ServiceRecord_controller, value) { return } } if x.OriginUri != "" { value := protoreflect.ValueOfString(x.OriginUri) - if !f(fd_Service_origin_uri, value) { + if !f(fd_ServiceRecord_origin_uri, value) { + return + } + } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_ServiceRecord_description, value) { return } } if len(x.ServiceEndpoints) != 0 { - value := protoreflect.ValueOfMap(&_Service_5_map{m: &x.ServiceEndpoints}) - if !f(fd_Service_service_endpoints, value) { + value := protoreflect.ValueOfMap(&_ServiceRecord_6_map{m: &x.ServiceEndpoints}) + if !f(fd_ServiceRecord_service_endpoints, value) { return } } if x.Permissions != nil { value := protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) - if !f(fd_Service_permissions, value) { + if !f(fd_ServiceRecord_permissions, value) { + return + } + } + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_ServiceRecord_metadata, value) { return } } @@ -2963,25 +3487,29 @@ func (x *fastReflection_Service) Range(f func(protoreflect.FieldDescriptor, prot // 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_Service) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_ServiceRecord) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.Service.id": + case "did.v1.ServiceRecord.id": return x.Id != "" - case "did.v1.Service.service_type": + case "did.v1.ServiceRecord.service_type": return x.ServiceType != "" - case "did.v1.Service.controller_did": - return x.ControllerDid != "" - case "did.v1.Service.origin_uri": + case "did.v1.ServiceRecord.controller": + return x.Controller != "" + case "did.v1.ServiceRecord.origin_uri": return x.OriginUri != "" - case "did.v1.Service.service_endpoints": + case "did.v1.ServiceRecord.description": + return x.Description != "" + case "did.v1.ServiceRecord.service_endpoints": return len(x.ServiceEndpoints) != 0 - case "did.v1.Service.permissions": + case "did.v1.ServiceRecord.permissions": return x.Permissions != nil + case "did.v1.ServiceRecord.metadata": + return x.Metadata != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) } - panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ServiceRecord does not contain field %s", fd.FullName())) } } @@ -2991,25 +3519,29 @@ func (x *fastReflection_Service) Has(fd protoreflect.FieldDescriptor) bool { // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_ServiceRecord) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.Service.id": + case "did.v1.ServiceRecord.id": x.Id = "" - case "did.v1.Service.service_type": + case "did.v1.ServiceRecord.service_type": x.ServiceType = "" - case "did.v1.Service.controller_did": - x.ControllerDid = "" - case "did.v1.Service.origin_uri": + case "did.v1.ServiceRecord.controller": + x.Controller = "" + case "did.v1.ServiceRecord.origin_uri": x.OriginUri = "" - case "did.v1.Service.service_endpoints": + case "did.v1.ServiceRecord.description": + x.Description = "" + case "did.v1.ServiceRecord.service_endpoints": x.ServiceEndpoints = nil - case "did.v1.Service.permissions": + case "did.v1.ServiceRecord.permissions": x.Permissions = nil + case "did.v1.ServiceRecord.metadata": + x.Metadata = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) } - panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ServiceRecord does not contain field %s", fd.FullName())) } } @@ -3019,34 +3551,40 @@ func (x *fastReflection_Service) 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_Service) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ServiceRecord) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.Service.id": + case "did.v1.ServiceRecord.id": value := x.Id return protoreflect.ValueOfString(value) - case "did.v1.Service.service_type": + case "did.v1.ServiceRecord.service_type": value := x.ServiceType return protoreflect.ValueOfString(value) - case "did.v1.Service.controller_did": - value := x.ControllerDid + case "did.v1.ServiceRecord.controller": + value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.Service.origin_uri": + case "did.v1.ServiceRecord.origin_uri": value := x.OriginUri return protoreflect.ValueOfString(value) - case "did.v1.Service.service_endpoints": + case "did.v1.ServiceRecord.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.ServiceRecord.service_endpoints": if len(x.ServiceEndpoints) == 0 { - return protoreflect.ValueOfMap(&_Service_5_map{}) + return protoreflect.ValueOfMap(&_ServiceRecord_6_map{}) } - mapValue := &_Service_5_map{m: &x.ServiceEndpoints} + mapValue := &_ServiceRecord_6_map{m: &x.ServiceEndpoints} return protoreflect.ValueOfMap(mapValue) - case "did.v1.Service.permissions": + case "did.v1.ServiceRecord.permissions": value := x.Permissions return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.ServiceRecord.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) } - panic(fmt.Errorf("message did.v1.Service does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.ServiceRecord does not contain field %s", descriptor.FullName())) } } @@ -3060,27 +3598,31 @@ func (x *fastReflection_Service) Get(descriptor protoreflect.FieldDescriptor) pr // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_ServiceRecord) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.Service.id": + case "did.v1.ServiceRecord.id": x.Id = value.Interface().(string) - case "did.v1.Service.service_type": + case "did.v1.ServiceRecord.service_type": x.ServiceType = value.Interface().(string) - case "did.v1.Service.controller_did": - x.ControllerDid = value.Interface().(string) - case "did.v1.Service.origin_uri": + case "did.v1.ServiceRecord.controller": + x.Controller = value.Interface().(string) + case "did.v1.ServiceRecord.origin_uri": x.OriginUri = value.Interface().(string) - case "did.v1.Service.service_endpoints": + case "did.v1.ServiceRecord.description": + x.Description = value.Interface().(string) + case "did.v1.ServiceRecord.service_endpoints": mv := value.Map() - cmv := mv.(*_Service_5_map) + cmv := mv.(*_ServiceRecord_6_map) x.ServiceEndpoints = *cmv.m - case "did.v1.Service.permissions": + case "did.v1.ServiceRecord.permissions": x.Permissions = value.Message().Interface().(*Permissions) + case "did.v1.ServiceRecord.metadata": + x.Metadata = value.Message().Interface().(*Metadata) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) } - panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ServiceRecord does not contain field %s", fd.FullName())) } } @@ -3094,69 +3636,81 @@ func (x *fastReflection_Service) Set(fd protoreflect.FieldDescriptor, value prot // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Service) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ServiceRecord) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Service.service_endpoints": + case "did.v1.ServiceRecord.service_endpoints": if x.ServiceEndpoints == nil { x.ServiceEndpoints = make(map[string]string) } - value := &_Service_5_map{m: &x.ServiceEndpoints} + value := &_ServiceRecord_6_map{m: &x.ServiceEndpoints} return protoreflect.ValueOfMap(value) - case "did.v1.Service.permissions": + case "did.v1.ServiceRecord.permissions": if x.Permissions == nil { x.Permissions = new(Permissions) } return protoreflect.ValueOfMessage(x.Permissions.ProtoReflect()) - case "did.v1.Service.id": - panic(fmt.Errorf("field id of message did.v1.Service is not mutable")) - case "did.v1.Service.service_type": - panic(fmt.Errorf("field service_type of message did.v1.Service is not mutable")) - case "did.v1.Service.controller_did": - panic(fmt.Errorf("field controller_did of message did.v1.Service is not mutable")) - case "did.v1.Service.origin_uri": - panic(fmt.Errorf("field origin_uri of message did.v1.Service is not mutable")) + case "did.v1.ServiceRecord.metadata": + if x.Metadata == nil { + x.Metadata = new(Metadata) + } + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + case "did.v1.ServiceRecord.id": + panic(fmt.Errorf("field id of message did.v1.ServiceRecord is not mutable")) + case "did.v1.ServiceRecord.service_type": + panic(fmt.Errorf("field service_type of message did.v1.ServiceRecord is not mutable")) + case "did.v1.ServiceRecord.controller": + panic(fmt.Errorf("field controller of message did.v1.ServiceRecord is not mutable")) + case "did.v1.ServiceRecord.origin_uri": + panic(fmt.Errorf("field origin_uri of message did.v1.ServiceRecord is not mutable")) + case "did.v1.ServiceRecord.description": + panic(fmt.Errorf("field description of message did.v1.ServiceRecord is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) } - panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ServiceRecord 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_Service) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_ServiceRecord) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.Service.id": + case "did.v1.ServiceRecord.id": return protoreflect.ValueOfString("") - case "did.v1.Service.service_type": + case "did.v1.ServiceRecord.service_type": return protoreflect.ValueOfString("") - case "did.v1.Service.controller_did": + case "did.v1.ServiceRecord.controller": return protoreflect.ValueOfString("") - case "did.v1.Service.origin_uri": + case "did.v1.ServiceRecord.origin_uri": return protoreflect.ValueOfString("") - case "did.v1.Service.service_endpoints": + case "did.v1.ServiceRecord.description": + return protoreflect.ValueOfString("") + case "did.v1.ServiceRecord.service_endpoints": m := make(map[string]string) - return protoreflect.ValueOfMap(&_Service_5_map{m: &m}) - case "did.v1.Service.permissions": + return protoreflect.ValueOfMap(&_ServiceRecord_6_map{m: &m}) + case "did.v1.ServiceRecord.permissions": m := new(Permissions) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.ServiceRecord.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.Service")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.ServiceRecord")) } - panic(fmt.Errorf("message did.v1.Service does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.ServiceRecord 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_Service) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_ServiceRecord) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.Service", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.ServiceRecord", d.FullName())) } panic("unreachable") } @@ -3164,7 +3718,7 @@ func (x *fastReflection_Service) WhichOneof(d protoreflect.OneofDescriptor) prot // 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_Service) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_ServiceRecord) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -3175,7 +3729,7 @@ func (x *fastReflection_Service) 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_Service) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_ServiceRecord) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -3187,7 +3741,7 @@ func (x *fastReflection_Service) 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_Service) IsValid() bool { +func (x *fastReflection_ServiceRecord) IsValid() bool { return x != nil } @@ -3197,9 +3751,9 @@ func (x *fastReflection_Service) 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_Service) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_ServiceRecord) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Service) + x := input.Message.Interface().(*ServiceRecord) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3219,7 +3773,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.ControllerDid) + l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } @@ -3227,6 +3781,10 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { 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 len(x.ServiceEndpoints) > 0 { SiZeMaP := func(k string, v string) { mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) @@ -3252,6 +3810,10 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { l = options.Size(x.Permissions) n += 1 + l + runtime.Sov(uint64(l)) } + if x.Metadata != nil { + l = options.Size(x.Metadata) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -3262,7 +3824,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Service) + x := input.Message.Interface().(*ServiceRecord) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3281,6 +3843,20 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x42 + } if x.Permissions != nil { encoded, err := options.Marshal(x.Permissions) if err != nil { @@ -3293,7 +3869,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(x.ServiceEndpoints) > 0 { MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { @@ -3310,7 +3886,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 return protoiface.MarshalOutput{}, nil } if options.Deterministic { @@ -3338,6 +3914,13 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } } } + 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] = 0x2a + } if len(x.OriginUri) > 0 { i -= len(x.OriginUri) copy(dAtA[i:], x.OriginUri) @@ -3345,10 +3928,10 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { i-- dAtA[i] = 0x22 } - if len(x.ControllerDid) > 0 { - i -= len(x.ControllerDid) - copy(dAtA[i:], x.ControllerDid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ControllerDid))) + if len(x.Controller) > 0 { + i -= len(x.Controller) + copy(dAtA[i:], x.Controller) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) i-- dAtA[i] = 0x1a } @@ -3377,7 +3960,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Service) + x := input.Message.Interface().(*ServiceRecord) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -3409,10 +3992,10 @@ func (x *fastReflection_Service) 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: Service: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceRecord: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: ServiceRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3481,7 +4064,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", 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 { @@ -3509,7 +4092,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.ControllerDid = string(dAtA[iNdEx:postIndex]) + x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -3544,6 +4127,38 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { x.OriginUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) } @@ -3670,7 +4285,7 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { } x.ServiceEndpoints[mapkey] = mapvalue iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } @@ -3706,6 +4321,42 @@ func (x *fastReflection_Service) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 8: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3768,8 +4419,14 @@ type Assertion struct { PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The value of the linked identifier CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + // The display label of the attestation + CredentialLabel string `protobuf:"bytes,5,opt,name=credential_label,json=credentialLabel,proto3" json:"credential_label,omitempty"` + // The origin of the attestation + Origin string `protobuf:"bytes,6,opt,name=origin,proto3" json:"origin,omitempty"` + // The subject of the attestation + Subject string `protobuf:"bytes,7,opt,name=subject,proto3" json:"subject,omitempty"` // Metadata is optional additional information about the assertion - Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (x *Assertion) Reset() { @@ -3820,6 +4477,27 @@ func (x *Assertion) GetCredentialId() []byte { return nil } +func (x *Assertion) GetCredentialLabel() string { + if x != nil { + return x.CredentialLabel + } + return "" +} + +func (x *Assertion) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *Assertion) GetSubject() string { + if x != nil { + return x.Subject + } + return "" +} + func (x *Assertion) GetMetadata() *Metadata { if x != nil { return x.Metadata @@ -3919,6 +4597,8 @@ type Controller struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The DID of the controller Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Aliases of the controller + Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` // PubKey is the verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier @@ -3959,6 +4639,13 @@ func (x *Controller) GetAddress() string { return "" } +func (x *Controller) GetAliases() []string { + if x != nil { + return x.Aliases + } + return nil +} + func (x *Controller) GetPublicKey() *PubKey { if x != nil { return x.PublicKey @@ -3984,9 +4671,15 @@ type Delegation struct { // The Decentralized Identifier of the delegated account Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // Resolved from module parameters - ChainInfoId string `protobuf:"bytes,3,opt,name=chain_info_id,json=chainInfoId,proto3" json:"chain_info_id,omitempty"` + ChainIndex string `protobuf:"bytes,3,opt,name=chain_index,json=chainIndex,proto3" json:"chain_index,omitempty"` // The delegation proof or verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The Account Address + AccountAddress string `protobuf:"bytes,5,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // The Account label + AccountLabel string `protobuf:"bytes,6,opt,name=account_label,json=accountLabel,proto3" json:"account_label,omitempty"` + // The Chain ID + ChainId string `protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` } func (x *Delegation) Reset() { @@ -4023,9 +4716,9 @@ func (x *Delegation) GetController() string { return "" } -func (x *Delegation) GetChainInfoId() string { +func (x *Delegation) GetChainIndex() string { if x != nil { - return x.ChainInfoId + return x.ChainIndex } return "" } @@ -4037,8 +4730,29 @@ func (x *Delegation) GetPublicKey() *PubKey { return nil } -// Service represents a service in a DID Document -type Service struct { +func (x *Delegation) GetAccountAddress() string { + if x != nil { + return x.AccountAddress + } + return "" +} + +func (x *Delegation) GetAccountLabel() string { + if x != nil { + return x.AccountLabel + } + return "" +} + +func (x *Delegation) GetChainId() string { + if x != nil { + return x.ChainId + } + return "" +} + +// ServiceRecord represents a decentralized service in a DID Document +type ServiceRecord struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -4048,17 +4762,21 @@ type Service struct { // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` // The controller DID of the service - ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` // The domain name of the service OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // The description of the service + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // The service endpoint - ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Scopes is the Authorization Grants of the service - Permissions *Permissions `protobuf:"bytes,6,opt,name=permissions,proto3" json:"permissions,omitempty"` + Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` + // Metadata is optional additional information about the service + Metadata *Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } -func (x *Service) Reset() { - *x = Service{} +func (x *ServiceRecord) Reset() { + *x = ServiceRecord{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_state_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -4066,59 +4784,73 @@ func (x *Service) Reset() { } } -func (x *Service) String() string { +func (x *ServiceRecord) String() string { return protoimpl.X.MessageStringOf(x) } -func (*Service) ProtoMessage() {} +func (*ServiceRecord) ProtoMessage() {} -// Deprecated: Use Service.ProtoReflect.Descriptor instead. -func (*Service) Descriptor() ([]byte, []int) { +// Deprecated: Use ServiceRecord.ProtoReflect.Descriptor instead. +func (*ServiceRecord) Descriptor() ([]byte, []int) { return file_did_v1_state_proto_rawDescGZIP(), []int{4} } -func (x *Service) GetId() string { +func (x *ServiceRecord) GetId() string { if x != nil { return x.Id } return "" } -func (x *Service) GetServiceType() string { +func (x *ServiceRecord) GetServiceType() string { if x != nil { return x.ServiceType } return "" } -func (x *Service) GetControllerDid() string { +func (x *ServiceRecord) GetController() string { if x != nil { - return x.ControllerDid + return x.Controller } return "" } -func (x *Service) GetOriginUri() string { +func (x *ServiceRecord) GetOriginUri() string { if x != nil { return x.OriginUri } return "" } -func (x *Service) GetServiceEndpoints() map[string]string { +func (x *ServiceRecord) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *ServiceRecord) GetServiceEndpoints() map[string]string { if x != nil { return x.ServiceEndpoints } return nil } -func (x *Service) GetPermissions() *Permissions { +func (x *ServiceRecord) GetPermissions() *Permissions { if x != nil { return x.Permissions } return nil } +func (x *ServiceRecord) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + var File_did_v1_state_proto protoreflect.FileDescriptor var file_did_v1_state_proto_rawDesc = []byte{ @@ -4128,7 +4860,7 @@ var file_did_v1_state_proto_rawDesc = []byte{ 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, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0xcd, 0x01, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, + 0x22, 0xfc, 0x02, 0x0a, 0x09, 0x41, 0x73, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 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, 0x2d, @@ -4137,76 +4869,112 @@ var file_did_v1_state_proto_rawDesc = []byte{ 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, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, - 0x49, 0x64, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x22, 0xf2, 0x01, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, - 0x12, 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, 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, + 0x49, 0x64, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, + 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x72, + 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x16, 0x0a, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, + 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x08, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, 0x64, + 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x60, 0xf2, + 0x9e, 0xd3, 0x8e, 0x03, 0x5a, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, 0x73, + 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, 0x18, + 0x01, 0x12, 0x17, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, 0x18, 0x01, 0x12, 0x21, 0x0a, 0x1b, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x63, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, + 0x69, 0x61, 0x6c, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, 0x03, 0x18, 0x01, 0x18, 0x01, 0x22, + 0x8b, 0x02, 0x0a, 0x0b, 0x41, 0x74, 0x74, 0x65, 0x73, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 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, + 0x2d, 0x0a, 0x0a, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 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, 0x16, + 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 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, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x61, + 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x3d, + 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x37, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x0e, + 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x01, + 0x18, 0x01, 0x12, 0x17, 0x0a, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, 0x02, 0x18, 0x01, 0x18, 0x02, 0x22, 0xcc, 0x01, + 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, + 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x65, 0x73, + 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, - 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 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, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x3a, - 0x24, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x1e, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, - 0x0e, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x10, - 0x01, 0x18, 0x01, 0x18, 0x02, 0x22, 0x92, 0x01, 0x0a, 0x0a, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x1b, 0x0a, - 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, - 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x22, 0x9f, 0x01, 0x0a, 0x0a, 0x44, - 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 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, 0x22, 0x0a, 0x0d, 0x63, 0x68, 0x61, - 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x49, 0x64, 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, 0x3a, 0x0e, 0xf2, 0x9e, - 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x04, 0x22, 0xe2, 0x02, 0x0a, - 0x07, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x5f, 0x64, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x44, - 0x69, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, + 0x1b, 0x0a, 0x09, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x76, 0x61, 0x75, 0x6c, 0x74, 0x43, 0x69, 0x64, 0x3a, 0x2e, 0xf2, 0x9e, + 0xd3, 0x8e, 0x03, 0x28, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x0d, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x10, 0x01, 0x18, 0x01, 0x12, 0x0f, 0x0a, 0x09, 0x76, 0x61, 0x75, + 0x6c, 0x74, 0x5f, 0x63, 0x69, 0x64, 0x10, 0x02, 0x18, 0x01, 0x18, 0x03, 0x22, 0xde, 0x02, 0x0a, + 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, + 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 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, 0x1f, 0x0a, 0x0b, 0x63, + 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x49, 0x6e, 0x64, 0x65, 0x78, 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, 0x27, 0x0a, 0x0f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, + 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x61, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x12, 0x19, 0x0a, 0x08, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x68, 0x61, + 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x67, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x61, 0x0a, 0x04, 0x0a, 0x02, + 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x18, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x2c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x10, 0x01, + 0x18, 0x01, 0x12, 0x1e, 0x0a, 0x18, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2c, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x10, 0x02, + 0x18, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x2c, 0x63, 0x68, 0x61, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x10, 0x03, 0x18, 0x04, 0x22, 0xe6, 0x03, + 0x0a, 0x0d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x12, + 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, + 0x21, 0x0a, 0x0c, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x54, 0x79, + 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, - 0x69, 0x12, 0x52, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, 0x64, - 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x64, - 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, - 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x0a, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, - 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x1a, 0x43, 0x0a, 0x15, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x3a, 0x0e, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x08, 0x0a, 0x04, 0x0a, 0x02, 0x69, 0x64, 0x18, - 0x05, 0x42, 0x7a, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x0a, 0x53, 0x74, 0x61, 0x74, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, - 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, - 0x3b, 0x64, 0x69, 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, - 0x69, 0x64, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, - 0x12, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x58, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, + 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x10, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x12, 0x35, 0x0a, + 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, + 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, + 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, + 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x3d, 0xf2, 0x9e, 0xd3, 0x8e, 0x03, 0x37, 0x0a, + 0x04, 0x0a, 0x02, 0x69, 0x64, 0x12, 0x10, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, + 0x75, 0x72, 0x69, 0x10, 0x01, 0x18, 0x01, 0x12, 0x1b, 0x0a, 0x15, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x2c, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, + 0x10, 0x02, 0x18, 0x01, 0x18, 0x05, 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 ( @@ -4223,15 +4991,15 @@ func file_did_v1_state_proto_rawDescGZIP() []byte { var file_did_v1_state_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_did_v1_state_proto_goTypes = []interface{}{ - (*Assertion)(nil), // 0: did.v1.Assertion - (*Attestation)(nil), // 1: did.v1.Attestation - (*Controller)(nil), // 2: did.v1.Controller - (*Delegation)(nil), // 3: did.v1.Delegation - (*Service)(nil), // 4: did.v1.Service - nil, // 5: did.v1.Service.ServiceEndpointsEntry - (*PubKey)(nil), // 6: did.v1.PubKey - (*Metadata)(nil), // 7: did.v1.Metadata - (*Permissions)(nil), // 8: did.v1.Permissions + (*Assertion)(nil), // 0: did.v1.Assertion + (*Attestation)(nil), // 1: did.v1.Attestation + (*Controller)(nil), // 2: did.v1.Controller + (*Delegation)(nil), // 3: did.v1.Delegation + (*ServiceRecord)(nil), // 4: did.v1.ServiceRecord + nil, // 5: did.v1.ServiceRecord.ServiceEndpointsEntry + (*PubKey)(nil), // 6: did.v1.PubKey + (*Metadata)(nil), // 7: did.v1.Metadata + (*Permissions)(nil), // 8: did.v1.Permissions } var file_did_v1_state_proto_depIdxs = []int32{ 6, // 0: did.v1.Assertion.public_key:type_name -> did.v1.PubKey @@ -4240,13 +5008,14 @@ var file_did_v1_state_proto_depIdxs = []int32{ 7, // 3: did.v1.Attestation.metadata:type_name -> did.v1.Metadata 6, // 4: did.v1.Controller.public_key:type_name -> did.v1.PubKey 6, // 5: did.v1.Delegation.public_key:type_name -> did.v1.PubKey - 5, // 6: did.v1.Service.service_endpoints:type_name -> did.v1.Service.ServiceEndpointsEntry - 8, // 7: did.v1.Service.permissions:type_name -> did.v1.Permissions - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name + 5, // 6: did.v1.ServiceRecord.service_endpoints:type_name -> did.v1.ServiceRecord.ServiceEndpointsEntry + 8, // 7: did.v1.ServiceRecord.permissions:type_name -> did.v1.Permissions + 7, // 8: did.v1.ServiceRecord.metadata:type_name -> did.v1.Metadata + 9, // [9:9] is the sub-list for method output_type + 9, // [9:9] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_did_v1_state_proto_init() } @@ -4306,7 +5075,7 @@ func file_did_v1_state_proto_init() { } } file_did_v1_state_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Service); i { + switch v := v.(*ServiceRecord); i { case 0: return &v.state case 1: diff --git a/api/did/v1/tx.pulsar.go b/api/did/v1/tx.pulsar.go index 12c66072c..932a8e88c 100644 --- a/api/did/v1/tx.pulsar.go +++ b/api/did/v1/tx.pulsar.go @@ -20,6 +20,7 @@ var ( md_MsgUpdateParams protoreflect.MessageDescriptor fd_MsgUpdateParams_authority protoreflect.FieldDescriptor fd_MsgUpdateParams_params protoreflect.FieldDescriptor + fd_MsgUpdateParams_token protoreflect.FieldDescriptor ) func init() { @@ -27,6 +28,7 @@ func init() { md_MsgUpdateParams = File_did_v1_tx_proto.Messages().ByName("MsgUpdateParams") fd_MsgUpdateParams_authority = md_MsgUpdateParams.Fields().ByName("authority") fd_MsgUpdateParams_params = md_MsgUpdateParams.Fields().ByName("params") + fd_MsgUpdateParams_token = md_MsgUpdateParams.Fields().ByName("token") } var _ protoreflect.Message = (*fastReflection_MsgUpdateParams)(nil) @@ -106,6 +108,12 @@ func (x *fastReflection_MsgUpdateParams) Range(f func(protoreflect.FieldDescript return } } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgUpdateParams_token, value) { + return + } + } } // Has reports whether a field is populated. @@ -125,6 +133,8 @@ func (x *fastReflection_MsgUpdateParams) Has(fd protoreflect.FieldDescriptor) bo return x.Authority != "" case "did.v1.MsgUpdateParams.params": return x.Params != nil + case "did.v1.MsgUpdateParams.token": + return x.Token != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) @@ -145,6 +155,8 @@ func (x *fastReflection_MsgUpdateParams) Clear(fd protoreflect.FieldDescriptor) x.Authority = "" case "did.v1.MsgUpdateParams.params": x.Params = nil + case "did.v1.MsgUpdateParams.token": + x.Token = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) @@ -167,6 +179,9 @@ func (x *fastReflection_MsgUpdateParams) Get(descriptor protoreflect.FieldDescri case "did.v1.MsgUpdateParams.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgUpdateParams.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) @@ -191,6 +206,8 @@ func (x *fastReflection_MsgUpdateParams) Set(fd protoreflect.FieldDescriptor, va x.Authority = value.Interface().(string) case "did.v1.MsgUpdateParams.params": x.Params = value.Message().Interface().(*Params) + case "did.v1.MsgUpdateParams.token": + x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) @@ -216,6 +233,11 @@ func (x *fastReflection_MsgUpdateParams) Mutable(fd protoreflect.FieldDescriptor x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "did.v1.MsgUpdateParams.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) case "did.v1.MsgUpdateParams.authority": panic(fmt.Errorf("field authority of message did.v1.MsgUpdateParams is not mutable")) default: @@ -236,6 +258,9 @@ func (x *fastReflection_MsgUpdateParams) NewField(fd protoreflect.FieldDescripto case "did.v1.MsgUpdateParams.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgUpdateParams.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgUpdateParams")) @@ -313,6 +338,10 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } + if x.Token != nil { + l = options.Size(x.Token) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -342,6 +371,20 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + 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] = 0x1a + } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { @@ -480,6 +523,42 @@ func (x *fastReflection_MsgUpdateParams) ProtoMethods() *protoiface.Methods { 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 Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -872,31 +951,29 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } var ( - md_MsgAuthenticate protoreflect.MessageDescriptor - fd_MsgAuthenticate_authority protoreflect.FieldDescriptor - fd_MsgAuthenticate_controller protoreflect.FieldDescriptor - fd_MsgAuthenticate_address protoreflect.FieldDescriptor - fd_MsgAuthenticate_origin protoreflect.FieldDescriptor + md_MsgAllocateVault protoreflect.MessageDescriptor + fd_MsgAllocateVault_authority protoreflect.FieldDescriptor + fd_MsgAllocateVault_subject protoreflect.FieldDescriptor + fd_MsgAllocateVault_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgAuthenticate = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticate") - fd_MsgAuthenticate_authority = md_MsgAuthenticate.Fields().ByName("authority") - fd_MsgAuthenticate_controller = md_MsgAuthenticate.Fields().ByName("controller") - fd_MsgAuthenticate_address = md_MsgAuthenticate.Fields().ByName("address") - fd_MsgAuthenticate_origin = md_MsgAuthenticate.Fields().ByName("origin") + md_MsgAllocateVault = File_did_v1_tx_proto.Messages().ByName("MsgAllocateVault") + fd_MsgAllocateVault_authority = md_MsgAllocateVault.Fields().ByName("authority") + fd_MsgAllocateVault_subject = md_MsgAllocateVault.Fields().ByName("subject") + fd_MsgAllocateVault_token = md_MsgAllocateVault.Fields().ByName("token") } -var _ protoreflect.Message = (*fastReflection_MsgAuthenticate)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAllocateVault)(nil) -type fastReflection_MsgAuthenticate MsgAuthenticate +type fastReflection_MsgAllocateVault MsgAllocateVault -func (x *MsgAuthenticate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticate)(x) +func (x *MsgAllocateVault) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAllocateVault)(x) } -func (x *MsgAuthenticate) slowProtoReflect() protoreflect.Message { +func (x *MsgAllocateVault) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -908,43 +985,43 @@ func (x *MsgAuthenticate) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgAuthenticate_messageType fastReflection_MsgAuthenticate_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticate_messageType{} +var _fastReflection_MsgAllocateVault_messageType fastReflection_MsgAllocateVault_messageType +var _ protoreflect.MessageType = fastReflection_MsgAllocateVault_messageType{} -type fastReflection_MsgAuthenticate_messageType struct{} +type fastReflection_MsgAllocateVault_messageType struct{} -func (x fastReflection_MsgAuthenticate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticate)(nil) +func (x fastReflection_MsgAllocateVault_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAllocateVault)(nil) } -func (x fastReflection_MsgAuthenticate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticate) +func (x fastReflection_MsgAllocateVault_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAllocateVault) } -func (x fastReflection_MsgAuthenticate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticate +func (x fastReflection_MsgAllocateVault_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAllocateVault } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAuthenticate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticate +func (x *fastReflection_MsgAllocateVault) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAllocateVault } // 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_MsgAuthenticate) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticate_messageType +func (x *fastReflection_MsgAllocateVault) Type() protoreflect.MessageType { + return _fastReflection_MsgAllocateVault_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticate) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticate) +func (x *fastReflection_MsgAllocateVault) New() protoreflect.Message { + return new(fastReflection_MsgAllocateVault) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthenticate) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticate)(x) +func (x *fastReflection_MsgAllocateVault) Interface() protoreflect.ProtoMessage { + return (*MsgAllocateVault)(x) } // Range iterates over every populated field in an undefined order, @@ -952,28 +1029,22 @@ func (x *fastReflection_MsgAuthenticate) 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_MsgAuthenticate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAllocateVault) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.Authority != "" { value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgAuthenticate_authority, value) { + if !f(fd_MsgAllocateVault_authority, value) { return } } - if x.Controller != "" { - value := protoreflect.ValueOfString(x.Controller) - if !f(fd_MsgAuthenticate_controller, value) { + if x.Subject != "" { + value := protoreflect.ValueOfString(x.Subject) + if !f(fd_MsgAllocateVault_subject, value) { return } } - if x.Address != "" { - value := protoreflect.ValueOfString(x.Address) - if !f(fd_MsgAuthenticate_address, value) { - return - } - } - if x.Origin != "" { - value := protoreflect.ValueOfString(x.Origin) - if !f(fd_MsgAuthenticate_origin, value) { + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgAllocateVault_token, value) { return } } @@ -990,21 +1061,19 @@ func (x *fastReflection_MsgAuthenticate) Range(f func(protoreflect.FieldDescript // 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_MsgAuthenticate) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAllocateVault) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgAuthenticate.authority": + case "did.v1.MsgAllocateVault.authority": return x.Authority != "" - case "did.v1.MsgAuthenticate.controller": - return x.Controller != "" - case "did.v1.MsgAuthenticate.address": - return x.Address != "" - case "did.v1.MsgAuthenticate.origin": - return x.Origin != "" + case "did.v1.MsgAllocateVault.subject": + return x.Subject != "" + case "did.v1.MsgAllocateVault.token": + return x.Token != nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) } } @@ -1014,21 +1083,19 @@ func (x *fastReflection_MsgAuthenticate) Has(fd protoreflect.FieldDescriptor) bo // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticate) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAllocateVault) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgAuthenticate.authority": + case "did.v1.MsgAllocateVault.authority": x.Authority = "" - case "did.v1.MsgAuthenticate.controller": - x.Controller = "" - case "did.v1.MsgAuthenticate.address": - x.Address = "" - case "did.v1.MsgAuthenticate.origin": - x.Origin = "" + case "did.v1.MsgAllocateVault.subject": + x.Subject = "" + case "did.v1.MsgAllocateVault.token": + x.Token = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) } } @@ -1038,25 +1105,22 @@ func (x *fastReflection_MsgAuthenticate) 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_MsgAuthenticate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAllocateVault) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgAuthenticate.authority": + case "did.v1.MsgAllocateVault.authority": value := x.Authority return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticate.controller": - value := x.Controller - return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticate.address": - value := x.Address - return protoreflect.ValueOfString(value) - case "did.v1.MsgAuthenticate.origin": - value := x.Origin + case "did.v1.MsgAllocateVault.subject": + value := x.Subject return protoreflect.ValueOfString(value) + case "did.v1.MsgAllocateVault.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", descriptor.FullName())) } } @@ -1070,21 +1134,19 @@ func (x *fastReflection_MsgAuthenticate) Get(descriptor protoreflect.FieldDescri // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAllocateVault) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgAuthenticate.authority": + case "did.v1.MsgAllocateVault.authority": x.Authority = value.Interface().(string) - case "did.v1.MsgAuthenticate.controller": - x.Controller = value.Interface().(string) - case "did.v1.MsgAuthenticate.address": - x.Address = value.Interface().(string) - case "did.v1.MsgAuthenticate.origin": - x.Origin = value.Interface().(string) + case "did.v1.MsgAllocateVault.subject": + x.Subject = value.Interface().(string) + case "did.v1.MsgAllocateVault.token": + x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVault does not contain field %s", fd.FullName())) } } @@ -1098,52 +1160,52 @@ func (x *fastReflection_MsgAuthenticate) Set(fd protoreflect.FieldDescriptor, va // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAllocateVault) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthenticate.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgAuthenticate is not mutable")) - case "did.v1.MsgAuthenticate.controller": - panic(fmt.Errorf("field controller of message did.v1.MsgAuthenticate is not mutable")) - case "did.v1.MsgAuthenticate.address": - panic(fmt.Errorf("field address of message did.v1.MsgAuthenticate is not mutable")) - case "did.v1.MsgAuthenticate.origin": - panic(fmt.Errorf("field origin of message did.v1.MsgAuthenticate is not mutable")) + case "did.v1.MsgAllocateVault.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + case "did.v1.MsgAllocateVault.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgAllocateVault is not mutable")) + case "did.v1.MsgAllocateVault.subject": + panic(fmt.Errorf("field subject of message did.v1.MsgAllocateVault is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVault 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_MsgAuthenticate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAllocateVault) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgAuthenticate.authority": + case "did.v1.MsgAllocateVault.authority": return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticate.controller": - return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticate.address": - return protoreflect.ValueOfString("") - case "did.v1.MsgAuthenticate.origin": + case "did.v1.MsgAllocateVault.subject": return protoreflect.ValueOfString("") + case "did.v1.MsgAllocateVault.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticate")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVault")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticate does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVault 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_MsgAuthenticate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAllocateVault) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticate", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAllocateVault", d.FullName())) } panic("unreachable") } @@ -1151,7 +1213,7 @@ func (x *fastReflection_MsgAuthenticate) WhichOneof(d protoreflect.OneofDescript // 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_MsgAuthenticate) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAllocateVault) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1162,7 +1224,7 @@ func (x *fastReflection_MsgAuthenticate) 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_MsgAuthenticate) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAllocateVault) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1174,7 +1236,7 @@ func (x *fastReflection_MsgAuthenticate) SetUnknown(fields protoreflect.RawField // 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_MsgAuthenticate) IsValid() bool { +func (x *fastReflection_MsgAllocateVault) IsValid() bool { return x != nil } @@ -1184,9 +1246,9 @@ func (x *fastReflection_MsgAuthenticate) 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_MsgAuthenticate) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAllocateVault) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticate) + x := input.Message.Interface().(*MsgAllocateVault) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1202,16 +1264,12 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Controller) + l = len(x.Subject) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Address) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Origin) - if l > 0 { + if x.Token != nil { + l = options.Size(x.Token) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -1224,7 +1282,7 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticate) + x := input.Message.Interface().(*MsgAllocateVault) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1243,24 +1301,24 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Origin) > 0 { - i -= len(x.Origin) - copy(dAtA[i:], x.Origin) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(x.Address) > 0 { - i -= len(x.Address) - copy(dAtA[i:], x.Address) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Address))) + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + 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] = 0x1a } - 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.Subject) > 0 { + i -= len(x.Subject) + copy(dAtA[i:], x.Subject) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Subject))) i-- dAtA[i] = 0x12 } @@ -1282,7 +1340,7 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticate) + x := input.Message.Interface().(*MsgAllocateVault) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1314,10 +1372,10 @@ func (x *fastReflection_MsgAuthenticate) 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: MsgAuthenticate: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVault: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1354,7 +1412,7 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { 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) + 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 { @@ -1382,13 +1440,13 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.Controller = string(dAtA[iNdEx:postIndex]) + 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 Address", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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 @@ -1398,55 +1456,27 @@ func (x *fastReflection_MsgAuthenticate) 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.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 Origin", wireType) + if x.Token == nil { + x.Token = &Token{} } - 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 - } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -1484,23 +1514,27 @@ func (x *fastReflection_MsgAuthenticate) ProtoMethods() *protoiface.Methods { } var ( - md_MsgAuthenticateResponse protoreflect.MessageDescriptor + md_MsgAllocateVaultResponse protoreflect.MessageDescriptor + fd_MsgAllocateVaultResponse_cid protoreflect.FieldDescriptor + fd_MsgAllocateVaultResponse_expiry_block protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() - md_MsgAuthenticateResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthenticateResponse") + md_MsgAllocateVaultResponse = File_did_v1_tx_proto.Messages().ByName("MsgAllocateVaultResponse") + fd_MsgAllocateVaultResponse_cid = md_MsgAllocateVaultResponse.Fields().ByName("cid") + fd_MsgAllocateVaultResponse_expiry_block = md_MsgAllocateVaultResponse.Fields().ByName("expiry_block") } -var _ protoreflect.Message = (*fastReflection_MsgAuthenticateResponse)(nil) +var _ protoreflect.Message = (*fastReflection_MsgAllocateVaultResponse)(nil) -type fastReflection_MsgAuthenticateResponse MsgAuthenticateResponse +type fastReflection_MsgAllocateVaultResponse MsgAllocateVaultResponse -func (x *MsgAuthenticateResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgAuthenticateResponse)(x) +func (x *MsgAllocateVaultResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAllocateVaultResponse)(x) } -func (x *MsgAuthenticateResponse) slowProtoReflect() protoreflect.Message { +func (x *MsgAllocateVaultResponse) slowProtoReflect() protoreflect.Message { mi := &file_did_v1_tx_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1512,43 +1546,43 @@ func (x *MsgAuthenticateResponse) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_MsgAuthenticateResponse_messageType fastReflection_MsgAuthenticateResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgAuthenticateResponse_messageType{} +var _fastReflection_MsgAllocateVaultResponse_messageType fastReflection_MsgAllocateVaultResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAllocateVaultResponse_messageType{} -type fastReflection_MsgAuthenticateResponse_messageType struct{} +type fastReflection_MsgAllocateVaultResponse_messageType struct{} -func (x fastReflection_MsgAuthenticateResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgAuthenticateResponse)(nil) +func (x fastReflection_MsgAllocateVaultResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAllocateVaultResponse)(nil) } -func (x fastReflection_MsgAuthenticateResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateResponse) +func (x fastReflection_MsgAllocateVaultResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAllocateVaultResponse) } -func (x fastReflection_MsgAuthenticateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateResponse +func (x fastReflection_MsgAllocateVaultResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAllocateVaultResponse } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_MsgAuthenticateResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgAuthenticateResponse +func (x *fastReflection_MsgAllocateVaultResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAllocateVaultResponse } // 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_MsgAuthenticateResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgAuthenticateResponse_messageType +func (x *fastReflection_MsgAllocateVaultResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAllocateVaultResponse_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgAuthenticateResponse) New() protoreflect.Message { - return new(fastReflection_MsgAuthenticateResponse) +func (x *fastReflection_MsgAllocateVaultResponse) New() protoreflect.Message { + return new(fastReflection_MsgAllocateVaultResponse) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgAuthenticateResponse) Interface() protoreflect.ProtoMessage { - return (*MsgAuthenticateResponse)(x) +func (x *fastReflection_MsgAllocateVaultResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAllocateVaultResponse)(x) } // Range iterates over every populated field in an undefined order, @@ -1556,7 +1590,19 @@ func (x *fastReflection_MsgAuthenticateResponse) Interface() protoreflect.ProtoM // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_MsgAuthenticateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_MsgAllocateVaultResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Cid != "" { + value := protoreflect.ValueOfString(x.Cid) + if !f(fd_MsgAllocateVaultResponse_cid, value) { + return + } + } + if x.ExpiryBlock != int64(0) { + value := protoreflect.ValueOfInt64(x.ExpiryBlock) + if !f(fd_MsgAllocateVaultResponse_expiry_block, value) { + return + } + } } // Has reports whether a field is populated. @@ -1570,13 +1616,17 @@ func (x *fastReflection_MsgAuthenticateResponse) Range(f func(protoreflect.Field // 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_MsgAuthenticateResponse) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_MsgAllocateVaultResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "did.v1.MsgAllocateVaultResponse.cid": + return x.Cid != "" + case "did.v1.MsgAllocateVaultResponse.expiry_block": + return x.ExpiryBlock != int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) } } @@ -1586,13 +1636,17 @@ func (x *fastReflection_MsgAuthenticateResponse) Has(fd protoreflect.FieldDescri // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_MsgAllocateVaultResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "did.v1.MsgAllocateVaultResponse.cid": + x.Cid = "" + case "did.v1.MsgAllocateVaultResponse.expiry_block": + x.ExpiryBlock = int64(0) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) } } @@ -1602,13 +1656,19 @@ func (x *fastReflection_MsgAuthenticateResponse) Clear(fd protoreflect.FieldDesc // 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_MsgAuthenticateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAllocateVaultResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "did.v1.MsgAllocateVaultResponse.cid": + value := x.Cid + return protoreflect.ValueOfString(value) + case "did.v1.MsgAllocateVaultResponse.expiry_block": + value := x.ExpiryBlock + return protoreflect.ValueOfInt64(value) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", descriptor.FullName())) } } @@ -1622,13 +1682,17 @@ func (x *fastReflection_MsgAuthenticateResponse) Get(descriptor protoreflect.Fie // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_MsgAllocateVaultResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "did.v1.MsgAllocateVaultResponse.cid": + x.Cid = value.Interface().(string) + case "did.v1.MsgAllocateVaultResponse.expiry_block": + x.ExpiryBlock = value.Int() default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse does not contain field %s", fd.FullName())) } } @@ -1642,36 +1706,44 @@ func (x *fastReflection_MsgAuthenticateResponse) Set(fd protoreflect.FieldDescri // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAllocateVaultResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.MsgAllocateVaultResponse.cid": + panic(fmt.Errorf("field cid of message did.v1.MsgAllocateVaultResponse is not mutable")) + case "did.v1.MsgAllocateVaultResponse.expiry_block": + panic(fmt.Errorf("field expiry_block of message did.v1.MsgAllocateVaultResponse is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse 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_MsgAuthenticateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_MsgAllocateVaultResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.MsgAllocateVaultResponse.cid": + return protoreflect.ValueOfString("") + case "did.v1.MsgAllocateVaultResponse.expiry_block": + return protoreflect.ValueOfInt64(int64(0)) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthenticateResponse")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAllocateVaultResponse")) } - panic(fmt.Errorf("message did.v1.MsgAuthenticateResponse does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message did.v1.MsgAllocateVaultResponse 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_MsgAuthenticateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_MsgAllocateVaultResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthenticateResponse", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAllocateVaultResponse", d.FullName())) } panic("unreachable") } @@ -1679,7 +1751,7 @@ func (x *fastReflection_MsgAuthenticateResponse) WhichOneof(d protoreflect.Oneof // 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_MsgAuthenticateResponse) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_MsgAllocateVaultResponse) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1690,7 +1762,7 @@ func (x *fastReflection_MsgAuthenticateResponse) GetUnknown() protoreflect.RawFi // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgAuthenticateResponse) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_MsgAllocateVaultResponse) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1702,7 +1774,7 @@ func (x *fastReflection_MsgAuthenticateResponse) SetUnknown(fields protoreflect. // 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_MsgAuthenticateResponse) IsValid() bool { +func (x *fastReflection_MsgAllocateVaultResponse) IsValid() bool { return x != nil } @@ -1712,9 +1784,9 @@ func (x *fastReflection_MsgAuthenticateResponse) 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_MsgAuthenticateResponse) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_MsgAllocateVaultResponse) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgAuthenticateResponse) + x := input.Message.Interface().(*MsgAllocateVaultResponse) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1726,6 +1798,13 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth var n int var l int _ = l + l = len(x.Cid) + 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) } @@ -1736,7 +1815,7 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateResponse) + x := input.Message.Interface().(*MsgAllocateVaultResponse) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1755,6 +1834,18 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.ExpiryBlock != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.ExpiryBlock)) + i-- + dAtA[i] = 0x10 + } + 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] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -1766,7 +1857,7 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgAuthenticateResponse) + x := input.Message.Interface().(*MsgAllocateVaultResponse) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1798,12 +1889,63 @@ func (x *fastReflection_MsgAuthenticateResponse) ProtoMethods() *protoiface.Meth fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVaultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAllocateVaultResponse: 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 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 2: + 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:]) @@ -1844,6 +1986,7 @@ var ( fd_MsgProveWitness_authority protoreflect.FieldDescriptor fd_MsgProveWitness_property protoreflect.FieldDescriptor fd_MsgProveWitness_witness protoreflect.FieldDescriptor + fd_MsgProveWitness_token protoreflect.FieldDescriptor ) func init() { @@ -1852,6 +1995,7 @@ func init() { fd_MsgProveWitness_authority = md_MsgProveWitness.Fields().ByName("authority") fd_MsgProveWitness_property = md_MsgProveWitness.Fields().ByName("property") fd_MsgProveWitness_witness = md_MsgProveWitness.Fields().ByName("witness") + fd_MsgProveWitness_token = md_MsgProveWitness.Fields().ByName("token") } var _ protoreflect.Message = (*fastReflection_MsgProveWitness)(nil) @@ -1937,6 +2081,12 @@ func (x *fastReflection_MsgProveWitness) Range(f func(protoreflect.FieldDescript return } } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgProveWitness_token, value) { + return + } + } } // Has reports whether a field is populated. @@ -1958,6 +2108,8 @@ func (x *fastReflection_MsgProveWitness) Has(fd protoreflect.FieldDescriptor) bo return x.Property != "" case "did.v1.MsgProveWitness.witness": return len(x.Witness) != 0 + case "did.v1.MsgProveWitness.token": + return x.Token != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) @@ -1980,6 +2132,8 @@ func (x *fastReflection_MsgProveWitness) Clear(fd protoreflect.FieldDescriptor) x.Property = "" case "did.v1.MsgProveWitness.witness": x.Witness = nil + case "did.v1.MsgProveWitness.token": + x.Token = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) @@ -2005,6 +2159,9 @@ func (x *fastReflection_MsgProveWitness) Get(descriptor protoreflect.FieldDescri case "did.v1.MsgProveWitness.witness": value := x.Witness return protoreflect.ValueOfBytes(value) + case "did.v1.MsgProveWitness.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) @@ -2031,6 +2188,8 @@ func (x *fastReflection_MsgProveWitness) Set(fd protoreflect.FieldDescriptor, va x.Property = value.Interface().(string) case "did.v1.MsgProveWitness.witness": x.Witness = value.Bytes() + case "did.v1.MsgProveWitness.token": + x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) @@ -2051,6 +2210,11 @@ func (x *fastReflection_MsgProveWitness) Set(fd protoreflect.FieldDescriptor, va // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgProveWitness) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.MsgProveWitness.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) case "did.v1.MsgProveWitness.authority": panic(fmt.Errorf("field authority of message did.v1.MsgProveWitness is not mutable")) case "did.v1.MsgProveWitness.property": @@ -2076,6 +2240,9 @@ func (x *fastReflection_MsgProveWitness) NewField(fd protoreflect.FieldDescripto return protoreflect.ValueOfString("") case "did.v1.MsgProveWitness.witness": return protoreflect.ValueOfBytes(nil) + case "did.v1.MsgProveWitness.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgProveWitness")) @@ -2157,6 +2324,10 @@ func (x *fastReflection_MsgProveWitness) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } + if x.Token != nil { + l = options.Size(x.Token) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2186,6 +2357,20 @@ func (x *fastReflection_MsgProveWitness) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + 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.Witness) > 0 { i -= len(x.Witness) copy(dAtA[i:], x.Witness) @@ -2354,6 +2539,42 @@ func (x *fastReflection_MsgProveWitness) ProtoMethods() *protoiface.Methods { x.Witness = []byte{} } iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -2866,16 +3087,14 @@ func (x *fastReflection_MsgProveWitnessResponse) ProtoMethods() *protoiface.Meth var ( md_MsgSyncVault protoreflect.MessageDescriptor fd_MsgSyncVault_controller protoreflect.FieldDescriptor - fd_MsgSyncVault_cid protoreflect.FieldDescriptor - fd_MsgSyncVault_macron protoreflect.FieldDescriptor + fd_MsgSyncVault_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() md_MsgSyncVault = File_did_v1_tx_proto.Messages().ByName("MsgSyncVault") fd_MsgSyncVault_controller = md_MsgSyncVault.Fields().ByName("controller") - fd_MsgSyncVault_cid = md_MsgSyncVault.Fields().ByName("cid") - fd_MsgSyncVault_macron = md_MsgSyncVault.Fields().ByName("macron") + fd_MsgSyncVault_token = md_MsgSyncVault.Fields().ByName("token") } var _ protoreflect.Message = (*fastReflection_MsgSyncVault)(nil) @@ -2949,15 +3168,9 @@ func (x *fastReflection_MsgSyncVault) Range(f func(protoreflect.FieldDescriptor, return } } - if x.Cid != "" { - value := protoreflect.ValueOfString(x.Cid) - if !f(fd_MsgSyncVault_cid, value) { - return - } - } - if len(x.Macron) != 0 { - value := protoreflect.ValueOfBytes(x.Macron) - if !f(fd_MsgSyncVault_macron, value) { + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgSyncVault_token, value) { return } } @@ -2978,10 +3191,8 @@ func (x *fastReflection_MsgSyncVault) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "did.v1.MsgSyncVault.controller": return x.Controller != "" - case "did.v1.MsgSyncVault.cid": - return x.Cid != "" - case "did.v1.MsgSyncVault.macron": - return len(x.Macron) != 0 + case "did.v1.MsgSyncVault.token": + return x.Token != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) @@ -3000,10 +3211,8 @@ func (x *fastReflection_MsgSyncVault) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "did.v1.MsgSyncVault.controller": x.Controller = "" - case "did.v1.MsgSyncVault.cid": - x.Cid = "" - case "did.v1.MsgSyncVault.macron": - x.Macron = nil + case "did.v1.MsgSyncVault.token": + x.Token = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) @@ -3023,12 +3232,9 @@ func (x *fastReflection_MsgSyncVault) Get(descriptor protoreflect.FieldDescripto case "did.v1.MsgSyncVault.controller": value := x.Controller return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncVault.cid": - value := x.Cid - return protoreflect.ValueOfString(value) - case "did.v1.MsgSyncVault.macron": - value := x.Macron - return protoreflect.ValueOfBytes(value) + case "did.v1.MsgSyncVault.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) @@ -3051,10 +3257,8 @@ func (x *fastReflection_MsgSyncVault) Set(fd protoreflect.FieldDescriptor, value switch fd.FullName() { case "did.v1.MsgSyncVault.controller": x.Controller = value.Interface().(string) - case "did.v1.MsgSyncVault.cid": - x.Cid = value.Interface().(string) - case "did.v1.MsgSyncVault.macron": - x.Macron = value.Bytes() + case "did.v1.MsgSyncVault.token": + x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) @@ -3075,12 +3279,13 @@ func (x *fastReflection_MsgSyncVault) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgSyncVault) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.MsgSyncVault.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) case "did.v1.MsgSyncVault.controller": panic(fmt.Errorf("field controller of message did.v1.MsgSyncVault is not mutable")) - case "did.v1.MsgSyncVault.cid": - panic(fmt.Errorf("field cid of message did.v1.MsgSyncVault is not mutable")) - case "did.v1.MsgSyncVault.macron": - panic(fmt.Errorf("field macron of message did.v1.MsgSyncVault is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) @@ -3096,10 +3301,9 @@ func (x *fastReflection_MsgSyncVault) NewField(fd protoreflect.FieldDescriptor) switch fd.FullName() { case "did.v1.MsgSyncVault.controller": return protoreflect.ValueOfString("") - case "did.v1.MsgSyncVault.cid": - return protoreflect.ValueOfString("") - case "did.v1.MsgSyncVault.macron": - return protoreflect.ValueOfBytes(nil) + case "did.v1.MsgSyncVault.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgSyncVault")) @@ -3173,12 +3377,8 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - l = len(x.Cid) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.Macron) - if l > 0 { + if x.Token != nil { + l = options.Size(x.Token) n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { @@ -3210,20 +3410,20 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Macron) > 0 { - i -= len(x.Macron) - copy(dAtA[i:], x.Macron) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Macron))) + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + 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] = 0x1a } - if len(x.Cid) > 0 { - i -= len(x.Cid) - copy(dAtA[i:], x.Cid) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Cid))) - i-- - dAtA[i] = 0x12 - } if len(x.Controller) > 0 { i -= len(x.Controller) copy(dAtA[i:], x.Controller) @@ -3312,43 +3512,11 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { } x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -3358,24 +3526,26 @@ func (x *fastReflection_MsgSyncVault) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Macron = append(x.Macron[:0], dAtA[iNdEx:postIndex]...) - if x.Macron == nil { - x.Macron = []byte{} + if x.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex default: @@ -3823,56 +3993,10 @@ func (x *fastReflection_MsgSyncVaultResponse) ProtoMethods() *protoiface.Methods } } -var _ protoreflect.List = (*_MsgRegisterController_3_list)(nil) - -type _MsgRegisterController_3_list struct { - list *[][]byte -} - -func (x *_MsgRegisterController_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgRegisterController_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) -} - -func (x *_MsgRegisterController_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgRegisterController_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgRegisterController_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Keyshares as it is not of Message kind")) -} - -func (x *_MsgRegisterController_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgRegisterController_3_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) -} - -func (x *_MsgRegisterController_3_list) IsValid() bool { - return x.list != nil -} - var _ protoreflect.List = (*_MsgRegisterController_4_list)(nil) type _MsgRegisterController_4_list struct { - list *[][]byte + list *[]*Credential } func (x *_MsgRegisterController_4_list) Len() int { @@ -3883,32 +4007,37 @@ func (x *_MsgRegisterController_4_list) Len() int { } func (x *_MsgRegisterController_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfBytes((*x.list)[i]) + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } func (x *_MsgRegisterController_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) (*x.list)[i] = concreteValue } func (x *_MsgRegisterController_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Bytes() - concreteValue := valueUnwrapped + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*Credential) *x.list = append(*x.list, concreteValue) } func (x *_MsgRegisterController_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterController at list field Verifications as it is not of Message kind")) + v := new(Credential) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_MsgRegisterController_4_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } *x.list = (*x.list)[:n] } func (x *_MsgRegisterController_4_list) NewElement() protoreflect.Value { - var v []byte - return protoreflect.ValueOfBytes(v) + v := new(Credential) + return protoreflect.ValueOfMessage(v.ProtoReflect()) } func (x *_MsgRegisterController_4_list) IsValid() bool { @@ -3916,11 +4045,12 @@ func (x *_MsgRegisterController_4_list) IsValid() bool { } var ( - md_MsgRegisterController protoreflect.MessageDescriptor - fd_MsgRegisterController_authority protoreflect.FieldDescriptor - fd_MsgRegisterController_cid protoreflect.FieldDescriptor - fd_MsgRegisterController_keyshares protoreflect.FieldDescriptor - fd_MsgRegisterController_verifications protoreflect.FieldDescriptor + md_MsgRegisterController protoreflect.MessageDescriptor + fd_MsgRegisterController_authority protoreflect.FieldDescriptor + fd_MsgRegisterController_cid protoreflect.FieldDescriptor + fd_MsgRegisterController_origin protoreflect.FieldDescriptor + fd_MsgRegisterController_authentication protoreflect.FieldDescriptor + fd_MsgRegisterController_token protoreflect.FieldDescriptor ) func init() { @@ -3928,8 +4058,9 @@ func init() { md_MsgRegisterController = File_did_v1_tx_proto.Messages().ByName("MsgRegisterController") fd_MsgRegisterController_authority = md_MsgRegisterController.Fields().ByName("authority") fd_MsgRegisterController_cid = md_MsgRegisterController.Fields().ByName("cid") - fd_MsgRegisterController_keyshares = md_MsgRegisterController.Fields().ByName("keyshares") - fd_MsgRegisterController_verifications = md_MsgRegisterController.Fields().ByName("verifications") + fd_MsgRegisterController_origin = md_MsgRegisterController.Fields().ByName("origin") + fd_MsgRegisterController_authentication = md_MsgRegisterController.Fields().ByName("authentication") + fd_MsgRegisterController_token = md_MsgRegisterController.Fields().ByName("token") } var _ protoreflect.Message = (*fastReflection_MsgRegisterController)(nil) @@ -4009,15 +4140,21 @@ func (x *fastReflection_MsgRegisterController) Range(f func(protoreflect.FieldDe return } } - if len(x.Keyshares) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &x.Keyshares}) - if !f(fd_MsgRegisterController_keyshares, value) { + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_MsgRegisterController_origin, value) { return } } - if len(x.Verifications) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Verifications}) - if !f(fd_MsgRegisterController_verifications, value) { + if len(x.Authentication) != 0 { + value := protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &x.Authentication}) + if !f(fd_MsgRegisterController_authentication, value) { + return + } + } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgRegisterController_token, value) { return } } @@ -4040,10 +4177,12 @@ func (x *fastReflection_MsgRegisterController) Has(fd protoreflect.FieldDescript return x.Authority != "" case "did.v1.MsgRegisterController.cid": return x.Cid != "" - case "did.v1.MsgRegisterController.keyshares": - return len(x.Keyshares) != 0 - case "did.v1.MsgRegisterController.verifications": - return len(x.Verifications) != 0 + case "did.v1.MsgRegisterController.origin": + return x.Origin != "" + case "did.v1.MsgRegisterController.authentication": + return len(x.Authentication) != 0 + case "did.v1.MsgRegisterController.token": + return x.Token != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4064,10 +4203,12 @@ func (x *fastReflection_MsgRegisterController) Clear(fd protoreflect.FieldDescri x.Authority = "" case "did.v1.MsgRegisterController.cid": x.Cid = "" - case "did.v1.MsgRegisterController.keyshares": - x.Keyshares = nil - case "did.v1.MsgRegisterController.verifications": - x.Verifications = nil + case "did.v1.MsgRegisterController.origin": + x.Origin = "" + case "did.v1.MsgRegisterController.authentication": + x.Authentication = nil + case "did.v1.MsgRegisterController.token": + x.Token = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4090,18 +4231,18 @@ func (x *fastReflection_MsgRegisterController) Get(descriptor protoreflect.Field case "did.v1.MsgRegisterController.cid": value := x.Cid return protoreflect.ValueOfString(value) - case "did.v1.MsgRegisterController.keyshares": - if len(x.Keyshares) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterController_3_list{}) - } - listValue := &_MsgRegisterController_3_list{list: &x.Keyshares} - return protoreflect.ValueOfList(listValue) - case "did.v1.MsgRegisterController.verifications": - if len(x.Verifications) == 0 { + case "did.v1.MsgRegisterController.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterController.authentication": + if len(x.Authentication) == 0 { return protoreflect.ValueOfList(&_MsgRegisterController_4_list{}) } - listValue := &_MsgRegisterController_4_list{list: &x.Verifications} + listValue := &_MsgRegisterController_4_list{list: &x.Authentication} return protoreflect.ValueOfList(listValue) + case "did.v1.MsgRegisterController.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4126,14 +4267,14 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript x.Authority = value.Interface().(string) case "did.v1.MsgRegisterController.cid": x.Cid = value.Interface().(string) - case "did.v1.MsgRegisterController.keyshares": - lv := value.List() - clv := lv.(*_MsgRegisterController_3_list) - x.Keyshares = *clv.list - case "did.v1.MsgRegisterController.verifications": + case "did.v1.MsgRegisterController.origin": + x.Origin = value.Interface().(string) + case "did.v1.MsgRegisterController.authentication": lv := value.List() clv := lv.(*_MsgRegisterController_4_list) - x.Verifications = *clv.list + x.Authentication = *clv.list + case "did.v1.MsgRegisterController.token": + x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4154,22 +4295,23 @@ func (x *fastReflection_MsgRegisterController) Set(fd protoreflect.FieldDescript // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterController) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterController.keyshares": - if x.Keyshares == nil { - x.Keyshares = [][]byte{} + case "did.v1.MsgRegisterController.authentication": + if x.Authentication == nil { + x.Authentication = []*Credential{} } - value := &_MsgRegisterController_3_list{list: &x.Keyshares} + value := &_MsgRegisterController_4_list{list: &x.Authentication} return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterController.verifications": - if x.Verifications == nil { - x.Verifications = [][]byte{} + case "did.v1.MsgRegisterController.token": + if x.Token == nil { + x.Token = new(Token) } - value := &_MsgRegisterController_4_list{list: &x.Verifications} - return protoreflect.ValueOfList(value) + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) case "did.v1.MsgRegisterController.authority": panic(fmt.Errorf("field authority of message did.v1.MsgRegisterController is not mutable")) case "did.v1.MsgRegisterController.cid": panic(fmt.Errorf("field cid of message did.v1.MsgRegisterController is not mutable")) + case "did.v1.MsgRegisterController.origin": + panic(fmt.Errorf("field origin of message did.v1.MsgRegisterController is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4187,12 +4329,14 @@ func (x *fastReflection_MsgRegisterController) NewField(fd protoreflect.FieldDes return protoreflect.ValueOfString("") case "did.v1.MsgRegisterController.cid": return protoreflect.ValueOfString("") - case "did.v1.MsgRegisterController.keyshares": - list := [][]byte{} - return protoreflect.ValueOfList(&_MsgRegisterController_3_list{list: &list}) - case "did.v1.MsgRegisterController.verifications": - list := [][]byte{} + case "did.v1.MsgRegisterController.origin": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterController.authentication": + list := []*Credential{} return protoreflect.ValueOfList(&_MsgRegisterController_4_list{list: &list}) + case "did.v1.MsgRegisterController.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterController")) @@ -4270,17 +4414,19 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Keyshares) > 0 { - for _, b := range x.Keyshares { - l = len(b) + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.Authentication) > 0 { + for _, e := range x.Authentication { + l = options.Size(e) n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.Verifications) > 0 { - for _, b := range x.Verifications { - l = len(b) - n += 1 + l + runtime.Sov(uint64(l)) - } + if x.Token != nil { + l = options.Size(x.Token) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -4311,23 +4457,42 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Verifications) > 0 { - for iNdEx := len(x.Verifications) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Verifications[iNdEx]) - copy(dAtA[i:], x.Verifications[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Verifications[iNdEx]))) + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.Authentication) > 0 { + for iNdEx := len(x.Authentication) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Authentication[iNdEx]) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- dAtA[i] = 0x22 } } - if len(x.Keyshares) > 0 { - for iNdEx := len(x.Keyshares) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Keyshares[iNdEx]) - copy(dAtA[i:], x.Keyshares[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Keyshares[iNdEx]))) - i-- - dAtA[i] = 0x1a - } + if len(x.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + i-- + dAtA[i] = 0x1a } if len(x.Cid) > 0 { i -= len(x.Cid) @@ -4458,9 +4623,9 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method iNdEx = postIndex case 3: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4470,29 +4635,29 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Keyshares = append(x.Keyshares, make([]byte, postIndex-iNdEx)) - copy(x.Keyshares[len(x.Keyshares)-1], dAtA[iNdEx:postIndex]) + x.Origin = 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 Verifications", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -4502,23 +4667,61 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength } - postIndex := iNdEx + byteLen + 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.Verifications = append(x.Verifications, make([]byte, postIndex-iNdEx)) - copy(x.Verifications[len(x.Verifications)-1], dAtA[iNdEx:postIndex]) + x.Authentication = append(x.Authentication, &Credential{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Authentication[len(x.Authentication)-1]); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } iNdEx = postIndex default: iNdEx = preIndex @@ -4555,20 +4758,20 @@ func (x *fastReflection_MsgRegisterController) ProtoMethods() *protoiface.Method } } -var _ protoreflect.Map = (*_MsgRegisterControllerResponse_2_map)(nil) +var _ protoreflect.Map = (*_MsgRegisterControllerResponse_3_map)(nil) -type _MsgRegisterControllerResponse_2_map struct { +type _MsgRegisterControllerResponse_3_map struct { m *map[string]string } -func (x *_MsgRegisterControllerResponse_2_map) Len() int { +func (x *_MsgRegisterControllerResponse_3_map) Len() int { if x.m == nil { return 0 } return len(*x.m) } -func (x *_MsgRegisterControllerResponse_2_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { +func (x *_MsgRegisterControllerResponse_3_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { if x.m == nil { return } @@ -4581,7 +4784,7 @@ func (x *_MsgRegisterControllerResponse_2_map) Range(f func(protoreflect.MapKey, } } -func (x *_MsgRegisterControllerResponse_2_map) Has(key protoreflect.MapKey) bool { +func (x *_MsgRegisterControllerResponse_3_map) Has(key protoreflect.MapKey) bool { if x.m == nil { return false } @@ -4591,7 +4794,7 @@ func (x *_MsgRegisterControllerResponse_2_map) Has(key protoreflect.MapKey) bool return ok } -func (x *_MsgRegisterControllerResponse_2_map) Clear(key protoreflect.MapKey) { +func (x *_MsgRegisterControllerResponse_3_map) Clear(key protoreflect.MapKey) { if x.m == nil { return } @@ -4600,7 +4803,7 @@ func (x *_MsgRegisterControllerResponse_2_map) Clear(key protoreflect.MapKey) { delete(*x.m, concreteKey) } -func (x *_MsgRegisterControllerResponse_2_map) Get(key protoreflect.MapKey) protoreflect.Value { +func (x *_MsgRegisterControllerResponse_3_map) Get(key protoreflect.MapKey) protoreflect.Value { if x.m == nil { return protoreflect.Value{} } @@ -4613,7 +4816,7 @@ func (x *_MsgRegisterControllerResponse_2_map) Get(key protoreflect.MapKey) prot return protoreflect.ValueOfString(v) } -func (x *_MsgRegisterControllerResponse_2_map) Set(key protoreflect.MapKey, value protoreflect.Value) { +func (x *_MsgRegisterControllerResponse_3_map) Set(key protoreflect.MapKey, value protoreflect.Value) { if !key.IsValid() || !value.IsValid() { panic("invalid key or value provided") } @@ -4624,21 +4827,22 @@ func (x *_MsgRegisterControllerResponse_2_map) Set(key protoreflect.MapKey, valu (*x.m)[concreteKey] = concreteValue } -func (x *_MsgRegisterControllerResponse_2_map) Mutable(key protoreflect.MapKey) protoreflect.Value { +func (x *_MsgRegisterControllerResponse_3_map) Mutable(key protoreflect.MapKey) protoreflect.Value { panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") } -func (x *_MsgRegisterControllerResponse_2_map) NewValue() protoreflect.Value { +func (x *_MsgRegisterControllerResponse_3_map) NewValue() protoreflect.Value { v := "" return protoreflect.ValueOfString(v) } -func (x *_MsgRegisterControllerResponse_2_map) IsValid() bool { +func (x *_MsgRegisterControllerResponse_3_map) IsValid() bool { return x.m != nil } var ( md_MsgRegisterControllerResponse protoreflect.MessageDescriptor + fd_MsgRegisterControllerResponse_success protoreflect.FieldDescriptor fd_MsgRegisterControllerResponse_controller protoreflect.FieldDescriptor fd_MsgRegisterControllerResponse_accounts protoreflect.FieldDescriptor ) @@ -4646,6 +4850,7 @@ var ( 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") fd_MsgRegisterControllerResponse_accounts = md_MsgRegisterControllerResponse.Fields().ByName("accounts") } @@ -4715,6 +4920,12 @@ func (x *fastReflection_MsgRegisterControllerResponse) Interface() protoreflect. // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgRegisterControllerResponse_success, value) { + return + } + } if x.Controller != "" { value := protoreflect.ValueOfString(x.Controller) if !f(fd_MsgRegisterControllerResponse_controller, value) { @@ -4722,7 +4933,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect } } if len(x.Accounts) != 0 { - value := protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &x.Accounts}) + value := protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_3_map{m: &x.Accounts}) if !f(fd_MsgRegisterControllerResponse_accounts, value) { return } @@ -4742,6 +4953,8 @@ func (x *fastReflection_MsgRegisterControllerResponse) Range(f func(protoreflect // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRegisterControllerResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.success": + return x.Success != false case "did.v1.MsgRegisterControllerResponse.controller": return x.Controller != "" case "did.v1.MsgRegisterControllerResponse.accounts": @@ -4762,6 +4975,8 @@ func (x *fastReflection_MsgRegisterControllerResponse) Has(fd protoreflect.Field // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterControllerResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.success": + x.Success = false case "did.v1.MsgRegisterControllerResponse.controller": x.Controller = "" case "did.v1.MsgRegisterControllerResponse.accounts": @@ -4782,14 +4997,17 @@ func (x *fastReflection_MsgRegisterControllerResponse) Clear(fd protoreflect.Fie // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRegisterControllerResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "did.v1.MsgRegisterControllerResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) case "did.v1.MsgRegisterControllerResponse.controller": value := x.Controller return protoreflect.ValueOfString(value) case "did.v1.MsgRegisterControllerResponse.accounts": if len(x.Accounts) == 0 { - return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{}) + return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_3_map{}) } - mapValue := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} + mapValue := &_MsgRegisterControllerResponse_3_map{m: &x.Accounts} return protoreflect.ValueOfMap(mapValue) default: if descriptor.IsExtension() { @@ -4811,11 +5029,13 @@ func (x *fastReflection_MsgRegisterControllerResponse) Get(descriptor protorefle // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterControllerResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.success": + x.Success = value.Bool() case "did.v1.MsgRegisterControllerResponse.controller": x.Controller = value.Interface().(string) case "did.v1.MsgRegisterControllerResponse.accounts": mv := value.Map() - cmv := mv.(*_MsgRegisterControllerResponse_2_map) + cmv := mv.(*_MsgRegisterControllerResponse_3_map) x.Accounts = *cmv.m default: if fd.IsExtension() { @@ -4841,8 +5061,10 @@ func (x *fastReflection_MsgRegisterControllerResponse) Mutable(fd protoreflect.F if x.Accounts == nil { x.Accounts = make(map[string]string) } - value := &_MsgRegisterControllerResponse_2_map{m: &x.Accounts} + value := &_MsgRegisterControllerResponse_3_map{m: &x.Accounts} return protoreflect.ValueOfMap(value) + 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")) default: @@ -4858,11 +5080,13 @@ func (x *fastReflection_MsgRegisterControllerResponse) Mutable(fd protoreflect.F // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRegisterControllerResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "did.v1.MsgRegisterControllerResponse.success": + return protoreflect.ValueOfBool(false) case "did.v1.MsgRegisterControllerResponse.controller": return protoreflect.ValueOfString("") case "did.v1.MsgRegisterControllerResponse.accounts": m := make(map[string]string) - return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_2_map{m: &m}) + return protoreflect.ValueOfMap(&_MsgRegisterControllerResponse_3_map{m: &m}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterControllerResponse")) @@ -4932,6 +5156,9 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac var n int var l int _ = l + if x.Success { + n += 2 + } l = len(x.Controller) if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) @@ -5001,7 +5228,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac dAtA[i] = 0xa i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a return protoiface.MarshalOutput{}, nil } if options.Deterministic { @@ -5034,7 +5261,17 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac copy(dAtA[i:], x.Controller) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Controller))) i-- - dAtA[i] = 0xa + 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...) @@ -5086,6 +5323,26 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } 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 Controller", wireType) } @@ -5117,7 +5374,7 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } x.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } @@ -5279,65 +5536,1289 @@ func (x *fastReflection_MsgRegisterControllerResponse) ProtoMethods() *protoifac } } -var _ protoreflect.List = (*_MsgRegisterService_3_list)(nil) +var ( + md_MsgAuthorize protoreflect.MessageDescriptor + fd_MsgAuthorize_authority protoreflect.FieldDescriptor + fd_MsgAuthorize_controller protoreflect.FieldDescriptor + fd_MsgAuthorize_address protoreflect.FieldDescriptor + fd_MsgAuthorize_origin protoreflect.FieldDescriptor + fd_MsgAuthorize_token protoreflect.FieldDescriptor +) -type _MsgRegisterService_3_list struct { - list *[]PermissionScope +func init() { + file_did_v1_tx_proto_init() + md_MsgAuthorize = File_did_v1_tx_proto.Messages().ByName("MsgAuthorize") + fd_MsgAuthorize_authority = md_MsgAuthorize.Fields().ByName("authority") + fd_MsgAuthorize_controller = md_MsgAuthorize.Fields().ByName("controller") + fd_MsgAuthorize_address = md_MsgAuthorize.Fields().ByName("address") + fd_MsgAuthorize_origin = md_MsgAuthorize.Fields().ByName("origin") + fd_MsgAuthorize_token = md_MsgAuthorize.Fields().ByName("token") } -func (x *_MsgRegisterService_3_list) Len() int { - if x.list == nil { - return 0 +var _ protoreflect.Message = (*fastReflection_MsgAuthorize)(nil) + +type fastReflection_MsgAuthorize MsgAuthorize + +func (x *MsgAuthorize) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthorize)(x) +} + +func (x *MsgAuthorize) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return len(*x.list) + return mi.MessageOf(x) } -func (x *_MsgRegisterService_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)((*x.list)[i])) +var _fastReflection_MsgAuthorize_messageType fastReflection_MsgAuthorize_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthorize_messageType{} + +type fastReflection_MsgAuthorize_messageType struct{} + +func (x fastReflection_MsgAuthorize_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthorize)(nil) +} +func (x fastReflection_MsgAuthorize_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthorize) +} +func (x fastReflection_MsgAuthorize_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorize } -func (x *_MsgRegisterService_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - (*x.list)[i] = concreteValue +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAuthorize) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorize } -func (x *_MsgRegisterService_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Enum() - concreteValue := (PermissionScope)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) +// 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_MsgAuthorize) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthorize_messageType } -func (x *_MsgRegisterService_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgRegisterService at list field Scopes as it is not of Message kind")) +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAuthorize) New() protoreflect.Message { + return new(fastReflection_MsgAuthorize) } -func (x *_MsgRegisterService_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAuthorize) Interface() protoreflect.ProtoMessage { + return (*MsgAuthorize)(x) } -func (x *_MsgRegisterService_3_list) NewElement() protoreflect.Value { - v := 0 - return protoreflect.ValueOfEnum((protoreflect.EnumNumber)(v)) +// 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_MsgAuthorize) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgAuthorize_authority, value) { + return + } + } + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgAuthorize_controller, value) { + return + } + } + if x.Address != "" { + value := protoreflect.ValueOfString(x.Address) + if !f(fd_MsgAuthorize_address, value) { + return + } + } + if x.Origin != "" { + value := protoreflect.ValueOfString(x.Origin) + if !f(fd_MsgAuthorize_origin, value) { + return + } + } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgAuthorize_token, value) { + return + } + } } -func (x *_MsgRegisterService_3_list) IsValid() bool { - return x.list != nil +// 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_MsgAuthorize) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgAuthorize.authority": + return x.Authority != "" + case "did.v1.MsgAuthorize.controller": + return x.Controller != "" + case "did.v1.MsgAuthorize.address": + return x.Address != "" + case "did.v1.MsgAuthorize.origin": + return x.Origin != "" + case "did.v1.MsgAuthorize.token": + return x.Token != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorize 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_MsgAuthorize) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgAuthorize.authority": + x.Authority = "" + case "did.v1.MsgAuthorize.controller": + x.Controller = "" + case "did.v1.MsgAuthorize.address": + x.Address = "" + case "did.v1.MsgAuthorize.origin": + x.Origin = "" + case "did.v1.MsgAuthorize.token": + x.Token = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorize 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_MsgAuthorize) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgAuthorize.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "did.v1.MsgAuthorize.controller": + value := x.Controller + return protoreflect.ValueOfString(value) + case "did.v1.MsgAuthorize.address": + value := x.Address + return protoreflect.ValueOfString(value) + case "did.v1.MsgAuthorize.origin": + value := x.Origin + return protoreflect.ValueOfString(value) + case "did.v1.MsgAuthorize.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorize 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_MsgAuthorize) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgAuthorize.authority": + x.Authority = value.Interface().(string) + case "did.v1.MsgAuthorize.controller": + x.Controller = value.Interface().(string) + case "did.v1.MsgAuthorize.address": + x.Address = value.Interface().(string) + case "did.v1.MsgAuthorize.origin": + x.Origin = value.Interface().(string) + case "did.v1.MsgAuthorize.token": + x.Token = value.Message().Interface().(*Token) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorize 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_MsgAuthorize) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgAuthorize.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + case "did.v1.MsgAuthorize.authority": + panic(fmt.Errorf("field authority of message did.v1.MsgAuthorize is not mutable")) + case "did.v1.MsgAuthorize.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgAuthorize is not mutable")) + case "did.v1.MsgAuthorize.address": + panic(fmt.Errorf("field address of message did.v1.MsgAuthorize is not mutable")) + case "did.v1.MsgAuthorize.origin": + panic(fmt.Errorf("field origin of message did.v1.MsgAuthorize is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorize 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_MsgAuthorize) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgAuthorize.authority": + return protoreflect.ValueOfString("") + case "did.v1.MsgAuthorize.controller": + return protoreflect.ValueOfString("") + case "did.v1.MsgAuthorize.address": + return protoreflect.ValueOfString("") + case "did.v1.MsgAuthorize.origin": + return protoreflect.ValueOfString("") + case "did.v1.MsgAuthorize.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorize")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorize 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_MsgAuthorize) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthorize", 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_MsgAuthorize) 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_MsgAuthorize) 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_MsgAuthorize) 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_MsgAuthorize) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAuthorize) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Controller) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Address) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Origin) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Token != nil { + l = options.Size(x.Token) + 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().(*MsgAuthorize) + 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.Token != nil { + encoded, err := options.Marshal(x.Token) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x2a + } + if len(x.Origin) > 0 { + i -= len(x.Origin) + copy(dAtA[i:], x.Origin) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Origin))) + 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 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.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().(*MsgAuthorize) + 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: MsgAuthorize: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorize: 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 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 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 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 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); 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_MsgRegisterService protoreflect.MessageDescriptor - fd_MsgRegisterService_authority protoreflect.FieldDescriptor - fd_MsgRegisterService_origin_uri protoreflect.FieldDescriptor - fd_MsgRegisterService_scopes protoreflect.FieldDescriptor + md_MsgAuthorizeResponse protoreflect.MessageDescriptor + fd_MsgAuthorizeResponse_success protoreflect.FieldDescriptor + fd_MsgAuthorizeResponse_token protoreflect.FieldDescriptor +) + +func init() { + file_did_v1_tx_proto_init() + md_MsgAuthorizeResponse = File_did_v1_tx_proto.Messages().ByName("MsgAuthorizeResponse") + fd_MsgAuthorizeResponse_success = md_MsgAuthorizeResponse.Fields().ByName("success") + fd_MsgAuthorizeResponse_token = md_MsgAuthorizeResponse.Fields().ByName("token") +} + +var _ protoreflect.Message = (*fastReflection_MsgAuthorizeResponse)(nil) + +type fastReflection_MsgAuthorizeResponse MsgAuthorizeResponse + +func (x *MsgAuthorizeResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgAuthorizeResponse)(x) +} + +func (x *MsgAuthorizeResponse) slowProtoReflect() protoreflect.Message { + mi := &file_did_v1_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgAuthorizeResponse_messageType fastReflection_MsgAuthorizeResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgAuthorizeResponse_messageType{} + +type fastReflection_MsgAuthorizeResponse_messageType struct{} + +func (x fastReflection_MsgAuthorizeResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgAuthorizeResponse)(nil) +} +func (x fastReflection_MsgAuthorizeResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgAuthorizeResponse) +} +func (x fastReflection_MsgAuthorizeResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorizeResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgAuthorizeResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgAuthorizeResponse +} + +// 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_MsgAuthorizeResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgAuthorizeResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgAuthorizeResponse) New() protoreflect.Message { + return new(fastReflection_MsgAuthorizeResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgAuthorizeResponse) Interface() protoreflect.ProtoMessage { + return (*MsgAuthorizeResponse)(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_MsgAuthorizeResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Success != false { + value := protoreflect.ValueOfBool(x.Success) + if !f(fd_MsgAuthorizeResponse_success, value) { + return + } + } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgAuthorizeResponse_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_MsgAuthorizeResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "did.v1.MsgAuthorizeResponse.success": + return x.Success != false + case "did.v1.MsgAuthorizeResponse.token": + return x.Token != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse 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_MsgAuthorizeResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "did.v1.MsgAuthorizeResponse.success": + x.Success = false + case "did.v1.MsgAuthorizeResponse.token": + x.Token = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse 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_MsgAuthorizeResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "did.v1.MsgAuthorizeResponse.success": + value := x.Success + return protoreflect.ValueOfBool(value) + case "did.v1.MsgAuthorizeResponse.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse 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_MsgAuthorizeResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "did.v1.MsgAuthorizeResponse.success": + x.Success = value.Bool() + case "did.v1.MsgAuthorizeResponse.token": + x.Token = value.Message().Interface().(*Token) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse 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_MsgAuthorizeResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgAuthorizeResponse.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + case "did.v1.MsgAuthorizeResponse.success": + panic(fmt.Errorf("field success of message did.v1.MsgAuthorizeResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse 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_MsgAuthorizeResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "did.v1.MsgAuthorizeResponse.success": + return protoreflect.ValueOfBool(false) + case "did.v1.MsgAuthorizeResponse.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgAuthorizeResponse")) + } + panic(fmt.Errorf("message did.v1.MsgAuthorizeResponse 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_MsgAuthorizeResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in did.v1.MsgAuthorizeResponse", 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_MsgAuthorizeResponse) 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_MsgAuthorizeResponse) 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_MsgAuthorizeResponse) 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_MsgAuthorizeResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgAuthorizeResponse) + 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.Token != nil { + l = options.Size(x.Token) + 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().(*MsgAuthorizeResponse) + 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.Token != nil { + encoded, err := options.Marshal(x.Token) + 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().(*MsgAuthorizeResponse) + 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: MsgAuthorizeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAuthorizeResponse: 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 Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var _ protoreflect.Map = (*_MsgRegisterService_5_map)(nil) + +type _MsgRegisterService_5_map struct { + m *map[string]string +} + +func (x *_MsgRegisterService_5_map) Len() int { + if x.m == nil { + return 0 + } + return len(*x.m) +} + +func (x *_MsgRegisterService_5_map) Range(f func(protoreflect.MapKey, protoreflect.Value) bool) { + if x.m == nil { + return + } + for k, v := range *x.m { + mapKey := (protoreflect.MapKey)(protoreflect.ValueOfString(k)) + mapValue := protoreflect.ValueOfString(v) + if !f(mapKey, mapValue) { + break + } + } +} + +func (x *_MsgRegisterService_5_map) Has(key protoreflect.MapKey) bool { + if x.m == nil { + return false + } + keyUnwrapped := key.String() + concreteValue := keyUnwrapped + _, ok := (*x.m)[concreteValue] + return ok +} + +func (x *_MsgRegisterService_5_map) Clear(key protoreflect.MapKey) { + if x.m == nil { + return + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + delete(*x.m, concreteKey) +} + +func (x *_MsgRegisterService_5_map) Get(key protoreflect.MapKey) protoreflect.Value { + if x.m == nil { + return protoreflect.Value{} + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + v, ok := (*x.m)[concreteKey] + if !ok { + return protoreflect.Value{} + } + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterService_5_map) Set(key protoreflect.MapKey, value protoreflect.Value) { + if !key.IsValid() || !value.IsValid() { + panic("invalid key or value provided") + } + keyUnwrapped := key.String() + concreteKey := keyUnwrapped + valueUnwrapped := value.String() + concreteValue := valueUnwrapped + (*x.m)[concreteKey] = concreteValue +} + +func (x *_MsgRegisterService_5_map) Mutable(key protoreflect.MapKey) protoreflect.Value { + panic("should not call Mutable on protoreflect.Map whose value is not of type protoreflect.Message") +} + +func (x *_MsgRegisterService_5_map) NewValue() protoreflect.Value { + v := "" + return protoreflect.ValueOfString(v) +} + +func (x *_MsgRegisterService_5_map) IsValid() bool { + return x.m != nil +} + +var ( + md_MsgRegisterService protoreflect.MessageDescriptor + fd_MsgRegisterService_controller protoreflect.FieldDescriptor + fd_MsgRegisterService_origin_uri protoreflect.FieldDescriptor + fd_MsgRegisterService_scopes protoreflect.FieldDescriptor + fd_MsgRegisterService_description protoreflect.FieldDescriptor + fd_MsgRegisterService_service_endpoints protoreflect.FieldDescriptor + fd_MsgRegisterService_metadata protoreflect.FieldDescriptor + fd_MsgRegisterService_token protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() md_MsgRegisterService = File_did_v1_tx_proto.Messages().ByName("MsgRegisterService") - fd_MsgRegisterService_authority = md_MsgRegisterService.Fields().ByName("authority") + fd_MsgRegisterService_controller = md_MsgRegisterService.Fields().ByName("controller") fd_MsgRegisterService_origin_uri = md_MsgRegisterService.Fields().ByName("origin_uri") fd_MsgRegisterService_scopes = md_MsgRegisterService.Fields().ByName("scopes") + fd_MsgRegisterService_description = md_MsgRegisterService.Fields().ByName("description") + fd_MsgRegisterService_service_endpoints = md_MsgRegisterService.Fields().ByName("service_endpoints") + fd_MsgRegisterService_metadata = md_MsgRegisterService.Fields().ByName("metadata") + fd_MsgRegisterService_token = md_MsgRegisterService.Fields().ByName("token") } var _ protoreflect.Message = (*fastReflection_MsgRegisterService)(nil) @@ -5349,7 +6830,7 @@ func (x *MsgRegisterService) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterService) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[10] + mi := &file_did_v1_tx_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -5405,9 +6886,9 @@ func (x *fastReflection_MsgRegisterService) Interface() protoreflect.ProtoMessag // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Authority != "" { - value := protoreflect.ValueOfString(x.Authority) - if !f(fd_MsgRegisterService_authority, value) { + if x.Controller != "" { + value := protoreflect.ValueOfString(x.Controller) + if !f(fd_MsgRegisterService_controller, value) { return } } @@ -5417,12 +6898,36 @@ func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescr return } } - if len(x.Scopes) != 0 { - value := protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &x.Scopes}) + if x.Scopes != nil { + value := protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) if !f(fd_MsgRegisterService_scopes, value) { return } } + if x.Description != "" { + value := protoreflect.ValueOfString(x.Description) + if !f(fd_MsgRegisterService_description, value) { + return + } + } + if len(x.ServiceEndpoints) != 0 { + value := protoreflect.ValueOfMap(&_MsgRegisterService_5_map{m: &x.ServiceEndpoints}) + if !f(fd_MsgRegisterService_service_endpoints, value) { + return + } + } + if x.Metadata != nil { + value := protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + if !f(fd_MsgRegisterService_metadata, value) { + return + } + } + if x.Token != nil { + value := protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + if !f(fd_MsgRegisterService_token, value) { + return + } + } } // Has reports whether a field is populated. @@ -5438,12 +6943,20 @@ func (x *fastReflection_MsgRegisterService) Range(f func(protoreflect.FieldDescr // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - return x.Authority != "" + case "did.v1.MsgRegisterService.controller": + return x.Controller != "" case "did.v1.MsgRegisterService.origin_uri": return x.OriginUri != "" case "did.v1.MsgRegisterService.scopes": - return len(x.Scopes) != 0 + return x.Scopes != nil + case "did.v1.MsgRegisterService.description": + return x.Description != "" + case "did.v1.MsgRegisterService.service_endpoints": + return len(x.ServiceEndpoints) != 0 + case "did.v1.MsgRegisterService.metadata": + return x.Metadata != nil + case "did.v1.MsgRegisterService.token": + return x.Token != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -5460,12 +6973,20 @@ func (x *fastReflection_MsgRegisterService) Has(fd protoreflect.FieldDescriptor) // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - x.Authority = "" + case "did.v1.MsgRegisterService.controller": + x.Controller = "" case "did.v1.MsgRegisterService.origin_uri": x.OriginUri = "" case "did.v1.MsgRegisterService.scopes": x.Scopes = nil + case "did.v1.MsgRegisterService.description": + x.Description = "" + case "did.v1.MsgRegisterService.service_endpoints": + x.ServiceEndpoints = nil + case "did.v1.MsgRegisterService.metadata": + x.Metadata = nil + case "did.v1.MsgRegisterService.token": + x.Token = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -5482,18 +7003,30 @@ func (x *fastReflection_MsgRegisterService) Clear(fd protoreflect.FieldDescripto // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "did.v1.MsgRegisterService.authority": - value := x.Authority + case "did.v1.MsgRegisterService.controller": + value := x.Controller return protoreflect.ValueOfString(value) case "did.v1.MsgRegisterService.origin_uri": value := x.OriginUri return protoreflect.ValueOfString(value) case "did.v1.MsgRegisterService.scopes": - if len(x.Scopes) == 0 { - return protoreflect.ValueOfList(&_MsgRegisterService_3_list{}) + value := x.Scopes + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgRegisterService.description": + value := x.Description + return protoreflect.ValueOfString(value) + case "did.v1.MsgRegisterService.service_endpoints": + if len(x.ServiceEndpoints) == 0 { + return protoreflect.ValueOfMap(&_MsgRegisterService_5_map{}) } - listValue := &_MsgRegisterService_3_list{list: &x.Scopes} - return protoreflect.ValueOfList(listValue) + mapValue := &_MsgRegisterService_5_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(mapValue) + case "did.v1.MsgRegisterService.metadata": + value := x.Metadata + return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "did.v1.MsgRegisterService.token": + value := x.Token + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -5514,14 +7047,22 @@ func (x *fastReflection_MsgRegisterService) Get(descriptor protoreflect.FieldDes // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgRegisterService) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": - x.Authority = value.Interface().(string) + case "did.v1.MsgRegisterService.controller": + x.Controller = value.Interface().(string) case "did.v1.MsgRegisterService.origin_uri": x.OriginUri = value.Interface().(string) case "did.v1.MsgRegisterService.scopes": - lv := value.List() - clv := lv.(*_MsgRegisterService_3_list) - x.Scopes = *clv.list + x.Scopes = value.Message().Interface().(*Permissions) + case "did.v1.MsgRegisterService.description": + x.Description = value.Interface().(string) + case "did.v1.MsgRegisterService.service_endpoints": + mv := value.Map() + cmv := mv.(*_MsgRegisterService_5_map) + x.ServiceEndpoints = *cmv.m + case "did.v1.MsgRegisterService.metadata": + x.Metadata = value.Message().Interface().(*Metadata) + case "did.v1.MsgRegisterService.token": + x.Token = value.Message().Interface().(*Token) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -5544,14 +7085,31 @@ func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescrip switch fd.FullName() { case "did.v1.MsgRegisterService.scopes": if x.Scopes == nil { - x.Scopes = []PermissionScope{} + x.Scopes = new(Permissions) } - value := &_MsgRegisterService_3_list{list: &x.Scopes} - return protoreflect.ValueOfList(value) - case "did.v1.MsgRegisterService.authority": - panic(fmt.Errorf("field authority of message did.v1.MsgRegisterService is not mutable")) + return protoreflect.ValueOfMessage(x.Scopes.ProtoReflect()) + case "did.v1.MsgRegisterService.service_endpoints": + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + value := &_MsgRegisterService_5_map{m: &x.ServiceEndpoints} + return protoreflect.ValueOfMap(value) + case "did.v1.MsgRegisterService.metadata": + if x.Metadata == nil { + x.Metadata = new(Metadata) + } + return protoreflect.ValueOfMessage(x.Metadata.ProtoReflect()) + case "did.v1.MsgRegisterService.token": + if x.Token == nil { + x.Token = new(Token) + } + return protoreflect.ValueOfMessage(x.Token.ProtoReflect()) + case "did.v1.MsgRegisterService.controller": + panic(fmt.Errorf("field controller of message did.v1.MsgRegisterService is not mutable")) case "did.v1.MsgRegisterService.origin_uri": panic(fmt.Errorf("field origin_uri of message did.v1.MsgRegisterService is not mutable")) + case "did.v1.MsgRegisterService.description": + panic(fmt.Errorf("field description of message did.v1.MsgRegisterService is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -5565,13 +7123,24 @@ func (x *fastReflection_MsgRegisterService) Mutable(fd protoreflect.FieldDescrip // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgRegisterService) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "did.v1.MsgRegisterService.authority": + case "did.v1.MsgRegisterService.controller": return protoreflect.ValueOfString("") case "did.v1.MsgRegisterService.origin_uri": return protoreflect.ValueOfString("") case "did.v1.MsgRegisterService.scopes": - list := []PermissionScope{} - return protoreflect.ValueOfList(&_MsgRegisterService_3_list{list: &list}) + m := new(Permissions) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgRegisterService.description": + return protoreflect.ValueOfString("") + case "did.v1.MsgRegisterService.service_endpoints": + m := make(map[string]string) + return protoreflect.ValueOfMap(&_MsgRegisterService_5_map{m: &m}) + case "did.v1.MsgRegisterService.metadata": + m := new(Metadata) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "did.v1.MsgRegisterService.token": + m := new(Token) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterService")) @@ -5641,7 +7210,7 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { 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)) } @@ -5649,12 +7218,42 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if len(x.Scopes) > 0 { - l = 0 - for _, e := range x.Scopes { - l += runtime.Sov(uint64(e)) + if x.Scopes != nil { + l = options.Size(x.Scopes) + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.Description) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if len(x.ServiceEndpoints) > 0 { + SiZeMaP := func(k string, v string) { + mapEntrySize := 1 + len(k) + runtime.Sov(uint64(len(k))) + 1 + len(v) + runtime.Sov(uint64(len(v))) + n += mapEntrySize + 1 + runtime.Sov(uint64(mapEntrySize)) } - n += 1 + runtime.Sov(uint64(l)) + l + if options.Deterministic { + sortme := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + sortme = append(sortme, k) + } + sort.Strings(sortme) + for _, k := range sortme { + v := x.ServiceEndpoints[k] + SiZeMaP(k, v) + } + } else { + for k, v := range x.ServiceEndpoints { + SiZeMaP(k, v) + } + } + } + if x.Metadata != nil { + l = options.Size(x.Metadata) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.Token != nil { + l = options.Size(x.Token) + n += 1 + l + runtime.Sov(uint64(l)) } if x.unknownFields != nil { n += len(x.unknownFields) @@ -5685,24 +7284,95 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if len(x.Scopes) > 0 { - var pksize2 int - for _, num := range x.Scopes { - pksize2 += runtime.Sov(uint64(num)) + if x.Token != nil { + encoded, err := options.Marshal(x.Token) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err } - i -= pksize2 - j1 := i - for _, num1 := range x.Scopes { - num := uint64(num1) - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0x3a + } + if x.Metadata != nil { + encoded, err := options.Marshal(x.Metadata) + 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] = 0x32 + } + if len(x.ServiceEndpoints) > 0 { + MaRsHaLmAp := func(k string, v string) (protoiface.MarshalOutput, error) { + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = runtime.EncodeVarint(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = runtime.EncodeVarint(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = runtime.EncodeVarint(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + return protoiface.MarshalOutput{}, nil + } + if options.Deterministic { + keysForServiceEndpoints := make([]string, 0, len(x.ServiceEndpoints)) + for k := range x.ServiceEndpoints { + keysForServiceEndpoints = append(keysForServiceEndpoints, string(k)) + } + sort.Slice(keysForServiceEndpoints, func(i, j int) bool { + return keysForServiceEndpoints[i] < keysForServiceEndpoints[j] + }) + for iNdEx := len(keysForServiceEndpoints) - 1; iNdEx >= 0; iNdEx-- { + v := x.ServiceEndpoints[string(keysForServiceEndpoints[iNdEx])] + out, err := MaRsHaLmAp(keysForServiceEndpoints[iNdEx], v) + if err != nil { + return out, err + } + } + } else { + for k := range x.ServiceEndpoints { + v := x.ServiceEndpoints[k] + out, err := MaRsHaLmAp(k, v) + if err != nil { + return out, err + } } - dAtA[j1] = uint8(num) - j1++ } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) + } + 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] = 0x22 + } + if x.Scopes != nil { + encoded, err := options.Marshal(x.Scopes) + 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] = 0x1a } @@ -5713,10 +7383,10 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { 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))) + 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 } @@ -5771,7 +7441,7 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { switch fieldNum { case 1: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field 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 { @@ -5799,7 +7469,7 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { 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 { @@ -5834,55 +7504,127 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { x.OriginUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow } - x.Scopes = append(x.Scopes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { + if iNdEx >= l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - var elementCount int - if elementCount != 0 && len(x.Scopes) == 0 { - x.Scopes = make([]PermissionScope, 0, elementCount) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - for iNdEx < postIndex { - var v PermissionScope + } + 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.Scopes == nil { + x.Scopes = &Permissions{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Scopes); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + x.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.ServiceEndpoints == nil { + x.ServiceEndpoints = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow @@ -5892,16 +7634,142 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { } b := dAtA[iNdEx] iNdEx++ - v |= PermissionScope(b&0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } - x.Scopes = append(x.Scopes, v) + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapkey > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postStringIndexmapvalue > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > postIndex { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + iNdEx += skippy } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) } + x.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Metadata", 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.Metadata == nil { + x.Metadata = &Metadata{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Metadata); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Token", 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.Token == nil { + x.Token = &Token{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Token); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -5940,12 +7808,14 @@ func (x *fastReflection_MsgRegisterService) ProtoMethods() *protoiface.Methods { var ( md_MsgRegisterServiceResponse protoreflect.MessageDescriptor fd_MsgRegisterServiceResponse_success protoreflect.FieldDescriptor + fd_MsgRegisterServiceResponse_did protoreflect.FieldDescriptor ) func init() { file_did_v1_tx_proto_init() md_MsgRegisterServiceResponse = File_did_v1_tx_proto.Messages().ByName("MsgRegisterServiceResponse") fd_MsgRegisterServiceResponse_success = md_MsgRegisterServiceResponse.Fields().ByName("success") + fd_MsgRegisterServiceResponse_did = md_MsgRegisterServiceResponse.Fields().ByName("did") } var _ protoreflect.Message = (*fastReflection_MsgRegisterServiceResponse)(nil) @@ -5957,7 +7827,7 @@ func (x *MsgRegisterServiceResponse) ProtoReflect() protoreflect.Message { } func (x *MsgRegisterServiceResponse) slowProtoReflect() protoreflect.Message { - mi := &file_did_v1_tx_proto_msgTypes[11] + mi := &file_did_v1_tx_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -6019,6 +7889,12 @@ func (x *fastReflection_MsgRegisterServiceResponse) Range(f func(protoreflect.Fi return } } + if x.Did != "" { + value := protoreflect.ValueOfString(x.Did) + if !f(fd_MsgRegisterServiceResponse_did, value) { + return + } + } } // Has reports whether a field is populated. @@ -6036,6 +7912,8 @@ func (x *fastReflection_MsgRegisterServiceResponse) Has(fd protoreflect.FieldDes switch fd.FullName() { case "did.v1.MsgRegisterServiceResponse.success": return x.Success != false + case "did.v1.MsgRegisterServiceResponse.did": + return x.Did != "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) @@ -6054,6 +7932,8 @@ func (x *fastReflection_MsgRegisterServiceResponse) Clear(fd protoreflect.FieldD switch fd.FullName() { case "did.v1.MsgRegisterServiceResponse.success": x.Success = false + case "did.v1.MsgRegisterServiceResponse.did": + x.Did = "" default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) @@ -6073,6 +7953,9 @@ func (x *fastReflection_MsgRegisterServiceResponse) Get(descriptor protoreflect. case "did.v1.MsgRegisterServiceResponse.success": value := x.Success return protoreflect.ValueOfBool(value) + case "did.v1.MsgRegisterServiceResponse.did": + value := x.Did + return protoreflect.ValueOfString(value) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) @@ -6095,6 +7978,8 @@ func (x *fastReflection_MsgRegisterServiceResponse) Set(fd protoreflect.FieldDes switch fd.FullName() { case "did.v1.MsgRegisterServiceResponse.success": x.Success = value.Bool() + case "did.v1.MsgRegisterServiceResponse.did": + x.Did = value.Interface().(string) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) @@ -6117,6 +8002,8 @@ func (x *fastReflection_MsgRegisterServiceResponse) Mutable(fd protoreflect.Fiel switch fd.FullName() { case "did.v1.MsgRegisterServiceResponse.success": panic(fmt.Errorf("field success of message did.v1.MsgRegisterServiceResponse is not mutable")) + case "did.v1.MsgRegisterServiceResponse.did": + panic(fmt.Errorf("field did of message did.v1.MsgRegisterServiceResponse is not mutable")) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) @@ -6132,6 +8019,8 @@ func (x *fastReflection_MsgRegisterServiceResponse) NewField(fd protoreflect.Fie switch fd.FullName() { case "did.v1.MsgRegisterServiceResponse.success": return protoreflect.ValueOfBool(false) + case "did.v1.MsgRegisterServiceResponse.did": + return protoreflect.ValueOfString("") default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: did.v1.MsgRegisterServiceResponse")) @@ -6204,6 +8093,10 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M 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) } @@ -6233,6 +8126,13 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M 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 { @@ -6312,6 +8212,38 @@ func (x *fastReflection_MsgRegisterServiceResponse) ProtoMethods() *protoiface.M } } 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:]) @@ -6371,9 +8303,9 @@ type MsgUpdateParams struct { // 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"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (x *MsgUpdateParams) Reset() { @@ -6410,6 +8342,13 @@ func (x *MsgUpdateParams) GetParams() *Params { return nil } +func (x *MsgUpdateParams) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. // @@ -6440,24 +8379,22 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{1} } -// MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticate struct { +// MsgAllocateVault is the message type for the AllocateVault RPC. +type MsgAllocateVault struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // authority is the address of the governance account. + // authority is the address of the service 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,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Address is the address to authenticate. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // Origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + // subject is a unique human-defined identifier to associate with the vault. + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } -func (x *MsgAuthenticate) Reset() { - *x = MsgAuthenticate{} +func (x *MsgAllocateVault) Reset() { + *x = MsgAllocateVault{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6465,54 +8402,52 @@ func (x *MsgAuthenticate) Reset() { } } -func (x *MsgAuthenticate) String() string { +func (x *MsgAllocateVault) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthenticate) ProtoMessage() {} +func (*MsgAllocateVault) ProtoMessage() {} -// Deprecated: Use MsgAuthenticate.ProtoReflect.Descriptor instead. -func (*MsgAuthenticate) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgAllocateVault.ProtoReflect.Descriptor instead. +func (*MsgAllocateVault) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{2} } -func (x *MsgAuthenticate) GetAuthority() string { +func (x *MsgAllocateVault) GetAuthority() string { if x != nil { return x.Authority } return "" } -func (x *MsgAuthenticate) GetController() string { +func (x *MsgAllocateVault) GetSubject() string { if x != nil { - return x.Controller + return x.Subject } return "" } -func (x *MsgAuthenticate) GetAddress() string { +func (x *MsgAllocateVault) GetToken() *Token { if x != nil { - return x.Address + return x.Token } - return "" + return nil } -func (x *MsgAuthenticate) GetOrigin() string { - if x != nil { - return x.Origin - } - return "" -} - -// MsgAuthenticateResponse is the response type for the Authenticate RPC. -type MsgAuthenticateResponse struct { +// MsgAllocateVaultResponse is the response type for the AllocateVault RPC. +type MsgAllocateVaultResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + // CID is the content identifier of the vault. + Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` + // ExpiryBlock is the block number at which the vault will expire. + ExpiryBlock int64 `protobuf:"varint,2,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` } -func (x *MsgAuthenticateResponse) Reset() { - *x = MsgAuthenticateResponse{} +func (x *MsgAllocateVaultResponse) Reset() { + *x = MsgAllocateVaultResponse{} if protoimpl.UnsafeEnabled { mi := &file_did_v1_tx_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -6520,17 +8455,31 @@ func (x *MsgAuthenticateResponse) Reset() { } } -func (x *MsgAuthenticateResponse) String() string { +func (x *MsgAllocateVaultResponse) String() string { return protoimpl.X.MessageStringOf(x) } -func (*MsgAuthenticateResponse) ProtoMessage() {} +func (*MsgAllocateVaultResponse) ProtoMessage() {} -// Deprecated: Use MsgAuthenticateResponse.ProtoReflect.Descriptor instead. -func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { +// Deprecated: Use MsgAllocateVaultResponse.ProtoReflect.Descriptor instead. +func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{3} } +func (x *MsgAllocateVaultResponse) GetCid() string { + if x != nil { + return x.Cid + } + return "" +} + +func (x *MsgAllocateVaultResponse) GetExpiryBlock() int64 { + if x != nil { + return x.ExpiryBlock + } + return 0 +} + // MsgProveWitness is the message type for the ProveWitness RPC. type MsgProveWitness struct { state protoimpl.MessageState @@ -6543,6 +8492,8 @@ type MsgProveWitness struct { Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` // Witness Value is the bytes of the witness. Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` } func (x *MsgProveWitness) Reset() { @@ -6586,6 +8537,13 @@ func (x *MsgProveWitness) GetWitness() []byte { return nil } +func (x *MsgProveWitness) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + // MsgProveWitnessResponse is the response type for the ProveWitness RPC. type MsgProveWitnessResponse struct { state protoimpl.MessageState @@ -6638,10 +8596,8 @@ type MsgSyncVault struct { // controller is the address of the controller to sync. Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // cid is the IPFS content identifier. - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - // Macroon is the public token to authenticate the operation. - Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` + // Token is the public token to authenticate the operation. + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (x *MsgSyncVault) Reset() { @@ -6671,16 +8627,9 @@ func (x *MsgSyncVault) GetController() string { return "" } -func (x *MsgSyncVault) GetCid() string { +func (x *MsgSyncVault) GetToken() *Token { if x != nil { - return x.Cid - } - return "" -} - -func (x *MsgSyncVault) GetMacron() []byte { - if x != nil { - return x.Macron + return x.Token } return nil } @@ -6731,10 +8680,12 @@ type MsgRegisterController struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Assertions is the list of assertions to initialize the controller with. Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` + // Origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + // Credential is the list of keyshares to initialize the controller with. + Authentication []*Credential `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` } func (x *MsgRegisterController) Reset() { @@ -6771,16 +8722,23 @@ func (x *MsgRegisterController) GetCid() string { return "" } -func (x *MsgRegisterController) GetKeyshares() [][]byte { +func (x *MsgRegisterController) GetOrigin() string { if x != nil { - return x.Keyshares + return x.Origin + } + return "" +} + +func (x *MsgRegisterController) GetAuthentication() []*Credential { + if x != nil { + return x.Authentication } return nil } -func (x *MsgRegisterController) GetVerifications() [][]byte { +func (x *MsgRegisterController) GetToken() *Token { if x != nil { - return x.Verifications + return x.Token } return nil } @@ -6791,10 +8749,12 @@ type MsgRegisterControllerResponse struct { 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. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // Accounts are a Address Map and Supported coin Denoms for the controller - Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Accounts map[string]string `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (x *MsgRegisterControllerResponse) Reset() { @@ -6817,6 +8777,13 @@ func (*MsgRegisterControllerResponse) Descriptor() ([]byte, []int) { return file_did_v1_tx_proto_rawDescGZIP(), []int{9} } +func (x *MsgRegisterControllerResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + func (x *MsgRegisterControllerResponse) GetController() string { if x != nil { return x.Controller @@ -6831,6 +8798,123 @@ func (x *MsgRegisterControllerResponse) GetAccounts() map[string]string { return nil } +// MsgAuthorize is the message type for the Authorize RPC. +type MsgAuthorize 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,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Address is the address to authenticate. + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // Origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *MsgAuthorize) Reset() { + *x = MsgAuthorize{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthorize) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthorize) ProtoMessage() {} + +// Deprecated: Use MsgAuthorize.ProtoReflect.Descriptor instead. +func (*MsgAuthorize) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgAuthorize) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgAuthorize) GetController() string { + if x != nil { + return x.Controller + } + return "" +} + +func (x *MsgAuthorize) GetAddress() string { + if x != nil { + return x.Address + } + return "" +} + +func (x *MsgAuthorize) GetOrigin() string { + if x != nil { + return x.Origin + } + return "" +} + +func (x *MsgAuthorize) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + +// MsgAuthorizeResponse is the response type for the Authorize RPC. +type MsgAuthorizeResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Token *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (x *MsgAuthorizeResponse) Reset() { + *x = MsgAuthorizeResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_did_v1_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgAuthorizeResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgAuthorizeResponse) ProtoMessage() {} + +// Deprecated: Use MsgAuthorizeResponse.ProtoReflect.Descriptor instead. +func (*MsgAuthorizeResponse) Descriptor() ([]byte, []int) { + return file_did_v1_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgAuthorizeResponse) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *MsgAuthorizeResponse) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + // MsgRegisterService is the message type for the RegisterService RPC. type MsgRegisterService struct { state protoimpl.MessageState @@ -6838,17 +8922,25 @@ type MsgRegisterService struct { unknownFields protoimpl.UnknownFields // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` // origin is the origin of the request in wildcard form. OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // PermissionScope is the scope of the service. - Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` + // Permissions is the scope of the service. + Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` + // Description is the description of the service + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // service_endpoints is the endpoints of the service + ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Metadata is optional additional information about the service + Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` } func (x *MsgRegisterService) Reset() { *x = MsgRegisterService{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[10] + mi := &file_did_v1_tx_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6862,12 +8954,12 @@ func (*MsgRegisterService) ProtoMessage() {} // Deprecated: Use MsgRegisterService.ProtoReflect.Descriptor instead. func (*MsgRegisterService) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{10} + return file_did_v1_tx_proto_rawDescGZIP(), []int{12} } -func (x *MsgRegisterService) GetAuthority() string { +func (x *MsgRegisterService) GetController() string { if x != nil { - return x.Authority + return x.Controller } return "" } @@ -6879,26 +8971,55 @@ func (x *MsgRegisterService) GetOriginUri() string { return "" } -func (x *MsgRegisterService) GetScopes() []PermissionScope { +func (x *MsgRegisterService) GetScopes() *Permissions { if x != nil { return x.Scopes } return nil } +func (x *MsgRegisterService) GetDescription() string { + if x != nil { + return x.Description + } + return "" +} + +func (x *MsgRegisterService) GetServiceEndpoints() map[string]string { + if x != nil { + return x.ServiceEndpoints + } + return nil +} + +func (x *MsgRegisterService) GetMetadata() *Metadata { + if x != nil { + return x.Metadata + } + return nil +} + +func (x *MsgRegisterService) GetToken() *Token { + if x != nil { + return x.Token + } + return nil +} + // MsgRegisterServiceResponse is the response type for the RegisterService RPC. type MsgRegisterServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` } func (x *MsgRegisterServiceResponse) Reset() { *x = MsgRegisterServiceResponse{} if protoimpl.UnsafeEnabled { - mi := &file_did_v1_tx_proto_msgTypes[11] + mi := &file_did_v1_tx_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -6912,7 +9033,7 @@ func (*MsgRegisterServiceResponse) ProtoMessage() {} // Deprecated: Use MsgRegisterServiceResponse.ProtoReflect.Descriptor instead. func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { - return file_did_v1_tx_proto_rawDescGZIP(), []int{11} + return file_did_v1_tx_proto_rawDescGZIP(), []int{13} } func (x *MsgRegisterServiceResponse) GetSuccess() bool { @@ -6922,149 +9043,205 @@ func (x *MsgRegisterServiceResponse) GetSuccess() bool { return false } +func (x *MsgRegisterServiceResponse) GetDid() string { + if x != nil { + return x.Did + } + return "" +} + var File_did_v1_tx_proto protoreflect.FileDescriptor var file_did_v1_tx_proto_rawDesc = []byte{ 0x0a, 0x0f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x06, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x13, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, - 0x67, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, - 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, - 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x2c, 0x0a, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, - 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, - 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xdf, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, - 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, - 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, - 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, - 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, - 0x72, 0x69, 0x67, 0x69, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x19, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x22, 0x8f, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, - 0x6e, 0x65, 0x73, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, - 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, - 0x73, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, - 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, - 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, - 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, - 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x70, 0x65, - 0x72, 0x74, 0x79, 0x22, 0x83, 0x01, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, - 0x61, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x10, - 0x0a, 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x06, 0x6d, 0x61, 0x63, 0x72, 0x6f, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, - 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xb5, 0x01, 0x0a, 0x15, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x6f, 0x1a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x16, 0x64, + 0x69, 0x64, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 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, 0x13, 0x64, 0x69, 0x64, + 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 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, 0xac, 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, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 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, + 0x22, 0x99, 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, 0x10, 0x0a, - 0x03, 0x63, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, - 0x1c, 0x0a, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0c, 0x52, 0x09, 0x6b, 0x65, 0x79, 0x73, 0x68, 0x61, 0x72, 0x65, 0x73, 0x12, 0x24, 0x0a, - 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x0c, 0x52, 0x0d, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x69, 0x74, 0x79, 0x22, 0xe7, 0x01, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, + 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, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x4f, 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, 0x22, 0xb4, 0x01, + 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, + 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x77, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x12, + 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x4f, 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, + 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, + 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, + 0x70, 0x65, 0x72, 0x74, 0x79, 0x22, 0x7e, 0x0a, 0x0c, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, + 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, - 0x4f, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x33, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x1a, 0x3b, 0x0a, 0x0d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xac, 0x01, - 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x1d, 0x0a, 0x0a, - 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x55, 0x72, 0x69, 0x12, 0x2f, 0x0a, 0x06, 0x73, - 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x64, 0x69, - 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, - 0x63, 0x6f, 0x70, 0x65, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x3a, 0x0e, 0x82, 0xe7, - 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x36, 0x0a, 0x1a, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, - 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, - 0x63, 0x65, 0x73, 0x73, 0x32, 0xda, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, + 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x30, 0x0a, 0x14, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, + 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, + 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xea, 0x01, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x52, + 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, + 0x72, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x63, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, + 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6f, 0x72, 0x69, + 0x67, 0x69, 0x6e, 0x12, 0x3a, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x61, 0x6c, 0x52, + 0x0e, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, + 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, + 0x72, 0x69, 0x74, 0x79, 0x22, 0x81, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, + 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, + 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x08, 0x61, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x64, + 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x1a, 0x3b, 0x0a, 0x0d, 0x41, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, + 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, + 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x81, 0x02, 0x0a, 0x0c, 0x4d, 0x73, 0x67, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, + 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, + 0x79, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, + 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x32, 0x0a, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, + 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x16, 0x0a, 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x12, 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, + 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, + 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3a, 0x0e, 0x82, 0xe7, + 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x55, 0x0a, 0x14, + 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 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, 0x23, + 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, 0x6f, + 0x6b, 0x65, 0x6e, 0x22, 0xc4, 0x03, 0x0a, 0x12, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, + 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x38, 0x0a, 0x0a, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, + 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x5f, 0x75, + 0x72, 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, + 0x55, 0x72, 0x69, 0x12, 0x2b, 0x0a, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x72, + 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x06, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x73, + 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, + 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x5d, 0x0a, 0x11, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x65, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, + 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, + 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, + 0x10, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, + 0x73, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x06, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x65, 0x74, + 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, + 0x23, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, + 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x05, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x1a, 0x43, 0x0a, 0x15, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x45, + 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x3a, 0x0f, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x22, 0x48, 0x0a, 0x1a, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, + 0x73, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x64, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x03, 0x64, 0x69, 0x64, 0x32, 0xd4, 0x03, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x48, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x48, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, - 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x1a, - 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, - 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x48, 0x0a, 0x0c, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, - 0x12, 0x17, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, - 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x1a, 0x1f, 0x2e, 0x64, 0x69, 0x64, 0x2e, - 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x50, 0x72, 0x6f, 0x76, 0x65, 0x57, 0x69, 0x74, 0x6e, 0x65, - 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x53, 0x79, - 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, - 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x1c, 0x2e, - 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, - 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x52, - 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, - 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, - 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, - 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, - 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, - 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, - 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, - 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, - 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, - 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x64, 0x69, 0x64, 0x2f, 0x76, 0x31, 0x3b, 0x64, 0x69, - 0x64, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x44, 0x58, 0x58, 0xaa, 0x02, 0x06, 0x44, 0x69, 0x64, 0x2e, - 0x56, 0x31, 0xca, 0x02, 0x06, 0x44, 0x69, 0x64, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x12, 0x44, 0x69, - 0x64, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, - 0xea, 0x02, 0x07, 0x44, 0x69, 0x64, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x65, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, + 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, + 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0d, 0x41, 0x6c, 0x6c, 0x6f, 0x63, + 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, + 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, + 0x6c, 0x74, 0x1a, 0x20, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x41, + 0x6c, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x65, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x09, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, + 0x74, 0x12, 0x14, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, + 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x1a, 0x1c, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, + 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x79, 0x6e, 0x63, 0x56, 0x61, 0x75, 0x6c, 0x74, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x12, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, + 0x72, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x12, 0x1d, 0x2e, 0x64, 0x69, + 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x1a, 0x25, 0x2e, 0x64, 0x69, 0x64, + 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x51, 0x0a, 0x0f, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x12, 0x1a, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, + 0x67, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x1a, 0x22, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x67, + 0x69, 0x73, 0x74, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0x77, 0x0a, 0x0a, 0x63, + 0x6f, 0x6d, 0x2e, 0x64, 0x69, 0x64, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, + 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x27, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 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 ( @@ -7079,45 +9256,62 @@ func file_did_v1_tx_proto_rawDescGZIP() []byte { return file_did_v1_tx_proto_rawDescData } -var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 13) +var file_did_v1_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 16) var file_did_v1_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: did.v1.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: did.v1.MsgUpdateParamsResponse - (*MsgAuthenticate)(nil), // 2: did.v1.MsgAuthenticate - (*MsgAuthenticateResponse)(nil), // 3: did.v1.MsgAuthenticateResponse + (*MsgAllocateVault)(nil), // 2: did.v1.MsgAllocateVault + (*MsgAllocateVaultResponse)(nil), // 3: did.v1.MsgAllocateVaultResponse (*MsgProveWitness)(nil), // 4: did.v1.MsgProveWitness (*MsgProveWitnessResponse)(nil), // 5: did.v1.MsgProveWitnessResponse (*MsgSyncVault)(nil), // 6: did.v1.MsgSyncVault (*MsgSyncVaultResponse)(nil), // 7: did.v1.MsgSyncVaultResponse (*MsgRegisterController)(nil), // 8: did.v1.MsgRegisterController (*MsgRegisterControllerResponse)(nil), // 9: did.v1.MsgRegisterControllerResponse - (*MsgRegisterService)(nil), // 10: did.v1.MsgRegisterService - (*MsgRegisterServiceResponse)(nil), // 11: did.v1.MsgRegisterServiceResponse - nil, // 12: did.v1.MsgRegisterControllerResponse.AccountsEntry - (*Params)(nil), // 13: did.v1.Params - (PermissionScope)(0), // 14: did.v1.PermissionScope + (*MsgAuthorize)(nil), // 10: did.v1.MsgAuthorize + (*MsgAuthorizeResponse)(nil), // 11: did.v1.MsgAuthorizeResponse + (*MsgRegisterService)(nil), // 12: did.v1.MsgRegisterService + (*MsgRegisterServiceResponse)(nil), // 13: did.v1.MsgRegisterServiceResponse + nil, // 14: did.v1.MsgRegisterControllerResponse.AccountsEntry + nil, // 15: did.v1.MsgRegisterService.ServiceEndpointsEntry + (*Params)(nil), // 16: did.v1.Params + (*Token)(nil), // 17: did.v1.Token + (*Credential)(nil), // 18: did.v1.Credential + (*Permissions)(nil), // 19: did.v1.Permissions + (*Metadata)(nil), // 20: did.v1.Metadata } var file_did_v1_tx_proto_depIdxs = []int32{ - 13, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params - 12, // 1: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry - 14, // 2: did.v1.MsgRegisterService.scopes:type_name -> did.v1.PermissionScope - 0, // 3: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams - 2, // 4: did.v1.Msg.Authenticate:input_type -> did.v1.MsgAuthenticate - 4, // 5: did.v1.Msg.ProveWitness:input_type -> did.v1.MsgProveWitness - 6, // 6: did.v1.Msg.SyncVault:input_type -> did.v1.MsgSyncVault - 8, // 7: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController - 10, // 8: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService - 1, // 9: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse - 3, // 10: did.v1.Msg.Authenticate:output_type -> did.v1.MsgAuthenticateResponse - 5, // 11: did.v1.Msg.ProveWitness:output_type -> did.v1.MsgProveWitnessResponse - 7, // 12: did.v1.Msg.SyncVault:output_type -> did.v1.MsgSyncVaultResponse - 9, // 13: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse - 11, // 14: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse - 9, // [9:15] is the sub-list for method output_type - 3, // [3:9] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 16, // 0: did.v1.MsgUpdateParams.params:type_name -> did.v1.Params + 17, // 1: did.v1.MsgUpdateParams.token:type_name -> did.v1.Token + 17, // 2: did.v1.MsgAllocateVault.token:type_name -> did.v1.Token + 17, // 3: did.v1.MsgProveWitness.token:type_name -> did.v1.Token + 17, // 4: did.v1.MsgSyncVault.token:type_name -> did.v1.Token + 18, // 5: did.v1.MsgRegisterController.authentication:type_name -> did.v1.Credential + 17, // 6: did.v1.MsgRegisterController.token:type_name -> did.v1.Token + 14, // 7: did.v1.MsgRegisterControllerResponse.accounts:type_name -> did.v1.MsgRegisterControllerResponse.AccountsEntry + 17, // 8: did.v1.MsgAuthorize.token:type_name -> did.v1.Token + 17, // 9: did.v1.MsgAuthorizeResponse.token:type_name -> did.v1.Token + 19, // 10: did.v1.MsgRegisterService.scopes:type_name -> did.v1.Permissions + 15, // 11: did.v1.MsgRegisterService.service_endpoints:type_name -> did.v1.MsgRegisterService.ServiceEndpointsEntry + 20, // 12: did.v1.MsgRegisterService.metadata:type_name -> did.v1.Metadata + 17, // 13: did.v1.MsgRegisterService.token:type_name -> did.v1.Token + 0, // 14: did.v1.Msg.UpdateParams:input_type -> did.v1.MsgUpdateParams + 10, // 15: did.v1.Msg.Authorize:input_type -> did.v1.MsgAuthorize + 2, // 16: did.v1.Msg.AllocateVault:input_type -> did.v1.MsgAllocateVault + 6, // 17: did.v1.Msg.SyncVault:input_type -> did.v1.MsgSyncVault + 8, // 18: did.v1.Msg.RegisterController:input_type -> did.v1.MsgRegisterController + 12, // 19: did.v1.Msg.RegisterService:input_type -> did.v1.MsgRegisterService + 1, // 20: did.v1.Msg.UpdateParams:output_type -> did.v1.MsgUpdateParamsResponse + 11, // 21: did.v1.Msg.Authorize:output_type -> did.v1.MsgAuthorizeResponse + 3, // 22: did.v1.Msg.AllocateVault:output_type -> did.v1.MsgAllocateVaultResponse + 7, // 23: did.v1.Msg.SyncVault:output_type -> did.v1.MsgSyncVaultResponse + 9, // 24: did.v1.Msg.RegisterController:output_type -> did.v1.MsgRegisterControllerResponse + 13, // 25: did.v1.Msg.RegisterService:output_type -> did.v1.MsgRegisterServiceResponse + 20, // [20:26] is the sub-list for method output_type + 14, // [14:20] is the sub-list for method input_type + 14, // [14:14] is the sub-list for extension type_name + 14, // [14:14] is the sub-list for extension extendee + 0, // [0:14] is the sub-list for field type_name } func init() { file_did_v1_tx_proto_init() } @@ -7125,8 +9319,9 @@ func file_did_v1_tx_proto_init() { if File_did_v1_tx_proto != nil { return } - file_did_v1_models_proto_init() + file_did_v1_constants_proto_init() file_did_v1_genesis_proto_init() + file_did_v1_models_proto_init() if !protoimpl.UnsafeEnabled { file_did_v1_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { @@ -7153,7 +9348,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.(*MsgAuthenticate); i { + switch v := v.(*MsgAllocateVault); i { case 0: return &v.state case 1: @@ -7165,7 +9360,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.(*MsgAuthenticateResponse); i { + switch v := v.(*MsgAllocateVaultResponse); i { case 0: return &v.state case 1: @@ -7249,7 +9444,7 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgRegisterService); i { + switch v := v.(*MsgAuthorize); i { case 0: return &v.state case 1: @@ -7261,6 +9456,30 @@ func file_did_v1_tx_proto_init() { } } file_did_v1_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgAuthorizeResponse); 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[12].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgRegisterService); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_did_v1_tx_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgRegisterServiceResponse); i { case 0: return &v.state @@ -7279,7 +9498,7 @@ func file_did_v1_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_did_v1_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 13, + NumMessages: 16, NumExtensions: 0, NumServices: 1, }, diff --git a/api/did/v1/tx_grpc.pb.go b/api/did/v1/tx_grpc.pb.go index 29ad8109c..e636df6bb 100644 --- a/api/did/v1/tx_grpc.pb.go +++ b/api/did/v1/tx_grpc.pb.go @@ -20,8 +20,8 @@ const _ = grpc.SupportPackageIsVersion7 const ( Msg_UpdateParams_FullMethodName = "/did.v1.Msg/UpdateParams" - Msg_Authenticate_FullMethodName = "/did.v1.Msg/Authenticate" - Msg_ProveWitness_FullMethodName = "/did.v1.Msg/ProveWitness" + Msg_Authorize_FullMethodName = "/did.v1.Msg/Authorize" + Msg_AllocateVault_FullMethodName = "/did.v1.Msg/AllocateVault" Msg_SyncVault_FullMethodName = "/did.v1.Msg/SyncVault" Msg_RegisterController_FullMethodName = "/did.v1.Msg/RegisterController" Msg_RegisterService_FullMethodName = "/did.v1.Msg/RegisterService" @@ -35,10 +35,11 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) + // Authorize asserts the given controller is the owner of the given address. + Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) + // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. + // this operation is called by services initiating a controller registration. + AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. @@ -64,18 +65,18 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { - out := new(MsgAuthenticateResponse) - err := c.cc.Invoke(ctx, Msg_Authenticate_FullMethodName, in, out, opts...) +func (c *msgClient) Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) { + out := new(MsgAuthorizeResponse) + err := c.cc.Invoke(ctx, Msg_Authorize_FullMethodName, in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) { - out := new(MsgProveWitnessResponse) - err := c.cc.Invoke(ctx, Msg_ProveWitness_FullMethodName, in, out, opts...) +func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) { + out := new(MsgAllocateVaultResponse) + err := c.cc.Invoke(ctx, Msg_AllocateVault_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -117,10 +118,11 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) + // Authorize asserts the given controller is the owner of the given address. + Authorize(context.Context, *MsgAuthorize) (*MsgAuthorizeResponse, error) + // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. + // this operation is called by services initiating a controller registration. + AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. @@ -137,11 +139,11 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (UnimplementedMsgServer) Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") +func (UnimplementedMsgServer) Authorize(context.Context, *MsgAuthorize) (*MsgAuthorizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") } -func (UnimplementedMsgServer) ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented") +func (UnimplementedMsgServer) AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } func (UnimplementedMsgServer) SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") @@ -183,38 +185,38 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticate) +func _Msg_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthorize) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Authenticate(ctx, in) + return srv.(MsgServer).Authorize(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_Authenticate_FullMethodName, + FullMethod: Msg_Authorize_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) + return srv.(MsgServer).Authorize(ctx, req.(*MsgAuthorize)) } return interceptor(ctx, in, info, handler) } -func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgProveWitness) +func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAllocateVault) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ProveWitness(ctx, in) + return srv.(MsgServer).AllocateVault(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: Msg_ProveWitness_FullMethodName, + FullMethod: Msg_AllocateVault_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness)) + return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault)) } return interceptor(ctx, in, info, handler) } @@ -285,12 +287,12 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "Authenticate", - Handler: _Msg_Authenticate_Handler, + MethodName: "Authorize", + Handler: _Msg_Authorize_Handler, }, { - MethodName: "ProveWitness", - Handler: _Msg_ProveWitness_Handler, + MethodName: "AllocateVault", + Handler: _Msg_AllocateVault_Handler, }, { MethodName: "SyncVault", diff --git a/api/oracle/module/v1/module.pulsar.go b/api/oracle/module/v1/module.pulsar.go index bc45ee5e8..1fee45c67 100644 --- a/api/oracle/module/v1/module.pulsar.go +++ b/api/oracle/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.hway.oracle.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.oracle.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.oracle.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.hway.oracle.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.oracle.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.oracle.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.hway.oracle.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.oracle.module.v1.Module does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message onsonr.sonr.oracle.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.hway.oracle.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.oracle.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.oracle.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.hway.oracle.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.oracle.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.oracle.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.hway.oracle.module.v1.Module")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: onsonr.sonr.oracle.module.v1.Module")) } - panic(fmt.Errorf("message onsonr.hway.oracle.module.v1.Module does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message onsonr.sonr.oracle.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.hway.oracle.module.v1.Module", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in onsonr.sonr.oracle.module.v1.Module", d.FullName())) } panic("unreachable") } @@ -415,28 +415,28 @@ var File_oracle_module_v1_module_proto protoreflect.FileDescriptor var file_oracle_module_v1_module_proto_rawDesc = []byte{ 0x0a, 0x1d, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x1c, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x68, 0x77, 0x61, 0x79, 0x2e, 0x6f, 0x72, 0x61, + 0x1c, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 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, 0x68, 0x77, 0x61, 0x79, 0x42, 0xfa, 0x01, 0x0a, 0x20, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x68, 0x77, 0x61, 0x79, 0x2e, 0x6f, 0x72, + 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x42, 0xfa, 0x01, 0x0a, 0x20, 0x63, 0x6f, + 0x6d, 0x2e, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x73, 0x6f, 0x6e, 0x72, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 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, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, - 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, + 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, - 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x48, 0x4f, 0x4d, 0xaa, 0x02, 0x1c, 0x4f, 0x6e, 0x73, - 0x6f, 0x6e, 0x72, 0x2e, 0x48, 0x77, 0x61, 0x79, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, + 0x65, 0x76, 0x31, 0xa2, 0x02, 0x04, 0x4f, 0x53, 0x4f, 0x4d, 0xaa, 0x02, 0x1c, 0x4f, 0x6e, 0x73, + 0x6f, 0x6e, 0x72, 0x2e, 0x53, 0x6f, 0x6e, 0x72, 0x2e, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x1c, 0x4f, 0x6e, 0x73, 0x6f, - 0x6e, 0x72, 0x5c, 0x48, 0x77, 0x61, 0x79, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, + 0x6e, 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x28, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, - 0x72, 0x5c, 0x48, 0x77, 0x61, 0x79, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, + 0x72, 0x5c, 0x53, 0x6f, 0x6e, 0x72, 0x5c, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x48, 0x77, - 0x61, 0x79, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, + 0x61, 0x74, 0x61, 0xea, 0x02, 0x20, 0x4f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x3a, 0x3a, 0x53, 0x6f, + 0x6e, 0x72, 0x3a, 0x3a, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x3a, 0x3a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } @@ -454,7 +454,7 @@ func file_oracle_module_v1_module_proto_rawDescGZIP() []byte { var file_oracle_module_v1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_oracle_module_v1_module_proto_goTypes = []interface{}{ - (*Module)(nil), // 0: onsonr.hway.oracle.module.v1.Module + (*Module)(nil), // 0: onsonr.sonr.oracle.module.v1.Module } var file_oracle_module_v1_module_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/api/oracle/v1/genesis.pulsar.go b/api/oracle/v1/genesis.pulsar.go index 149db8b0c..447e1f22a 100644 --- a/api/oracle/v1/genesis.pulsar.go +++ b/api/oracle/v1/genesis.pulsar.go @@ -420,7 +420,7 @@ var file_oracle_v1_genesis_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, - 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, + 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x15, 0x4f, 0x72, 0x61, 0x63, diff --git a/api/oracle/v1/query.pulsar.go b/api/oracle/v1/query.pulsar.go index 18e9372e9..7d3fc5ce9 100644 --- a/api/oracle/v1/query.pulsar.go +++ b/api/oracle/v1/query.pulsar.go @@ -30,7 +30,7 @@ var file_oracle_v1_query_proto_rawDesc = []byte{ 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8f, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, diff --git a/api/oracle/v1/tx.pulsar.go b/api/oracle/v1/tx.pulsar.go index 1d63906ae..39a948648 100644 --- a/api/oracle/v1/tx.pulsar.go +++ b/api/oracle/v1/tx.pulsar.go @@ -30,7 +30,7 @@ var file_oracle_v1_tx_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x42, 0x8c, 0x01, 0x0a, 0x0d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, - 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x68, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, + 0x6e, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x73, 0x6f, 0x6e, 0x72, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x6f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4f, 0x58, 0x58, 0xaa, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x09, 0x4f, 0x72, 0x61, 0x63, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0xe2, diff --git a/app/app.go b/app/app.go index 461d57bf0..5747870f7 100644 --- a/app/app.go +++ b/app/app.go @@ -145,12 +145,12 @@ import ( tokenfactorykeeper "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/keeper" tokenfactorytypes "github.com/strangelove-ventures/tokenfactory/x/tokenfactory/types" - did "github.com/onsonr/hway/x/did" - didkeeper "github.com/onsonr/hway/x/did/keeper" - didtypes "github.com/onsonr/hway/x/did/types" - oracle "github.com/onsonr/hway/x/oracle" - oraclekeeper "github.com/onsonr/hway/x/oracle/keeper" - oracletypes "github.com/onsonr/hway/x/oracle/types" + did "github.com/onsonr/sonr/x/did" + didkeeper "github.com/onsonr/sonr/x/did/keeper" + didtypes "github.com/onsonr/sonr/x/did/types" + oracle "github.com/onsonr/sonr/x/oracle" + oraclekeeper "github.com/onsonr/sonr/x/oracle/keeper" + oracletypes "github.com/onsonr/sonr/x/oracle/types" ) const appName = "sonr" diff --git a/app/decorators/msg_filter_test.go b/app/decorators/msg_filter_test.go index bfbb2f4dc..e63e3cc83 100644 --- a/app/decorators/msg_filter_test.go +++ b/app/decorators/msg_filter_test.go @@ -10,8 +10,8 @@ import ( banktypes "github.com/cosmos/cosmos-sdk/x/bank/types" "github.com/stretchr/testify/suite" - app "github.com/onsonr/hway/app" - "github.com/onsonr/hway/app/decorators" + app "github.com/onsonr/sonr/app" + "github.com/onsonr/sonr/app/decorators" ) type AnteTestSuite struct { diff --git a/app/encoding.go b/app/encoding.go index 59a270b87..4bd9bfbb9 100644 --- a/app/encoding.go +++ b/app/encoding.go @@ -9,7 +9,7 @@ import ( simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" - "github.com/onsonr/hway/app/params" + "github.com/onsonr/sonr/app/params" ) // MakeEncodingConfig creates a new EncodingConfig with all modules registered. For testing only diff --git a/app/local.go b/app/local.go index 522e95760..02d549dee 100644 --- a/app/local.go +++ b/app/local.go @@ -2,6 +2,7 @@ package app import ( "github.com/ipfs/kubo/client/rpc" + "github.com/onsonr/sonr/internal/files" ) var ( @@ -11,6 +12,10 @@ var ( // Initialize initializes the local configuration values func init() { + err := files.Assemble(".data/vaults/0") + if err != nil { + panic(err) + } } // SetLocalContextSessionID sets the session ID for the local context diff --git a/app/upgrades.go b/app/upgrades.go index 3cecae42c..a613b29d1 100644 --- a/app/upgrades.go +++ b/app/upgrades.go @@ -5,8 +5,8 @@ import ( upgradetypes "cosmossdk.io/x/upgrade/types" - "github.com/onsonr/hway/app/upgrades" - "github.com/onsonr/hway/app/upgrades/noop" + "github.com/onsonr/sonr/app/upgrades" + "github.com/onsonr/sonr/app/upgrades/noop" ) // Upgrades list of chain upgrades diff --git a/app/upgrades/noop/upgrades.go b/app/upgrades/noop/upgrades.go index e21f21d6d..cf67da610 100644 --- a/app/upgrades/noop/upgrades.go +++ b/app/upgrades/noop/upgrades.go @@ -8,7 +8,7 @@ import ( "github.com/cosmos/cosmos-sdk/types/module" - "github.com/onsonr/hway/app/upgrades" + "github.com/onsonr/sonr/app/upgrades" ) // NewUpgrade constructor diff --git a/chains.yaml b/chains.yaml index 8d4050d0c..262c9b928 100644 --- a/chains.yaml +++ b/chains.yaml @@ -1,7 +1,10 @@ # This file is used to create docker images using the heighliner binary. # see: https://github.com/strangelove-ventures/heighliner +# Sonr Node - Identity - name: sonr + github-organization: onsonr + github-repo: core dockerfile: cosmos build-target: make install binaries: @@ -9,6 +12,8 @@ build-env: - LEDGER_ENABLED=false - BUILD_TAGS=muslc + +# Ethereum Node - Web3 - name: evmos github-organization: tharsis github-repo: evmos @@ -16,6 +21,8 @@ build-target: make install binaries: - /go/bin/evmosd + +# Bitcoin Node - Gold - name: nomic github-organization: nomic-io github-repo: nomic @@ -26,7 +33,5 @@ cargo install --locked --path . -Zbuild-std binaries: - /build/nomic/target/${ARCH}-unknown-linux-gnu/release/nomic - # TODO remove platforms here so that both linux/amd64 and linux/arm64 are built - # once these changes are merged: https://github.com/nomic-io/orga/pull/154 platforms: - linux/amd64 diff --git a/client/go.mod b/client/go.mod deleted file mode 100644 index a07a4b514..000000000 --- a/client/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module client - -go 1.22.0 diff --git a/cmd/sonrd/commands.go b/cmd/sonrd/commands.go index 6167e31c5..3f3d6ce7d 100644 --- a/cmd/sonrd/commands.go +++ b/cmd/sonrd/commands.go @@ -7,7 +7,7 @@ import ( cmtcfg "github.com/cometbft/cometbft/config" dbm "github.com/cosmos/cosmos-db" - "github.com/onsonr/hway/app" + "github.com/onsonr/sonr/app" "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/viper" diff --git a/cmd/sonrd/main.go b/cmd/sonrd/main.go index 980000e08..06d6db692 100644 --- a/cmd/sonrd/main.go +++ b/cmd/sonrd/main.go @@ -6,7 +6,7 @@ import ( "cosmossdk.io/log" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" _ "github.com/joho/godotenv/autoload" - "github.com/onsonr/hway/app" + "github.com/onsonr/sonr/app" ) func main() { diff --git a/cmd/sonrd/root.go b/cmd/sonrd/root.go index 981eec5ae..fa5fffa5f 100644 --- a/cmd/sonrd/root.go +++ b/cmd/sonrd/root.go @@ -20,8 +20,8 @@ import ( txmodule "github.com/cosmos/cosmos-sdk/x/auth/tx/config" authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" - "github.com/onsonr/hway/app" - "github.com/onsonr/hway/app/params" + "github.com/onsonr/sonr/app" + "github.com/onsonr/sonr/app/params" // NewRootCmd creates a new root command for chain app. It is called once in the // main function. ) diff --git a/cmd/sonrd/testnet.go b/cmd/sonrd/testnet.go index 9c3d44466..0a86f0411 100644 --- a/cmd/sonrd/testnet.go +++ b/cmd/sonrd/testnet.go @@ -39,7 +39,7 @@ import ( genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" - "github.com/onsonr/hway/app" + "github.com/onsonr/sonr/app" ) var ( diff --git a/cmd/vault/main.go b/cmd/vault/main.go new file mode 100644 index 000000000..39b93ec7b --- /dev/null +++ b/cmd/vault/main.go @@ -0,0 +1,104 @@ +//go:build js && wasm +// +build js,wasm + +package main + +import ( + "database/sql" + "encoding/json" + "fmt" + "net/http" + + _ "github.com/flimzy/go-sql.js" + wasmhttp "github.com/nlepage/go-wasm-http-server" +) + +var db *sql.DB + +func main() { + var err error + // Open a new in-memory SQLite database + db, err = sql.Open("sqljs", "") + if err != nil { + panic(err) + } + defer db.Close() + + // Initialize the database + initDB() + + // Define your handlers + http.HandleFunc("/", homeHandler) + http.HandleFunc("/api/items", itemsHandler) + + // Use wasmhttp.Serve to start the server + wasmhttp.Serve(nil) +} + +func initDB() { + _, err := db.Exec(` + CREATE TABLE IF NOT EXISTS items ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL + ) + `) + if err != nil { + panic(err) + } +} + +func homeHandler(w http.ResponseWriter, r *http.Request) { + fmt.Fprintf(w, "Welcome to the WASM SQLite Server!") +} + +func itemsHandler(w http.ResponseWriter, r *http.Request) { + switch r.Method { + case "GET": + getItems(w, r) + case "POST": + addItem(w, r) + default: + http.Error(w, "Method not allowed", http.StatusMethodNotAllowed) + } +} + +func getItems(w http.ResponseWriter, _ *http.Request) { + rows, err := db.Query("SELECT id, name FROM items") + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + defer rows.Close() + + var items []map[string]interface{} + for rows.Next() { + var id int + var name string + if err := rows.Scan(&id, &name); err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + items = append(items, map[string]interface{}{"id": id, "name": name}) + } + + json.NewEncoder(w).Encode(items) +} + +func addItem(w http.ResponseWriter, r *http.Request) { + var item struct { + Name string `json:"name"` + } + if err := json.NewDecoder(r.Body).Decode(&item); err != nil { + http.Error(w, err.Error(), http.StatusBadRequest) + return + } + + result, err := db.Exec("INSERT INTO items (name) VALUES (?)", item.Name) + if err != nil { + http.Error(w, err.Error(), http.StatusInternalServerError) + return + } + + id, _ := result.LastInsertId() + json.NewEncoder(w).Encode(map[string]interface{}{"id": id, "name": item.Name}) +} diff --git a/devbox.json b/devbox.json index 0d4d00570..2ac61568c 100644 --- a/devbox.json +++ b/devbox.json @@ -1,16 +1,30 @@ { "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/0.12.0/.schema/devbox.schema.json", - "packages": ["go@1.21", "air@latest"], + "packages": [ + "go@1.22", + "templ@latest", + "commitizen@latest", + "goreleaser@latest", + "go-task@latest" + ], "env": { "GOPATH": "$HOME/go", - "PATH": "$HOME/go/bin:$PATH" + "PATH": "$HOME/go/bin:$PATH", + "CHAIN_ID": "sonr-testnet-1", + "DENOM": "usnr", + "KEYRING": "test", + "MONIKER": "florence", + "MIN_GAS_PRICES": "0.0001usnr" }, "shell": { "scripts": { "init": ["make install", "sonrd init"], - "proto": ["make proto-gen"], + "gen": ["make proto-gen", "make vault", "make templ"], "build": ["make build", "make local-image"], - "testnet": ["make sh-testnet"] + "testnet": ["make install", "make sh-testnet"], + "icnet": ["make install", "make testnet"], + "explorer": ["make explorer"], + "release": ["cz bump --yes", "goreleaser release --clean --dry-run"] } } } diff --git a/docker-compose.yaml b/docker-compose.yaml index 3f837c90c..5f60f669c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -6,7 +6,7 @@ services: context: . dockerfile: Dockerfile volumes: - - /home/prad/.core:/root/.sonr + - /home/prad/.sonr:/root/.sonr ports: - "26657:26657" - "1317:1317" diff --git a/go.mod b/go.mod index 10bba71dc..0c86dd3c0 100644 --- a/go.mod +++ b/go.mod @@ -1,13 +1,19 @@ -module github.com/onsonr/hway +module github.com/onsonr/sonr -go 1.22 +go 1.22.5 + +toolchain go1.23.0 // overrides replace ( cosmossdk.io/core => cosmossdk.io/core v0.11.0 + github.com/ChainSafe/go-schnorrkel => github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d + github.com/ChainSafe/go-schnorrkel/1 => github.com/ChainSafe/go-schnorrkel v1.0.0 + github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1 github.com/prometheus/client_golang => github.com/prometheus/client_golang v1.18.0 github.com/prometheus/common => github.com/prometheus/common v0.47.0 github.com/spf13/viper => github.com/spf13/viper v1.17.0 // v1.18+ breaks app overrides + github.com/vedhavyas/go-subkey => github.com/strangelove-ventures/go-subkey v1.0.7 ) replace ( @@ -42,6 +48,7 @@ require ( cosmossdk.io/x/nft v0.1.0 cosmossdk.io/x/tx v0.13.3 cosmossdk.io/x/upgrade v0.1.1 + github.com/a-h/templ v0.2.771 github.com/btcsuite/btcd/btcec/v2 v2.3.3 github.com/cometbft/cometbft v0.38.8 github.com/cosmos/cosmos-db v1.0.2 @@ -51,13 +58,20 @@ require ( github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2-0.20240228211029-91e486ec4dbb github.com/cosmos/ibc-go/modules/capability v1.0.0 github.com/cosmos/ibc-go/v8 v8.2.0 + github.com/flimzy/go-sql.js v0.0.0-20170413005827-c7e22c0fd6e9 github.com/go-webauthn/webauthn v0.10.2 github.com/golang/protobuf v1.5.4 github.com/gorilla/mux v1.8.1 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/onsonr/crypto v1.5.0 + github.com/mattn/go-sqlite3 v1.14.23 + github.com/mr-tron/base58 v1.2.0 + github.com/ncruces/go-sqlite3 v0.18.2 + github.com/ncruces/go-sqlite3/gormlite v0.18.0 + github.com/nlepage/go-wasm-http-server v1.1.0 + github.com/onsonr/crypto v1.23.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -66,11 +80,13 @@ require ( github.com/strangelove-ventures/poa v0.50.0 github.com/strangelove-ventures/tokenfactory v0.50.0 github.com/stretchr/testify v1.9.0 - golang.org/x/crypto v0.25.0 + golang.org/x/crypto v0.26.0 google.golang.org/genproto/googleapis/api v0.0.0-20240617180043-68d350f18fd4 google.golang.org/grpc v1.64.0 google.golang.org/protobuf v1.34.2 gopkg.in/macaroon-bakery.v2 v2.3.0 + gorm.io/gorm v1.25.11 + lukechampine.com/adiantum v1.1.1 ) require ( @@ -79,10 +95,12 @@ require ( cloud.google.com/go/iam v1.1.6 // indirect cloud.google.com/go/storage v1.38.0 // indirect filippo.io/edwards25519 v1.1.0 // indirect + git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect github.com/99designs/keyring v1.2.1 // indirect github.com/DataDog/datadog-go v3.2.0+incompatible // indirect github.com/DataDog/zstd v1.5.5 // indirect + github.com/Microsoft/go-winio v0.6.2 // indirect github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect github.com/aws/aws-sdk-go v1.44.224 // indirect github.com/beorn7/perks v1.0.1 // indirect @@ -124,9 +142,9 @@ require ( github.com/dgraph-io/ristretto v0.1.1 // indirect github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect + github.com/dustinxie/ecc v0.0.0-20210511000915-959544187564 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect github.com/emicklei/dot v1.6.1 // indirect - github.com/ethereum/go-ethereum v1.14.6 // indirect github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 // indirect github.com/fatih/color v1.16.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect @@ -156,6 +174,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect github.com/googleapis/gax-go/v2 v2.12.2 // indirect + github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect github.com/gorilla/handlers v1.5.2 // indirect github.com/gorilla/websocket v1.5.3 // indirect github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect @@ -181,7 +200,6 @@ require ( github.com/improbable-eng/grpc-web v0.15.0 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/ipfs/bbloom v0.0.4 // indirect - github.com/ipfs/boxo v0.21.0 // indirect github.com/ipfs/go-bitfield v1.1.0 // indirect github.com/ipfs/go-block-format v0.2.0 // indirect github.com/ipfs/go-cid v0.4.1 // indirect @@ -201,6 +219,8 @@ require ( github.com/ipld/go-codec-dagpb v1.6.0 // indirect github.com/ipld/go-ipld-prime v0.21.0 // indirect github.com/jbenet/goprocess v0.1.4 // indirect + github.com/jinzhu/inflection v1.0.0 // indirect + github.com/jinzhu/now v1.1.5 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect github.com/jmhodges/levigo v1.0.0 // indirect github.com/klauspost/compress v1.17.9 // indirect @@ -230,7 +250,6 @@ require ( github.com/mitchellh/go-testing-interface v1.14.1 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mmcloughlin/addchain v0.4.0 // indirect - github.com/mr-tron/base58 v1.2.0 // indirect github.com/mtibben/percent v0.2.1 // indirect github.com/multiformats/go-base32 v0.1.0 // indirect github.com/multiformats/go-base36 v0.2.0 // indirect @@ -241,6 +260,8 @@ require ( github.com/multiformats/go-multihash v0.2.3 // indirect github.com/multiformats/go-multistream v0.5.0 // indirect github.com/multiformats/go-varint v0.0.7 // indirect + github.com/ncruces/julianday v1.0.0 // indirect + github.com/nlepage/go-js-promise v1.0.0 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect github.com/onsi/ginkgo v1.16.5 // indirect @@ -271,6 +292,7 @@ require ( github.com/subosito/gotenv v1.6.0 // indirect github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect github.com/tendermint/go-amino v0.16.0 // indirect + github.com/tetratelabs/wazero v1.8.0 // indirect github.com/tidwall/btree v1.7.0 // indirect github.com/ulikunitz/xz v0.5.11 // indirect github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc // indirect @@ -291,15 +313,15 @@ require ( go.uber.org/zap v1.27.0 // indirect go4.org v0.0.0-20230225012048-214862532bf5 // indirect golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect golang.org/x/oauth2 v0.21.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.22.0 // indirect - golang.org/x/term v0.22.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/text v0.18.0 // indirect golang.org/x/time v0.5.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/tools v0.24.0 // indirect golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect gonum.org/v1/gonum v0.15.0 // indirect google.golang.org/api v0.169.0 // indirect diff --git a/go.sum b/go.sum index 4ba2f4eec..46409dd37 100644 --- a/go.sum +++ b/go.sum @@ -803,6 +803,9 @@ filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= gioui.org v0.0.0-20210308172011-57750fc8a0a6/go.mod h1:RSH6KIUZ0p2xy5zHDxgAM4zumjgTw83q2ge/PI+yyw8= git.sr.ht/~sbinet/gg v0.3.1/go.mod h1:KGYtlADtqsqANL9ueOFkWymvzUvLMQllU5Ixo+8v3pc= +git.sr.ht/~sircmpwn/getopt v0.0.0-20191230200459-23622cc906b3/go.mod h1:wMEGFFFNuPos7vHmWXfszqImLppbc0wEhh6JBfJIUgw= +git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9 h1:Ahny8Ud1LjVMMAlt8utUFKhhxJtwBAualvsbc/Sk7cE= +git.sr.ht/~sircmpwn/go-bare v0.0.0-20210406120253-ab86bc2846d9/go.mod h1:BVJwbDfVjCjoFiKrhkei6NdGcZYpkDkdyCdg1ukytRA= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 h1:/vQbFIOMbk2FiG/kXiLl8BRyzTWDw7gX/Hz7Dd5eDMs= github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4/go.mod h1:hN7oaIRCjzsZ2dE+yG5k+rsdt3qcwykqK6HVGcKwsw4= github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M= @@ -830,6 +833,8 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= +github.com/a-h/templ v0.2.771 h1:4KH5ykNigYGGpCe0fRJ7/hzwz72k3qFqIiiLLJskbSo= +github.com/a-h/templ v0.2.771/go.mod h1:lq48JXoUvuQrU0VThrK31yFwdRjTCnIE5bcPCM9IP1w= github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/adlio/schema v1.3.3/go.mod h1:1EsRssiv9/Ce2CMzq5DoL7RiMshhuigQxrR4DMV9fHg= github.com/aead/siphash v1.0.1/go.mod h1:Nywa3cDsYNNK3gaciGTWPwHt0wlpNV15vwmswBAUSII= @@ -1064,6 +1069,8 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY= github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto= +github.com/dustinxie/ecc v0.0.0-20210511000915-959544187564 h1:I6KUy4CI6hHjqnyJLNCEi7YHVMkwwtfSr2k9splgdSM= +github.com/dustinxie/ecc v0.0.0-20210511000915-959544187564/go.mod h1:yekO+3ZShy19S+bsmnERmznGy9Rfg6dWWWpiGJjNAz8= github.com/dvsekhvalnov/jose2go v1.6.0 h1:Y9gnSnP4qEI0+/uQkHvFXeD2PLPJeXEL+ySMEA2EjTY= github.com/dvsekhvalnov/jose2go v1.6.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU= github.com/elastic/gosigar v0.14.3 h1:xwkKwPia+hSfg9GqrCUKYdId102m9qTJIIr7egmK/uo= @@ -1090,8 +1097,6 @@ github.com/envoyproxy/protoc-gen-validate v0.10.0/go.mod h1:DRjgyB0I43LtJapqN6Ni github.com/envoyproxy/protoc-gen-validate v0.10.1/go.mod h1:DRjgyB0I43LtJapqN6NiRwroiAU2PaFuvk/vjgh61ss= github.com/envoyproxy/protoc-gen-validate v1.0.1/go.mod h1:0vj8bNkYbSTNS2PIyH87KZaeN4x9zpL9Qt8fQC7d+vs= github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/ethereum/go-ethereum v1.14.6 h1:ZTxnErSopkDyxdvB8zW/KcK+/AVrdil/TzoWXVKaaC8= -github.com/ethereum/go-ethereum v1.14.6/go.mod h1:hglUZo/5pVIYXNyYjWzsAUDpT/zI+WbWo/Nih7ot+G0= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5 h1:BBso6MBKW8ncyZLv37o+KNyy0HrrHgfnOaGQC2qvN+A= github.com/facebookgo/atomicfile v0.0.0-20151019160806-2de1f203e7d5/go.mod h1:JpoxHjuQauoxiFMl1ie8Xc/7TfLuMZ5eOCONd1sUBHg= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= @@ -1102,6 +1107,8 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= +github.com/flimzy/go-sql.js v0.0.0-20170413005827-c7e22c0fd6e9 h1:rAjGCKhKN+iStQ250cH9J9vtW9ch8/g0SXaq7Hrz4aI= +github.com/flimzy/go-sql.js v0.0.0-20170413005827-c7e22c0fd6e9/go.mod h1:N12LGw7VcXxCm94kw4ePQPPnADHUqopSEO54v/jMERc= github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg= github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k= @@ -1191,10 +1198,6 @@ github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRx github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= github.com/gogo/googleapis v1.4.1/go.mod h1:2lpHqI5OcWCtVElxXnPt+s8oJvMpySlOyM6xDCrzib4= -github.com/gogo/protobuf v1.2.1/go.mod h1:hp+jE20tsWTFYpLwKvXlhS1hjn+gTNwPg2I6zVXpSg4= -github.com/gogo/protobuf v1.3.1/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v5 v5.2.1 h1:OuVbFODueb089Lh128TAcimifWaLhJwVflnrgM17wHk= github.com/golang-jwt/jwt/v5 v5.2.1/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk= github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k= @@ -1547,6 +1550,10 @@ github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jhump/protoreflect v1.15.3 h1:6SFRuqU45u9hIZPJAoZ8c28T3nK64BNdp9w6jFonzls= github.com/jhump/protoreflect v1.15.3/go.mod h1:4ORHmSBmlCW8fh3xHmJMGyul1zNqZK4Elxc8qKP+p1k= +github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= +github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= +github.com/jinzhu/now v1.1.5 h1:/o9tlHleP7gOFmsnYNz3RGnqzefHA47wQpKrrdTIwXQ= +github.com/jinzhu/now v1.1.5/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg= github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= github.com/jmespath/go-jmespath/internal/testify v1.5.1 h1:shLQSRRSCCPj3f2gpwzGwWFoC7ycTf1rcQZHOlsJ6N8= @@ -1573,8 +1580,6 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/jung-kurt/gofpdf v1.0.0/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/jung-kurt/gofpdf v1.0.3-0.20190309125859-24315acbbda5/go.mod h1:7Id9E/uU8ce6rXgefFLlgrJj/GYY22cpxn+r32jIOes= github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:CzGEWj7cYgsdH8dAjBGEr58BoE7ScuLd+fwFZ44+/x8= -github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= -github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= @@ -1687,6 +1692,8 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU= github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg= +github.com/mattn/go-sqlite3 v1.14.23 h1:gbShiuAP1W5j9UOksQ06aiiqPMxYecovVGwmTxWtuw0= +github.com/mattn/go-sqlite3 v1.14.23/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= @@ -1764,7 +1771,17 @@ github.com/nats-io/nats.go v1.30.2/go.mod h1:dcfhUgmQNN4GJEfIb2f9R7Fow+gzBF4emzD github.com/nats-io/nkeys v0.4.4/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nkeys v0.4.5/go.mod h1:XUkxdLPTufzlihbamfzQ7mw/VGx6ObUs+0bN5sNvt64= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= +github.com/ncruces/go-sqlite3 v0.18.2 h1:m7QXhBWIwXsp84HE11t+ze0n1v3LRU+zGFg4uHjBeFA= +github.com/ncruces/go-sqlite3 v0.18.2/go.mod h1:4sZHOm+b/FM8FJRVGN4TemkPPDq5JXGK/1EHIEWxsYo= +github.com/ncruces/go-sqlite3/gormlite v0.18.0 h1:KqP9a9wlX/Ba+yG+aeVX4pnNBNdaSO6xHdNDWzPxPnk= +github.com/ncruces/go-sqlite3/gormlite v0.18.0/go.mod h1:RXeT1hknrz3A0tBDL6IfluDHuNkHdJeImn5TBMQg9zc= +github.com/ncruces/julianday v1.0.0 h1:fH0OKwa7NWvniGQtxdJRxAgkBMolni2BjDHaWTxqt7M= +github.com/ncruces/julianday v1.0.0/go.mod h1:Dusn2KvZrrovOMJuOt0TNXL6tB7U2E8kvza5fFc9G7g= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= +github.com/nlepage/go-js-promise v1.0.0 h1:K7OmJ3+0BgWJ2LfXchg2sI6RDr7AW/KWR8182epFwGQ= +github.com/nlepage/go-js-promise v1.0.0/go.mod h1:bdOP0wObXu34euibyK39K1hoBCtlgTKXGc56AGflaRo= +github.com/nlepage/go-wasm-http-server v1.1.0 h1:phw2NtSp71m/6NmGjE2veQ41PBPzWFcnE614cKucy5M= +github.com/nlepage/go-wasm-http-server v1.1.0/go.mod h1:xpffUeN97vuv8CTlMJ2oC5tPsftfPoG9HkAgI9gkiPI= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY= @@ -1787,8 +1804,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.5.0 h1:iAmjTdzuu6inJL48/gHsLcQsyq+GbnVaKSBxlkpkBnE= -github.com/onsonr/crypto v1.5.0/go.mod h1:g77+cbK6mD5qILg4dN6d2X9fNtYrEUAOQ6JIlj12Um0= +github.com/onsonr/crypto v1.23.0 h1:8YYDwja/tGpRaA2Tcoau3Rw5j1t/RfZkIcVacKIi7dI= +github.com/onsonr/crypto v1.23.0/go.mod h1:nPb9pp3n7kMl4/3l2sW3ZJWMU3DQsGoNzyYAqLwL+EY= 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= @@ -1898,6 +1915,8 @@ github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5X github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/regen-network/gocuke v0.6.2 h1:pHviZ0kKAq2U2hN2q3smKNxct6hS0mGByFMHGnWA97M= github.com/regen-network/gocuke v0.6.2/go.mod h1:zYaqIHZobHyd0xOrHGPQjbhGJsuZ1oElx150u2o1xuk= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1 h1:OHEc+q5iIAXpqiqFKeLpu5NwTIkVXUs48vFMwzqpqY4= +github.com/regen-network/protobuf v1.3.3-alpha.regen.1/go.mod h1:2DjTFR1HhMQhiWC5sZ4OhQ3+NtdbZ6oBDKQwq5Ou+FI= github.com/remyoudompheng/bigfft v0.0.0-20200410134404-eec4a21b6bb0/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec/go.mod h1:qqbHyh8v60DhA7CoWK5oRCqLrMHRGoxYCSS9EjAz6Eo= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= @@ -2000,6 +2019,8 @@ github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70 github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tetratelabs/wazero v1.8.0 h1:iEKu0d4c2Pd+QSRieYbnQC9yiFlMS9D+Jr0LsRmcF4g= +github.com/tetratelabs/wazero v1.8.0/go.mod h1:yAI0XTsMBhREkM/YDAK/zNou3GoiAce1P6+rp/wQhjs= github.com/tidwall/btree v1.7.0 h1:L1fkJH/AuEh5zBnnBbmTwQ5Lt+bRJ5A8EWecslvo9iI= github.com/tidwall/btree v1.7.0/go.mod h1:twD9XRA5jj9VUQGELzDO4HPQTNJsoWWfYEL+EUQ2cKY= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -2150,8 +2171,8 @@ golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98y golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= golang.org/x/crypto v0.18.0/go.mod h1:R0j02AL6hcrfOiy9T4ZYp/rcWeMxM3L6QYxlOuEG1mg= -golang.org/x/crypto v0.25.0 h1:ypSNr+bnYL2YhwoMt2zPxHFmbAN1KZs/njMG3hxUp30= -golang.org/x/crypto v0.25.0/go.mod h1:T+wALwcMOSE0kXgUAnPAHqTLW+XHgcELELW8VaDgm/M= +golang.org/x/crypto v0.26.0 h1:RrRspgV4mU+YwB4FYnuBoKsUapNIL5cohGAmSH3azsw= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -2218,8 +2239,8 @@ golang.org/x/mod v0.9.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.10.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.11.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20150829230318-ea47fc708ee3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -2296,8 +2317,8 @@ golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI= golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0 h1:a9JDOJc5GMUJ0+UDqmLT86WiEy7iWyIhz8gz8E4e5hE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -2352,8 +2373,8 @@ golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.2.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -2471,8 +2492,8 @@ golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.13.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.22.0 h1:RI27ohtqKCnwULzJLqkv897zojh5/DwS/ENaMzUOaWI= -golang.org/x/sys v0.22.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= @@ -2489,8 +2510,8 @@ golang.org/x/term v0.11.0/go.mod h1:zC9APTIj3jG3FdV/Ons+XE1riIZXG4aZ4GTHiPZJPIU= golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= golang.org/x/term v0.13.0/go.mod h1:LTmsnFJwVN6bCy1rVCoS+qHT1HhALEFxKncY3WNNh4U= golang.org/x/term v0.16.0/go.mod h1:yn7UURbUtPyrVJPGPq404EukNFxcm/foM+bV/bfcDsY= -golang.org/x/term v0.22.0 h1:BbsgPEJULsl2fV/AT3v15Mjva5yXKQDyKf+TbDz7QJk= -golang.org/x/term v0.22.0/go.mod h1:F3qCibpT5AMpCRfhfT53vVJwhLtIVHhB9XDjfFvnMI4= +golang.org/x/term v0.23.0 h1:F6D4vR+EHoL9/sWAWgAR1H2DcHr4PareCbAaCo1RpuU= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -2512,8 +2533,8 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -2522,11 +2543,9 @@ golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= -golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180525024113-a5b4c53f6e8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20181008205924-a2b3f7f249e9/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190206041539-40960b6deb8e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -2599,8 +2618,8 @@ golang.org/x/tools v0.8.0/go.mod h1:JxBZ99ISMI5ViVkT1tr6tdNmXeTrcpVSD3vZ1RsRdN4= golang.org/x/tools v0.9.1/go.mod h1:owI94Op576fPu3cIGQeHs3joujW/2Oc6MtlxbF5dfNc= golang.org/x/tools v0.10.0/go.mod h1:UJwyiVBsOA2uwvK/e5OY3GTpDUJriEd+/YlqAwLPmyM= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= @@ -2715,6 +2734,7 @@ google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfG google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= @@ -2980,6 +3000,8 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gorm.io/gorm v1.25.11 h1:/Wfyg1B/je1hnDx3sMkX+gAlxrlZpn6X0BXRlwXlvHg= +gorm.io/gorm v1.25.11/go.mod h1:xh7N7RHfYlNc5EmcI/El95gXusucDrQnHXe0+CgWcLQ= gotest.tools/v3 v3.5.1 h1:EENdUnS3pdur5nybKYIh2Vfgc8IUNBjxDPSjtiJcOzU= gotest.tools/v3 v3.5.1/go.mod h1:isy3WKz7GK6uNw/sbHzfKBLvlvXwUyV06n6brMxxopU= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= @@ -2990,6 +3012,8 @@ honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.1.3/go.mod h1:NgwopIslSNH47DimFoV78dnkksY2EFtX0ajyb3K/las= +lukechampine.com/adiantum v1.1.1 h1:4fp6gTxWCqpEbLy40ExiYDDED3oUNWx5cTqBCtPdZqA= +lukechampine.com/adiantum v1.1.1/go.mod h1:LrAYVnTYLnUtE/yMp5bQr0HstAf060YUF8nM0B6+rUw= lukechampine.com/blake3 v1.3.0 h1:sJ3XhFINmHSrYCgl958hscfIa3bw8x4DqMP3u1YvoYE= lukechampine.com/blake3 v1.3.0/go.mod h1:0OFRp7fBtAylGVCO40o87sbupkyIGgbpv1+M1k1LM6k= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= diff --git a/internal/db/db.go b/internal/db/db.go new file mode 100644 index 000000000..2f916c6b1 --- /dev/null +++ b/internal/db/db.go @@ -0,0 +1,174 @@ +package db + +import ( + "fmt" + + "github.com/ncruces/go-sqlite3" + _ "github.com/ncruces/go-sqlite3/embed" +) + +type DB struct { + *sqlite3.Conn +} + +func New(opts ...DBOption) *DBConfig { + config := &DBConfig{ + fileName: "vault.db", + } + for _, opt := range opts { + opt(config) + } + return config +} + +func Open(config *DBConfig) (*DB, error) { + conn, err := sqlite3.Open(config.ConnectionString()) + if err != nil { + return nil, fmt.Errorf("failed to open database: %w", err) + } + + db := &DB{ + Conn: conn, + } + + if err := createTables(db); err != nil { + conn.Close() + return nil, fmt.Errorf("failed to create tables: %w", err) + } + return db, nil +} + +func createTables(db *DB) error { + tables := []string{ + createAccountsTable, + createAssetsTable, + createChainsTable, + createCredentialsTable, + createKeysharesTable, + createProfilesTable, + createPropertiesTable, + createPermissionsTable, + } + + for _, table := range tables { + err := db.Exec(table) + if err != nil { + return fmt.Errorf("failed to create table: %w", err) + } + } + + return nil +} + +// AddAccount adds a new account to the database +func (db *DB) AddAccount(name, address string) error { + return db.Exec(insertAccountQuery(name, address)) +} + +// AddAsset adds a new asset to the database +func (db *DB) AddAsset(name, symbol string, decimals int, chainID int64) error { + return db.Exec(insertAssetQuery(name, symbol, decimals, chainID)) +} + +// AddChain adds a new chain to the database +func (db *DB) AddChain(name, networkID string) error { + return db.Exec(insertChainQuery(name, networkID)) +} + +// AddCredential adds a new credential to the database +func (db *DB) AddCredential( + handle, controller, attestationType, origin string, + credentialID, publicKey []byte, + transport string, + signCount uint32, + userPresent, userVerified, backupEligible, backupState, cloneWarning bool, +) error { + return db.Exec(insertCredentialQuery( + handle, + controller, + attestationType, + origin, + credentialID, + publicKey, + transport, + signCount, + userPresent, + userVerified, + backupEligible, + backupState, + cloneWarning, + )) +} + +// +// // AddProfile adds a new profile to the database +// func (db *DB) AddProfile( +// id, subject, controller, originURI string, +// publicMetadata, privateMetadata string, +// ) error { +// return db.statements["insertProfile"].Exec( +// id, +// subject, +// controller, +// originURI, +// publicMetadata, +// privateMetadata, +// ) +// } +// +// // AddProperty adds a new property to the database +// func (db *DB) AddProperty(profileID, key string, accumulator, propertyKey []byte) error { +// return db.statements["insertProperty"].Exec(profileID, key, accumulator, propertyKey) +// } +// +// // AddPermission adds a new permission to the database +// func (db *DB) AddPermission( +// serviceID string, +// grants []DIDNamespace, +// scopes []PermissionScope, +// ) error { +// grantsJSON, err := json.Marshal(grants) +// if err != nil { +// return fmt.Errorf("failed to marshal grants: %w", err) +// } +// +// scopesJSON, err := json.Marshal(scopes) +// if err != nil { +// return fmt.Errorf("failed to marshal scopes: %w", err) +// } +// +// return db.statements["insertPermission"].Exec( +// serviceID, +// string(grantsJSON), +// string(scopesJSON), +// ) +// } +// +// // GetPermission retrieves a permission from the database +// func (db *DB) GetPermission(serviceID string) ([]DIDNamespace, []PermissionScope, error) { +// stmt := db.statements["getPermission"] +// if err := stmt.Exec(serviceID); err != nil { +// return nil, nil, fmt.Errorf("failed to execute statement: %w", err) +// } +// +// if !stmt.Step() { +// return nil, nil, fmt.Errorf("permission not found") +// } +// +// grantsJSON := stmt.ColumnText(0) +// scopesJSON := stmt.ColumnText(1) +// +// var grants []DIDNamespace +// err := json.Unmarshal([]byte(grantsJSON), &grants) +// if err != nil { +// return nil, nil, fmt.Errorf("failed to unmarshal grants: %w", err) +// } +// +// var scopes []PermissionScope +// err = json.Unmarshal([]byte(scopesJSON), &scopes) +// if err != nil { +// return nil, nil, fmt.Errorf("failed to unmarshal scopes: %w", err) +// } +// +// return grants, scopes, nil +// } diff --git a/internal/db/enums.go b/internal/db/enums.go new file mode 100644 index 000000000..339a0f716 --- /dev/null +++ b/internal/db/enums.go @@ -0,0 +1,36 @@ +package db + +// DIDNamespace defines the different namespaces of DID +type DIDNamespace int + +const ( + DIDNamespaceUnspecified DIDNamespace = iota + DIDNamespaceIPFS + DIDNamespaceSonr + DIDNamespaceBitcoin + DIDNamespaceEthereum + DIDNamespaceIBC + DIDNamespaceWebauthn + DIDNamespaceDWN + DIDNamespaceService +) + +// PermissionScope defines the Capabilities Controllers can grant for Services +type PermissionScope int + +const ( + PermissionScopeUnspecified PermissionScope = iota + PermissionScopeBasicInfo + PermissionScopeRecordsRead + PermissionScopeRecordsWrite + PermissionScopeTransactionsRead + PermissionScopeTransactionsWrite + PermissionScopeWalletsRead + PermissionScopeWalletsCreate + PermissionScopeWalletsSubscribe + PermissionScopeWalletsUpdate + PermissionScopeTransactionsVerify + PermissionScopeTransactionsBroadcast + PermissionScopeAdminUser + PermissionScopeAdminValidator +) diff --git a/internal/db/options.go b/internal/db/options.go new file mode 100644 index 000000000..9699a3ea2 --- /dev/null +++ b/internal/db/options.go @@ -0,0 +1,83 @@ +package db + +import ( + "crypto/rand" + + "github.com/ncruces/go-sqlite3/gormlite" + "github.com/ncruces/go-sqlite3/vfs" + "golang.org/x/crypto/argon2" + "gorm.io/gorm" + "lukechampine.com/adiantum/hbsh" + "lukechampine.com/adiantum/hpolyc" +) + +type DBOption func(config *DBConfig) + +func WithDir(dir string) DBOption { + return func(config *DBConfig) { + config.Dir = dir + } +} + +func WithInMemory() DBOption { + return func(config *DBConfig) { + config.InMemory = true + } +} + +func WithSecretKey(secretKey string) DBOption { + return func(config *DBConfig) { + config.SecretKey = secretKey + } +} + +func WithOpenFlag(flag vfs.OpenFlag) DBOption { + return func(config *DBConfig) { + config.OpenFlag = flag + } +} + +type DBConfig struct { + Dir string + InMemory bool + SecretKey string + OpenFlag vfs.OpenFlag + + fileName string +} + +func (config *DBConfig) ConnectionString() string { + connStr := "file:" + if config.InMemory { + connStr += ":memory:" + } else { + connStr += config.Dir + "/" + config.fileName + } + return connStr +} + +// GormDialector creates a gorm dialector for the database. +func (config *DBConfig) GormDialector() (*gorm.DB, error) { + return gorm.Open(gormlite.Open(config.ConnectionString())) +} + +// HBSH creates an HBSH cipher given a key. +func (c *DBConfig) HBSH(key []byte) *hbsh.HBSH { + if len(key) != 32 { + // Key is not appropriate, return nil. + return nil + } + return hpolyc.New(key) +} + +// KDF gets a key from a secret. +func (c *DBConfig) KDF(secret string) []byte { + if secret == "" { + // No secret is given, generate a random key. + key := make([]byte, 32) + n, _ := rand.Read(key) + return key[:n] + } + // Hash the secret with a KDF. + return argon2.IDKey([]byte(secret), []byte("hpolyc"), 3, 64*1024, 4, 32) +} diff --git a/internal/db/queries.go b/internal/db/queries.go new file mode 100644 index 000000000..807d70193 --- /dev/null +++ b/internal/db/queries.go @@ -0,0 +1,79 @@ +package db + +import "fmt" + +// Account queries +func insertAccountQuery(name, address string) string { + return fmt.Sprintf(`INSERT INTO accounts (name, address) VALUES (%s, %s)`, name, address) +} + +// Asset queries +func insertAssetQuery(name, symbol string, decimals int, chainID int64) string { + return fmt.Sprintf( + `INSERT INTO assets (name, symbol, decimals, chain_id) VALUES (%s, %s, %d, %d)`, + name, + symbol, + decimals, + chainID, + ) +} + +// Chain queries +func insertChainQuery(name string, networkID string) string { + return fmt.Sprintf(`INSERT INTO chains (name, network_id) VALUES (%s, %d)`, name, networkID) +} + +// Credential queries +func insertCredentialQuery( + handle, controller, attestationType, origin string, + credentialID, publicKey []byte, + transport string, + signCount uint32, + userPresent, userVerified, backupEligible, backupState, cloneWarning bool, +) string { + return fmt.Sprintf(`INSERT INTO credentials ( + handle, controller, attestation_type, origin, + credential_id, public_key, transport, sign_count, + user_present, user_verified, backup_eligible, + backup_state, clone_warning + ) VALUES (%s, %s, %s, %s, %s, %s, %s, %d, %t, %t, %t, %t, %t)`, + handle, controller, attestationType, origin, + credentialID, publicKey, transport, signCount, + userPresent, userVerified, backupEligible, + backupState, cloneWarning) +} + +// Profile queries +func insertProfileQuery( + id, subject, controller, originURI, publicMetadata, privateMetadata string, +) string { + return fmt.Sprintf(`INSERT INTO profiles ( + id, subject, controller, origin_uri, + public_metadata, private_metadata + ) VALUES (%s, %s, %s, %s, %s, %s)`, + id, subject, controller, originURI, + publicMetadata, privateMetadata) +} + +// Property queries +func insertPropertyQuery(profileID, key, accumulator, propertyKey string) string { + return fmt.Sprintf(`INSERT INTO properties ( + profile_id, key, accumulator, property_key + ) VALUES (%s, %s, %s, %s)`, + profileID, key, accumulator, propertyKey) +} + +// Permission queries +func insertPermissionQuery(serviceID, grants, scopes string) string { + return fmt.Sprintf( + `INSERT INTO permissions (service_id, grants, scopes) VALUES (%s, %s, %s)`, + serviceID, + grants, + scopes, + ) +} + +// GetPermission query +func getPermissionQuery(serviceID string) string { + return fmt.Sprintf(`SELECT grants, scopes FROM permissions WHERE service_id = %s`, serviceID) +} diff --git a/internal/db/tables.go b/internal/db/tables.go new file mode 100644 index 000000000..e15a8ccf7 --- /dev/null +++ b/internal/db/tables.go @@ -0,0 +1,104 @@ +package db + +const ( + createAccountsTable = ` + CREATE TABLE IF NOT EXISTS accounts ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + address TEXT NOT NULL UNIQUE, + public_key BLOB NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) + ` + + createAssetsTable = ` + CREATE TABLE IF NOT EXISTS assets ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + symbol TEXT NOT NULL, + decimals INTEGER NOT NULL, + chain_id INTEGER, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (chain_id) REFERENCES chains(id) + ) + ` + + createChainsTable = ` + CREATE TABLE IF NOT EXISTS chains ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + name TEXT NOT NULL, + network_id TEXT NOT NULL UNIQUE, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) + ` + + createCredentialsTable = ` + CREATE TABLE IF NOT EXISTS credentials ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + handle TEXT NOT NULL, + controller TEXT NOT NULL, + attestation_type TEXT NOT NULL, + origin TEXT NOT NULL, + credential_id BLOB NOT NULL, + public_key BLOB NOT NULL, + transport TEXT NOT NULL, + sign_count INTEGER NOT NULL, + user_present BOOLEAN NOT NULL, + user_verified BOOLEAN NOT NULL, + backup_eligible BOOLEAN NOT NULL, + backup_state BOOLEAN NOT NULL, + clone_warning BOOLEAN NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) + ` + + createProfilesTable = ` + CREATE TABLE IF NOT EXISTS profiles ( + id TEXT PRIMARY KEY, + subject TEXT NOT NULL, + controller TEXT NOT NULL, + origin_uri TEXT, + public_metadata TEXT, + private_metadata TEXT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) + ` + + createPropertiesTable = ` + CREATE TABLE IF NOT EXISTS properties ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + profile_id TEXT NOT NULL, + key TEXT NOT NULL, + accumulator BLOB NOT NULL, + property_key BLOB NOT NULL, + FOREIGN KEY (profile_id) REFERENCES profiles(id) + ) + ` + + createKeysharesTable = ` + CREATE TABLE IF NOT EXISTS keyshares ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + metadata TEXT NOT NULL, + payloads TEXT NOT NULL, + protocol TEXT NOT NULL, + public_key BLOB NOT NULL, + role INTEGER NOT NULL, + version INTEGER NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP + ) + ` + + createPermissionsTable = ` + CREATE TABLE IF NOT EXISTS permissions ( + id INTEGER PRIMARY KEY AUTOINCREMENT, + service_id TEXT NOT NULL, + grants TEXT NOT NULL, + scopes TEXT NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + updated_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (service_id) REFERENCES services(id) + ) + ` +) diff --git a/internal/files/assemble.go b/internal/files/assemble.go new file mode 100644 index 000000000..6a0413825 --- /dev/null +++ b/internal/files/assemble.go @@ -0,0 +1,63 @@ +package files + +import ( + "fmt" + "os" + "path/filepath" + + _ "github.com/mattn/go-sqlite3" + + "github.com/onsonr/sonr/internal/db" +) + +var ( + kServiceWorkerFileName = "sw.js" + kVaultFileName = "vault.wasm" + kIndexFileName = "index.html" +) + +func Assemble(dir string) error { + err := os.MkdirAll(dir, 0o755) + if err != nil { + return err + } + + // Write the vault file + if err := writeVaultWASM(filepath.Join(dir, kVaultFileName)); err != nil { + return err + } + + // Write the service worker file + if err := writeServiceWorkerJS(filepath.Join(dir, kServiceWorkerFileName)); err != nil { + return err + } + + // Write the index file + if err := writeIndexHTML(filepath.Join(dir, kIndexFileName)); err != nil { + return err + } + + // Initialize the database + if err := initializeDatabase(dir); err != nil { + return err + } + + return nil +} + +func initializeDatabase(dir string) error { + db, err := db.Open(db.New(db.WithDir(dir))) + if err != nil { + return fmt.Errorf("failed to open database: %w", err) + } + defer db.Close() + + // You can add some initial data here if needed + // For example: + // err = db.AddChain("Ethereum", "1") + // if err != nil { + // return fmt.Errorf("failed to add initial chain: %w", err) + // } + + return nil +} diff --git a/internal/files/embed.go b/internal/files/embed.go new file mode 100644 index 000000000..d319469ef --- /dev/null +++ b/internal/files/embed.go @@ -0,0 +1,58 @@ +package files + +import ( + "context" + _ "embed" + "os" +) + +//go:embed vault.wasm +var vaultWasmData []byte + +func writeServiceWorkerJS(path string) error { + // Create the service worker file + file, err := os.Create(path) + if err != nil { + return err + } + defer file.Close() + + // Write the service worker file to the specified path + err = VaultServiceWorker(kVaultFileName).Render(context.Background(), file) + if err != nil { + return err + } + return nil +} + +func writeVaultWASM(path string) error { + // Create the vault file + file, err := os.Create(path) + if err != nil { + return err + } + defer file.Close() + + // Write the embedded vault file to the specified path + err = os.WriteFile(file.Name(), vaultWasmData, 0o644) + if err != nil { + return err + } + return nil +} + +func writeIndexHTML(path string) error { + // create the index file + file, err := os.Create(path) + if err != nil { + return err + } + defer file.Close() + + // write the index file to the specified path + err = IndexHTML().Render(context.Background(), file) + if err != nil { + return err + } + return nil +} diff --git a/internal/files/sw.templ b/internal/files/sw.templ new file mode 100644 index 000000000..88acdebd5 --- /dev/null +++ b/internal/files/sw.templ @@ -0,0 +1,32 @@ +package files + +templ VaultServiceWorker(path string) { + @serviceWorkerJS(path) +} + +script serviceWorkerJS(path string) { + importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.18.4/misc/wasm/wasm_exec.js') + importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js') +} + +templ IndexHTML() { + + + Sonr ID + + + +} diff --git a/internal/files/sw_templ.go b/internal/files/sw_templ.go new file mode 100644 index 000000000..47f0d9543 --- /dev/null +++ b/internal/files/sw_templ.go @@ -0,0 +1,74 @@ +// Code generated by templ - DO NOT EDIT. + +// templ: version: v0.2.771 +package files + +//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 VaultServiceWorker(path 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 + 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 = serviceWorkerJS(path).Render(ctx, templ_7745c5c3_Buffer) + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +func serviceWorkerJS(path string) templ.ComponentScript { + return templ.ComponentScript{ + Name: `__templ_serviceWorkerJS_2501`, + Function: `function __templ_serviceWorkerJS_2501(path){importScripts('https://cdn.jsdelivr.net/gh/golang/go@go1.18.4/misc/wasm/wasm_exec.js') + importScripts('https://cdn.jsdelivr.net/gh/nlepage/go-wasm-http-server@v1.1.0/sw.js') +}`, + Call: templ.SafeScript(`__templ_serviceWorkerJS_2501`, path), + CallInline: templ.SafeScriptInline(`__templ_serviceWorkerJS_2501`, path), + } +} + +func IndexHTML() 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 + 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("Sonr ID") + if templ_7745c5c3_Err != nil { + return templ_7745c5c3_Err + } + return templ_7745c5c3_Err + }) +} + +var _ = templruntime.GeneratedTemplate diff --git a/internal/files/vault.wasm b/internal/files/vault.wasm new file mode 100755 index 000000000..b5a056b73 Binary files /dev/null and b/internal/files/vault.wasm differ diff --git a/internal/ipfs/base.go b/internal/ipfs/base.go new file mode 100644 index 000000000..f67c89e8c --- /dev/null +++ b/internal/ipfs/base.go @@ -0,0 +1,88 @@ +package ipfs + +import ( + "fmt" + "io" + "time" +) + +var ( + ErrNotInitialized = fmt.Errorf("IPFS client not initialized") + ErrNotMounted = fmt.Errorf("IPFS client not mounted") + ErrCIDNotFound = fmt.Errorf("CID not found") + ErrIPNSNotFound = fmt.Errorf("IPNS not found") + ErrInternal = fmt.Errorf("internal error") +) + +type FileSystem interface { + // NewFile initializes a File on the specified volume at path 'absFilePath'. + // + // * Accepts volume and an absolute file path. + // * Upon success, a vfs.File, representing the file's new path (location path + file relative path), will be returned. + // * On error, nil is returned for the file. + // * Note that not all file systems will have a "volume" and will therefore be "": + // file:///path/to/file has a volume of "" and name /path/to/file + // whereas + // s3://mybucket/path/to/file has a volume of "mybucket and name /path/to/file + // results in /tmp/dir1/newerdir/file.txt for the final vfs.File path. + // * The file may or may not already exist. + NewFile(volume string, absFilePath string) (File, error) + + // Name returns the name of the FileSystem ie: Amazon S3, os, Google Cloud Storage, etc. + Name() string +} + +type File interface { + io.Closer + io.Reader + io.Seeker + io.Writer + fmt.Stringer + + // Exists returns boolean if the file exists on the file system. Returns an error, if any. + Exists() (bool, error) + + // CopyToFile will copy the current file to the provided file instance. + // + // * In the case of an error, nil is returned for the file. + // * CopyToLocation should use native functions when possible within the same scheme. + // * If the file already exists, the contents will be overwritten with the current file's contents. + // * CopyToFile will Close both the source and target Files which therefore can't be appended to without first + // calling Seek() to move the cursor to the end of the file. + CopyToFile(file File) error + + // MoveToFile will move the current file to the provided file instance. + // + // * If the file already exists, the contents will be overwritten with the current file's contents. + // * The current instance of the file will be removed. + // * MoveToFile will Close both the source and target Files which therefore can't be appended to without first + // calling Seek() to move the cursor to the end of the file. + MoveToFile(file File) error + + // Delete unlinks the File on the file system. + Delete() error + + // LastModified returns the timestamp the file was last modified (as *time.Time). + LastModified() (*time.Time, error) + + // Size returns the size of the file in bytes. + Size() (uint64, error) + + // Path returns absolute path, including filename, ie /some/path/to/file.txt + // + // If the directory portion of a file is desired, call + // someFile.Location().Path() + Path() string + + // Name returns the base name of the file path. + // + // For file:///some/path/to/file.txt, it would return file.txt + Name() string + + // Touch creates a zero-length file on the vfs.File if no File exists. Update File's last modified timestamp. + // Returns error if unable to touch File. + Touch() error + + // URI returns the fully qualified absolute URI for the File. IE, s3://bucket/some/path/to/file.txt + URI() string +} diff --git a/internal/ipfs/ipfs.go b/internal/ipfs/ipfs.go new file mode 100644 index 000000000..0af936f9d --- /dev/null +++ b/internal/ipfs/ipfs.go @@ -0,0 +1,173 @@ +package ipfs + +import ( + "context" + "fmt" + "io" + "os" + "path/filepath" + + "github.com/ipfs/boxo/files" + "github.com/ipfs/boxo/path" + "github.com/ipfs/kubo/client/rpc" +) + +var ( + initialized bool + localMount bool + ipfsClient *rpc.HttpApi + ipfsFS FileSystem +) + +// init initializes the IPFS client and checks for local mounts +func init() { + var err error + ipfsClient, err = rpc.NewLocalApi() + if err != nil { + initialized = false + localMount = false + return + } + + initialized = true + ipfsFS = &IPFSFileSystem{client: ipfsClient} + + // Check if /ipfs and /ipns are mounted using os package + _, errIPFS := os.Stat("/ipfs") + _, errIPNS := os.Stat("/ipns") + localMount = !os.IsNotExist(errIPFS) && !os.IsNotExist(errIPNS) +} + +// GetFileSystem returns the IPFS FileSystem implementation +func GetFileSystem() FileSystem { + return ipfsFS +} + +// AddFile adds a single file to IPFS and returns its CID +func AddFile(ctx context.Context, filePath string) (string, error) { + if !initialized { + return "", ErrNotInitialized + } + + file, err := os.Open(filePath) + if err != nil { + return "", fmt.Errorf("failed to open file: %w", err) + } + defer file.Close() + + fileNode := files.NewReaderFile(file) + + cidFile, err := ipfsClient.Unixfs().Add(ctx, fileNode) + if err != nil { + return "", fmt.Errorf("failed to add file to IPFS: %w", err) + } + + return cidFile.String(), nil +} + +// AddFolder adds a folder and its contents to IPFS and returns the CID of the folder +func AddFolder(ctx context.Context, folderPath string) (string, error) { + if !initialized { + return "", ErrNotInitialized + } + + stat, err := os.Stat(folderPath) + if err != nil { + return "", fmt.Errorf("failed to get folder info: %w", err) + } + + if !stat.IsDir() { + return "", fmt.Errorf("provided path is not a directory") + } + + folderNode, err := files.NewSerialFile(folderPath, false, stat) + if err != nil { + return "", fmt.Errorf("failed to create folder node: %w", err) + } + + cidFolder, err := ipfsClient.Unixfs().Add(ctx, folderNode) + if err != nil { + return "", fmt.Errorf("failed to add folder to IPFS: %w", err) + } + + return cidFolder.String(), nil +} + +func GetCID(ctx context.Context, cid string) ([]byte, error) { + if !initialized { + return nil, ErrNotInitialized + } + + if localMount { + // Try to read from local filesystem first + data, err := os.ReadFile(filepath.Join("/ipfs", cid)) + if err == nil { + return data, nil + } + // If local read fails, fall back to IPFS client + } + + // Use IPFS client to fetch the data + p, err := path.NewPath("/ipfs/" + cid) + if err != nil { + return nil, err + } + n, err := ipfsClient.Unixfs().Get(ctx, p) + if err != nil { + return nil, err + } + + return readNodeData(n) +} + +func GetIPNS(ctx context.Context, name string) ([]byte, error) { + if !initialized { + return nil, ErrNotInitialized + } + + if localMount { + // Try to read from local filesystem first + data, err := os.ReadFile(filepath.Join("/ipns", name)) + if err == nil { + return data, nil + } + // If local read fails, fall back to IPFS client + } + + // Use IPFS client to fetch the data + p, err := path.NewPath("/ipns/" + name) + if err != nil { + return nil, err + } + n, err := ipfsClient.Unixfs().Get(ctx, p) + if err != nil { + return nil, err + } + + return readNodeData(n) +} + +func PinCID(ctx context.Context, cid string, name string) error { + if !initialized { + return ErrNotInitialized + } + + p, err := path.NewPath(cid) + if err != nil { + return ErrNotInitialized + } + err = ipfsClient.Pin().Add(ctx, p) + if err != nil { + return ErrInternal + } + return nil +} + +func readNodeData(n files.Node) ([]byte, error) { + switch n := n.(type) { + case files.File: + return io.ReadAll(n) + default: + return nil, fmt.Errorf("unsupported node type: %T", n) + } +} diff --git a/internal/ipfs/vfs.go b/internal/ipfs/vfs.go new file mode 100644 index 000000000..1b52ae77a --- /dev/null +++ b/internal/ipfs/vfs.go @@ -0,0 +1,119 @@ +package ipfs + +import ( + "context" + "fmt" + "time" + + "github.com/ipfs/boxo/files" + "github.com/ipfs/boxo/path" + "github.com/ipfs/kubo/client/rpc" +) + +type IPFSFile struct { + node files.Node + path string + name string + client *rpc.HttpApi +} + +func (f *IPFSFile) Close() error { + return nil // IPFS nodes don't need to be closed +} + +func (f *IPFSFile) Read(p []byte) (n int, err error) { + if file, ok := f.node.(files.File); ok { + return file.Read(p) + } + return 0, fmt.Errorf("not a file") +} + +func (f *IPFSFile) Seek(offset int64, whence int) (int64, error) { + if file, ok := f.node.(files.File); ok { + return file.Seek(offset, whence) + } + return 0, fmt.Errorf("not a file") +} + +func (f *IPFSFile) Write(p []byte) (n int, err error) { + return 0, fmt.Errorf("write operation not supported for IPFS files") +} + +func (f *IPFSFile) String() string { + return f.path +} + +func (f *IPFSFile) Exists() (bool, error) { + // In IPFS, if we have the node, it exists + return true, nil +} + +func (f *IPFSFile) CopyToFile(file File) error { + // Implementation depends on how you want to handle copying between IPFS and other file types + return fmt.Errorf("CopyToFile not implemented for IPFS files") +} + +func (f *IPFSFile) MoveToFile(file File) error { + // Moving files in IPFS doesn't make sense in the traditional way + return fmt.Errorf("MoveToFile not applicable for IPFS files") +} + +func (f *IPFSFile) Delete() error { + // Deleting in IPFS is not straightforward, might need to implement unpinning + return fmt.Errorf("Delete operation not supported for IPFS files") +} + +func (f *IPFSFile) LastModified() (*time.Time, error) { + // IPFS doesn't have a concept of last modified time + return nil, fmt.Errorf("LastModified not applicable for IPFS files") +} + +func (f *IPFSFile) Size() (uint64, error) { + if file, ok := f.node.(files.File); ok { + s, _ := file.Size() + return uint64(s), nil + } + return 0, fmt.Errorf("not a file") +} + +func (f *IPFSFile) Path() string { + return f.path +} + +func (f *IPFSFile) Name() string { + return f.name +} + +func (f *IPFSFile) Touch() error { + return fmt.Errorf("Touch operation not supported for IPFS files") +} + +func (f *IPFSFile) URI() string { + return fmt.Sprintf("ipfs://%s", f.path) +} + +type IPFSFileSystem struct { + client *rpc.HttpApi +} + +func (fs *IPFSFileSystem) NewFile(volume string, absFilePath string) (File, error) { + p, err := path.NewPath(absFilePath) + if err != nil { + return nil, err + } + node, err := fs.client.Unixfs().Get(context.Background(), p) + if err != nil { + return nil, err + } + + return &IPFSFile{ + node: node, + path: absFilePath, + name: p.String(), + client: fs.client, + }, nil +} + +func (fs *IPFSFileSystem) Name() string { + return "IPFS" +} diff --git a/new.Dockerfile b/new.Dockerfile deleted file mode 100644 index 411dd5e3d..000000000 --- a/new.Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -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 - -RUN devbox run -- echo "Installed Packages." - -ENTRYPOINT ["devbox", "run"] diff --git a/proto/buf.gen.pulsar.yaml b/proto/buf.gen.pulsar.yaml index 79be938c2..2f8e09621 100644 --- a/proto/buf.gen.pulsar.yaml +++ b/proto/buf.gen.pulsar.yaml @@ -2,7 +2,7 @@ version: v1 managed: enabled: true go_package_prefix: - default: github.com/onsonr/hway/api + default: github.com/onsonr/sonr/api except: - buf.build/googleapis/googleapis - buf.build/cosmos/gogo-proto diff --git a/proto/buf.yaml b/proto/buf.yaml index 068bc2bd5..6301a3b3f 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -1,5 +1,5 @@ version: v1 -name: buf.build/didao/sonr +name: buf.build/onsonr/sonr deps: - buf.build/cosmos/cosmos-sdk:9000fcc585a046c9881271d53dd40c34 - buf.build/cosmos/cosmos-proto:1935555c206d4afb9e94615dfd0fad31 diff --git a/proto/did/module/v1/module.proto b/proto/did/module/v1/module.proto index faa4c564a..49002f51f 100644 --- a/proto/did/module/v1/module.proto +++ b/proto/did/module/v1/module.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package onsonr.hway.did.module.v1; +package onsonr.sonr.did.module.v1; import "cosmos/app/v1alpha1/module.proto"; @@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import : "github.com/onsonr/hway" + go_import : "github.com/onsonr/sonr" }; } diff --git a/proto/did/v1/accounts.proto b/proto/did/v1/accounts.proto index 8e1f1b1e0..2f6e1007b 100644 --- a/proto/did/v1/accounts.proto +++ b/proto/did/v1/accounts.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package did.v1; -option go_package = "github.com/onsonr/hway/x/did/types"; +option go_package = "github.com/onsonr/sonr/x/did/types"; message BtcAccount {} diff --git a/proto/did/v1/constants.proto b/proto/did/v1/constants.proto new file mode 100644 index 000000000..0ed85d061 --- /dev/null +++ b/proto/did/v1/constants.proto @@ -0,0 +1,101 @@ +syntax = "proto3"; +package did.v1; + +option go_package = "github.com/onsonr/sonr/x/did/types"; + +// AssetType defines the type of asset: native, wrapped, staking, pool, or unspecified +enum AssetType { + ASSET_TYPE_UNSPECIFIED = 0; + ASSET_TYPE_NATIVE = 1; + ASSET_TYPE_WRAPPED = 2; + ASSET_TYPE_STAKING = 3; + ASSET_TYPE_POOL = 4; + ASSET_TYPE_IBC = 5; + ASSET_TYPE_CW20 = 6; +} + +// DIDNamespace define the different namespaces of DID +enum DIDNamespace { + DID_NAMESPACE_UNSPECIFIED = 0; + DID_NAMESPACE_IPFS = 1; + DID_NAMESPACE_SONR = 2; + DID_NAMESPACE_BITCOIN = 3; + DID_NAMESPACE_ETHEREUM = 4; + DID_NAMESPACE_IBC = 5; + DID_NAMESPACE_WEBAUTHN = 6; + DID_NAMESPACE_DWN = 7; + DID_NAMESPACE_SERVICE = 8; +} + +// KeyAlgorithm defines the key algorithm +enum KeyAlgorithm { + KEY_ALGORITHM_UNSPECIFIED = 0; + KEY_ALGORITHM_ES256 = 1; + KEY_ALGORITHM_ES384 = 2; + KEY_ALGORITHM_ES512 = 3; + KEY_ALGORITHM_EDDSA = 4; + KEY_ALGORITHM_ES256K = 5; + KEY_ALGORITHM_BLS12377 = 6; + KEY_ALGORITHM_KECCAK256 = 7; +} + +// KeyCurve defines the key curve +enum KeyCurve { + KEY_CURVE_UNSPECIFIED = 0; + KEY_CURVE_P256 = 1; + KEY_CURVE_P384 = 2; + KEY_CURVE_P521 = 3; + KEY_CURVE_X25519 = 4; + KEY_CURVE_X448 = 5; + KEY_CURVE_ED25519 = 6; + KEY_CURVE_ED448 = 7; + KEY_CURVE_SECP256K1 = 8; +} + +// KeyEncoding defines the key encoding +enum KeyEncoding { + KEY_ENCODING_UNSPECIFIED = 0; + KEY_ENCODING_RAW = 1; + KEY_ENCODING_HEX = 2; + KEY_ENCODING_MULTIBASE = 3; + KEY_ENCODING_JWK = 4; +} + +// KeyRole defines the kind of key +enum KeyRole { + KEY_ROLE_UNSPECIFIED = 0; + + // Blockchain key types + KEY_ROLE_AUTHENTICATION = 1; // Passkeys and FIDO + KEY_ROLE_ASSERTION = 2; // Zk Identifiers + KEY_ROLE_DELEGATION = 3; // ETH,BTC,IBC addresses + KEY_ROLE_INVOCATION = 4; // DWN Controllers +} + +// KeyType defines the key type +enum KeyType { + KEY_TYPE_UNSPECIFIED = 0; + KEY_TYPE_OCTET = 1; + KEY_TYPE_ELLIPTIC = 2; + KEY_TYPE_RSA = 3; + KEY_TYPE_SYMMETRIC = 4; + KEY_TYPE_HMAC = 5; +} + +// PermissionScope define the Capabilities Controllers can grant for Services +enum PermissionScope { + PERMISSION_SCOPE_UNSPECIFIED = 0; + PERMISSION_SCOPE_BASIC_INFO = 1; + PERMISSION_SCOPE_RECORDS_READ = 2; + PERMISSION_SCOPE_RECORDS_WRITE = 3; + PERMISSION_SCOPE_TRANSACTIONS_READ = 4; + PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; + PERMISSION_SCOPE_WALLETS_READ = 6; + PERMISSION_SCOPE_WALLETS_CREATE = 7; + PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; + PERMISSION_SCOPE_WALLETS_UPDATE = 9; + PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; + PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; + PERMISSION_SCOPE_ADMIN_USER = 12; + PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; +} diff --git a/proto/did/v1/genesis.proto b/proto/did/v1/genesis.proto index 92a75192c..c87e3280c 100644 --- a/proto/did/v1/genesis.proto +++ b/proto/did/v1/genesis.proto @@ -1,10 +1,11 @@ syntax = "proto3"; package did.v1; -import "gogoproto/gogo.proto"; import "amino/amino.proto"; +import "did/v1/constants.proto"; +import "gogoproto/gogo.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; +option go_package = "github.com/onsonr/sonr/x/did/types"; // GenesisState defines the module genesis state message GenesisState { @@ -18,7 +19,7 @@ message Params { option (gogoproto.equal) = true; option (gogoproto.goproto_stringer) = false; - // Whitelisted Assets + // Whitelisted Assets repeated AssetInfo whitelisted_assets = 1; // Whitelisted Blockchains @@ -27,117 +28,99 @@ message Params { // Whitelisted Key Types repeated KeyInfo allowed_public_keys = 3; - // Whitlested Validator nodes with Public DID Resolvers - repeated ValidatorInfo public_validators = 4; + // OpenIDConfig defines the base openid configuration across all did services + OpenIDConfig openid_config = 4; } // AssetInfo defines the asset info message AssetInfo { - string id = 1; - string denom = 2; - string symbol = 3; - string asset_type = 4; - string origin_chain = 5; - string origin_denom = 6; - int32 decimals = 7; - string description = 8; - string image_url = 9; - string coingecko_id = 10; - bool is_enabled = 11; - string ibc_path = 12; - string ibc_channel = 13; - string ibc_port = 14; + // The coin type index for bip44 path + int64 index = 1; + + // The hrp for bech32 address + string hrp = 2; + + // The coin symbol + string symbol = 3; + + // The coin name + AssetType asset_type = 4; + + // The name of the asset + string name = 5; + + // The Method of the did namespace + string method = 6; + + // The icon url + string icon_url = 7; } // ChainInfo defines the chain info message ChainInfo { - string id = 1; - string chain_id = 2; - string name = 3; - string symbol = 4; - string bech32_prefix = 5; - string genesis_time = 6; - } + string id = 1; + string chain_id = 2; + string name = 3; + string symbol = 4; + repeated ValidatorInfo validators = 5; +} // KeyInfo defines information for accepted PubKey types message KeyInfo { - KeyType kind = 1; - string algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" - string curve = 3; // e.g., "P-256", "Ed25519", "secp256k1" - string encoding = 4; // e.g., "hex", "base64", "multibase" + KeyRole role = 1; + KeyAlgorithm algorithm = 2; // e.g., "ES256", "EdDSA", "ES256K" + KeyEncoding encoding = 3; // e.g., "hex", "base64", "multibase" + KeyCurve curve = 4; // e.g., "P256", "P384", "P521", "X25519", "X448", "Ed25519", "Ed448", "secp256k1" + KeyType type = 5; // e.g., "Octet", "Elliptic", "RSA", "Symmetric", "HMAC" +} + +// OpenIDConfig defines the base openid configuration across all did services +message OpenIDConfig { + string issuer = 1; + string authorization_endpoint = 2; + string token_endpoint = 3; + string userinfo_endpoint = 4; + repeated string scopes_supported = 5; + repeated string response_types_supported = 6; + repeated string response_modes_supported = 7; + repeated string grant_types_supported = 8; + repeated string acr_values_supported = 9; + repeated string subject_types_supported = 10; } // ValidatorInfo defines information for accepted Validator nodes message ValidatorInfo { - repeated Endpoint grpc_endpoints = 5; - repeated Endpoint rest_endpoints = 6; - ExplorerInfo explorer = 7; - FeeInfo fee_info = 8; - + string moniker = 1; + repeated Endpoint grpc_endpoints = 2; + repeated Endpoint rest_endpoints = 3; + ExplorerInfo explorer = 4; + FeeInfo fee_info = 5; + IBCChannel ibc_channel = 6; + // Endpoint defines an endpoint message Endpoint { - string url = 1; - bool is_primary = 2; + string url = 1; + bool is_primary = 2; } // ExplorerInfo defines the explorer info message ExplorerInfo { - string name = 1; - string url = 2; + string name = 1; + string url = 2; } // FeeInfo defines a fee info message FeeInfo { - string base_denom = 1; - repeated string fee_rates = 2; - int32 init_gas_limit = 3; - bool is_simulable = 4; - double gas_multiply = 5; + string base_denom = 1; + repeated string fee_rates = 2; + int32 init_gas_limit = 3; + bool is_simulable = 4; + double gas_multiply = 5; + } + + // IBCChannel defines the IBC channel info + message IBCChannel { + string id = 1; + string port = 2; } } - - -// DIDNamespace define the different namespaces of DID -enum DIDNamespace { - DID_NAMESPACE_UNSPECIFIED = 0; - DID_NAMESPACE_IPFS = 1; - DID_NAMESPACE_SONR = 2; - DID_NAMESPACE_BITCOIN = 3; - DID_NAMESPACE_ETHEREUM = 4; - DID_NAMESPACE_IBC = 5; -} - -// KeyKTind defines the kind of key -enum KeyType { - KEY_TYPE_UNSPECIFIED = 0; - - // Blockchain key types - KEY_TYPE_SECP256K1 = 1; // cross-chain - KEY_TYPE_ED25519 = 2; // validators - KEY_TYPE_KECCAK = 3; // ethereum addresses - KEY_TYPE_BLS12381 = 4; // zero-knowledge - KEY_TYPE_X25519 = 5; // multisig - KEY_TYPE_SCHNORR = 6; // mpc - - // Webauthn and FIDO key types - KEY_TYPE_WEBAUTHN = 7; // passkey authentication - KEY_TYPE_FIDO = 8; // fido2 authentication -} - -// PermissionScope define the Capabilities Controllers can grant for Services -enum PermissionScope { - PERMISSION_SCOPE_UNSPECIFIED = 0; - PERMISSION_SCOPE_BASIC_INFO = 1; - PERMISSION_SCOPE_RECORDS_READ = 2; - PERMISSION_SCOPE_RECORDS_WRITE = 3; - PERMISSION_SCOPE_TRANSACTIONS_READ = 4; - PERMISSION_SCOPE_TRANSACTIONS_WRITE = 5; - PERMISSION_SCOPE_WALLETS_READ = 6; - PERMISSION_SCOPE_WALLETS_CREATE = 7; - PERMISSION_SCOPE_WALLETS_SUBSCRIBE = 8; - PERMISSION_SCOPE_WALLETS_UPDATE = 9; - PERMISSION_SCOPE_TRANSACTIONS_VERIFY = 10; - PERMISSION_SCOPE_TRANSACTIONS_BROADCAST = 11; - PERMISSION_SCOPE_ADMIN_USER = 12; - PERMISSION_SCOPE_ADMIN_VALIDATOR = 13; -} diff --git a/proto/did/v1/models.proto b/proto/did/v1/models.proto index 79bdc46b7..16879f704 100644 --- a/proto/did/v1/models.proto +++ b/proto/did/v1/models.proto @@ -2,17 +2,15 @@ syntax = "proto3"; package did.v1; +import "did/v1/constants.proto"; import "did/v1/genesis.proto"; +import "gogoproto/gogo.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; +option go_package = "github.com/onsonr/sonr/x/did/types"; -// DID defines a parsed DID string -message DID { - string id = 1; - DIDNamespace method = 2; - string network = 3; - string identifier = 4; - repeated string paths = 5; +// Accumulator defines a BLS accumulator +message Accumulator { + bytes accumulator = 1; } // Credential defines a WebAuthn credential @@ -23,7 +21,16 @@ message Credential { repeated string transport = 4; string subject = 6; string controller = 7; -} +} + +// DID defines a parsed DID string +message DID { + DIDNamespace method = 1; + string network = 2; + string subject = 3; + string identifier = 4; + repeated string paths = 5; +} // Document defines a DID document message Document { @@ -33,6 +40,7 @@ message Document { repeated string assertion_method = 5; repeated string capability_delegation = 7; repeated string capability_invocation = 8; + repeated string service = 9; } // Metadata defines additional information provided to a did @@ -42,7 +50,7 @@ message Metadata { map private = 3; } -// Permissions contains a list of grants and access control rules for +// Permissions contains a list of grants and access control rules for // a Service. message Permissions { repeated DIDNamespace grants = 1; @@ -54,9 +62,7 @@ message Profile { string id = 1; string subject = 2; string controller = 3; - repeated Credential credentials = 4; - repeated VerificationMethod attestations = 5; - Metadata metadata = 6; + Metadata metadata = 4; } // Property defines a Zero-Knowledge accumulator which can be used to @@ -68,17 +74,42 @@ message Property { // PubKey defines a public key for a did message PubKey { - DIDNamespace namespace = 1; - bytes key = 2; - KeyType kind = 3; - string multibase = 5; - map jwks = 6; + KeyRole role = 1; + KeyAlgorithm algorithm = 2; + KeyEncoding encoding = 3; + bytes raw = 4; + string hex = 5; + string multibase = 6; + map jwk = 7; +} + +// Service defines a Decentralized Service on the Sonr Blockchain +message Service { + string id = 1; + string controller = 2; + string origin = 3; + Permissions permissions = 4; + OpenIDConfig openid = 5; + Metadata metadata = 6; +} + +// Token defines a macron token +message Token { + string id = 1; + string controller = 2; + bytes macron = 3; } // VerificationMethod defines a verification method message VerificationMethod { string id = 1; string controller = 2; - PubKey public_key = 3; + DIDNamespace method = 3; + PubKey public_key = 4; + Service service = 7; } +// Witness defines a BLS witness +message Witness { + bytes witness = 1; +} diff --git a/proto/did/v1/query.proto b/proto/did/v1/query.proto index 0716e576c..38038d8ec 100644 --- a/proto/did/v1/query.proto +++ b/proto/did/v1/query.proto @@ -1,47 +1,52 @@ syntax = "proto3"; package did.v1; -import "google/api/annotations.proto"; import "did/v1/genesis.proto"; import "did/v1/models.proto"; +import "google/api/annotations.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; +option go_package = "github.com/onsonr/sonr/x/did/types"; // Query provides defines the gRPC querier service. service Query { - // Params queries all parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/did/params"; - } + // Params queries all parameters of the module. + rpc Params(QueryRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/did/params"; + } - // Accounts returns associated wallet accounts with the DID. - rpc Accounts(QueryAccountsRequest) returns (QueryAccountsResponse) { - option (google.api.http).get = "/did/{did}/accounts"; - } + // Accounts returns associated wallet accounts with the DID. + rpc Accounts(QueryRequest) returns (QueryAccountsResponse) { + option (google.api.http).get = "/did/{did}/accounts"; + } - // Credentials returns associated credentials with the DID and Service Origin. - rpc Credentials(QueryCredentialsRequest) returns (QueryCredentialsResponse) { - option (google.api.http).get = "/did/{did}/{origin}/credentials"; - } + // Credentials returns associated credentials with the DID and Service Origin. + rpc Credentials(QueryRequest) returns (QueryCredentialsResponse) { + option (google.api.http).get = "/service/{origin}/{subject}/credentials"; + } - // Identities returns associated identity with the DID. - rpc Identities(QueryIdentitiesRequest) returns (QueryIdentitiesResponse) { - option (google.api.http).get = "/did/{did}/identities"; - } + // Resolve queries the DID document by its id. + rpc Resolve(QueryRequest) returns (QueryResolveResponse) { + option (google.api.http).get = "/did/{did}"; + } - // Resolve queries the DID document by its id. - rpc Resolve(QueryResolveRequest) returns (QueryResolveResponse) { - option (google.api.http).get = "/did/resolve/{did}"; - } + // Service returns associated ServiceInfo for a given Origin + rpc Service(QueryRequest) returns (QueryServiceResponse) { + option (google.api.http).get = "/service/{origin}"; + } - // Service returns associated ServiceInfo for a given Origin - rpc Service(QueryServiceRequest) returns (QueryServiceResponse) { - option (google.api.http).get = "/did/service/{origin}"; - } + // Token returns the current authentication token for the client. + rpc Token(QueryRequest) returns (QueryTokenResponse) { + option (google.api.http).post = "/token"; + } } -// QueryParamsRequest is the request type for the Query/Params RPC method. -message QueryParamsRequest {} +// Queryequest is the request type for the Query/Params RPC method. +message QueryRequest { + string did = 1; + string origin = 2; + string subject = 3; + repeated Credential credentials = 4; +} // QueryParamsResponse is the response type for the Query/Params RPC method. message QueryParamsResponse { @@ -49,57 +54,34 @@ message QueryParamsResponse { Params params = 1; } -// QueryAccountsRequest is the request type for the Query/Exists RPC method. -message QueryAccountsRequest { - string did = 1; -} - // QueryAccountsResponse is the response type for the Query/Exists RPC method. message QueryAccountsResponse { - bool exists = 1; -} - -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -message QueryCredentialsRequest { - string did = 1; - string origin = 2; + bool exists = 1; } // QueryCredentialsResponse is the response type for the Query/Exists RPC method. message QueryCredentialsResponse { - map credentials = 1; -} - -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -message QueryIdentitiesRequest { - string did = 1; -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -message QueryIdentitiesResponse { - bool exists = 1; - repeated VerificationMethod verificationMethod = 2; -} - -// QueryResolveRequest is the request type for the Query/Resolve RPC method. -message QueryResolveRequest { - string did = 1; + bool success = 1; + string subject = 2; + string origin = 3; + repeated Credential credentials = 4; + string error = 5; } // QueryResolveResponse is the response type for the Query/Resolve RPC method. message QueryResolveResponse { - // document is the DID document - Document document = 1; -} - -// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. -message QueryServiceRequest { - string origin = 1; + // document is the DID document + Document document = 1; } // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. message QueryServiceResponse { - // options is the PublicKeyCredentialAttestationOptions - string options = 1; + Service service = 1; } +// QueryTokenResponse is the response type for the Query/LoginOptions RPC method. +message QueryTokenResponse { + bool success = 1; + Token token = 2; + string error = 3; +} diff --git a/proto/did/v1/state.proto b/proto/did/v1/state.proto index 2ab347b73..6a00cb6cb 100644 --- a/proto/did/v1/state.proto +++ b/proto/did/v1/state.proto @@ -2,17 +2,32 @@ syntax = "proto3"; package did.v1; -option go_package = "github.com/onsonr/hway/x/did/types"; - import "cosmos/orm/v1/orm.proto"; import "did/v1/genesis.proto"; import "did/v1/models.proto"; +option go_package = "github.com/onsonr/sonr/x/did/types"; + // Assertion represents strongly created credentials (e.g., Passkeys, SSH, GPG, Native Secure Enclaave) message Assertion { option (cosmos.orm.v1.table) = { - id: 1 + id: 1 primary_key: {fields: "id"} + index: { + id: 1 + fields: "subject,origin" + unique: true + } + index: { + id: 2 + fields: "controller,origin" + unique: true + } + index: { + id: 3 + fields: "controller,credential_label" + unique: true + } }; // The unique identifier of the attestation @@ -27,8 +42,17 @@ message Assertion { // The value of the linked identifier bytes credential_id = 4; + // The display label of the attestation + string credential_label = 5; + + // The origin of the attestation + string origin = 6; + + // The subject of the attestation + string subject = 7; + // Metadata is optional additional information about the assertion - Metadata metadata = 5; + Metadata metadata = 8; } // Attestation represents linked identifiers (e.g., Crypto Accounts, Github, Email, Phone) @@ -36,7 +60,16 @@ message Attestation { option (cosmos.orm.v1.table) = { id: 2 primary_key: {fields: "id"} - index: { id: 1, fields: "subject,origin", unique: true } + index: { + id: 1 + fields: "subject,origin" + unique: true + } + index: { + id: 2 + fields: "controller,origin" + unique: true + } }; // The unique identifier of the attestation @@ -58,12 +91,21 @@ message Attestation { Metadata metadata = 6; } - // Controller represents a Sonr DWN Vault message Controller { option (cosmos.orm.v1.table) = { id: 3 primary_key: {fields: "id"} + index: { + id: 1 + fields: "address" + unique: true + } + index: { + id: 2 + fields: "vault_cid" + unique: true + } }; // The unique identifier of the controller @@ -72,8 +114,11 @@ message Controller { // The DID of the controller string address = 2; + // Aliases of the controller + repeated string aliases = 3; + // PubKey is the verification method - PubKey public_key = 4; + PubKey public_key = 4; // The vault address or identifier string vault_cid = 5; @@ -84,6 +129,20 @@ message Delegation { option (cosmos.orm.v1.table) = { id: 4 primary_key: {fields: "id"} + index: { + id: 1 + fields: "account_address,chain_id" + unique: true + } + index: { + id: 2 + fields: "controller,account_label" + unique: true + } + index: { + id: 3 + fields: "controller,chain_id" + } }; // The unique identifier of the delegation @@ -93,17 +152,36 @@ message Delegation { string controller = 2; // Resolved from module parameters - string chain_info_id = 3; + string chain_index = 3; // The delegation proof or verification method - PubKey public_key = 4; + PubKey public_key = 4; + + // The Account Address + string account_address = 5; + + // The Account label + string account_label = 6; + + // The Chain ID + string chain_id = 7; } -// Service represents a service in a DID Document -message Service { +// ServiceRecord represents a decentralized service in a DID Document +message ServiceRecord { option (cosmos.orm.v1.table) = { id: 5 primary_key: {fields: "id"} + index: { + id: 1 + fields: "origin_uri" + unique: true + } + index: { + id: 2 + fields: "controller,origin_uri" + unique: true + } }; // The ID of the service @@ -113,14 +191,20 @@ message Service { string service_type = 2; // The controller DID of the service - string controller_did = 3; + string controller = 3; // The domain name of the service string origin_uri = 4; + // The description of the service + string description = 5; + // The service endpoint - map service_endpoints = 5; + map service_endpoints = 6; // Scopes is the Authorization Grants of the service - Permissions permissions = 6; + Permissions permissions = 7; + + // Metadata is optional additional information about the service + Metadata metadata = 8; } diff --git a/proto/did/v1/tx.proto b/proto/did/v1/tx.proto index ee65f158a..c69f20c3c 100644 --- a/proto/did/v1/tx.proto +++ b/proto/did/v1/tx.proto @@ -3,34 +3,37 @@ syntax = "proto3"; package did.v1; import "cosmos/msg/v1/msg.proto"; -import "did/v1/models.proto"; -import "did/v1/genesis.proto"; -import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; -option go_package = "github.com/onsonr/hway/x/did/types"; +import "did/v1/constants.proto"; +import "did/v1/genesis.proto"; +import "did/v1/models.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/onsonr/sonr/x/did/types"; // Msg defines the Msg service. service Msg { - option (cosmos.msg.v1.service) = true; - // UpdateParams defines a governance operation for updating the parameters. - // - // Since: cosmos-sdk 0.47 - rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); + option (cosmos.msg.v1.service) = true; + // UpdateParams defines a governance operation for updating the parameters. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); - // Authenticate asserts the given controller is the owner of the given address. - rpc Authenticate(MsgAuthenticate) returns (MsgAuthenticateResponse); + // Authorize asserts the given controller is the owner of the given address. + rpc Authorize(MsgAuthorize) returns (MsgAuthorizeResponse); - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - rpc ProveWitness(MsgProveWitness) returns (MsgProveWitnessResponse); + // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. + // this operation is called by services initiating a controller registration. + rpc AllocateVault(MsgAllocateVault) returns (MsgAllocateVaultResponse); - // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. - rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse); + // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. + rpc SyncVault(MsgSyncVault) returns (MsgSyncVaultResponse); - // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. - rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse); + // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. + rpc RegisterController(MsgRegisterController) returns (MsgRegisterControllerResponse); - // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. - rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse); + // RegisterService initializes a Service with a given permission scope and URI. The domain must have a valid TXT record containing the public key. + rpc RegisterService(MsgRegisterService) returns (MsgRegisterServiceResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. @@ -43,9 +46,10 @@ message MsgUpdateParams { string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // params defines the parameters to update. - // - // NOTE: All parameters must be supplied. Params params = 2 [(gogoproto.nullable) = false]; + + // token is the macron token to authenticate the operation. + Token token = 3; } // MsgUpdateParamsResponse defines the response structure for executing a @@ -54,25 +58,28 @@ message MsgUpdateParams { // Since: cosmos-sdk 0.47 message MsgUpdateParamsResponse {} -// MsgAuthenticate is the message type for the Authenticate RPC. -message MsgAuthenticate { - option (cosmos.msg.v1.signer) = "authority"; +// MsgAllocateVault is the message type for the AllocateVault RPC. +message MsgAllocateVault { + option (cosmos.msg.v1.signer) = "authority"; - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // authority is the address of the service account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - // Controller is the address of the controller to authenticate. - string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // subject is a unique human-defined identifier to associate with the vault. + string subject = 2; - // Address is the address to authenticate. - string address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Origin is the origin of the request in wildcard form. - string origin = 4; + // token is the macron token to authenticate the operation. + Token token = 3; } -// MsgAuthenticateResponse is the response type for the Authenticate RPC. -message MsgAuthenticateResponse {} +// MsgAllocateVaultResponse is the response type for the AllocateVault RPC. +message MsgAllocateVaultResponse { + // CID is the content identifier of the vault. + string cid = 1; + + // ExpiryBlock is the block number at which the vault will expire. + int64 expiry_block = 2; +} // MsgProveWitness is the message type for the ProveWitness RPC. message MsgProveWitness { @@ -86,6 +93,9 @@ message MsgProveWitness { // Witness Value is the bytes of the witness. bytes witness = 3; + + // token is the macron token to authenticate the operation. + Token token = 4; } // MsgProveWitnessResponse is the response type for the ProveWitness RPC. @@ -100,12 +110,9 @@ message MsgSyncVault { // controller is the address of the controller to sync. string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // cid is the IPFS content identifier. - string cid = 2; - // Macroon is the public token to authenticate the operation. - bytes macron = 3; + // Token is the public token to authenticate the operation. + Token token = 3; } // MsgSyncVaultResponse is the response type for the SyncVault RPC. @@ -115,45 +122,90 @@ message MsgSyncVaultResponse { // MsgRegisterController is the message type for the InitializeController RPC. message MsgRegisterController { - option (cosmos.msg.v1.signer) = "authority"; - - // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Assertions is the list of assertions to initialize the controller with. - string cid = 2; - - // Keyshares is the list of keyshares to initialize the controller with. - repeated bytes keyshares = 3; - - // Verifications is the list of verifications to initialize the controller with. - repeated bytes verifications = 4; -} - -// MsgRegisterControllerResponse is the response type for the InitializeController RPC. -message MsgRegisterControllerResponse { - // Controller is the address of the initialized controller. - string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - - // Accounts are a Address Map and Supported coin Denoms for the controller - map accounts = 2; -} - -// MsgRegisterService is the message type for the RegisterService RPC. -message MsgRegisterService { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // Assertions is the list of assertions to initialize the controller with. + string cid = 2; + + // Origin is the origin of the request in wildcard form. + string origin = 3; + + // Credential is the list of keyshares to initialize the controller with. + repeated Credential authentication = 4; + + // token is the macron token to authenticate the operation. + Token token = 5; +} + +// MsgRegisterControllerResponse is the response type for the InitializeController RPC. +message MsgRegisterControllerResponse { + // Success returns true if the specified cid is valid and not already encrypted. + bool success = 1; + + // Controller is the address of the initialized controller. + string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Accounts are a Address Map and Supported coin Denoms for the controller + map accounts = 3; +} + +// MsgAuthorize is the message type for the Authorize RPC. +message MsgAuthorize { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Controller is the address of the controller to authenticate. + string controller = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Address is the address to authenticate. + string address = 3 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // Origin is the origin of the request in wildcard form. + string origin = 4; + + // token is the macron token to authenticate the operation. + Token token = 5; +} + +// MsgAuthorizeResponse is the response type for the Authorize RPC. +message MsgAuthorizeResponse { + bool success = 1; + Token token = 2; +} + +// MsgRegisterService is the message type for the RegisterService RPC. +message MsgRegisterService { + option (cosmos.msg.v1.signer) = "controller"; + + // authority is the address of the governance account. + string controller = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + // origin is the origin of the request in wildcard form. string origin_uri = 2; - // PermissionScope is the scope of the service. - repeated PermissionScope scopes = 3; + // Permissions is the scope of the service. + Permissions scopes = 3; + + // Description is the description of the service + string description = 4; + + // service_endpoints is the endpoints of the service + map service_endpoints = 5; + + // Metadata is optional additional information about the service + Metadata metadata = 6; + + // token is the macron token to authenticate the operation. + Token token = 7; } // MsgRegisterServiceResponse is the response type for the RegisterService RPC. message MsgRegisterServiceResponse { bool success = 1; + string did = 2; } diff --git a/proto/oracle/module/v1/module.proto b/proto/oracle/module/v1/module.proto index cbcb8bba3..5b4e261e4 100644 --- a/proto/oracle/module/v1/module.proto +++ b/proto/oracle/module/v1/module.proto @@ -1,6 +1,6 @@ syntax = "proto3"; -package onsonr.hway.oracle.module.v1; +package onsonr.sonr.oracle.module.v1; import "cosmos/app/v1alpha1/module.proto"; @@ -8,6 +8,6 @@ import "cosmos/app/v1alpha1/module.proto"; // Learn more: https://docs.cosmos.network/main/building-modules/depinject message Module { option (cosmos.app.v1alpha1.module) = { - go_import : "github.com/onsonr/hway" + go_import : "github.com/onsonr/sonr" }; } diff --git a/proto/oracle/v1/genesis.proto b/proto/oracle/v1/genesis.proto index 435cfa50e..80f75910c 100644 --- a/proto/oracle/v1/genesis.proto +++ b/proto/oracle/v1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package oracle.v1; -option go_package = "github.com/onsonr/hway/x/oracle/types"; +option go_package = "github.com/onsonr/sonr/x/oracle/types"; import "gogoproto/gogo.proto"; diff --git a/proto/oracle/v1/query.proto b/proto/oracle/v1/query.proto index e1c61b044..c4a8fecdc 100644 --- a/proto/oracle/v1/query.proto +++ b/proto/oracle/v1/query.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package oracle.v1; -option go_package = "github.com/onsonr/hway/x/oracle/types"; +option go_package = "github.com/onsonr/sonr/x/oracle/types"; -import "gogoproto/gogo.proto"; \ No newline at end of file +import "gogoproto/gogo.proto"; diff --git a/proto/oracle/v1/tx.proto b/proto/oracle/v1/tx.proto index e1c61b044..c4a8fecdc 100644 --- a/proto/oracle/v1/tx.proto +++ b/proto/oracle/v1/tx.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package oracle.v1; -option go_package = "github.com/onsonr/hway/x/oracle/types"; +option go_package = "github.com/onsonr/sonr/x/oracle/types"; -import "gogoproto/gogo.proto"; \ No newline at end of file +import "gogoproto/gogo.proto"; diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index bb57f7139..aeac42056 100644 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -2,7 +2,7 @@ set -e -GO_MOD_PACKAGE="github.com/onsonr/hway" +GO_MOD_PACKAGE="github.com/onsonr/sonr" echo "Generating gogo proto code" cd proto diff --git a/scripts/test_ics_node.sh b/scripts/test_ics_node.sh new file mode 100644 index 000000000..98f1589e0 --- /dev/null +++ b/scripts/test_ics_node.sh @@ -0,0 +1,152 @@ +#!/bin/bash +# Run this script to quickly install, setup, and run the current version of the network. +# +# Examples: +# CHAIN_ID="localchain-1" HOME_DIR="~/.simapp" BLOCK_TIME="1000ms" CLEAN=true sh scripts/test_ics_node.sh +# CHAIN_ID="localchain-2" HOME_DIR="~/.simapp" CLEAN=true RPC=36657 REST=2317 PROFF=6061 P2P=36656 GRPC=8090 GRPC_WEB=8091 ROSETTA=8081 BLOCK_TIME="500ms" sh scripts/test_ics_node.sh + +set -eu + +export KEY="acc0" +export KEY2="acc1" + +export CHAIN_ID=${CHAIN_ID:-"localchain-1"} +export MONIKER="localvalidator" +export KEYALGO="secp256k1" +export KEYRING=${KEYRING:-"test"} +export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.simapp"}") +export BINARY=${BINARY:-wasmd} +export DENOM=${DENOM:-token} + +export CLEAN=${CLEAN:-"false"} +export RPC=${RPC:-"26657"} +export REST=${REST:-"1317"} +export PROFF=${PROFF:-"6060"} +export P2P=${P2P:-"26656"} +export GRPC=${GRPC:-"9090"} +export GRPC_WEB=${GRPC_WEB:-"9091"} +export ROSETTA=${ROSETTA:-"8080"} +export BLOCK_TIME=${BLOCK_TIME:-"5s"} + +config_toml="${HOME_DIR}/config/config.toml" +client_toml="${HOME_DIR}/config/client.toml" +app_toml="${HOME_DIR}/config/app.toml" +genesis_json="${HOME_DIR}/config/genesis.json" + +# if which binary does not exist, install it +if [ -z $(which $BINARY) ]; then + make install + + if [ -z $(which $BINARY) ]; then + echo "Ensure $BINARY is installed and in your PATH" + exit 1 + fi +fi + +command -v $BINARY >/dev/null 2>&1 || { + echo >&2 "$BINARY command not found. Ensure this is setup / properly installed in your GOPATH (make install)." + exit 1 +} +command -v jq >/dev/null 2>&1 || { + echo >&2 "jq not installed. More info: https://stedolan.github.io/jq/download/" + exit 1 +} + +set_config() { + $BINARY config set client chain-id $CHAIN_ID + $BINARY config set client keyring-backend $KEYRING +} +set_config + +from_scratch() { + # Fresh install on current branch + make install + + # remove existing daemon files. + if [ ${#HOME_DIR} -le 2 ]; then + echo "HOME_DIR must be more than 2 characters long" + return + fi + rm -rf $HOME_DIR && echo "Removed $HOME_DIR" + + # reset values if not set already after whipe + set_config + + add_key() { + key=$1 + mnemonic=$2 + echo $mnemonic | $BINARY keys add $key --home $HOME_DIR --keyring-backend $KEYRING --algo $KEYALGO --recover + } + + # cosmos1efd63aw40lxf3n4mhf7dzhjkr453axur6cpk92 + add_key $KEY "decorate bright ozone fork gallery riot bus exhaust worth way bone indoor calm squirrel merry zero scheme cotton until shop any excess stage laundry" + # cosmos1hj5fveer5cjtn4wd6wstzugjfdxzl0xpxvjjvr + add_key $KEY2 "wealth flavor believe regret funny network recall kiss grape useless pepper cram hint member few certain unveil rather brick bargain curious require crowd raise" + + $BINARY init $CHAIN_ID --chain-id $CHAIN_ID --overwrite --default-denom $DENOM --home $HOME_DIR + + update_test_genesis() { + cat $HOME_DIR/config/genesis.json | jq "$1" >$HOME_DIR/config/tmp_genesis.json && mv $HOME_DIR/config/tmp_genesis.json $HOME_DIR/config/genesis.json + } + + # === CORE MODULES === + # block + update_test_genesis '.consensus_params["block"]["max_gas"]="100000000"' + # crisis + update_test_genesis $(printf '.app_state["crisis"]["constant_fee"]={"denom":"%s","amount":"1000"}' $DENOM) + + # === CUSTOM MODULES === + # tokenfactory + update_test_genesis '.app_state["tokenfactory"]["params"]["denom_creation_fee"]=[]' + update_test_genesis '.app_state["tokenfactory"]["params"]["denom_creation_gas_consume"]=100000' + + $BINARY keys list --keyring-backend $KEYRING --home $HOME_DIR + + # Allocate genesis accounts + $BINARY genesis add-genesis-account $KEY 10000000$DENOM,900test --keyring-backend $KEYRING --home $HOME_DIR --append + $BINARY genesis add-genesis-account $KEY2 10000000$DENOM,800test --keyring-backend $KEYRING --home $HOME_DIR --append + + # ICS provider genesis hack + HACK_DIR=icshack-1 && echo $HACK_DIR + rm -rf $HACK_DIR + cp -r ${HOME_DIR} $HACK_DIR + + $BINARY add-consumer-section provider --home $HACK_DIR + ccvjson=$(jq '.app_state["ccvconsumer"]' $HACK_DIR/config/genesis.json) + echo $ccvjson + jq '.app_state["ccvconsumer"] = '"$ccvjson" ${HACK_DIR}/config/genesis.json >json.tmp && mv json.tmp $genesis_json + rm -rf $HACK_DIR + + update_test_genesis $(printf '.app_state["ccvconsumer"]["params"]["unbonding_period"]="%s"' "240s") +} + +# check if CLEAN is not set to false +if [ "$CLEAN" != "false" ]; then + echo "Starting from a clean state" + from_scratch +fi + +# Opens the RPC endpoint to outside connections +sed -i -e 's/laddr = "tcp:\/\/127.0.0.1:26657"/c\laddr = "tcp:\/\/0.0.0.0:'$RPC'"/g' $HOME_DIR/config/config.toml +sed -i -e 's/cors_allowed_origins = \[\]/cors_allowed_origins = \["\*"\]/g' $HOME_DIR/config/config.toml + +# REST endpoint +sed -i -e 's/address = "tcp:\/\/localhost:1317"/address = "tcp:\/\/0.0.0.0:'$REST'"/g' $HOME_DIR/config/app.toml +sed -i -e 's/enable = false/enable = true/g' $HOME_DIR/config/app.toml + +# peer exchange +sed -i -e 's/pprof_laddr = "localhost:6060"/pprof_laddr = "localhost:'$PROFF'"/g' $HOME_DIR/config/config.toml +sed -i -e 's/laddr = "tcp:\/\/0.0.0.0:26656"/laddr = "tcp:\/\/0.0.0.0:'$P2P'"/g' $HOME_DIR/config/config.toml + +# GRPC +sed -i -e 's/address = "localhost:9090"/address = "0.0.0.0:'$GRPC'"/g' $HOME_DIR/config/app.toml +sed -i -e 's/address = "localhost:9091"/address = "0.0.0.0:'$GRPC_WEB'"/g' $HOME_DIR/config/app.toml + +# Rosetta Api +sed -i -e 's/address = ":8080"/address = "0.0.0.0:'$ROSETTA'"/g' $HOME_DIR/config/app.toml + +# Faster blocks +sed -i -e 's/timeout_commit = "5s"/timeout_commit = "'$BLOCK_TIME'"/g' $HOME_DIR/config/config.toml + +# Start the daemon in the background +$BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" --home $HOME_DIR diff --git a/scripts/test_node.sh b/scripts/test_node.sh index e17d0a923..45ad8f58c 100644 --- a/scripts/test_node.sh +++ b/scripts/test_node.sh @@ -8,15 +8,15 @@ export KEY="user1" export KEY2="user2" -export CHAIN_ID=${CHAIN_ID:-"local-1"} -export MONIKER="localvalidator" +export CHAIN_ID=${CHAIN_ID:-"sonr-testnet-1"} +export MONIKER="florence" export KEYALGO="secp256k1" export KEYRING=${KEYRING:-"test"} -export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.core"}") +export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.sonr"}") export BINARY=${BINARY:-sonrd} export DENOM=${DENOM:-usnr} -export CLEAN=${CLEAN:-"false"} +export CLEAN=${CLEAN:-"true"} export RPC=${RPC:-"26657"} export REST=${REST:-"1317"} export PROFF=${PROFF:-"6060"} @@ -106,8 +106,8 @@ from_scratch () { update_test_genesis '.app_state["poa"]["params"]["admins"]=["idx10d07y265gmmuvt4z0w9aw880jnsr700j9kqcfa"]' # Allocate genesis accounts - BINARY genesis add-genesis-account $KEY 10000000$DENOM,900test --keyring-backend $KEYRING - BINARY genesis add-genesis-account $KEY2 10000000$DENOM,800test --keyring-backend $KEYRING + BINARY genesis add-genesis-account $KEY 10000000$DENOM,900snr --keyring-backend $KEYRING + BINARY genesis add-genesis-account $KEY2 10000000$DENOM,800snr --keyring-backend $KEYRING # Sign genesis transaction BINARY genesis gentx $KEY 1000000$DENOM --keyring-backend $KEYRING --chain-id $CHAIN_ID @@ -153,4 +153,4 @@ sed -i 's/address = ":8080"/address = "0.0.0.0:'$ROSETTA'"/g' $HOME_DIR/config/a sed -i 's/timeout_commit = "5s"/timeout_commit = "'$BLOCK_TIME'"/g' $HOME_DIR/config/config.toml # Start the node with 0 gas fees -BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" \ No newline at end of file +BINARY start --pruning=nothing --minimum-gas-prices=0$DENOM --rpc.laddr="tcp://0.0.0.0:$RPC" diff --git a/x/did/autocli.go b/x/did/autocli.go index bc41bbd28..c5fe6ab80 100644 --- a/x/did/autocli.go +++ b/x/did/autocli.go @@ -3,7 +3,7 @@ package module import ( autocliv1 "cosmossdk.io/api/cosmos/autocli/v1" - modulev1 "github.com/onsonr/hway/api/did/v1" + modulev1 "github.com/onsonr/sonr/api/did/v1" ) // AutoCLIOptions implements the autocli.HasAutoCLIConfig interface. diff --git a/x/did/depinject.go b/x/did/depinject.go index 49c633393..c4f05d78a 100644 --- a/x/did/depinject.go +++ b/x/did/depinject.go @@ -17,8 +17,8 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" - modulev1 "github.com/onsonr/hway/api/did/module/v1" - "github.com/onsonr/hway/x/did/keeper" + modulev1 "github.com/onsonr/sonr/api/did/module/v1" + "github.com/onsonr/sonr/x/did/keeper" ) var _ appmodule.AppModule = AppModule{} diff --git a/x/did/keeper/genesis.go b/x/did/keeper/genesis.go index 4259878eb..85e5dbfc6 100644 --- a/x/did/keeper/genesis.go +++ b/x/did/keeper/genesis.go @@ -4,7 +4,7 @@ import ( "context" "cosmossdk.io/log" - "github.com/onsonr/hway/x/did/types" + "github.com/onsonr/sonr/x/did/types" ) // Logger returns the logger diff --git a/x/did/keeper/genesis_test.go b/x/did/keeper/genesis_test.go index 806c86474..e92aaf280 100644 --- a/x/did/keeper/genesis_test.go +++ b/x/did/keeper/genesis_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/onsonr/hway/x/did/types" + "github.com/onsonr/sonr/x/did/types" ) func TestGenesis(t *testing.T) { @@ -20,7 +20,6 @@ func TestGenesis(t *testing.T) { err := f.k.InitGenesis(f.ctx, genesisState) require.NoError(t, err) - got := f.k.ExportGenesis(f.ctx) require.NotNil(t, got) diff --git a/x/did/keeper/keeper.go b/x/did/keeper/keeper.go index 96989763d..3578eddd4 100644 --- a/x/did/keeper/keeper.go +++ b/x/did/keeper/keeper.go @@ -10,8 +10,8 @@ import ( authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" - apiv1 "github.com/onsonr/hway/api/did/v1" - "github.com/onsonr/hway/x/did/types" + apiv1 "github.com/onsonr/sonr/api/did/v1" + "github.com/onsonr/sonr/x/did/types" ) // Keeper defines the middleware keeper. diff --git a/x/did/keeper/keeper_test.go b/x/did/keeper/keeper_test.go index 60f152f6c..b474f6cdd 100644 --- a/x/did/keeper/keeper_test.go +++ b/x/did/keeper/keeper_test.go @@ -26,9 +26,9 @@ import ( "cosmossdk.io/core/store" - module "github.com/onsonr/hway/x/did" - "github.com/onsonr/hway/x/did/keeper" - "github.com/onsonr/hway/x/did/types" + module "github.com/onsonr/sonr/x/did" + "github.com/onsonr/sonr/x/did/keeper" + "github.com/onsonr/sonr/x/did/types" "github.com/strangelove-ventures/poa" ) diff --git a/x/did/keeper/querier.go b/x/did/keeper/querier.go index 9833169ce..0131f5a91 100644 --- a/x/did/keeper/querier.go +++ b/x/did/keeper/querier.go @@ -5,8 +5,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" - // "github.com/onsonr/hway/internal/local" - "github.com/onsonr/hway/x/did/types" + // "github.com/onsonr/sonr/internal/local" + "github.com/onsonr/sonr/x/did/types" ) var _ types.QueryServer = Querier{} @@ -20,7 +20,7 @@ func NewQuerier(keeper Keeper) Querier { } // Params returns the total set of did parameters. -func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { +func (k Querier) Params(c context.Context, req *types.QueryRequest) (*types.QueryParamsResponse, error) { ctx := sdk.UnwrapSDKContext(c) p, err := k.Keeper.Params.Get(ctx) @@ -32,31 +32,31 @@ func (k Querier) Params(c context.Context, req *types.QueryParamsRequest) (*type } // Accounts implements types.QueryServer. -func (k Querier) Accounts(goCtx context.Context, req *types.QueryAccountsRequest) (*types.QueryAccountsResponse, error) { +func (k Querier) Accounts(goCtx context.Context, req *types.QueryRequest) (*types.QueryAccountsResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryAccountsResponse{}, nil } // Credentials implements types.QueryServer. -func (k Querier) Credentials(goCtx context.Context, req *types.QueryCredentialsRequest) (*types.QueryCredentialsResponse, error) { +func (k Querier) Credentials(goCtx context.Context, req *types.QueryRequest) (*types.QueryCredentialsResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryCredentialsResponse{}, nil } -// Identities implements types.QueryServer. -func (k Querier) Identities(goCtx context.Context, req *types.QueryIdentitiesRequest) (*types.QueryIdentitiesResponse, error) { - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.QueryIdentitiesResponse{}, nil -} - // Resolve implements types.QueryServer. -func (k Querier) Resolve(goCtx context.Context, req *types.QueryResolveRequest) (*types.QueryResolveResponse, error) { +func (k Querier) Resolve(goCtx context.Context, req *types.QueryRequest) (*types.QueryResolveResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryResolveResponse{}, nil } // Service implements types.QueryServer. -func (k Querier) Service(goCtx context.Context, req *types.QueryServiceRequest) (*types.QueryServiceResponse, error) { +func (k Querier) Service(goCtx context.Context, req *types.QueryRequest) (*types.QueryServiceResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) return &types.QueryServiceResponse{}, nil } + +// Token implements types.QueryServer. +func (k Querier) Token(goCtx context.Context, req *types.QueryRequest) (*types.QueryTokenResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + return &types.QueryTokenResponse{}, nil +} diff --git a/x/did/keeper/server.go b/x/did/keeper/server.go index b0d9c84de..03176b242 100644 --- a/x/did/keeper/server.go +++ b/x/did/keeper/server.go @@ -7,8 +7,9 @@ import ( govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" "cosmossdk.io/errors" - didv1 "github.com/onsonr/hway/api/did/v1" - "github.com/onsonr/hway/x/did/types" + didv1 "github.com/onsonr/sonr/api/did/v1" + "github.com/onsonr/sonr/internal/files" + "github.com/onsonr/sonr/x/did/types" ) type msgServer struct { @@ -31,13 +32,23 @@ func (ms msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams return nil, ms.k.Params.Set(ctx, msg.Params) } -// Authenticate implements types.MsgServer. -func (ms msgServer) Authenticate(ctx context.Context, msg *types.MsgAuthenticate) (*types.MsgAuthenticateResponse, error) { +// Authorize implements types.MsgServer. +func (ms msgServer) Authorize(ctx context.Context, msg *types.MsgAuthorize) (*types.MsgAuthorizeResponse, error) { if ms.k.authority != msg.Authority { return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) } // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgAuthenticateResponse{}, nil + return &types.MsgAuthorizeResponse{}, nil +} + +// AllocateVault implements types.MsgServer. +func (ms msgServer) AllocateVault(goCtx context.Context, msg *types.MsgAllocateVault) (*types.MsgAllocateVaultResponse, error) { + // ctx := sdk.UnwrapSDKContext(goCtx) + err := files.Assemble("/tmp/sonr-testnet-1/vaults/0") + if err != nil { + return nil, err + } + return &types.MsgAllocateVaultResponse{}, nil } // RegisterController implements types.MsgServer. @@ -46,26 +57,25 @@ func (ms msgServer) RegisterController(goCtx context.Context, msg *types.MsgRegi return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) } ctx := sdk.UnwrapSDKContext(goCtx) - svc := didv1.Service{ - ControllerDid: msg.Authority, + svc := didv1.ServiceRecord{ + Controller: msg.Authority, } - ms.k.OrmDB.ServiceTable().Insert(ctx, &svc) + ms.k.OrmDB.ServiceRecordTable().Insert(ctx, &svc) return &types.MsgRegisterControllerResponse{}, nil } // RegisterService implements types.MsgServer. func (ms msgServer) RegisterService(ctx context.Context, msg *types.MsgRegisterService) (*types.MsgRegisterServiceResponse, error) { - if ms.k.authority != msg.Authority { - return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Authority) + if ms.k.authority != msg.Controller { + return nil, errors.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", ms.k.authority, msg.Controller) } - // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgRegisterServiceResponse{}, nil -} -// ProveWitness implements types.MsgServer. -func (ms msgServer) ProveWitness(ctx context.Context, msg *types.MsgProveWitness) (*types.MsgProveWitnessResponse, error) { // ctx := sdk.UnwrapSDKContext(goCtx) - return &types.MsgProveWitnessResponse{}, nil + svc := didv1.ServiceRecord{ + Controller: msg.Controller, + } + ms.k.OrmDB.ServiceRecordTable().Insert(ctx, &svc) + return &types.MsgRegisterServiceResponse{}, nil } // SyncVault implements types.MsgServer. diff --git a/x/did/keeper/server_test.go b/x/did/keeper/server_test.go deleted file mode 100644 index f403f0cb5..000000000 --- a/x/did/keeper/server_test.go +++ /dev/null @@ -1,55 +0,0 @@ -package keeper_test - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/onsonr/hway/x/did/types" -) - -func TestParams(t *testing.T) { - f := SetupTest(t) - require := require.New(t) - - testCases := []struct { - name string - request *types.MsgUpdateParams - err bool - }{ - { - name: "fail; invalid authority", - request: &types.MsgUpdateParams{ - Authority: f.addrs[0].String(), - Params: types.DefaultParams(), - }, - err: true, - }, - { - name: "success", - request: &types.MsgUpdateParams{ - Authority: f.govModAddr, - Params: types.DefaultParams(), - }, - err: false, - }, - } - - for _, tc := range testCases { - tc := tc - t.Run(tc.name, func(t *testing.T) { - _, err := f.msgServer.UpdateParams(f.ctx, tc.request) - - if tc.err { - require.Error(err) - } else { - require.NoError(err) - - r, err := f.queryServer.Params(f.ctx, &types.QueryParamsRequest{}) - require.NoError(err) - - require.EqualValues(&tc.request.Params, r.Params) - } - }) - } -} diff --git a/x/did/keeper/state.go b/x/did/keeper/state.go index b64f6c9e5..947d1e4a0 100644 --- a/x/did/keeper/state.go +++ b/x/did/keeper/state.go @@ -1,9 +1,13 @@ package keeper -func (k Keeper) insertAliasFromDisplayName() { -} +import ( + didv1 "github.com/onsonr/sonr/api/did/v1" + "github.com/onsonr/sonr/x/did/types" -func (k Keeper) insertAssertionFromIdentity() { + sdk "github.com/cosmos/cosmos-sdk/types" +) + +func (k Keeper) convertProfileToVerification() { } func (k Keeper) insertAuthenticationFromCredential() { @@ -12,5 +16,22 @@ func (k Keeper) insertAuthenticationFromCredential() { func (k Keeper) insertControllerFromMotrVault() { } -func (k Keeper) insertDelegationFromAccount() { +func (k Keeper) insertDelegationFromAccount(ctx sdk.Context, address string, label string) (*didv1.Delegation, error) { + del, err := k.OrmDB.DelegationTable().GetByControllerAccountLabel(ctx, address, label) + if err != nil { + return nil, err + } + return del, nil +} + +func (k Keeper) insertServiceRecord(ctx sdk.Context, msg *types.MsgRegisterService) error { + record, err := msg.ExtractServiceRecord() + if err != nil { + return err + } + err = k.OrmDB.ServiceRecordTable().Insert(ctx, record) + if err != nil { + return err + } + return nil } diff --git a/x/did/keeper/validate.go b/x/did/keeper/validate.go new file mode 100644 index 000000000..ce070b372 --- /dev/null +++ b/x/did/keeper/validate.go @@ -0,0 +1,14 @@ +package keeper + +import sdk "github.com/cosmos/cosmos-sdk/types" + +func (k Keeper) ValidServiceOrigin(ctx sdk.Context, origin string) bool { + rec, err := k.OrmDB.ServiceRecordTable().GetByOriginUri(ctx, origin) + if err != nil { + return false + } + if rec == nil { + return false + } + return true +} diff --git a/x/did/module.go b/x/did/module.go index fbde2aad2..9f61da1f2 100644 --- a/x/did/module.go +++ b/x/did/module.go @@ -18,8 +18,8 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/module" - "github.com/onsonr/hway/x/did/keeper" - "github.com/onsonr/hway/x/did/types" + "github.com/onsonr/sonr/x/did/keeper" + "github.com/onsonr/sonr/x/did/types" // this line is used by starport scaffolding # 1 ) diff --git a/x/did/types/accounts.pb.go b/x/did/types/accounts.pb.go index c9102852a..b35007bdb 100644 --- a/x/did/types/accounts.pb.go +++ b/x/did/types/accounts.pb.go @@ -176,7 +176,7 @@ func init() { func init() { proto.RegisterFile("did/v1/accounts.proto", fileDescriptor_2125a09fb14c3bc3) } var fileDescriptor_2125a09fb14c3bc3 = []byte{ - // 148 bytes of a gzipped FileDescriptorProto + // 145 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4d, 0xc9, 0x4c, 0xd1, 0x2f, 0x33, 0xd4, 0x4f, 0x4c, 0x4e, 0xce, 0x2f, 0xcd, 0x2b, 0x29, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x4b, 0xc9, 0x4c, 0xd1, 0x2b, 0x33, 0x54, 0xe2, 0xe1, 0xe2, 0x72, 0x2a, 0x49, @@ -184,9 +184,9 @@ var fileDescriptor_2125a09fb14c3bc3 = []byte{ 0x5e, 0x11, 0x94, 0xe7, 0x64, 0x73, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x4a, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, 0xb9, 0xfa, 0xf9, 0x79, 0xc5, 0xf9, - 0x79, 0x45, 0xfa, 0x19, 0xe5, 0x89, 0x95, 0xfa, 0x15, 0xfa, 0x20, 0x97, 0x94, 0x54, 0x16, 0xa4, - 0x16, 0x27, 0xb1, 0x81, 0x1d, 0x61, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x96, 0xc2, 0x4c, 0x7c, - 0x9d, 0x00, 0x00, 0x00, + 0x79, 0x45, 0xfa, 0x60, 0xa2, 0x42, 0x1f, 0xe4, 0x92, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, + 0xb0, 0x23, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x82, 0x7e, 0x89, 0x0a, 0x9d, 0x00, 0x00, + 0x00, } func (m *BtcAccount) Marshal() (dAtA []byte, err error) { diff --git a/x/did/types/codec.go b/x/did/types/codec.go index 4e875afeb..2cb3dbf04 100644 --- a/x/did/types/codec.go +++ b/x/did/types/codec.go @@ -4,6 +4,7 @@ import ( "github.com/cosmos/cosmos-sdk/codec" "github.com/cosmos/cosmos-sdk/codec/types" cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" // this line is used by starport scaffolding # 1 @@ -26,16 +27,17 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } func RegisterInterfaces(registry types.InterfaceRegistry) { - //registry.RegisterImplementations( - //(*cryptotypes.PubKey)(nil), - // &PublicKey{}, - //) + registry.RegisterImplementations( + (*cryptotypes.PubKey)(nil), + &PubKey{}, + ) registry.RegisterImplementations( (*sdk.Msg)(nil), &MsgUpdateParams{}, &MsgRegisterController{}, &MsgRegisterService{}, + &MsgAllocateVault{}, ) msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) } diff --git a/x/did/types/coins.go b/x/did/types/constants.go similarity index 100% rename from x/did/types/coins.go rename to x/did/types/constants.go diff --git a/x/did/types/constants.pb.go b/x/did/types/constants.pb.go new file mode 100644 index 000000000..99f16378e --- /dev/null +++ b/x/did/types/constants.pb.go @@ -0,0 +1,445 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: did/v1/constants.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + math "math" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// AssetType defines the type of asset: native, wrapped, staking, pool, or unspecified +type AssetType int32 + +const ( + AssetType_ASSET_TYPE_UNSPECIFIED AssetType = 0 + AssetType_ASSET_TYPE_NATIVE AssetType = 1 + AssetType_ASSET_TYPE_WRAPPED AssetType = 2 + AssetType_ASSET_TYPE_STAKING AssetType = 3 + AssetType_ASSET_TYPE_POOL AssetType = 4 + AssetType_ASSET_TYPE_IBC AssetType = 5 + AssetType_ASSET_TYPE_CW20 AssetType = 6 +) + +var AssetType_name = map[int32]string{ + 0: "ASSET_TYPE_UNSPECIFIED", + 1: "ASSET_TYPE_NATIVE", + 2: "ASSET_TYPE_WRAPPED", + 3: "ASSET_TYPE_STAKING", + 4: "ASSET_TYPE_POOL", + 5: "ASSET_TYPE_IBC", + 6: "ASSET_TYPE_CW20", +} + +var AssetType_value = map[string]int32{ + "ASSET_TYPE_UNSPECIFIED": 0, + "ASSET_TYPE_NATIVE": 1, + "ASSET_TYPE_WRAPPED": 2, + "ASSET_TYPE_STAKING": 3, + "ASSET_TYPE_POOL": 4, + "ASSET_TYPE_IBC": 5, + "ASSET_TYPE_CW20": 6, +} + +func (x AssetType) String() string { + return proto.EnumName(AssetType_name, int32(x)) +} + +func (AssetType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{0} +} + +// DIDNamespace define the different namespaces of DID +type DIDNamespace int32 + +const ( + DIDNamespace_DID_NAMESPACE_UNSPECIFIED DIDNamespace = 0 + DIDNamespace_DID_NAMESPACE_IPFS DIDNamespace = 1 + DIDNamespace_DID_NAMESPACE_SONR DIDNamespace = 2 + DIDNamespace_DID_NAMESPACE_BITCOIN DIDNamespace = 3 + DIDNamespace_DID_NAMESPACE_ETHEREUM DIDNamespace = 4 + DIDNamespace_DID_NAMESPACE_IBC DIDNamespace = 5 + DIDNamespace_DID_NAMESPACE_WEBAUTHN DIDNamespace = 6 + DIDNamespace_DID_NAMESPACE_DWN DIDNamespace = 7 + DIDNamespace_DID_NAMESPACE_SERVICE DIDNamespace = 8 +) + +var DIDNamespace_name = map[int32]string{ + 0: "DID_NAMESPACE_UNSPECIFIED", + 1: "DID_NAMESPACE_IPFS", + 2: "DID_NAMESPACE_SONR", + 3: "DID_NAMESPACE_BITCOIN", + 4: "DID_NAMESPACE_ETHEREUM", + 5: "DID_NAMESPACE_IBC", + 6: "DID_NAMESPACE_WEBAUTHN", + 7: "DID_NAMESPACE_DWN", + 8: "DID_NAMESPACE_SERVICE", +} + +var DIDNamespace_value = map[string]int32{ + "DID_NAMESPACE_UNSPECIFIED": 0, + "DID_NAMESPACE_IPFS": 1, + "DID_NAMESPACE_SONR": 2, + "DID_NAMESPACE_BITCOIN": 3, + "DID_NAMESPACE_ETHEREUM": 4, + "DID_NAMESPACE_IBC": 5, + "DID_NAMESPACE_WEBAUTHN": 6, + "DID_NAMESPACE_DWN": 7, + "DID_NAMESPACE_SERVICE": 8, +} + +func (x DIDNamespace) String() string { + return proto.EnumName(DIDNamespace_name, int32(x)) +} + +func (DIDNamespace) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{1} +} + +// KeyAlgorithm defines the key algorithm +type KeyAlgorithm int32 + +const ( + KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED KeyAlgorithm = 0 + KeyAlgorithm_KEY_ALGORITHM_ES256 KeyAlgorithm = 1 + KeyAlgorithm_KEY_ALGORITHM_ES384 KeyAlgorithm = 2 + KeyAlgorithm_KEY_ALGORITHM_ES512 KeyAlgorithm = 3 + KeyAlgorithm_KEY_ALGORITHM_EDDSA KeyAlgorithm = 4 + KeyAlgorithm_KEY_ALGORITHM_ES256K KeyAlgorithm = 5 + KeyAlgorithm_KEY_ALGORITHM_BLS12377 KeyAlgorithm = 6 + KeyAlgorithm_KEY_ALGORITHM_KECCAK256 KeyAlgorithm = 7 +) + +var KeyAlgorithm_name = map[int32]string{ + 0: "KEY_ALGORITHM_UNSPECIFIED", + 1: "KEY_ALGORITHM_ES256", + 2: "KEY_ALGORITHM_ES384", + 3: "KEY_ALGORITHM_ES512", + 4: "KEY_ALGORITHM_EDDSA", + 5: "KEY_ALGORITHM_ES256K", + 6: "KEY_ALGORITHM_BLS12377", + 7: "KEY_ALGORITHM_KECCAK256", +} + +var KeyAlgorithm_value = map[string]int32{ + "KEY_ALGORITHM_UNSPECIFIED": 0, + "KEY_ALGORITHM_ES256": 1, + "KEY_ALGORITHM_ES384": 2, + "KEY_ALGORITHM_ES512": 3, + "KEY_ALGORITHM_EDDSA": 4, + "KEY_ALGORITHM_ES256K": 5, + "KEY_ALGORITHM_BLS12377": 6, + "KEY_ALGORITHM_KECCAK256": 7, +} + +func (x KeyAlgorithm) String() string { + return proto.EnumName(KeyAlgorithm_name, int32(x)) +} + +func (KeyAlgorithm) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{2} +} + +// KeyCurve defines the key curve +type KeyCurve int32 + +const ( + KeyCurve_KEY_CURVE_UNSPECIFIED KeyCurve = 0 + KeyCurve_KEY_CURVE_P256 KeyCurve = 1 + KeyCurve_KEY_CURVE_P384 KeyCurve = 2 + KeyCurve_KEY_CURVE_P521 KeyCurve = 3 + KeyCurve_KEY_CURVE_X25519 KeyCurve = 4 + KeyCurve_KEY_CURVE_X448 KeyCurve = 5 + KeyCurve_KEY_CURVE_ED25519 KeyCurve = 6 + KeyCurve_KEY_CURVE_ED448 KeyCurve = 7 + KeyCurve_KEY_CURVE_SECP256K1 KeyCurve = 8 +) + +var KeyCurve_name = map[int32]string{ + 0: "KEY_CURVE_UNSPECIFIED", + 1: "KEY_CURVE_P256", + 2: "KEY_CURVE_P384", + 3: "KEY_CURVE_P521", + 4: "KEY_CURVE_X25519", + 5: "KEY_CURVE_X448", + 6: "KEY_CURVE_ED25519", + 7: "KEY_CURVE_ED448", + 8: "KEY_CURVE_SECP256K1", +} + +var KeyCurve_value = map[string]int32{ + "KEY_CURVE_UNSPECIFIED": 0, + "KEY_CURVE_P256": 1, + "KEY_CURVE_P384": 2, + "KEY_CURVE_P521": 3, + "KEY_CURVE_X25519": 4, + "KEY_CURVE_X448": 5, + "KEY_CURVE_ED25519": 6, + "KEY_CURVE_ED448": 7, + "KEY_CURVE_SECP256K1": 8, +} + +func (x KeyCurve) String() string { + return proto.EnumName(KeyCurve_name, int32(x)) +} + +func (KeyCurve) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{3} +} + +// KeyEncoding defines the key encoding +type KeyEncoding int32 + +const ( + KeyEncoding_KEY_ENCODING_UNSPECIFIED KeyEncoding = 0 + KeyEncoding_KEY_ENCODING_RAW KeyEncoding = 1 + KeyEncoding_KEY_ENCODING_HEX KeyEncoding = 2 + KeyEncoding_KEY_ENCODING_MULTIBASE KeyEncoding = 3 + KeyEncoding_KEY_ENCODING_JWK KeyEncoding = 4 +) + +var KeyEncoding_name = map[int32]string{ + 0: "KEY_ENCODING_UNSPECIFIED", + 1: "KEY_ENCODING_RAW", + 2: "KEY_ENCODING_HEX", + 3: "KEY_ENCODING_MULTIBASE", + 4: "KEY_ENCODING_JWK", +} + +var KeyEncoding_value = map[string]int32{ + "KEY_ENCODING_UNSPECIFIED": 0, + "KEY_ENCODING_RAW": 1, + "KEY_ENCODING_HEX": 2, + "KEY_ENCODING_MULTIBASE": 3, + "KEY_ENCODING_JWK": 4, +} + +func (x KeyEncoding) String() string { + return proto.EnumName(KeyEncoding_name, int32(x)) +} + +func (KeyEncoding) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{4} +} + +// KeyRole defines the kind of key +type KeyRole int32 + +const ( + KeyRole_KEY_ROLE_UNSPECIFIED KeyRole = 0 + // Blockchain key types + KeyRole_KEY_ROLE_AUTHENTICATION KeyRole = 1 + KeyRole_KEY_ROLE_ASSERTION KeyRole = 2 + KeyRole_KEY_ROLE_DELEGATION KeyRole = 3 + KeyRole_KEY_ROLE_INVOCATION KeyRole = 4 +) + +var KeyRole_name = map[int32]string{ + 0: "KEY_ROLE_UNSPECIFIED", + 1: "KEY_ROLE_AUTHENTICATION", + 2: "KEY_ROLE_ASSERTION", + 3: "KEY_ROLE_DELEGATION", + 4: "KEY_ROLE_INVOCATION", +} + +var KeyRole_value = map[string]int32{ + "KEY_ROLE_UNSPECIFIED": 0, + "KEY_ROLE_AUTHENTICATION": 1, + "KEY_ROLE_ASSERTION": 2, + "KEY_ROLE_DELEGATION": 3, + "KEY_ROLE_INVOCATION": 4, +} + +func (x KeyRole) String() string { + return proto.EnumName(KeyRole_name, int32(x)) +} + +func (KeyRole) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{5} +} + +// KeyType defines the key type +type KeyType int32 + +const ( + KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 + KeyType_KEY_TYPE_OCTET KeyType = 1 + KeyType_KEY_TYPE_ELLIPTIC KeyType = 2 + KeyType_KEY_TYPE_RSA KeyType = 3 + KeyType_KEY_TYPE_SYMMETRIC KeyType = 4 + KeyType_KEY_TYPE_HMAC KeyType = 5 +) + +var KeyType_name = map[int32]string{ + 0: "KEY_TYPE_UNSPECIFIED", + 1: "KEY_TYPE_OCTET", + 2: "KEY_TYPE_ELLIPTIC", + 3: "KEY_TYPE_RSA", + 4: "KEY_TYPE_SYMMETRIC", + 5: "KEY_TYPE_HMAC", +} + +var KeyType_value = map[string]int32{ + "KEY_TYPE_UNSPECIFIED": 0, + "KEY_TYPE_OCTET": 1, + "KEY_TYPE_ELLIPTIC": 2, + "KEY_TYPE_RSA": 3, + "KEY_TYPE_SYMMETRIC": 4, + "KEY_TYPE_HMAC": 5, +} + +func (x KeyType) String() string { + return proto.EnumName(KeyType_name, int32(x)) +} + +func (KeyType) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{6} +} + +// PermissionScope define the Capabilities Controllers can grant for Services +type PermissionScope int32 + +const ( + PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 + PermissionScope_PERMISSION_SCOPE_BASIC_INFO PermissionScope = 1 + PermissionScope_PERMISSION_SCOPE_RECORDS_READ PermissionScope = 2 + PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE PermissionScope = 3 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 + PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 + PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 + PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 + PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 + PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 + PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 + PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 +) + +var PermissionScope_name = map[int32]string{ + 0: "PERMISSION_SCOPE_UNSPECIFIED", + 1: "PERMISSION_SCOPE_BASIC_INFO", + 2: "PERMISSION_SCOPE_RECORDS_READ", + 3: "PERMISSION_SCOPE_RECORDS_WRITE", + 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", + 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", + 6: "PERMISSION_SCOPE_WALLETS_READ", + 7: "PERMISSION_SCOPE_WALLETS_CREATE", + 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", + 9: "PERMISSION_SCOPE_WALLETS_UPDATE", + 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", + 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", + 12: "PERMISSION_SCOPE_ADMIN_USER", + 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", +} + +var PermissionScope_value = map[string]int32{ + "PERMISSION_SCOPE_UNSPECIFIED": 0, + "PERMISSION_SCOPE_BASIC_INFO": 1, + "PERMISSION_SCOPE_RECORDS_READ": 2, + "PERMISSION_SCOPE_RECORDS_WRITE": 3, + "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, + "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, + "PERMISSION_SCOPE_WALLETS_READ": 6, + "PERMISSION_SCOPE_WALLETS_CREATE": 7, + "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, + "PERMISSION_SCOPE_WALLETS_UPDATE": 9, + "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, + "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, + "PERMISSION_SCOPE_ADMIN_USER": 12, + "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, +} + +func (x PermissionScope) String() string { + return proto.EnumName(PermissionScope_name, int32(x)) +} + +func (PermissionScope) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_7cc61ab03a01b9c8, []int{7} +} + +func init() { + proto.RegisterEnum("did.v1.AssetType", AssetType_name, AssetType_value) + proto.RegisterEnum("did.v1.DIDNamespace", DIDNamespace_name, DIDNamespace_value) + proto.RegisterEnum("did.v1.KeyAlgorithm", KeyAlgorithm_name, KeyAlgorithm_value) + proto.RegisterEnum("did.v1.KeyCurve", KeyCurve_name, KeyCurve_value) + proto.RegisterEnum("did.v1.KeyEncoding", KeyEncoding_name, KeyEncoding_value) + proto.RegisterEnum("did.v1.KeyRole", KeyRole_name, KeyRole_value) + proto.RegisterEnum("did.v1.KeyType", KeyType_name, KeyType_value) + proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) +} + +func init() { proto.RegisterFile("did/v1/constants.proto", fileDescriptor_7cc61ab03a01b9c8) } + +var fileDescriptor_7cc61ab03a01b9c8 = []byte{ + // 902 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x95, 0xdf, 0x72, 0xda, 0x46, + 0x14, 0xc6, 0x2d, 0x83, 0xb1, 0xb3, 0x71, 0x92, 0x93, 0x4d, 0xe2, 0x24, 0x4d, 0x42, 0xd2, 0x24, + 0xd3, 0x74, 0xe8, 0x8c, 0x29, 0xd8, 0x34, 0xe9, 0x4c, 0x6f, 0x56, 0xab, 0x63, 0xb3, 0x95, 0x90, + 0x34, 0xbb, 0x0b, 0xc4, 0xbd, 0x61, 0x1c, 0xd0, 0x38, 0xcc, 0xc4, 0x88, 0x01, 0xe2, 0x29, 0x8f, + 0xd0, 0xf6, 0xa6, 0x6f, 0xd0, 0x17, 0xe8, 0x83, 0xf4, 0xd2, 0x97, 0xbd, 0xec, 0xd8, 0x7d, 0x89, + 0xde, 0x75, 0x84, 0xf8, 0x27, 0xc0, 0xbe, 0xe1, 0xe2, 0xf7, 0x7d, 0x3a, 0xfa, 0xce, 0x39, 0xcb, + 0x8a, 0xec, 0xb4, 0xda, 0xad, 0xfc, 0x59, 0x21, 0xdf, 0x0c, 0x3b, 0xfd, 0xc1, 0x71, 0x67, 0xd0, + 0xdf, 0xed, 0xf6, 0xc2, 0x41, 0x48, 0x33, 0xad, 0x76, 0x6b, 0xf7, 0xac, 0x90, 0xfb, 0xd3, 0x20, + 0x37, 0x58, 0xbf, 0x1f, 0x0c, 0xf4, 0xb0, 0x1b, 0xd0, 0x2f, 0xc8, 0x0e, 0x53, 0x0a, 0x75, 0x43, + 0x1f, 0xf9, 0xd8, 0xa8, 0xba, 0xca, 0x47, 0x2e, 0x0e, 0x04, 0x5a, 0xb0, 0x46, 0x1f, 0x90, 0xbb, + 0x73, 0x9a, 0xcb, 0xb4, 0xa8, 0x21, 0x18, 0x74, 0x87, 0xd0, 0x39, 0x5c, 0x97, 0xcc, 0xf7, 0xd1, + 0x82, 0xf5, 0x05, 0xae, 0x34, 0xb3, 0x85, 0x7b, 0x08, 0x29, 0x7a, 0x8f, 0xdc, 0x99, 0xe3, 0xbe, + 0xe7, 0x39, 0x90, 0xa6, 0x94, 0xdc, 0x9e, 0x83, 0xc2, 0xe4, 0xb0, 0xb1, 0x60, 0xe4, 0xf5, 0xe2, + 0xb7, 0x90, 0xc9, 0xfd, 0x67, 0x90, 0x6d, 0x4b, 0x58, 0xee, 0xf1, 0x69, 0xd0, 0xef, 0x1e, 0x37, + 0x03, 0xfa, 0x8c, 0x3c, 0xb6, 0x84, 0xd5, 0x70, 0x59, 0x05, 0x95, 0xcf, 0xf8, 0x62, 0xe8, 0x1d, + 0x42, 0x93, 0xb2, 0xf0, 0x0f, 0x54, 0x9c, 0x3a, 0xc9, 0x95, 0xe7, 0x4a, 0x58, 0xa7, 0x8f, 0xc9, + 0x83, 0x24, 0x37, 0x85, 0xe6, 0x9e, 0x70, 0x21, 0x15, 0xcd, 0x26, 0x29, 0xa1, 0x2e, 0xa3, 0xc4, + 0x6a, 0x05, 0xd2, 0xd1, 0x6c, 0x16, 0x5e, 0x33, 0x6a, 0x61, 0xe9, 0x91, 0x3a, 0x9a, 0xac, 0xaa, + 0xcb, 0x2e, 0x64, 0x96, 0x1f, 0xb1, 0xea, 0x2e, 0x6c, 0x2e, 0x07, 0x50, 0x28, 0x6b, 0x82, 0x23, + 0x6c, 0xe5, 0xfe, 0x35, 0xc8, 0xb6, 0x1d, 0x0c, 0xd9, 0xa7, 0x93, 0xb0, 0xd7, 0x1e, 0x7c, 0x3c, + 0x8d, 0x7a, 0xb7, 0xf1, 0xa8, 0xc1, 0x9c, 0x43, 0x4f, 0x0a, 0x5d, 0xae, 0x2c, 0xf4, 0xfe, 0x90, + 0xdc, 0x4b, 0xca, 0xa8, 0x8a, 0xa5, 0xef, 0xc0, 0x58, 0x25, 0xec, 0xbd, 0xdb, 0x87, 0xf5, 0x55, + 0x42, 0xa9, 0x50, 0x84, 0xd4, 0x0a, 0xc1, 0xb2, 0x14, 0x83, 0x34, 0x7d, 0x44, 0xee, 0xaf, 0x78, + 0x87, 0x1d, 0xf7, 0x9e, 0x54, 0x4c, 0x47, 0x15, 0x8a, 0x7b, 0x6f, 0xdf, 0x42, 0x86, 0x3e, 0x21, + 0x0f, 0x93, 0x9a, 0x8d, 0x9c, 0x33, 0x3b, 0x4a, 0xb7, 0x99, 0x3b, 0x37, 0xc8, 0x96, 0x1d, 0x0c, + 0xf9, 0xe7, 0xde, 0x59, 0x10, 0x8d, 0x23, 0x72, 0xf2, 0xaa, 0xac, 0x2d, 0xae, 0x96, 0x92, 0xdb, + 0x33, 0xc9, 0x8f, 0x3b, 0x4b, 0xb2, 0xb8, 0xa9, 0x24, 0x2b, 0x15, 0x0b, 0x90, 0xa2, 0xf7, 0x09, + 0xcc, 0xd8, 0xfb, 0x62, 0xa9, 0x54, 0xf8, 0x3e, 0x3e, 0x85, 0x73, 0x74, 0x7f, 0xff, 0x1d, 0x6c, + 0x44, 0x6b, 0x9a, 0x31, 0xb4, 0x62, 0x6b, 0x26, 0x3a, 0x9c, 0xf3, 0x38, 0xf2, 0x6e, 0x4e, 0xa6, + 0x14, 0x43, 0x85, 0x3c, 0x0a, 0x65, 0x17, 0x60, 0x2b, 0xf7, 0x8b, 0x41, 0x6e, 0xda, 0xc1, 0x10, + 0x3b, 0xcd, 0xb0, 0xd5, 0xee, 0x9c, 0xd0, 0xa7, 0xe4, 0x51, 0x64, 0x44, 0x97, 0x7b, 0x96, 0x70, + 0x0f, 0x17, 0x1a, 0x1b, 0x87, 0x9b, 0xaa, 0x92, 0xd5, 0xc1, 0x58, 0xa2, 0x65, 0x7c, 0x0f, 0xeb, + 0x93, 0x29, 0x4f, 0x69, 0xa5, 0xea, 0x68, 0x61, 0x32, 0x85, 0xb3, 0x26, 0xa7, 0xda, 0x8f, 0x75, + 0x1b, 0xd2, 0xb9, 0x5f, 0x0d, 0xb2, 0x69, 0x07, 0x43, 0x19, 0x7e, 0x0a, 0x26, 0xdb, 0x93, 0x9e, + 0xb3, 0x38, 0xdc, 0xf1, 0x86, 0x46, 0x4a, 0x74, 0x62, 0xd1, 0xd5, 0x82, 0x33, 0x2d, 0x3c, 0x37, + 0xfe, 0xf3, 0xcc, 0x44, 0xa5, 0x50, 0x8e, 0xf8, 0xf4, 0xf8, 0x8c, 0xb8, 0x85, 0x0e, 0x1e, 0xc6, + 0x0f, 0xa4, 0x12, 0x82, 0x70, 0x6b, 0xde, 0xb8, 0x52, 0x3a, 0xf7, 0x5b, 0x1c, 0x66, 0x74, 0xf7, + 0x8c, 0xc3, 0xac, 0xb8, 0x79, 0xc6, 0x7b, 0x19, 0x29, 0x1e, 0xd7, 0xa8, 0xc1, 0x98, 0xec, 0x65, + 0xc4, 0xd0, 0x71, 0x84, 0xaf, 0x05, 0x87, 0x75, 0x0a, 0x64, 0x7b, 0x8a, 0xa5, 0x62, 0x90, 0x9a, + 0x84, 0x8d, 0x6f, 0xa1, 0xa3, 0x4a, 0x05, 0xb5, 0x14, 0x1c, 0xd2, 0xf4, 0x2e, 0xb9, 0x35, 0xe5, + 0xe5, 0x0a, 0xe3, 0xb0, 0x91, 0xfb, 0x23, 0x4d, 0xee, 0xf8, 0x41, 0xef, 0xb4, 0xdd, 0xef, 0xb7, + 0xc3, 0x8e, 0x6a, 0x86, 0xdd, 0x80, 0xbe, 0x20, 0x4f, 0x7d, 0x94, 0x15, 0xa1, 0x94, 0xf0, 0xdc, + 0x86, 0xe2, 0xde, 0x52, 0xba, 0xe7, 0xe4, 0xc9, 0x92, 0xc3, 0x64, 0x4a, 0xf0, 0x86, 0x70, 0x0f, + 0x3c, 0x30, 0xe8, 0x97, 0xe4, 0xd9, 0x92, 0x41, 0x22, 0xf7, 0xa4, 0xa5, 0x1a, 0x12, 0x59, 0x74, + 0x59, 0xbe, 0x24, 0xd9, 0x2b, 0x2d, 0x75, 0x29, 0x74, 0xb4, 0xce, 0xaf, 0xc8, 0xcb, 0x25, 0x8f, + 0x96, 0xcc, 0x55, 0x8c, 0x47, 0xd3, 0x1c, 0xd7, 0x4a, 0xd3, 0x37, 0xe4, 0xd5, 0xf5, 0xbe, 0xb8, + 0xe0, 0xc6, 0xca, 0x5c, 0x75, 0xe6, 0x38, 0xa8, 0xc7, 0xb5, 0x32, 0xf4, 0x15, 0x79, 0x7e, 0xa5, + 0x85, 0x4b, 0x64, 0x1a, 0x61, 0x73, 0x65, 0xb0, 0x89, 0x49, 0x55, 0x4d, 0xc5, 0xa5, 0x30, 0x11, + 0xb6, 0xae, 0x2d, 0x56, 0xf5, 0xad, 0xa8, 0xd8, 0x0d, 0xfa, 0x35, 0x79, 0x7d, 0x7d, 0xfa, 0x1a, + 0x4a, 0x71, 0x70, 0x04, 0x84, 0x7e, 0x43, 0xde, 0x5c, 0xef, 0x34, 0xa5, 0xc7, 0x2c, 0xce, 0x94, + 0x86, 0x9b, 0x2b, 0x97, 0xc4, 0xac, 0x8a, 0x70, 0x1b, 0x55, 0x85, 0x12, 0xb6, 0xe9, 0x6b, 0xf2, + 0xe2, 0x0a, 0x43, 0x8d, 0x39, 0xc2, 0x62, 0xda, 0x93, 0x70, 0xcb, 0xfc, 0xe1, 0xaf, 0x8b, 0xac, + 0x71, 0x7e, 0x91, 0x35, 0xfe, 0xb9, 0xc8, 0x1a, 0xbf, 0x5f, 0x66, 0xd7, 0xce, 0x2f, 0xb3, 0x6b, + 0x7f, 0x5f, 0x66, 0xd7, 0x7e, 0x7a, 0x79, 0xd2, 0x1e, 0x7c, 0xfc, 0xfc, 0x61, 0xb7, 0x19, 0x9e, + 0xe6, 0xc3, 0x4e, 0x3f, 0xec, 0xf4, 0xf2, 0xa3, 0x9f, 0x9f, 0xf3, 0xd1, 0x07, 0x78, 0x30, 0xec, + 0x06, 0xfd, 0x0f, 0x99, 0xd1, 0xa7, 0x77, 0xef, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x40, 0x58, + 0x91, 0x1e, 0x94, 0x07, 0x00, 0x00, +} diff --git a/x/did/types/defaults.go b/x/did/types/defaults.go new file mode 100644 index 000000000..d1fa53027 --- /dev/null +++ b/x/did/types/defaults.go @@ -0,0 +1,109 @@ +package types + +// DefaultAssets returns the default asset infos: BTC, ETH, SNR, and USDC +func DefaultAssets() []*AssetInfo { + return []*AssetInfo{ + { + Name: "Bitcoin", + Symbol: "BTC", + Hrp: "bc", + Index: 0, + AssetType: AssetType_ASSET_TYPE_NATIVE, + IconUrl: "https://cdn.sonr.land/BTC.svg", + }, + { + Name: "Ethereum", + Symbol: "ETH", + Hrp: "eth", + Index: 64, + AssetType: AssetType_ASSET_TYPE_NATIVE, + IconUrl: "https://cdn.sonr.land/ETH.svg", + }, + { + Name: "Sonr", + Symbol: "SNR", + Hrp: "idx", + Index: 703, + AssetType: AssetType_ASSET_TYPE_NATIVE, + IconUrl: "https://cdn.sonr.land/SNR.svg", + }, + } +} + +// DefaultChains returns the default chain infos: Bitcoin, Ethereum, and Sonr. +func DefaultChains() []*ChainInfo { + return []*ChainInfo{} +} + +// DefaultKeyInfos returns the default key infos: secp256k1, ed25519, keccak256, and bls12377. +func DefaultKeyInfos() []*KeyInfo { + return []*KeyInfo{ + // + // Identity Key Info + // + // Sonr Controller Key Info + { + Role: KeyRole_KEY_ROLE_INVOCATION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256K, + Encoding: KeyEncoding_KEY_ENCODING_HEX, + }, + { + Role: KeyRole_KEY_ROLE_ASSERTION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_BLS12377, + Encoding: KeyEncoding_KEY_ENCODING_MULTIBASE, + }, + + // + // Blockchain Key Info + // + // Ethereum Key Info + { + Role: KeyRole_KEY_ROLE_DELEGATION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_KECCAK256, + Encoding: KeyEncoding_KEY_ENCODING_HEX, + }, + // Bitcoin Key Info + { + Role: KeyRole_KEY_ROLE_DELEGATION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256K, + Encoding: KeyEncoding_KEY_ENCODING_HEX, + }, + + // + // Authentication Key Info + // + // Browser based WebAuthn + { + Role: KeyRole_KEY_ROLE_AUTHENTICATION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256, + Encoding: KeyEncoding_KEY_ENCODING_RAW, + }, + // FIDO U2F + { + Role: KeyRole_KEY_ROLE_AUTHENTICATION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_ES256K, + Encoding: KeyEncoding_KEY_ENCODING_RAW, + }, + // Cross-Platform Passkeys + { + Role: KeyRole_KEY_ROLE_AUTHENTICATION, + Algorithm: KeyAlgorithm_KEY_ALGORITHM_EDDSA, + Encoding: KeyEncoding_KEY_ENCODING_RAW, + }, + } +} + +func DefaultOpenIDConfig() *OpenIDConfig { + return &OpenIDConfig{ + Issuer: "https://sonr.id", + AuthorizationEndpoint: "https://api.sonr.id/auth", + TokenEndpoint: "https://api.sonr.id/token", + UserinfoEndpoint: "https://api.sonr.id/userinfo", + ScopesSupported: []string{"openid", "profile", "email", "web3", "sonr"}, + ResponseTypesSupported: []string{"code"}, + ResponseModesSupported: []string{"query", "form_post"}, + GrantTypesSupported: []string{"authorization_code", "refresh_token"}, + AcrValuesSupported: []string{"passkey"}, + SubjectTypesSupported: []string{"public"}, + } +} diff --git a/x/did/types/pub_key.go b/x/did/types/ec_point.go similarity index 91% rename from x/did/types/pub_key.go rename to x/did/types/ec_point.go index 1ed57f2ce..8ede36958 100644 --- a/x/did/types/pub_key.go +++ b/x/did/types/ec_point.go @@ -11,7 +11,7 @@ import ( // VerifySignature verifies the signature of a message func VerifySignature(key []byte, msg []byte, sig []byte) bool { - pp, err := BuildEcPoint(key) + pp, err := buildEcPoint(key) if err != nil { return false } @@ -29,7 +29,7 @@ func VerifySignature(key []byte, msg []byte, sig []byte) bool { } // BuildEcPoint builds an elliptic curve point from a compressed byte slice -func BuildEcPoint(pubKey []byte) (*curves.EcPoint, error) { +func buildEcPoint(pubKey []byte) (*curves.EcPoint, error) { crv := curves.K256() x := new(big.Int).SetBytes(pubKey[1:33]) y := new(big.Int).SetBytes(pubKey[33:]) diff --git a/x/did/types/enums.pb.go b/x/did/types/enums.pb.go deleted file mode 100644 index 5d96c7ec0..000000000 --- a/x/did/types/enums.pb.go +++ /dev/null @@ -1,120 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/enums.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - math "math" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// PermissionScope define the Capabilities Controllers can grant for Services -type PermissionScope int32 - -const ( - PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 - PermissionScope_PERMISSION_SCOPE_PROFILE_NAME PermissionScope = 1 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE PermissionScope = 3 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 - PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 - PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 - PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 - PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 - PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 - PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 -) - -var PermissionScope_name = map[int32]string{ - 0: "PERMISSION_SCOPE_UNSPECIFIED", - 1: "PERMISSION_SCOPE_PROFILE_NAME", - 2: "PERMISSION_SCOPE_IDENTIFIERS_EMAIL", - 3: "PERMISSION_SCOPE_IDENTIFIERS_PHONE", - 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", - 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", - 6: "PERMISSION_SCOPE_WALLETS_READ", - 7: "PERMISSION_SCOPE_WALLETS_CREATE", - 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", - 9: "PERMISSION_SCOPE_WALLETS_UPDATE", - 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", - 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", - 12: "PERMISSION_SCOPE_ADMIN_USER", - 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", -} - -var PermissionScope_value = map[string]int32{ - "PERMISSION_SCOPE_UNSPECIFIED": 0, - "PERMISSION_SCOPE_PROFILE_NAME": 1, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": 2, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": 3, - "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, - "PERMISSION_SCOPE_WALLETS_READ": 6, - "PERMISSION_SCOPE_WALLETS_CREATE": 7, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, - "PERMISSION_SCOPE_WALLETS_UPDATE": 9, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, - "PERMISSION_SCOPE_ADMIN_USER": 12, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, -} - -func (x PermissionScope) String() string { - return proto.EnumName(PermissionScope_name, int32(x)) -} - -func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_001c58538597e328, []int{0} -} - -func init() { - proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) -} - -func init() { proto.RegisterFile("did/v1/enums.proto", fileDescriptor_001c58538597e328) } - -var fileDescriptor_001c58538597e328 = []byte{ - // 388 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0xd2, 0xc1, 0x6e, 0xd3, 0x30, - 0x18, 0x07, 0xf0, 0x04, 0x46, 0x01, 0x03, 0xc2, 0x58, 0x9c, 0x06, 0x64, 0x63, 0x9b, 0x18, 0x02, - 0xa9, 0xd6, 0xc4, 0x95, 0x8b, 0x93, 0x7c, 0x15, 0x96, 0x12, 0x27, 0xb2, 0x9d, 0x4d, 0x70, 0x89, - 0xd6, 0x26, 0x6a, 0x73, 0x48, 0x5c, 0x35, 0x6d, 0xa1, 0x6f, 0xc1, 0x73, 0xf0, 0x24, 0x1c, 0x7b, - 0xe4, 0x88, 0xda, 0x17, 0x41, 0x69, 0xe1, 0xd4, 0x36, 0x5c, 0x2c, 0xeb, 0xf3, 0x4f, 0x7f, 0x7d, - 0x96, 0xfe, 0x88, 0x64, 0x45, 0x46, 0xe7, 0x57, 0x34, 0xaf, 0x66, 0x65, 0xdd, 0x1d, 0x4f, 0xcc, - 0xd4, 0x90, 0x4e, 0x56, 0x64, 0xdd, 0xf9, 0xd5, 0xf1, 0xf3, 0xa1, 0x19, 0x9a, 0xcd, 0x88, 0x36, - 0xb7, 0xed, 0xeb, 0xf1, 0xb3, 0xdb, 0xb2, 0xa8, 0x0c, 0xdd, 0x9c, 0xdb, 0xd1, 0xbb, 0x1f, 0x47, - 0xe8, 0x69, 0x9c, 0x4f, 0xca, 0xa2, 0xae, 0x0b, 0x53, 0xa9, 0x81, 0x19, 0xe7, 0xe4, 0x14, 0xbd, - 0x8c, 0x41, 0x86, 0x5c, 0x29, 0x1e, 0x89, 0x54, 0x79, 0x51, 0x0c, 0x69, 0x22, 0x54, 0x0c, 0x1e, - 0xef, 0x71, 0xf0, 0xb1, 0x45, 0x5e, 0xa3, 0x57, 0x3b, 0x22, 0x96, 0x51, 0x8f, 0x07, 0x90, 0x0a, - 0x16, 0x02, 0xb6, 0xc9, 0x1b, 0x74, 0xb6, 0x43, 0xb8, 0x0f, 0x42, 0x37, 0x19, 0x52, 0xa5, 0x10, - 0x32, 0x1e, 0xe0, 0x3b, 0xff, 0x75, 0xf1, 0xa7, 0x48, 0x00, 0xbe, 0xbb, 0xd7, 0x69, 0xc9, 0x84, - 0x62, 0x9e, 0xe6, 0x91, 0x50, 0xa9, 0x04, 0xe6, 0xe3, 0x23, 0x72, 0x89, 0xce, 0xdb, 0xdd, 0x8d, - 0xe4, 0x1a, 0xf0, 0xbd, 0xbd, 0x7f, 0xb8, 0x61, 0x41, 0x00, 0xfa, 0x6f, 0x56, 0x87, 0x9c, 0xa3, - 0x93, 0x83, 0xc4, 0x93, 0xc0, 0x34, 0xe0, 0xfb, 0x7b, 0x17, 0xfb, 0x87, 0x54, 0xe2, 0x2a, 0x4f, - 0x72, 0x17, 0xf0, 0x83, 0xd6, 0xb0, 0x24, 0xf6, 0x9b, 0xb0, 0x87, 0xe4, 0x2d, 0xba, 0x68, 0xdf, - 0xfe, 0x1a, 0x24, 0xef, 0x7d, 0xc6, 0x88, 0xbc, 0x47, 0x97, 0xed, 0xd2, 0x95, 0x11, 0xf3, 0x3d, - 0xa6, 0x34, 0x7e, 0x44, 0x4e, 0xd0, 0x8b, 0x1d, 0xcc, 0xfc, 0x90, 0x8b, 0x34, 0x51, 0x20, 0xf1, - 0x63, 0x72, 0x81, 0x4e, 0x0f, 0x80, 0x6b, 0x16, 0x70, 0x9f, 0xe9, 0x48, 0xe2, 0x27, 0xee, 0xc7, - 0x9f, 0x2b, 0xc7, 0x5e, 0xae, 0x1c, 0xfb, 0xf7, 0xca, 0xb1, 0xbf, 0xaf, 0x1d, 0x6b, 0xb9, 0x76, - 0xac, 0x5f, 0x6b, 0xc7, 0xfa, 0x72, 0x36, 0x2c, 0xa6, 0xa3, 0x59, 0xbf, 0x3b, 0x30, 0x25, 0x35, - 0x55, 0x6d, 0xaa, 0x09, 0x1d, 0x7d, 0xbd, 0x5d, 0xd0, 0x6f, 0xb4, 0x29, 0xe9, 0x74, 0x31, 0xce, - 0xeb, 0x7e, 0x67, 0xd3, 0xb8, 0x0f, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9e, 0x1a, 0xa8, 0xd9, - 0xb8, 0x02, 0x00, 0x00, -} diff --git a/x/did/types/errors.go b/x/did/types/errors.go index 9a8789fce..e6ebdfcbb 100644 --- a/x/did/types/errors.go +++ b/x/did/types/errors.go @@ -12,4 +12,5 @@ var ( ErrMinimumAssertions = sdkerrors.Register(ModuleName, 300, "at least one assertion is required for account initialization") ErrInvalidControllers = sdkerrors.Register(ModuleName, 301, "no more than one controller can be used for account initialization") ErrMaximumAuthenticators = sdkerrors.Register(ModuleName, 302, "more authenticators provided than the total accepted count") + ErrUnsupportedKeyEncoding = sdkerrors.Register(ModuleName, 400, "unsupported key encoding") ) diff --git a/x/did/types/extractor.go b/x/did/types/extractor.go new file mode 100644 index 000000000..1f49d4fda --- /dev/null +++ b/x/did/types/extractor.go @@ -0,0 +1,18 @@ +package types + +import didv1 "github.com/onsonr/sonr/api/did/v1" + +func (m *MsgRegisterService) ExtractServiceRecord() (*didv1.ServiceRecord, error) { + return &didv1.ServiceRecord{ + Controller: m.Controller, + OriginUri: m.OriginUri, + Description: m.Description, + }, nil +} + +func convertPermissions(permissions *Permissions) *didv1.Permissions { + if permissions == nil { + return nil + } + return &didv1.Permissions{} +} diff --git a/x/did/types/genesis.go b/x/did/types/genesis.go index 27328baac..1541cd439 100644 --- a/x/did/types/genesis.go +++ b/x/did/types/genesis.go @@ -25,7 +25,12 @@ func (gs GenesisState) Validate() error { // DefaultParams returns default module parameters. func DefaultParams() Params { - return Params{} + return Params{ + WhitelistedAssets: DefaultAssets(), + WhitelistedChains: DefaultChains(), + AllowedPublicKeys: DefaultKeyInfos(), + OpenidConfig: DefaultOpenIDConfig(), + } } // Stringer method for Params. diff --git a/x/did/types/genesis.pb.go b/x/did/types/genesis.pb.go index 2eec3f876..a903a9f70 100644 --- a/x/did/types/genesis.pb.go +++ b/x/did/types/genesis.pb.go @@ -25,155 +25,6 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// DIDNamespace define the different namespaces of DID -type DIDNamespace int32 - -const ( - DIDNamespace_DID_NAMESPACE_UNSPECIFIED DIDNamespace = 0 - DIDNamespace_DID_NAMESPACE_IPFS DIDNamespace = 1 - DIDNamespace_DID_NAMESPACE_SONR DIDNamespace = 2 - DIDNamespace_DID_NAMESPACE_BITCOIN DIDNamespace = 3 - DIDNamespace_DID_NAMESPACE_ETHEREUM DIDNamespace = 4 - DIDNamespace_DID_NAMESPACE_IBC DIDNamespace = 5 -) - -var DIDNamespace_name = map[int32]string{ - 0: "DID_NAMESPACE_UNSPECIFIED", - 1: "DID_NAMESPACE_IPFS", - 2: "DID_NAMESPACE_SONR", - 3: "DID_NAMESPACE_BITCOIN", - 4: "DID_NAMESPACE_ETHEREUM", - 5: "DID_NAMESPACE_IBC", -} - -var DIDNamespace_value = map[string]int32{ - "DID_NAMESPACE_UNSPECIFIED": 0, - "DID_NAMESPACE_IPFS": 1, - "DID_NAMESPACE_SONR": 2, - "DID_NAMESPACE_BITCOIN": 3, - "DID_NAMESPACE_ETHEREUM": 4, - "DID_NAMESPACE_IBC": 5, -} - -func (x DIDNamespace) String() string { - return proto.EnumName(DIDNamespace_name, int32(x)) -} - -func (DIDNamespace) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{0} -} - -// KeyKTind defines the kind of key -type KeyType int32 - -const ( - KeyType_KEY_TYPE_UNSPECIFIED KeyType = 0 - // Blockchain key types - KeyType_KEY_TYPE_SECP256K1 KeyType = 1 - KeyType_KEY_TYPE_ED25519 KeyType = 2 - KeyType_KEY_TYPE_KECCAK KeyType = 3 - KeyType_KEY_TYPE_BLS12381 KeyType = 4 - KeyType_KEY_TYPE_X25519 KeyType = 5 - KeyType_KEY_TYPE_SCHNORR KeyType = 6 - // Webauthn and FIDO key types - KeyType_KEY_TYPE_WEBAUTHN KeyType = 7 - KeyType_KEY_TYPE_FIDO KeyType = 8 -) - -var KeyType_name = map[int32]string{ - 0: "KEY_TYPE_UNSPECIFIED", - 1: "KEY_TYPE_SECP256K1", - 2: "KEY_TYPE_ED25519", - 3: "KEY_TYPE_KECCAK", - 4: "KEY_TYPE_BLS12381", - 5: "KEY_TYPE_X25519", - 6: "KEY_TYPE_SCHNORR", - 7: "KEY_TYPE_WEBAUTHN", - 8: "KEY_TYPE_FIDO", -} - -var KeyType_value = map[string]int32{ - "KEY_TYPE_UNSPECIFIED": 0, - "KEY_TYPE_SECP256K1": 1, - "KEY_TYPE_ED25519": 2, - "KEY_TYPE_KECCAK": 3, - "KEY_TYPE_BLS12381": 4, - "KEY_TYPE_X25519": 5, - "KEY_TYPE_SCHNORR": 6, - "KEY_TYPE_WEBAUTHN": 7, - "KEY_TYPE_FIDO": 8, -} - -func (x KeyType) String() string { - return proto.EnumName(KeyType_name, int32(x)) -} - -func (KeyType) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{1} -} - -// PermissionScope define the Capabilities Controllers can grant for Services -type PermissionScope int32 - -const ( - PermissionScope_PERMISSION_SCOPE_UNSPECIFIED PermissionScope = 0 - PermissionScope_PERMISSION_SCOPE_BASIC_INFO PermissionScope = 1 - PermissionScope_PERMISSION_SCOPE_RECORDS_READ PermissionScope = 2 - PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE PermissionScope = 3 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ PermissionScope = 4 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE PermissionScope = 5 - PermissionScope_PERMISSION_SCOPE_WALLETS_READ PermissionScope = 6 - PermissionScope_PERMISSION_SCOPE_WALLETS_CREATE PermissionScope = 7 - PermissionScope_PERMISSION_SCOPE_WALLETS_SUBSCRIBE PermissionScope = 8 - PermissionScope_PERMISSION_SCOPE_WALLETS_UPDATE PermissionScope = 9 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_VERIFY PermissionScope = 10 - PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_BROADCAST PermissionScope = 11 - PermissionScope_PERMISSION_SCOPE_ADMIN_USER PermissionScope = 12 - PermissionScope_PERMISSION_SCOPE_ADMIN_VALIDATOR PermissionScope = 13 -) - -var PermissionScope_name = map[int32]string{ - 0: "PERMISSION_SCOPE_UNSPECIFIED", - 1: "PERMISSION_SCOPE_BASIC_INFO", - 2: "PERMISSION_SCOPE_RECORDS_READ", - 3: "PERMISSION_SCOPE_RECORDS_WRITE", - 4: "PERMISSION_SCOPE_TRANSACTIONS_READ", - 5: "PERMISSION_SCOPE_TRANSACTIONS_WRITE", - 6: "PERMISSION_SCOPE_WALLETS_READ", - 7: "PERMISSION_SCOPE_WALLETS_CREATE", - 8: "PERMISSION_SCOPE_WALLETS_SUBSCRIBE", - 9: "PERMISSION_SCOPE_WALLETS_UPDATE", - 10: "PERMISSION_SCOPE_TRANSACTIONS_VERIFY", - 11: "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST", - 12: "PERMISSION_SCOPE_ADMIN_USER", - 13: "PERMISSION_SCOPE_ADMIN_VALIDATOR", -} - -var PermissionScope_value = map[string]int32{ - "PERMISSION_SCOPE_UNSPECIFIED": 0, - "PERMISSION_SCOPE_BASIC_INFO": 1, - "PERMISSION_SCOPE_RECORDS_READ": 2, - "PERMISSION_SCOPE_RECORDS_WRITE": 3, - "PERMISSION_SCOPE_TRANSACTIONS_READ": 4, - "PERMISSION_SCOPE_TRANSACTIONS_WRITE": 5, - "PERMISSION_SCOPE_WALLETS_READ": 6, - "PERMISSION_SCOPE_WALLETS_CREATE": 7, - "PERMISSION_SCOPE_WALLETS_SUBSCRIBE": 8, - "PERMISSION_SCOPE_WALLETS_UPDATE": 9, - "PERMISSION_SCOPE_TRANSACTIONS_VERIFY": 10, - "PERMISSION_SCOPE_TRANSACTIONS_BROADCAST": 11, - "PERMISSION_SCOPE_ADMIN_USER": 12, - "PERMISSION_SCOPE_ADMIN_VALIDATOR": 13, -} - -func (x PermissionScope) String() string { - return proto.EnumName(PermissionScope_name, int32(x)) -} - -func (PermissionScope) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{2} -} - // GenesisState defines the module genesis state type GenesisState struct { // Params defines all the parameters of the module. @@ -228,6 +79,8 @@ type Params struct { WhitelistedChains []*ChainInfo `protobuf:"bytes,2,rep,name=whitelisted_chains,json=whitelistedChains,proto3" json:"whitelisted_chains,omitempty"` // Whitelisted Key Types AllowedPublicKeys []*KeyInfo `protobuf:"bytes,3,rep,name=allowed_public_keys,json=allowedPublicKeys,proto3" json:"allowed_public_keys,omitempty"` + // OpenIDConfig defines the base openid configuration across all did services + OpenidConfig *OpenIDConfig `protobuf:"bytes,4,opt,name=openid_config,json=openidConfig,proto3" json:"openid_config,omitempty"` } func (m *Params) Reset() { *m = Params{} } @@ -283,22 +136,29 @@ func (m *Params) GetAllowedPublicKeys() []*KeyInfo { return nil } +func (m *Params) GetOpenidConfig() *OpenIDConfig { + if m != nil { + return m.OpenidConfig + } + return nil +} + // AssetInfo defines the asset info type AssetInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Denom string `protobuf:"bytes,2,opt,name=denom,proto3" json:"denom,omitempty"` - Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` - AssetType string `protobuf:"bytes,4,opt,name=asset_type,json=assetType,proto3" json:"asset_type,omitempty"` - OriginChain string `protobuf:"bytes,5,opt,name=origin_chain,json=originChain,proto3" json:"origin_chain,omitempty"` - OriginDenom string `protobuf:"bytes,6,opt,name=origin_denom,json=originDenom,proto3" json:"origin_denom,omitempty"` - Decimals int32 `protobuf:"varint,7,opt,name=decimals,proto3" json:"decimals,omitempty"` - Description string `protobuf:"bytes,8,opt,name=description,proto3" json:"description,omitempty"` - ImageUrl string `protobuf:"bytes,9,opt,name=image_url,json=imageUrl,proto3" json:"image_url,omitempty"` - CoingeckoId string `protobuf:"bytes,10,opt,name=coingecko_id,json=coingeckoId,proto3" json:"coingecko_id,omitempty"` - IsEnabled bool `protobuf:"varint,11,opt,name=is_enabled,json=isEnabled,proto3" json:"is_enabled,omitempty"` - IbcPath string `protobuf:"bytes,12,opt,name=ibc_path,json=ibcPath,proto3" json:"ibc_path,omitempty"` - IbcChannel string `protobuf:"bytes,13,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` - IbcPort string `protobuf:"bytes,14,opt,name=ibc_port,json=ibcPort,proto3" json:"ibc_port,omitempty"` + // The coin type index for bip44 path + Index int64 `protobuf:"varint,1,opt,name=index,proto3" json:"index,omitempty"` + // The hrp for bech32 address + Hrp string `protobuf:"bytes,2,opt,name=hrp,proto3" json:"hrp,omitempty"` + // The coin symbol + Symbol string `protobuf:"bytes,3,opt,name=symbol,proto3" json:"symbol,omitempty"` + // The coin name + AssetType AssetType `protobuf:"varint,4,opt,name=asset_type,json=assetType,proto3,enum=did.v1.AssetType" json:"asset_type,omitempty"` + // The name of the asset + Name string `protobuf:"bytes,5,opt,name=name,proto3" json:"name,omitempty"` + // The Method of the did namespace + Method string `protobuf:"bytes,6,opt,name=method,proto3" json:"method,omitempty"` + // The icon url + IconUrl string `protobuf:"bytes,7,opt,name=icon_url,json=iconUrl,proto3" json:"icon_url,omitempty"` } func (m *AssetInfo) Reset() { *m = AssetInfo{} } @@ -334,16 +194,16 @@ func (m *AssetInfo) XXX_DiscardUnknown() { var xxx_messageInfo_AssetInfo proto.InternalMessageInfo -func (m *AssetInfo) GetId() string { +func (m *AssetInfo) GetIndex() int64 { if m != nil { - return m.Id + return m.Index } - return "" + return 0 } -func (m *AssetInfo) GetDenom() string { +func (m *AssetInfo) GetHrp() string { if m != nil { - return m.Denom + return m.Hrp } return "" } @@ -355,95 +215,41 @@ func (m *AssetInfo) GetSymbol() string { return "" } -func (m *AssetInfo) GetAssetType() string { +func (m *AssetInfo) GetAssetType() AssetType { if m != nil { return m.AssetType } - return "" + return AssetType_ASSET_TYPE_UNSPECIFIED } -func (m *AssetInfo) GetOriginChain() string { +func (m *AssetInfo) GetName() string { if m != nil { - return m.OriginChain + return m.Name } return "" } -func (m *AssetInfo) GetOriginDenom() string { +func (m *AssetInfo) GetMethod() string { if m != nil { - return m.OriginDenom + return m.Method } return "" } -func (m *AssetInfo) GetDecimals() int32 { +func (m *AssetInfo) GetIconUrl() string { if m != nil { - return m.Decimals - } - return 0 -} - -func (m *AssetInfo) GetDescription() string { - if m != nil { - return m.Description - } - return "" -} - -func (m *AssetInfo) GetImageUrl() string { - if m != nil { - return m.ImageUrl - } - return "" -} - -func (m *AssetInfo) GetCoingeckoId() string { - if m != nil { - return m.CoingeckoId - } - return "" -} - -func (m *AssetInfo) GetIsEnabled() bool { - if m != nil { - return m.IsEnabled - } - return false -} - -func (m *AssetInfo) GetIbcPath() string { - if m != nil { - return m.IbcPath - } - return "" -} - -func (m *AssetInfo) GetIbcChannel() string { - if m != nil { - return m.IbcChannel - } - return "" -} - -func (m *AssetInfo) GetIbcPort() string { - if m != nil { - return m.IbcPort + return m.IconUrl } return "" } // ChainInfo defines the chain info type ChainInfo struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` - Bech32Prefix string `protobuf:"bytes,5,opt,name=bech32_prefix,json=bech32Prefix,proto3" json:"bech32_prefix,omitempty"` - GenesisTime string `protobuf:"bytes,6,opt,name=genesis_time,json=genesisTime,proto3" json:"genesis_time,omitempty"` - GrpcEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,7,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` - RestEndpoints []*ChainInfo_Endpoint `protobuf:"bytes,8,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` - Explorer *ChainInfo_ExplorerInfo `protobuf:"bytes,9,opt,name=explorer,proto3" json:"explorer,omitempty"` - FeeInfo *ChainInfo_FeeInfo `protobuf:"bytes,10,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + Symbol string `protobuf:"bytes,4,opt,name=symbol,proto3" json:"symbol,omitempty"` + Validators []*ValidatorInfo `protobuf:"bytes,5,rep,name=validators,proto3" json:"validators,omitempty"` } func (m *ChainInfo) Reset() { *m = ChainInfo{} } @@ -507,237 +313,20 @@ func (m *ChainInfo) GetSymbol() string { return "" } -func (m *ChainInfo) GetBech32Prefix() string { +func (m *ChainInfo) GetValidators() []*ValidatorInfo { if m != nil { - return m.Bech32Prefix - } - return "" -} - -func (m *ChainInfo) GetGenesisTime() string { - if m != nil { - return m.GenesisTime - } - return "" -} - -func (m *ChainInfo) GetGrpcEndpoints() []*ChainInfo_Endpoint { - if m != nil { - return m.GrpcEndpoints + return m.Validators } return nil } -func (m *ChainInfo) GetRestEndpoints() []*ChainInfo_Endpoint { - if m != nil { - return m.RestEndpoints - } - return nil -} - -func (m *ChainInfo) GetExplorer() *ChainInfo_ExplorerInfo { - if m != nil { - return m.Explorer - } - return nil -} - -func (m *ChainInfo) GetFeeInfo() *ChainInfo_FeeInfo { - if m != nil { - return m.FeeInfo - } - return nil -} - -// Endpoint defines an endpoint -type ChainInfo_Endpoint struct { - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` -} - -func (m *ChainInfo_Endpoint) Reset() { *m = ChainInfo_Endpoint{} } -func (m *ChainInfo_Endpoint) String() string { return proto.CompactTextString(m) } -func (*ChainInfo_Endpoint) ProtoMessage() {} -func (*ChainInfo_Endpoint) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{3, 0} -} -func (m *ChainInfo_Endpoint) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainInfo_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo_Endpoint.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChainInfo_Endpoint) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo_Endpoint.Merge(m, src) -} -func (m *ChainInfo_Endpoint) XXX_Size() int { - return m.Size() -} -func (m *ChainInfo_Endpoint) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo_Endpoint.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo_Endpoint proto.InternalMessageInfo - -func (m *ChainInfo_Endpoint) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -func (m *ChainInfo_Endpoint) GetIsPrimary() bool { - if m != nil { - return m.IsPrimary - } - return false -} - -// ExplorerInfo defines the explorer info -type ChainInfo_ExplorerInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` -} - -func (m *ChainInfo_ExplorerInfo) Reset() { *m = ChainInfo_ExplorerInfo{} } -func (m *ChainInfo_ExplorerInfo) String() string { return proto.CompactTextString(m) } -func (*ChainInfo_ExplorerInfo) ProtoMessage() {} -func (*ChainInfo_ExplorerInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{3, 1} -} -func (m *ChainInfo_ExplorerInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainInfo_ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo_ExplorerInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChainInfo_ExplorerInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo_ExplorerInfo.Merge(m, src) -} -func (m *ChainInfo_ExplorerInfo) XXX_Size() int { - return m.Size() -} -func (m *ChainInfo_ExplorerInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo_ExplorerInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo_ExplorerInfo proto.InternalMessageInfo - -func (m *ChainInfo_ExplorerInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *ChainInfo_ExplorerInfo) GetUrl() string { - if m != nil { - return m.Url - } - return "" -} - -// FeeInfo defines a fee info -type ChainInfo_FeeInfo struct { - BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` - FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` - InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` - IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` - GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` -} - -func (m *ChainInfo_FeeInfo) Reset() { *m = ChainInfo_FeeInfo{} } -func (m *ChainInfo_FeeInfo) String() string { return proto.CompactTextString(m) } -func (*ChainInfo_FeeInfo) ProtoMessage() {} -func (*ChainInfo_FeeInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_fda181cae44f7c00, []int{3, 2} -} -func (m *ChainInfo_FeeInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ChainInfo_FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ChainInfo_FeeInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ChainInfo_FeeInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_ChainInfo_FeeInfo.Merge(m, src) -} -func (m *ChainInfo_FeeInfo) XXX_Size() int { - return m.Size() -} -func (m *ChainInfo_FeeInfo) XXX_DiscardUnknown() { - xxx_messageInfo_ChainInfo_FeeInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_ChainInfo_FeeInfo proto.InternalMessageInfo - -func (m *ChainInfo_FeeInfo) GetBaseDenom() string { - if m != nil { - return m.BaseDenom - } - return "" -} - -func (m *ChainInfo_FeeInfo) GetFeeRates() []string { - if m != nil { - return m.FeeRates - } - return nil -} - -func (m *ChainInfo_FeeInfo) GetInitGasLimit() int32 { - if m != nil { - return m.InitGasLimit - } - return 0 -} - -func (m *ChainInfo_FeeInfo) GetIsSimulable() bool { - if m != nil { - return m.IsSimulable - } - return false -} - -func (m *ChainInfo_FeeInfo) GetGasMultiply() float64 { - if m != nil { - return m.GasMultiply - } - return 0 -} - // KeyInfo defines information for accepted PubKey types type KeyInfo struct { - Kind KeyType `protobuf:"varint,1,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` - Algorithm string `protobuf:"bytes,2,opt,name=algorithm,proto3" json:"algorithm,omitempty"` - Curve string `protobuf:"bytes,3,opt,name=curve,proto3" json:"curve,omitempty"` - Encoding string `protobuf:"bytes,4,opt,name=encoding,proto3" json:"encoding,omitempty"` + Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"` + Algorithm KeyAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=did.v1.KeyAlgorithm" json:"algorithm,omitempty"` + Encoding KeyEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=did.v1.KeyEncoding" json:"encoding,omitempty"` + Curve KeyCurve `protobuf:"varint,4,opt,name=curve,proto3,enum=did.v1.KeyCurve" json:"curve,omitempty"` + Type KeyType `protobuf:"varint,5,opt,name=type,proto3,enum=did.v1.KeyType" json:"type,omitempty"` } func (m *KeyInfo) Reset() { *m = KeyInfo{} } @@ -773,136 +362,568 @@ func (m *KeyInfo) XXX_DiscardUnknown() { var xxx_messageInfo_KeyInfo proto.InternalMessageInfo -func (m *KeyInfo) GetKind() KeyType { +func (m *KeyInfo) GetRole() KeyRole { if m != nil { - return m.Kind + return m.Role + } + return KeyRole_KEY_ROLE_UNSPECIFIED +} + +func (m *KeyInfo) GetAlgorithm() KeyAlgorithm { + if m != nil { + return m.Algorithm + } + return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED +} + +func (m *KeyInfo) GetEncoding() KeyEncoding { + if m != nil { + return m.Encoding + } + return KeyEncoding_KEY_ENCODING_UNSPECIFIED +} + +func (m *KeyInfo) GetCurve() KeyCurve { + if m != nil { + return m.Curve + } + return KeyCurve_KEY_CURVE_UNSPECIFIED +} + +func (m *KeyInfo) GetType() KeyType { + if m != nil { + return m.Type } return KeyType_KEY_TYPE_UNSPECIFIED } -func (m *KeyInfo) GetAlgorithm() string { +// OpenIDConfig defines the base openid configuration across all did services +type OpenIDConfig struct { + Issuer string `protobuf:"bytes,1,opt,name=issuer,proto3" json:"issuer,omitempty"` + AuthorizationEndpoint string `protobuf:"bytes,2,opt,name=authorization_endpoint,json=authorizationEndpoint,proto3" json:"authorization_endpoint,omitempty"` + TokenEndpoint string `protobuf:"bytes,3,opt,name=token_endpoint,json=tokenEndpoint,proto3" json:"token_endpoint,omitempty"` + UserinfoEndpoint string `protobuf:"bytes,4,opt,name=userinfo_endpoint,json=userinfoEndpoint,proto3" json:"userinfo_endpoint,omitempty"` + ScopesSupported []string `protobuf:"bytes,5,rep,name=scopes_supported,json=scopesSupported,proto3" json:"scopes_supported,omitempty"` + ResponseTypesSupported []string `protobuf:"bytes,6,rep,name=response_types_supported,json=responseTypesSupported,proto3" json:"response_types_supported,omitempty"` + ResponseModesSupported []string `protobuf:"bytes,7,rep,name=response_modes_supported,json=responseModesSupported,proto3" json:"response_modes_supported,omitempty"` + GrantTypesSupported []string `protobuf:"bytes,8,rep,name=grant_types_supported,json=grantTypesSupported,proto3" json:"grant_types_supported,omitempty"` + AcrValuesSupported []string `protobuf:"bytes,9,rep,name=acr_values_supported,json=acrValuesSupported,proto3" json:"acr_values_supported,omitempty"` + SubjectTypesSupported []string `protobuf:"bytes,10,rep,name=subject_types_supported,json=subjectTypesSupported,proto3" json:"subject_types_supported,omitempty"` +} + +func (m *OpenIDConfig) Reset() { *m = OpenIDConfig{} } +func (m *OpenIDConfig) String() string { return proto.CompactTextString(m) } +func (*OpenIDConfig) ProtoMessage() {} +func (*OpenIDConfig) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{5} +} +func (m *OpenIDConfig) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *OpenIDConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_OpenIDConfig.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *OpenIDConfig) XXX_Merge(src proto.Message) { + xxx_messageInfo_OpenIDConfig.Merge(m, src) +} +func (m *OpenIDConfig) XXX_Size() int { + return m.Size() +} +func (m *OpenIDConfig) XXX_DiscardUnknown() { + xxx_messageInfo_OpenIDConfig.DiscardUnknown(m) +} + +var xxx_messageInfo_OpenIDConfig proto.InternalMessageInfo + +func (m *OpenIDConfig) GetIssuer() string { if m != nil { - return m.Algorithm + return m.Issuer } return "" } -func (m *KeyInfo) GetCurve() string { +func (m *OpenIDConfig) GetAuthorizationEndpoint() string { if m != nil { - return m.Curve + return m.AuthorizationEndpoint } return "" } -func (m *KeyInfo) GetEncoding() string { +func (m *OpenIDConfig) GetTokenEndpoint() string { if m != nil { - return m.Encoding + return m.TokenEndpoint + } + return "" +} + +func (m *OpenIDConfig) GetUserinfoEndpoint() string { + if m != nil { + return m.UserinfoEndpoint + } + return "" +} + +func (m *OpenIDConfig) GetScopesSupported() []string { + if m != nil { + return m.ScopesSupported + } + return nil +} + +func (m *OpenIDConfig) GetResponseTypesSupported() []string { + if m != nil { + return m.ResponseTypesSupported + } + return nil +} + +func (m *OpenIDConfig) GetResponseModesSupported() []string { + if m != nil { + return m.ResponseModesSupported + } + return nil +} + +func (m *OpenIDConfig) GetGrantTypesSupported() []string { + if m != nil { + return m.GrantTypesSupported + } + return nil +} + +func (m *OpenIDConfig) GetAcrValuesSupported() []string { + if m != nil { + return m.AcrValuesSupported + } + return nil +} + +func (m *OpenIDConfig) GetSubjectTypesSupported() []string { + if m != nil { + return m.SubjectTypesSupported + } + return nil +} + +// ValidatorInfo defines information for accepted Validator nodes +type ValidatorInfo struct { + Moniker string `protobuf:"bytes,1,opt,name=moniker,proto3" json:"moniker,omitempty"` + GrpcEndpoints []*ValidatorInfo_Endpoint `protobuf:"bytes,2,rep,name=grpc_endpoints,json=grpcEndpoints,proto3" json:"grpc_endpoints,omitempty"` + RestEndpoints []*ValidatorInfo_Endpoint `protobuf:"bytes,3,rep,name=rest_endpoints,json=restEndpoints,proto3" json:"rest_endpoints,omitempty"` + Explorer *ValidatorInfo_ExplorerInfo `protobuf:"bytes,4,opt,name=explorer,proto3" json:"explorer,omitempty"` + FeeInfo *ValidatorInfo_FeeInfo `protobuf:"bytes,5,opt,name=fee_info,json=feeInfo,proto3" json:"fee_info,omitempty"` + IbcChannel *ValidatorInfo_IBCChannel `protobuf:"bytes,6,opt,name=ibc_channel,json=ibcChannel,proto3" json:"ibc_channel,omitempty"` +} + +func (m *ValidatorInfo) Reset() { *m = ValidatorInfo{} } +func (m *ValidatorInfo) String() string { return proto.CompactTextString(m) } +func (*ValidatorInfo) ProtoMessage() {} +func (*ValidatorInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{6} +} +func (m *ValidatorInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorInfo.Merge(m, src) +} +func (m *ValidatorInfo) XXX_Size() int { + return m.Size() +} +func (m *ValidatorInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorInfo proto.InternalMessageInfo + +func (m *ValidatorInfo) GetMoniker() string { + if m != nil { + return m.Moniker + } + return "" +} + +func (m *ValidatorInfo) GetGrpcEndpoints() []*ValidatorInfo_Endpoint { + if m != nil { + return m.GrpcEndpoints + } + return nil +} + +func (m *ValidatorInfo) GetRestEndpoints() []*ValidatorInfo_Endpoint { + if m != nil { + return m.RestEndpoints + } + return nil +} + +func (m *ValidatorInfo) GetExplorer() *ValidatorInfo_ExplorerInfo { + if m != nil { + return m.Explorer + } + return nil +} + +func (m *ValidatorInfo) GetFeeInfo() *ValidatorInfo_FeeInfo { + if m != nil { + return m.FeeInfo + } + return nil +} + +func (m *ValidatorInfo) GetIbcChannel() *ValidatorInfo_IBCChannel { + if m != nil { + return m.IbcChannel + } + return nil +} + +// Endpoint defines an endpoint +type ValidatorInfo_Endpoint struct { + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + IsPrimary bool `protobuf:"varint,2,opt,name=is_primary,json=isPrimary,proto3" json:"is_primary,omitempty"` +} + +func (m *ValidatorInfo_Endpoint) Reset() { *m = ValidatorInfo_Endpoint{} } +func (m *ValidatorInfo_Endpoint) String() string { return proto.CompactTextString(m) } +func (*ValidatorInfo_Endpoint) ProtoMessage() {} +func (*ValidatorInfo_Endpoint) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{6, 0} +} +func (m *ValidatorInfo_Endpoint) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorInfo_Endpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorInfo_Endpoint.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorInfo_Endpoint) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorInfo_Endpoint.Merge(m, src) +} +func (m *ValidatorInfo_Endpoint) XXX_Size() int { + return m.Size() +} +func (m *ValidatorInfo_Endpoint) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorInfo_Endpoint.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorInfo_Endpoint proto.InternalMessageInfo + +func (m *ValidatorInfo_Endpoint) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +func (m *ValidatorInfo_Endpoint) GetIsPrimary() bool { + if m != nil { + return m.IsPrimary + } + return false +} + +// ExplorerInfo defines the explorer info +type ValidatorInfo_ExplorerInfo struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + Url string `protobuf:"bytes,2,opt,name=url,proto3" json:"url,omitempty"` +} + +func (m *ValidatorInfo_ExplorerInfo) Reset() { *m = ValidatorInfo_ExplorerInfo{} } +func (m *ValidatorInfo_ExplorerInfo) String() string { return proto.CompactTextString(m) } +func (*ValidatorInfo_ExplorerInfo) ProtoMessage() {} +func (*ValidatorInfo_ExplorerInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{6, 1} +} +func (m *ValidatorInfo_ExplorerInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorInfo_ExplorerInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorInfo_ExplorerInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorInfo_ExplorerInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorInfo_ExplorerInfo.Merge(m, src) +} +func (m *ValidatorInfo_ExplorerInfo) XXX_Size() int { + return m.Size() +} +func (m *ValidatorInfo_ExplorerInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorInfo_ExplorerInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorInfo_ExplorerInfo proto.InternalMessageInfo + +func (m *ValidatorInfo_ExplorerInfo) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *ValidatorInfo_ExplorerInfo) GetUrl() string { + if m != nil { + return m.Url + } + return "" +} + +// FeeInfo defines a fee info +type ValidatorInfo_FeeInfo struct { + BaseDenom string `protobuf:"bytes,1,opt,name=base_denom,json=baseDenom,proto3" json:"base_denom,omitempty"` + FeeRates []string `protobuf:"bytes,2,rep,name=fee_rates,json=feeRates,proto3" json:"fee_rates,omitempty"` + InitGasLimit int32 `protobuf:"varint,3,opt,name=init_gas_limit,json=initGasLimit,proto3" json:"init_gas_limit,omitempty"` + IsSimulable bool `protobuf:"varint,4,opt,name=is_simulable,json=isSimulable,proto3" json:"is_simulable,omitempty"` + GasMultiply float64 `protobuf:"fixed64,5,opt,name=gas_multiply,json=gasMultiply,proto3" json:"gas_multiply,omitempty"` +} + +func (m *ValidatorInfo_FeeInfo) Reset() { *m = ValidatorInfo_FeeInfo{} } +func (m *ValidatorInfo_FeeInfo) String() string { return proto.CompactTextString(m) } +func (*ValidatorInfo_FeeInfo) ProtoMessage() {} +func (*ValidatorInfo_FeeInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{6, 2} +} +func (m *ValidatorInfo_FeeInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorInfo_FeeInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorInfo_FeeInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorInfo_FeeInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorInfo_FeeInfo.Merge(m, src) +} +func (m *ValidatorInfo_FeeInfo) XXX_Size() int { + return m.Size() +} +func (m *ValidatorInfo_FeeInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorInfo_FeeInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorInfo_FeeInfo proto.InternalMessageInfo + +func (m *ValidatorInfo_FeeInfo) GetBaseDenom() string { + if m != nil { + return m.BaseDenom + } + return "" +} + +func (m *ValidatorInfo_FeeInfo) GetFeeRates() []string { + if m != nil { + return m.FeeRates + } + return nil +} + +func (m *ValidatorInfo_FeeInfo) GetInitGasLimit() int32 { + if m != nil { + return m.InitGasLimit + } + return 0 +} + +func (m *ValidatorInfo_FeeInfo) GetIsSimulable() bool { + if m != nil { + return m.IsSimulable + } + return false +} + +func (m *ValidatorInfo_FeeInfo) GetGasMultiply() float64 { + if m != nil { + return m.GasMultiply + } + return 0 +} + +// IBCChannel defines the IBC channel info +type ValidatorInfo_IBCChannel struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Port string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"` +} + +func (m *ValidatorInfo_IBCChannel) Reset() { *m = ValidatorInfo_IBCChannel{} } +func (m *ValidatorInfo_IBCChannel) String() string { return proto.CompactTextString(m) } +func (*ValidatorInfo_IBCChannel) ProtoMessage() {} +func (*ValidatorInfo_IBCChannel) Descriptor() ([]byte, []int) { + return fileDescriptor_fda181cae44f7c00, []int{6, 3} +} +func (m *ValidatorInfo_IBCChannel) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ValidatorInfo_IBCChannel) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ValidatorInfo_IBCChannel.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ValidatorInfo_IBCChannel) XXX_Merge(src proto.Message) { + xxx_messageInfo_ValidatorInfo_IBCChannel.Merge(m, src) +} +func (m *ValidatorInfo_IBCChannel) XXX_Size() int { + return m.Size() +} +func (m *ValidatorInfo_IBCChannel) XXX_DiscardUnknown() { + xxx_messageInfo_ValidatorInfo_IBCChannel.DiscardUnknown(m) +} + +var xxx_messageInfo_ValidatorInfo_IBCChannel proto.InternalMessageInfo + +func (m *ValidatorInfo_IBCChannel) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *ValidatorInfo_IBCChannel) GetPort() string { + if m != nil { + return m.Port } return "" } func init() { - proto.RegisterEnum("did.v1.DIDNamespace", DIDNamespace_name, DIDNamespace_value) - proto.RegisterEnum("did.v1.KeyType", KeyType_name, KeyType_value) - proto.RegisterEnum("did.v1.PermissionScope", PermissionScope_name, PermissionScope_value) proto.RegisterType((*GenesisState)(nil), "did.v1.GenesisState") proto.RegisterType((*Params)(nil), "did.v1.Params") proto.RegisterType((*AssetInfo)(nil), "did.v1.AssetInfo") proto.RegisterType((*ChainInfo)(nil), "did.v1.ChainInfo") - proto.RegisterType((*ChainInfo_Endpoint)(nil), "did.v1.ChainInfo.Endpoint") - proto.RegisterType((*ChainInfo_ExplorerInfo)(nil), "did.v1.ChainInfo.ExplorerInfo") - proto.RegisterType((*ChainInfo_FeeInfo)(nil), "did.v1.ChainInfo.FeeInfo") proto.RegisterType((*KeyInfo)(nil), "did.v1.KeyInfo") + proto.RegisterType((*OpenIDConfig)(nil), "did.v1.OpenIDConfig") + proto.RegisterType((*ValidatorInfo)(nil), "did.v1.ValidatorInfo") + proto.RegisterType((*ValidatorInfo_Endpoint)(nil), "did.v1.ValidatorInfo.Endpoint") + proto.RegisterType((*ValidatorInfo_ExplorerInfo)(nil), "did.v1.ValidatorInfo.ExplorerInfo") + proto.RegisterType((*ValidatorInfo_FeeInfo)(nil), "did.v1.ValidatorInfo.FeeInfo") + proto.RegisterType((*ValidatorInfo_IBCChannel)(nil), "did.v1.ValidatorInfo.IBCChannel") } func init() { proto.RegisterFile("did/v1/genesis.proto", fileDescriptor_fda181cae44f7c00) } var fileDescriptor_fda181cae44f7c00 = []byte{ - // 1336 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x96, 0xcd, 0x6e, 0xdb, 0xc6, - 0x16, 0xc7, 0x4d, 0x7d, 0xeb, 0x48, 0x76, 0xe8, 0x89, 0x93, 0x4b, 0x2b, 0x89, 0xec, 0xd8, 0xc1, - 0x8d, 0xe1, 0x7b, 0x61, 0xc1, 0x4a, 0x52, 0xb4, 0x69, 0x80, 0x96, 0xa2, 0xe8, 0x84, 0xb0, 0x2d, - 0x09, 0xa4, 0x9c, 0x34, 0xdd, 0x10, 0x14, 0x39, 0x96, 0x06, 0xe1, 0x17, 0x38, 0x74, 0x12, 0x6d, - 0xfa, 0x00, 0x5d, 0x75, 0xd9, 0x5d, 0x83, 0x6e, 0xbb, 0x69, 0xdf, 0x22, 0xdd, 0x05, 0x5d, 0x75, - 0x55, 0x14, 0x09, 0xd0, 0xf6, 0x31, 0x8a, 0x19, 0x52, 0x8a, 0x54, 0x39, 0xee, 0x46, 0xe0, 0xfc, - 0xce, 0xff, 0xfc, 0xe7, 0xe3, 0x9c, 0x19, 0x08, 0xd6, 0x1c, 0xe2, 0x34, 0x9e, 0xef, 0x37, 0x86, - 0xd8, 0xc7, 0x94, 0xd0, 0xbd, 0x30, 0x0a, 0xe2, 0x00, 0x15, 0x1c, 0xe2, 0xec, 0x3d, 0xdf, 0xaf, - 0xad, 0x0d, 0x83, 0x61, 0xc0, 0x51, 0x83, 0x7d, 0x25, 0xd1, 0xda, 0xaa, 0xe5, 0x11, 0x3f, 0x68, - 0xf0, 0xdf, 0x04, 0x6d, 0x3d, 0x80, 0xea, 0xc3, 0xc4, 0xc1, 0x88, 0xad, 0x18, 0xa3, 0xff, 0x43, - 0x21, 0xb4, 0x22, 0xcb, 0xa3, 0x92, 0xb0, 0x29, 0xec, 0x54, 0x9a, 0x2b, 0x7b, 0x89, 0xe3, 0x5e, - 0x8f, 0xd3, 0x56, 0xee, 0xf5, 0x6f, 0x1b, 0x4b, 0x7a, 0xaa, 0xd9, 0xfa, 0x43, 0x80, 0x42, 0x12, - 0x40, 0x9f, 0x03, 0x7a, 0x31, 0x22, 0x31, 0x76, 0x09, 0x8d, 0xb1, 0x63, 0x5a, 0x94, 0xe2, 0x98, - 0x99, 0x64, 0x77, 0x2a, 0xcd, 0xd5, 0x89, 0x89, 0xcc, 0xa8, 0xe6, 0x9f, 0x06, 0xfa, 0xea, 0x8c, - 0x98, 0xd3, 0x05, 0x07, 0x7b, 0x64, 0x11, 0x9f, 0x4a, 0x99, 0x79, 0x07, 0x85, 0xd1, 0x05, 0x07, - 0x4e, 0x29, 0xfa, 0x0c, 0x2e, 0x5b, 0xae, 0x1b, 0xbc, 0xc0, 0x8e, 0x19, 0x9e, 0x0d, 0x5c, 0x62, - 0x9b, 0xcf, 0xf0, 0x98, 0x4a, 0x59, 0x6e, 0x71, 0x69, 0x62, 0x71, 0x88, 0xc7, 0x89, 0x41, 0xaa, - 0xed, 0x71, 0xe9, 0x21, 0x1e, 0xd3, 0xfb, 0xff, 0xf9, 0xf6, 0xd5, 0xc6, 0xd2, 0x5f, 0xaf, 0x36, - 0x84, 0xaf, 0xff, 0xfc, 0x71, 0x17, 0xd8, 0x09, 0xa7, 0x1b, 0xfd, 0x3e, 0x0b, 0xe5, 0xe9, 0xe2, - 0xd1, 0x0a, 0x64, 0x88, 0xc3, 0x0f, 0xa8, 0xac, 0x67, 0x88, 0x83, 0xd6, 0x20, 0xef, 0x60, 0x3f, - 0xf0, 0xa4, 0x0c, 0x47, 0xc9, 0x00, 0x5d, 0x85, 0x02, 0x1d, 0x7b, 0x83, 0xc0, 0x95, 0xb2, 0x1c, - 0xa7, 0x23, 0x74, 0x03, 0x80, 0x9f, 0x8e, 0x19, 0x8f, 0x43, 0x2c, 0xe5, 0x78, 0xac, 0xcc, 0x49, - 0x7f, 0x1c, 0x62, 0x74, 0x13, 0xaa, 0x41, 0x44, 0x86, 0xc4, 0x4f, 0x4e, 0x40, 0xca, 0x73, 0x41, - 0x25, 0x61, 0x7c, 0xa3, 0x33, 0x92, 0x64, 0xda, 0xc2, 0xac, 0xa4, 0xcd, 0x27, 0xaf, 0x41, 0xc9, - 0xc1, 0x36, 0xf1, 0x2c, 0x97, 0x4a, 0xc5, 0x4d, 0x61, 0x27, 0xaf, 0x4f, 0xc7, 0x68, 0x13, 0x2a, - 0x0e, 0xa6, 0x76, 0x44, 0xc2, 0x98, 0x04, 0xbe, 0x54, 0x4a, 0xb2, 0x67, 0x10, 0xba, 0x06, 0x65, - 0xe2, 0x59, 0x43, 0x6c, 0x9e, 0x45, 0xae, 0x54, 0xe6, 0xf1, 0x12, 0x07, 0x27, 0x91, 0xcb, 0x66, - 0xb7, 0x03, 0xe2, 0x0f, 0xb1, 0xfd, 0x2c, 0x30, 0x89, 0x23, 0x41, 0x92, 0x3f, 0x65, 0x9a, 0xc3, - 0xb6, 0x48, 0xa8, 0x89, 0x7d, 0x6b, 0xe0, 0x62, 0x47, 0xaa, 0x6c, 0x0a, 0x3b, 0x25, 0xbd, 0x4c, - 0xa8, 0x9a, 0x00, 0xb4, 0x0e, 0x25, 0x32, 0xb0, 0xcd, 0xd0, 0x8a, 0x47, 0x52, 0x95, 0x67, 0x17, - 0xc9, 0xc0, 0xee, 0x59, 0xf1, 0x08, 0x6d, 0x40, 0x85, 0x85, 0xec, 0x91, 0xe5, 0xfb, 0xd8, 0x95, - 0x96, 0x79, 0x14, 0xc8, 0xc0, 0x56, 0x12, 0x32, 0xcd, 0x0d, 0xa2, 0x58, 0x5a, 0x79, 0x9f, 0x1b, - 0x44, 0xf1, 0xd6, 0xcf, 0x79, 0x28, 0x4f, 0xfb, 0x63, 0xa1, 0x48, 0xeb, 0x50, 0xe2, 0x07, 0xca, - 0x96, 0x9c, 0xd4, 0xa9, 0xc8, 0xc7, 0x9a, 0x83, 0x10, 0xe4, 0x7c, 0xcb, 0xc3, 0x69, 0x9d, 0xf8, - 0xf7, 0x4c, 0xf5, 0x72, 0x73, 0xd5, 0xdb, 0x86, 0xe5, 0x01, 0xb6, 0x47, 0x77, 0x9a, 0x66, 0x18, - 0xe1, 0x53, 0xf2, 0x32, 0xad, 0x4f, 0x35, 0x81, 0x3d, 0xce, 0xd8, 0x11, 0xa5, 0xf7, 0xd2, 0x8c, - 0x89, 0x87, 0x27, 0x05, 0x4a, 0x59, 0x9f, 0x78, 0x18, 0xc9, 0xb0, 0x32, 0x8c, 0x42, 0xdb, 0xc4, - 0xbe, 0x13, 0x06, 0xc4, 0x8f, 0x59, 0x99, 0x58, 0x9b, 0xd6, 0x16, 0x3a, 0x7d, 0x4f, 0x4d, 0x25, - 0xfa, 0x32, 0xcb, 0x98, 0x8c, 0x28, 0xb3, 0x88, 0x30, 0x8d, 0x67, 0x2c, 0x4a, 0xff, 0x6e, 0xc1, - 0x32, 0xde, 0x5b, 0xdc, 0x87, 0x12, 0x7e, 0x19, 0xba, 0x41, 0x84, 0x23, 0x5e, 0xe7, 0x4a, 0xb3, - 0x7e, 0x4e, 0x72, 0xaa, 0xe0, 0xb7, 0x66, 0xaa, 0x47, 0x77, 0xa1, 0x74, 0x8a, 0xb1, 0x49, 0xfc, - 0xd3, 0x80, 0xf7, 0x40, 0xa5, 0xb9, 0xbe, 0x98, 0x7b, 0x80, 0x31, 0x4f, 0x2b, 0x9e, 0x26, 0x1f, - 0xb5, 0x4f, 0xa1, 0x34, 0x99, 0x1e, 0x89, 0x90, 0x65, 0x0d, 0x96, 0xd4, 0x88, 0x7d, 0xa6, 0x8d, - 0x13, 0x46, 0xc4, 0xb3, 0xa2, 0x31, 0x2f, 0x13, 0x6f, 0x9c, 0x5e, 0x02, 0x6a, 0x77, 0xa1, 0x3a, - 0xbb, 0x98, 0x69, 0xe1, 0x84, 0x99, 0xc2, 0xa5, 0xa6, 0x99, 0xa9, 0x69, 0xed, 0x27, 0x01, 0x8a, - 0xe9, 0x3a, 0xd8, 0x04, 0x03, 0x8b, 0xe2, 0xf4, 0xe2, 0x24, 0x79, 0x65, 0x46, 0x92, 0x6b, 0x73, - 0x0d, 0xca, 0x6c, 0x4f, 0x91, 0x15, 0xe3, 0xe4, 0xe9, 0x29, 0xeb, 0x6c, 0x93, 0x3a, 0x1b, 0xa3, - 0x5b, 0xb0, 0x42, 0x7c, 0x12, 0x9b, 0x43, 0x8b, 0x9a, 0x2e, 0xf1, 0x48, 0xcc, 0x1b, 0x26, 0xaf, - 0x57, 0x19, 0x7d, 0x68, 0xd1, 0x23, 0xc6, 0x58, 0xed, 0x09, 0x35, 0x29, 0xf1, 0xce, 0x5c, 0xd6, - 0xed, 0xbc, 0x7d, 0x4a, 0x7a, 0x85, 0x50, 0x63, 0x82, 0x78, 0x7b, 0x58, 0xd4, 0xf4, 0xce, 0xdc, - 0x98, 0x84, 0xee, 0x98, 0xb7, 0x90, 0xa0, 0x57, 0x86, 0x16, 0x3d, 0x4e, 0xd1, 0xd6, 0x57, 0x50, - 0x4c, 0xdf, 0x29, 0xb4, 0x0d, 0xb9, 0x67, 0xc4, 0x4f, 0x5a, 0x79, 0x65, 0xee, 0x19, 0x63, 0xef, - 0x85, 0xce, 0x83, 0xe8, 0x3a, 0x94, 0x2d, 0x77, 0x18, 0x44, 0x24, 0x1e, 0x4d, 0x9e, 0xa1, 0xf7, - 0x80, 0x3d, 0x50, 0xf6, 0x59, 0xf4, 0x7c, 0xd2, 0xe1, 0xc9, 0x80, 0xbd, 0x11, 0xd8, 0xb7, 0x03, - 0x87, 0xf8, 0xc3, 0xb4, 0xc9, 0xa7, 0xe3, 0xdd, 0x1f, 0x04, 0xa8, 0xb6, 0xb5, 0x76, 0xc7, 0xf2, - 0x30, 0x0d, 0x2d, 0x1b, 0xa3, 0x1b, 0xb0, 0xde, 0xd6, 0xda, 0x66, 0x47, 0x3e, 0x56, 0x8d, 0x9e, - 0xac, 0xa8, 0xe6, 0x49, 0xc7, 0xe8, 0xa9, 0x8a, 0x76, 0xa0, 0xa9, 0x6d, 0x71, 0x09, 0x5d, 0x05, - 0x34, 0x1f, 0xd6, 0x7a, 0x07, 0x86, 0x28, 0x2c, 0x72, 0xa3, 0xdb, 0xd1, 0xc5, 0x0c, 0x5a, 0x87, - 0x2b, 0xf3, 0xbc, 0xa5, 0xf5, 0x95, 0xae, 0xd6, 0x11, 0xb3, 0xa8, 0x06, 0x57, 0xe7, 0x43, 0x6a, - 0xff, 0x91, 0xaa, 0xab, 0x27, 0xc7, 0x62, 0x0e, 0x5d, 0x81, 0xd5, 0x7f, 0x4c, 0xd3, 0x52, 0xc4, - 0xfc, 0xee, 0x2f, 0x02, 0x3f, 0x2e, 0xfe, 0x7e, 0x4a, 0xb0, 0x76, 0xa8, 0x3e, 0x35, 0xfb, 0x4f, - 0x7b, 0xe7, 0xac, 0x71, 0x1a, 0x31, 0x54, 0xa5, 0xd7, 0xbc, 0xf7, 0xd1, 0xe1, 0xbe, 0x28, 0xa0, - 0x35, 0x10, 0xa7, 0x5c, 0x6d, 0x37, 0xef, 0xdd, 0xdb, 0xff, 0x44, 0xcc, 0xa0, 0xcb, 0x70, 0x69, - 0x4a, 0x0f, 0x55, 0x45, 0x91, 0x0f, 0xc5, 0x2c, 0x9b, 0x7f, 0x0a, 0x5b, 0x47, 0xc6, 0x7e, 0xf3, - 0xce, 0xc7, 0xfb, 0x62, 0x6e, 0x4e, 0xfb, 0x45, 0x62, 0x90, 0x9f, 0xb3, 0x35, 0x94, 0x47, 0x9d, - 0xae, 0xae, 0x8b, 0x85, 0x39, 0x87, 0x27, 0x6a, 0x4b, 0x3e, 0xe9, 0x3f, 0xea, 0x88, 0x45, 0xb4, - 0x0a, 0xcb, 0x53, 0x7c, 0xa0, 0xb5, 0xbb, 0x62, 0x69, 0xf7, 0xbb, 0x1c, 0x5c, 0xea, 0xe1, 0xc8, - 0x23, 0x94, 0x92, 0xc0, 0x37, 0xec, 0x20, 0xc4, 0x68, 0x13, 0xae, 0xf7, 0x54, 0xfd, 0x58, 0x33, - 0x0c, 0xad, 0xdb, 0x31, 0x0d, 0xa5, 0xbb, 0xb0, 0xc9, 0x0d, 0xb8, 0xb6, 0xa0, 0x68, 0xc9, 0x86, - 0xa6, 0x98, 0x5a, 0xe7, 0xa0, 0x2b, 0x0a, 0xe8, 0x26, 0xdc, 0x58, 0x10, 0xe8, 0xaa, 0xd2, 0xd5, - 0xdb, 0x86, 0xa9, 0xab, 0x72, 0x5b, 0xcc, 0xa0, 0x2d, 0xa8, 0x7f, 0x50, 0xf2, 0x44, 0xd7, 0xfa, - 0xaa, 0x98, 0x45, 0xff, 0x85, 0xad, 0x05, 0x4d, 0x5f, 0x97, 0x3b, 0x86, 0xac, 0xf4, 0xb5, 0x6e, - 0x27, 0xf5, 0xca, 0xa1, 0xdb, 0xb0, 0x7d, 0xb1, 0x2e, 0x31, 0xcc, 0x9f, 0xbb, 0xae, 0x27, 0xf2, - 0xd1, 0x91, 0xda, 0x4f, 0xbd, 0x0a, 0x68, 0x1b, 0x36, 0x3e, 0x28, 0x51, 0x74, 0x55, 0xee, 0xab, - 0x62, 0xf1, 0xdc, 0x85, 0x4d, 0x44, 0xc6, 0x49, 0xcb, 0x50, 0x74, 0xad, 0xa5, 0x8a, 0xa5, 0x0b, - 0xcd, 0x4e, 0x7a, 0x6d, 0x66, 0x56, 0x46, 0x3b, 0x70, 0xeb, 0xe2, 0xd5, 0x3f, 0x56, 0x75, 0xed, - 0xe0, 0xa9, 0x08, 0xe8, 0x7f, 0x70, 0xfb, 0x62, 0x65, 0x4b, 0xef, 0xca, 0x6d, 0x45, 0x36, 0xfa, - 0x62, 0xe5, 0xdc, 0x22, 0xc9, 0xed, 0x63, 0xad, 0x63, 0x9e, 0x18, 0xaa, 0x2e, 0x56, 0xd1, 0x2d, - 0xd8, 0xfc, 0x80, 0xe0, 0xb1, 0x7c, 0xa4, 0xb5, 0xe5, 0x7e, 0x57, 0x17, 0x97, 0x5b, 0x0f, 0x5e, - 0xbf, 0xad, 0x0b, 0x6f, 0xde, 0xd6, 0x85, 0xdf, 0xdf, 0xd6, 0x85, 0x6f, 0xde, 0xd5, 0x97, 0xde, - 0xbc, 0xab, 0x2f, 0xfd, 0xfa, 0xae, 0xbe, 0xf4, 0xe5, 0xd6, 0x90, 0xc4, 0xa3, 0xb3, 0xc1, 0x9e, - 0x1d, 0x78, 0x8d, 0xc0, 0xa7, 0x81, 0x1f, 0x35, 0x46, 0x2f, 0xac, 0x71, 0xe3, 0x65, 0x83, 0xfd, - 0xa9, 0x61, 0x7f, 0x3c, 0xe8, 0xa0, 0xc0, 0xff, 0x01, 0xde, 0xf9, 0x3b, 0x00, 0x00, 0xff, 0xff, - 0x56, 0xab, 0x9f, 0xc0, 0x4a, 0x0a, 0x00, 0x00, + // 1122 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x56, 0xcb, 0x8e, 0x1b, 0x45, + 0x14, 0x9d, 0xf6, 0xbb, 0xaf, 0x3d, 0xce, 0x4c, 0x65, 0x66, 0xd2, 0x18, 0xc5, 0x09, 0xe6, 0xa1, + 0xf0, 0x90, 0x9d, 0x18, 0x82, 0x02, 0x44, 0x40, 0x32, 0x09, 0xd1, 0x28, 0x44, 0x44, 0x1d, 0xc8, + 0x82, 0x4d, 0xab, 0xdc, 0x5d, 0x63, 0x17, 0xe9, 0xae, 0x6a, 0x55, 0x75, 0x4f, 0x62, 0x3e, 0x81, + 0x15, 0x4b, 0xd8, 0x85, 0x3f, 0x80, 0x7f, 0x60, 0x91, 0x0d, 0x52, 0x96, 0xac, 0x50, 0x94, 0x59, + 0xc0, 0x8a, 0x6f, 0x40, 0x75, 0xfb, 0x61, 0x3b, 0x9e, 0x48, 0x6c, 0xac, 0xfb, 0x3a, 0xa7, 0xea, + 0xde, 0x53, 0x55, 0x6d, 0xd8, 0x09, 0x78, 0x30, 0x3a, 0xba, 0x34, 0x9a, 0x32, 0xc1, 0x34, 0xd7, + 0xc3, 0x58, 0xc9, 0x44, 0x92, 0x46, 0xc0, 0x83, 0xe1, 0xd1, 0xa5, 0xde, 0x36, 0x8d, 0xb8, 0x90, + 0x23, 0xfc, 0xcd, 0x52, 0xbd, 0xbd, 0x1c, 0xe0, 0x4b, 0xa1, 0x13, 0x2a, 0x92, 0x1c, 0xd2, 0xdb, + 0x99, 0xca, 0xa9, 0x44, 0x73, 0x64, 0xac, 0x2c, 0x3a, 0xb8, 0x0a, 0x9d, 0x5b, 0x19, 0xf3, 0xbd, + 0x84, 0x26, 0x8c, 0xbc, 0x07, 0x8d, 0x98, 0x2a, 0x1a, 0x69, 0xc7, 0x3a, 0x6f, 0x5d, 0x68, 0x8f, + 0xbb, 0xc3, 0x6c, 0xa5, 0xe1, 0x5d, 0x8c, 0x5e, 0xaf, 0x3d, 0xf9, 0xeb, 0xdc, 0x86, 0x9b, 0xd7, + 0x0c, 0x7e, 0xa9, 0x40, 0x23, 0x4b, 0x90, 0xcf, 0x81, 0x3c, 0x9c, 0xf1, 0x84, 0x85, 0x5c, 0x27, + 0x2c, 0xf0, 0xa8, 0xd6, 0x2c, 0x31, 0x24, 0xd5, 0x0b, 0xed, 0xf1, 0x76, 0x41, 0x72, 0xcd, 0x44, + 0x0f, 0xc4, 0xa1, 0x74, 0xb7, 0x97, 0x8a, 0x31, 0xba, 0xc6, 0xe0, 0xcf, 0x28, 0x17, 0xda, 0xa9, + 0xac, 0x32, 0xec, 0x9b, 0xe8, 0x1a, 0x03, 0x46, 0x35, 0xf9, 0x0c, 0x4e, 0xd3, 0x30, 0x94, 0x0f, + 0x59, 0xe0, 0xc5, 0xe9, 0x24, 0xe4, 0xbe, 0xf7, 0x80, 0xcd, 0xb5, 0x53, 0x45, 0x8a, 0x53, 0x05, + 0xc5, 0x6d, 0x36, 0xcf, 0x08, 0xf2, 0xda, 0xbb, 0x58, 0x7a, 0x9b, 0xcd, 0x35, 0xf9, 0x08, 0x36, + 0x65, 0xcc, 0x04, 0x0f, 0x3c, 0x5f, 0x8a, 0x43, 0x3e, 0x75, 0x6a, 0x38, 0x84, 0x9d, 0x02, 0xfa, + 0x55, 0xcc, 0xc4, 0xc1, 0x8d, 0x7d, 0xcc, 0xb9, 0x9d, 0xac, 0x34, 0xf3, 0x3e, 0x3e, 0xf3, 0xd3, + 0xe3, 0x73, 0x1b, 0xff, 0x3c, 0x3e, 0x67, 0xfd, 0xf0, 0xf7, 0xaf, 0xef, 0x80, 0xd1, 0x20, 0x9f, + 0xd1, 0xef, 0x16, 0xd8, 0x65, 0xdf, 0x64, 0x07, 0xea, 0x5c, 0x04, 0xec, 0x11, 0x8e, 0xb7, 0xea, + 0x66, 0x0e, 0xd9, 0x82, 0xea, 0x4c, 0xc5, 0x4e, 0xe5, 0xbc, 0x75, 0xc1, 0x76, 0x8d, 0x49, 0xf6, + 0xa0, 0xa1, 0xe7, 0xd1, 0x44, 0x86, 0x4e, 0x15, 0x83, 0xb9, 0x47, 0x2e, 0x02, 0xe0, 0x68, 0xbd, + 0x64, 0x1e, 0x33, 0xdc, 0x5e, 0xf7, 0x85, 0xf1, 0x7e, 0x3d, 0x8f, 0x99, 0x6b, 0xd3, 0xc2, 0x24, + 0x04, 0x6a, 0x82, 0x46, 0xcc, 0xa9, 0x23, 0x0f, 0xda, 0x86, 0x3d, 0x62, 0xc9, 0x4c, 0x06, 0x4e, + 0x23, 0x63, 0xcf, 0x3c, 0xf2, 0x0a, 0xb4, 0xb8, 0x2f, 0x85, 0x97, 0xaa, 0xd0, 0x69, 0x62, 0xa6, + 0x69, 0xfc, 0x6f, 0x54, 0x38, 0xf8, 0xd9, 0x02, 0xbb, 0x1c, 0x3e, 0xe9, 0x42, 0x85, 0x07, 0xd8, + 0x83, 0xed, 0x56, 0x38, 0x02, 0x51, 0x2f, 0x8f, 0x07, 0x79, 0x17, 0x4d, 0xf4, 0x0f, 0x82, 0x72, + 0xfd, 0xea, 0xea, 0xfa, 0x79, 0x77, 0xb5, 0x95, 0xee, 0x2e, 0x03, 0x1c, 0xd1, 0x90, 0x07, 0x34, + 0x91, 0x4a, 0x3b, 0x75, 0xd4, 0x6d, 0xb7, 0xe8, 0xee, 0x7e, 0x91, 0x41, 0xf5, 0x96, 0x0a, 0x07, + 0xcf, 0x2c, 0x68, 0xe6, 0xaa, 0x92, 0xd7, 0xa1, 0xa6, 0x64, 0xc8, 0x70, 0x6f, 0xdd, 0x15, 0xd1, + 0x5d, 0x19, 0x32, 0x17, 0x93, 0x64, 0x0c, 0x36, 0x0d, 0xa7, 0x52, 0xf1, 0x64, 0x16, 0xe1, 0x7e, + 0xbb, 0x0b, 0x8d, 0x6f, 0xb3, 0xf9, 0xb5, 0x22, 0xe7, 0x2e, 0xca, 0xc8, 0x08, 0x5a, 0x4c, 0xf8, + 0x32, 0xe0, 0x62, 0x8a, 0xbd, 0x74, 0xc7, 0xa7, 0x97, 0x20, 0x37, 0xf3, 0x94, 0x5b, 0x16, 0x91, + 0xb7, 0xa0, 0xee, 0xa7, 0xea, 0xa8, 0x50, 0x69, 0x6b, 0xa9, 0x7a, 0xdf, 0xc4, 0xdd, 0x2c, 0x6d, + 0x76, 0x8c, 0x62, 0xd6, 0xd7, 0x76, 0x8c, 0x52, 0x62, 0x72, 0xf0, 0x6f, 0x15, 0x3a, 0xcb, 0xa7, + 0xcf, 0x8c, 0x90, 0x6b, 0x9d, 0x32, 0x95, 0xab, 0x90, 0x7b, 0xe4, 0x32, 0xec, 0xd1, 0x34, 0x99, + 0x49, 0xc5, 0xbf, 0xa7, 0x09, 0x97, 0xc2, 0x63, 0x22, 0x88, 0x25, 0x17, 0x49, 0xae, 0xcb, 0xee, + 0x4a, 0xf6, 0x66, 0x9e, 0x24, 0x6f, 0x42, 0x37, 0x91, 0x0f, 0xd8, 0x52, 0x79, 0xa6, 0xd7, 0x26, + 0x46, 0xcb, 0xb2, 0x77, 0x61, 0x3b, 0xd5, 0x4c, 0x71, 0x71, 0x28, 0x17, 0x95, 0x99, 0x86, 0x5b, + 0x45, 0xa2, 0x2c, 0x7e, 0x1b, 0xb6, 0xb4, 0x2f, 0x63, 0xa6, 0x3d, 0x9d, 0xc6, 0xb1, 0x54, 0x09, + 0x0b, 0x50, 0x53, 0xdb, 0x3d, 0x95, 0xc5, 0xef, 0x15, 0x61, 0x72, 0x05, 0x1c, 0xc5, 0x74, 0x2c, + 0x85, 0x66, 0x78, 0xb2, 0x97, 0x21, 0x0d, 0x84, 0xec, 0x15, 0x79, 0x33, 0x94, 0x97, 0x20, 0x23, + 0x19, 0xac, 0x20, 0x9b, 0xab, 0xc8, 0x3b, 0x26, 0xbd, 0x40, 0x8e, 0x61, 0x77, 0xaa, 0xa8, 0x48, + 0xd6, 0x16, 0x6c, 0x21, 0xec, 0x34, 0x26, 0x5f, 0x58, 0xed, 0x22, 0xec, 0x50, 0x5f, 0x79, 0x47, + 0x34, 0x4c, 0x57, 0x20, 0x36, 0x42, 0x08, 0xf5, 0xd5, 0x7d, 0x4c, 0x2d, 0x10, 0x1f, 0xc2, 0x19, + 0x9d, 0x4e, 0xbe, 0x63, 0xfe, 0xfa, 0x3a, 0x80, 0xa0, 0xdd, 0x3c, 0xbd, 0xba, 0xd2, 0xe0, 0x8f, + 0x3a, 0x6c, 0xae, 0x9c, 0x78, 0xe2, 0x40, 0x33, 0x92, 0x82, 0x3f, 0x28, 0x25, 0x2f, 0x5c, 0x72, + 0x13, 0xba, 0x53, 0x15, 0xfb, 0xa5, 0x22, 0xc5, 0xab, 0xd9, 0x3f, 0xf1, 0xea, 0x0c, 0x0b, 0x81, + 0xdc, 0x4d, 0x83, 0x2a, 0x3c, 0x6d, 0x68, 0x14, 0xd3, 0xc9, 0x12, 0x4d, 0xf5, 0xff, 0xd1, 0x18, + 0xd4, 0x82, 0xe6, 0x53, 0x68, 0xb1, 0x47, 0x71, 0x28, 0x15, 0x53, 0xf9, 0xfb, 0x39, 0x78, 0x09, + 0x41, 0x5e, 0x85, 0xf7, 0xb9, 0xc4, 0x90, 0x2b, 0xd0, 0x3a, 0x64, 0xcc, 0x33, 0x47, 0x09, 0xef, + 0x44, 0x7b, 0x7c, 0xf6, 0x64, 0xfc, 0x17, 0x8c, 0x21, 0xb4, 0x79, 0x98, 0x19, 0xe4, 0x1a, 0xb4, + 0xf9, 0xc4, 0x37, 0x5f, 0x0e, 0x21, 0x58, 0x88, 0x6f, 0x5b, 0x7b, 0x7c, 0xfe, 0x64, 0xf0, 0xc1, + 0xf5, 0xfd, 0xfd, 0xac, 0xce, 0x05, 0x3e, 0xf1, 0x73, 0xbb, 0xf7, 0x09, 0xb4, 0xca, 0xf3, 0xbb, + 0x05, 0x55, 0xf3, 0x10, 0x66, 0xc3, 0x36, 0x26, 0x39, 0x0b, 0xc0, 0xb5, 0x17, 0x2b, 0x1e, 0x51, + 0x35, 0xc7, 0x0b, 0xd5, 0x72, 0x6d, 0xae, 0xef, 0x66, 0x81, 0xde, 0x07, 0xd0, 0x59, 0xee, 0xa9, + 0x7c, 0xfa, 0xac, 0xa5, 0xa7, 0x2f, 0x27, 0xad, 0x94, 0xa4, 0xbd, 0xdf, 0x2c, 0x68, 0xe6, 0xad, + 0x98, 0x05, 0x26, 0x54, 0x33, 0x2f, 0x60, 0x42, 0x46, 0x39, 0xce, 0x36, 0x91, 0x1b, 0x26, 0x40, + 0x5e, 0x05, 0xdb, 0x8c, 0x46, 0xd1, 0x84, 0x65, 0x1a, 0xdb, 0xae, 0x99, 0x95, 0x6b, 0x7c, 0xf2, + 0x06, 0x74, 0xb9, 0xe0, 0x89, 0x37, 0xa5, 0xda, 0x0b, 0x79, 0xc4, 0xb3, 0x2b, 0x5c, 0x77, 0x3b, + 0x26, 0x7a, 0x8b, 0xea, 0x2f, 0x4d, 0x8c, 0xbc, 0x06, 0x1d, 0xae, 0x3d, 0xcd, 0xa3, 0x34, 0xa4, + 0x93, 0x30, 0x7b, 0x9c, 0x5a, 0x6e, 0x9b, 0xeb, 0x7b, 0x45, 0xc8, 0x94, 0x18, 0x8e, 0x28, 0x0d, + 0x13, 0x1e, 0x87, 0x73, 0x14, 0xc1, 0x72, 0xdb, 0x53, 0xaa, 0xef, 0xe4, 0xa1, 0xde, 0x45, 0x80, + 0xc5, 0x00, 0xd7, 0xbe, 0x06, 0x04, 0x6a, 0xe6, 0x14, 0xe7, 0x4d, 0xa2, 0x7d, 0xfd, 0xea, 0x93, + 0xe7, 0x7d, 0xeb, 0xe9, 0xf3, 0xbe, 0xf5, 0xec, 0x79, 0xdf, 0xfa, 0xf1, 0xb8, 0xbf, 0xf1, 0xf4, + 0xb8, 0xbf, 0xf1, 0xe7, 0x71, 0x7f, 0xe3, 0xdb, 0xc1, 0x94, 0x27, 0xb3, 0x74, 0x32, 0xf4, 0x65, + 0x34, 0x92, 0x42, 0x4b, 0xa1, 0x46, 0xf8, 0xf3, 0x68, 0x64, 0xbe, 0xa2, 0x78, 0x69, 0x26, 0x0d, + 0xfc, 0xb7, 0xf2, 0xfe, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xa0, 0x10, 0x30, 0xf0, 0x0e, 0x09, + 0x00, 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -948,6 +969,9 @@ func (this *Params) Equal(that interface{}) bool { return false } } + if !this.OpenidConfig.Equal(that1.OpenidConfig) { + return false + } return true } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -1003,6 +1027,18 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.OpenidConfig != nil { + { + size, err := m.OpenidConfig.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if len(m.AllowedPublicKeys) > 0 { for iNdEx := len(m.AllowedPublicKeys) - 1; iNdEx >= 0; iNdEx-- { { @@ -1068,83 +1104,31 @@ func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.IbcPort) > 0 { - i -= len(m.IbcPort) - copy(dAtA[i:], m.IbcPort) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.IbcPort))) + if len(m.IconUrl) > 0 { + i -= len(m.IconUrl) + copy(dAtA[i:], m.IconUrl) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.IconUrl))) i-- - dAtA[i] = 0x72 + dAtA[i] = 0x3a } - if len(m.IbcChannel) > 0 { - i -= len(m.IbcChannel) - copy(dAtA[i:], m.IbcChannel) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.IbcChannel))) - i-- - dAtA[i] = 0x6a - } - if len(m.IbcPath) > 0 { - i -= len(m.IbcPath) - copy(dAtA[i:], m.IbcPath) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.IbcPath))) - i-- - dAtA[i] = 0x62 - } - if m.IsEnabled { - i-- - if m.IsEnabled { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x58 - } - if len(m.CoingeckoId) > 0 { - i -= len(m.CoingeckoId) - copy(dAtA[i:], m.CoingeckoId) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.CoingeckoId))) - i-- - dAtA[i] = 0x52 - } - if len(m.ImageUrl) > 0 { - i -= len(m.ImageUrl) - copy(dAtA[i:], m.ImageUrl) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.ImageUrl))) - i-- - dAtA[i] = 0x4a - } - if len(m.Description) > 0 { - i -= len(m.Description) - copy(dAtA[i:], m.Description) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Description))) - i-- - dAtA[i] = 0x42 - } - if m.Decimals != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Decimals)) - i-- - dAtA[i] = 0x38 - } - if len(m.OriginDenom) > 0 { - i -= len(m.OriginDenom) - copy(dAtA[i:], m.OriginDenom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginDenom))) + if len(m.Method) > 0 { + i -= len(m.Method) + copy(dAtA[i:], m.Method) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Method))) i-- dAtA[i] = 0x32 } - if len(m.OriginChain) > 0 { - i -= len(m.OriginChain) - copy(dAtA[i:], m.OriginChain) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.OriginChain))) + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Name))) i-- dAtA[i] = 0x2a } - if len(m.AssetType) > 0 { - i -= len(m.AssetType) - copy(dAtA[i:], m.AssetType) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.AssetType))) + if m.AssetType != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.AssetType)) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x20 } if len(m.Symbol) > 0 { i -= len(m.Symbol) @@ -1153,19 +1137,17 @@ func (m *AssetInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Denom) > 0 { - i -= len(m.Denom) - copy(dAtA[i:], m.Denom) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Denom))) + if len(m.Hrp) > 0 { + i -= len(m.Hrp) + copy(dAtA[i:], m.Hrp) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Hrp))) i-- dAtA[i] = 0x12 } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) + if m.Index != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Index)) i-- - dAtA[i] = 0xa + dAtA[i] = 0x8 } return len(dAtA) - i, nil } @@ -1190,34 +1172,10 @@ func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.FeeInfo != nil { - { - size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x52 - } - if m.Explorer != nil { - { - size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x4a - } - if len(m.RestEndpoints) > 0 { - for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Validators) > 0 { + for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1225,37 +1183,9 @@ func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintGenesis(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x42 + dAtA[i] = 0x2a } } - if len(m.GrpcEndpoints) > 0 { - for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.GenesisTime) > 0 { - i -= len(m.GenesisTime) - copy(dAtA[i:], m.GenesisTime) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.GenesisTime))) - i-- - dAtA[i] = 0x32 - } - if len(m.Bech32Prefix) > 0 { - i -= len(m.Bech32Prefix) - copy(dAtA[i:], m.Bech32Prefix) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Bech32Prefix))) - i-- - dAtA[i] = 0x2a - } if len(m.Symbol) > 0 { i -= len(m.Symbol) copy(dAtA[i:], m.Symbol) @@ -1287,7 +1217,7 @@ func (m *ChainInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ChainInfo_Endpoint) Marshal() (dAtA []byte, err error) { +func (m *KeyInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1297,12 +1227,259 @@ func (m *ChainInfo_Endpoint) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ChainInfo_Endpoint) MarshalTo(dAtA []byte) (int, error) { +func (m *KeyInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ChainInfo_Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Type != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Type)) + i-- + dAtA[i] = 0x28 + } + if m.Curve != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Curve)) + i-- + dAtA[i] = 0x20 + } + if m.Encoding != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Encoding)) + i-- + dAtA[i] = 0x18 + } + if m.Algorithm != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Algorithm)) + i-- + dAtA[i] = 0x10 + } + if m.Role != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *OpenIDConfig) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *OpenIDConfig) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *OpenIDConfig) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.SubjectTypesSupported) > 0 { + for iNdEx := len(m.SubjectTypesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.SubjectTypesSupported[iNdEx]) + copy(dAtA[i:], m.SubjectTypesSupported[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.SubjectTypesSupported[iNdEx]))) + i-- + dAtA[i] = 0x52 + } + } + if len(m.AcrValuesSupported) > 0 { + for iNdEx := len(m.AcrValuesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.AcrValuesSupported[iNdEx]) + copy(dAtA[i:], m.AcrValuesSupported[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AcrValuesSupported[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } + if len(m.GrantTypesSupported) > 0 { + for iNdEx := len(m.GrantTypesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.GrantTypesSupported[iNdEx]) + copy(dAtA[i:], m.GrantTypesSupported[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.GrantTypesSupported[iNdEx]))) + i-- + dAtA[i] = 0x42 + } + } + if len(m.ResponseModesSupported) > 0 { + for iNdEx := len(m.ResponseModesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResponseModesSupported[iNdEx]) + copy(dAtA[i:], m.ResponseModesSupported[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ResponseModesSupported[iNdEx]))) + i-- + dAtA[i] = 0x3a + } + } + if len(m.ResponseTypesSupported) > 0 { + for iNdEx := len(m.ResponseTypesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ResponseTypesSupported[iNdEx]) + copy(dAtA[i:], m.ResponseTypesSupported[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ResponseTypesSupported[iNdEx]))) + i-- + dAtA[i] = 0x32 + } + } + if len(m.ScopesSupported) > 0 { + for iNdEx := len(m.ScopesSupported) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.ScopesSupported[iNdEx]) + copy(dAtA[i:], m.ScopesSupported[iNdEx]) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.ScopesSupported[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.UserinfoEndpoint) > 0 { + i -= len(m.UserinfoEndpoint) + copy(dAtA[i:], m.UserinfoEndpoint) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.UserinfoEndpoint))) + i-- + dAtA[i] = 0x22 + } + if len(m.TokenEndpoint) > 0 { + i -= len(m.TokenEndpoint) + copy(dAtA[i:], m.TokenEndpoint) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.TokenEndpoint))) + i-- + dAtA[i] = 0x1a + } + if len(m.AuthorizationEndpoint) > 0 { + i -= len(m.AuthorizationEndpoint) + copy(dAtA[i:], m.AuthorizationEndpoint) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.AuthorizationEndpoint))) + i-- + dAtA[i] = 0x12 + } + if len(m.Issuer) > 0 { + i -= len(m.Issuer) + copy(dAtA[i:], m.Issuer) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Issuer))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IbcChannel != nil { + { + size, err := m.IbcChannel.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.FeeInfo != nil { + { + size, err := m.FeeInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Explorer != nil { + { + size, err := m.Explorer.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.RestEndpoints) > 0 { + for iNdEx := len(m.RestEndpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.RestEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + } + if len(m.GrpcEndpoints) > 0 { + for iNdEx := len(m.GrpcEndpoints) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.GrpcEndpoints[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } + if len(m.Moniker) > 0 { + i -= len(m.Moniker) + copy(dAtA[i:], m.Moniker) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Moniker))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *ValidatorInfo_Endpoint) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ValidatorInfo_Endpoint) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ValidatorInfo_Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1327,7 +1504,7 @@ func (m *ChainInfo_Endpoint) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ChainInfo_ExplorerInfo) Marshal() (dAtA []byte, err error) { +func (m *ValidatorInfo_ExplorerInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1337,12 +1514,12 @@ func (m *ChainInfo_ExplorerInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ChainInfo_ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatorInfo_ExplorerInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ChainInfo_ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatorInfo_ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1364,7 +1541,7 @@ func (m *ChainInfo_ExplorerInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *ChainInfo_FeeInfo) Marshal() (dAtA []byte, err error) { +func (m *ValidatorInfo_FeeInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1374,12 +1551,12 @@ func (m *ChainInfo_FeeInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ChainInfo_FeeInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatorInfo_FeeInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ChainInfo_FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatorInfo_FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1424,7 +1601,7 @@ func (m *ChainInfo_FeeInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *KeyInfo) Marshal() (dAtA []byte, err error) { +func (m *ValidatorInfo_IBCChannel) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1434,41 +1611,29 @@ func (m *KeyInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *KeyInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *ValidatorInfo_IBCChannel) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *KeyInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ValidatorInfo_IBCChannel) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Encoding) > 0 { - i -= len(m.Encoding) - copy(dAtA[i:], m.Encoding) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Encoding))) - i-- - dAtA[i] = 0x22 - } - if len(m.Curve) > 0 { - i -= len(m.Curve) - copy(dAtA[i:], m.Curve) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Curve))) - i-- - dAtA[i] = 0x1a - } - if len(m.Algorithm) > 0 { - i -= len(m.Algorithm) - copy(dAtA[i:], m.Algorithm) - i = encodeVarintGenesis(dAtA, i, uint64(len(m.Algorithm))) + if len(m.Port) > 0 { + i -= len(m.Port) + copy(dAtA[i:], m.Port) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Port))) i-- dAtA[i] = 0x12 } - if m.Kind != 0 { - i = encodeVarintGenesis(dAtA, i, uint64(m.Kind)) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1519,6 +1684,10 @@ func (m *Params) Size() (n int) { n += 1 + l + sovGenesis(uint64(l)) } } + if m.OpenidConfig != nil { + l = m.OpenidConfig.Size() + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -1528,11 +1697,10 @@ func (m *AssetInfo) Size() (n int) { } var l int _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) + if m.Index != 0 { + n += 1 + sovGenesis(uint64(m.Index)) } - l = len(m.Denom) + l = len(m.Hrp) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } @@ -1540,45 +1708,18 @@ func (m *AssetInfo) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.AssetType) + if m.AssetType != 0 { + n += 1 + sovGenesis(uint64(m.AssetType)) + } + l = len(m.Name) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.OriginChain) + l = len(m.Method) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.OriginDenom) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.Decimals != 0 { - n += 1 + sovGenesis(uint64(m.Decimals)) - } - l = len(m.Description) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.ImageUrl) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.CoingeckoId) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - if m.IsEnabled { - n += 2 - } - l = len(m.IbcPath) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.IbcChannel) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.IbcPort) + l = len(m.IconUrl) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } @@ -1607,11 +1748,107 @@ func (m *ChainInfo) Size() (n int) { if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.Bech32Prefix) + if len(m.Validators) > 0 { + for _, e := range m.Validators { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *KeyInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Role != 0 { + n += 1 + sovGenesis(uint64(m.Role)) + } + if m.Algorithm != 0 { + n += 1 + sovGenesis(uint64(m.Algorithm)) + } + if m.Encoding != 0 { + n += 1 + sovGenesis(uint64(m.Encoding)) + } + if m.Curve != 0 { + n += 1 + sovGenesis(uint64(m.Curve)) + } + if m.Type != 0 { + n += 1 + sovGenesis(uint64(m.Type)) + } + return n +} + +func (m *OpenIDConfig) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Issuer) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.GenesisTime) + l = len(m.AuthorizationEndpoint) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.TokenEndpoint) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = len(m.UserinfoEndpoint) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + if len(m.ScopesSupported) > 0 { + for _, s := range m.ScopesSupported { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ResponseTypesSupported) > 0 { + for _, s := range m.ResponseTypesSupported { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.ResponseModesSupported) > 0 { + for _, s := range m.ResponseModesSupported { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.GrantTypesSupported) > 0 { + for _, s := range m.GrantTypesSupported { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.AcrValuesSupported) > 0 { + for _, s := range m.AcrValuesSupported { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + if len(m.SubjectTypesSupported) > 0 { + for _, s := range m.SubjectTypesSupported { + l = len(s) + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *ValidatorInfo) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Moniker) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } @@ -1635,10 +1872,14 @@ func (m *ChainInfo) Size() (n int) { l = m.FeeInfo.Size() n += 1 + l + sovGenesis(uint64(l)) } + if m.IbcChannel != nil { + l = m.IbcChannel.Size() + n += 1 + l + sovGenesis(uint64(l)) + } return n } -func (m *ChainInfo_Endpoint) Size() (n int) { +func (m *ValidatorInfo_Endpoint) Size() (n int) { if m == nil { return 0 } @@ -1654,7 +1895,7 @@ func (m *ChainInfo_Endpoint) Size() (n int) { return n } -func (m *ChainInfo_ExplorerInfo) Size() (n int) { +func (m *ValidatorInfo_ExplorerInfo) Size() (n int) { if m == nil { return 0 } @@ -1671,7 +1912,7 @@ func (m *ChainInfo_ExplorerInfo) Size() (n int) { return n } -func (m *ChainInfo_FeeInfo) Size() (n int) { +func (m *ValidatorInfo_FeeInfo) Size() (n int) { if m == nil { return 0 } @@ -1699,24 +1940,17 @@ func (m *ChainInfo_FeeInfo) Size() (n int) { return n } -func (m *KeyInfo) Size() (n int) { +func (m *ValidatorInfo_IBCChannel) Size() (n int) { if m == nil { return 0 } var l int _ = l - if m.Kind != 0 { - n += 1 + sovGenesis(uint64(m.Kind)) - } - l = len(m.Algorithm) + l = len(m.Id) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } - l = len(m.Curve) - if l > 0 { - n += 1 + l + sovGenesis(uint64(l)) - } - l = len(m.Encoding) + l = len(m.Port) if l > 0 { n += 1 + l + sovGenesis(uint64(l)) } @@ -1943,6 +2177,42 @@ func (m *Params) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field OpenidConfig", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.OpenidConfig == nil { + m.OpenidConfig = &OpenIDConfig{} + } + if err := m.OpenidConfig.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -1994,10 +2264,10 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Index", wireType) } - var stringLen uint64 + m.Index = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2007,27 +2277,14 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.Index |= int64(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Denom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Hrp", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2055,7 +2312,7 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Denom = string(dAtA[iNdEx:postIndex]) + m.Hrp = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { @@ -2090,10 +2347,10 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { m.Symbol = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { + if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field AssetType", wireType) } - var stringLen uint64 + m.AssetType = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -2103,27 +2360,14 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + m.AssetType |= AssetType(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssetType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginChain", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2151,11 +2395,11 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginChain = string(dAtA[iNdEx:postIndex]) + m.Name = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field OriginDenom", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2183,30 +2427,11 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.OriginDenom = string(dAtA[iNdEx:postIndex]) + m.Method = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 7: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Decimals", wireType) - } - m.Decimals = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Decimals |= int32(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 8: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field IconUrl", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2234,187 +2459,7 @@ func (m *AssetInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Description = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 9: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ImageUrl", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.ImageUrl = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 10: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CoingeckoId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CoingeckoId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 11: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field IsEnabled", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.IsEnabled = bool(v != 0) - case 12: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPath", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPath = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 13: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcChannel = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 14: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field IbcPort", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.IbcPort = string(dAtA[iNdEx:postIndex]) + m.IconUrl = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2596,7 +2641,236 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Bech32Prefix", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Validators = append(m.Validators, &ValidatorInfo{}) + if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *KeyInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: KeyInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) + } + m.Role = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Role |= KeyRole(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + m.Algorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Algorithm |= KeyAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + m.Encoding = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Encoding |= KeyEncoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) + } + m.Curve = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Curve |= KeyCurve(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 5: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType) + } + m.Type = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Type |= KeyType(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *OpenIDConfig) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: OpenIDConfig: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: OpenIDConfig: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Issuer", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2624,11 +2898,139 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Bech32Prefix = string(dAtA[iNdEx:postIndex]) + m.Issuer = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AuthorizationEndpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AuthorizationEndpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TokenEndpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TokenEndpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field UserinfoEndpoint", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.UserinfoEndpoint = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScopesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ScopesSupported = append(m.ScopesSupported, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 6: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GenesisTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTypesSupported", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2656,9 +3058,219 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GenesisTime = string(dAtA[iNdEx:postIndex]) + m.ResponseTypesSupported = append(m.ResponseTypesSupported, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseModesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ResponseModesSupported = append(m.ResponseModesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field GrantTypesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.GrantTypesSupported = append(m.GrantTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AcrValuesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AcrValuesSupported = append(m.AcrValuesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + case 10: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SubjectTypesSupported", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SubjectTypesSupported = append(m.SubjectTypesSupported, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *ValidatorInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ValidatorInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ValidatorInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Moniker = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field GrpcEndpoints", wireType) } @@ -2687,12 +3299,12 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.GrpcEndpoints = append(m.GrpcEndpoints, &ChainInfo_Endpoint{}) + m.GrpcEndpoints = append(m.GrpcEndpoints, &ValidatorInfo_Endpoint{}) if err := m.GrpcEndpoints[len(m.GrpcEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 8: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field RestEndpoints", wireType) } @@ -2721,12 +3333,12 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.RestEndpoints = append(m.RestEndpoints, &ChainInfo_Endpoint{}) + m.RestEndpoints = append(m.RestEndpoints, &ValidatorInfo_Endpoint{}) if err := m.RestEndpoints[len(m.RestEndpoints)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 9: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Explorer", wireType) } @@ -2756,13 +3368,13 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.Explorer == nil { - m.Explorer = &ChainInfo_ExplorerInfo{} + m.Explorer = &ValidatorInfo_ExplorerInfo{} } if err := m.Explorer.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex - case 10: + case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field FeeInfo", wireType) } @@ -2792,12 +3404,48 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { return io.ErrUnexpectedEOF } if m.FeeInfo == nil { - m.FeeInfo = &ChainInfo_FeeInfo{} + m.FeeInfo = &ValidatorInfo_FeeInfo{} } if err := m.FeeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field IbcChannel", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.IbcChannel == nil { + m.IbcChannel = &ValidatorInfo_IBCChannel{} + } + if err := m.IbcChannel.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) @@ -2819,7 +3467,7 @@ func (m *ChainInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *ChainInfo_Endpoint) Unmarshal(dAtA []byte) error { +func (m *ValidatorInfo_Endpoint) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2921,7 +3569,7 @@ func (m *ChainInfo_Endpoint) Unmarshal(dAtA []byte) error { } return nil } -func (m *ChainInfo_ExplorerInfo) Unmarshal(dAtA []byte) error { +func (m *ValidatorInfo_ExplorerInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3035,7 +3683,7 @@ func (m *ChainInfo_ExplorerInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *ChainInfo_FeeInfo) Unmarshal(dAtA []byte) error { +func (m *ValidatorInfo_FeeInfo) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3199,7 +3847,7 @@ func (m *ChainInfo_FeeInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *KeyInfo) Unmarshal(dAtA []byte) error { +func (m *ValidatorInfo_IBCChannel) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3222,17 +3870,17 @@ func (m *KeyInfo) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: KeyInfo: wiretype end group for non-group") + return fmt.Errorf("proto: IBCChannel: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: KeyInfo: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: IBCChannel: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) } - m.Kind = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -3242,14 +3890,27 @@ func (m *KeyInfo) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Kind |= KeyType(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Port", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3277,71 +3938,7 @@ func (m *KeyInfo) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Algorithm = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Curve", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Curve = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowGenesis - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthGenesis - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthGenesis - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Encoding = string(dAtA[iNdEx:postIndex]) + m.Port = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/did/types/genesis_test.go b/x/did/types/genesis_test.go index 998a9d4a3..01d5a476d 100644 --- a/x/did/types/genesis_test.go +++ b/x/did/types/genesis_test.go @@ -3,7 +3,7 @@ package types_test import ( "testing" - "github.com/onsonr/hway/x/did/types" + "github.com/onsonr/sonr/x/did/types" "github.com/stretchr/testify/require" ) @@ -19,14 +19,6 @@ func TestGenesisState_Validate(t *testing.T) { genState: types.DefaultGenesis(), valid: true, }, - { - desc: "valid genesis state", - genState: &types.GenesisState{ - - // this line is used by starport scaffolding # types/genesis/validField - }, - valid: true, - }, // this line is used by starport scaffolding # types/genesis/testcase } for _, tc := range tests { diff --git a/x/did/types/info.go b/x/did/types/info.go new file mode 100644 index 000000000..aaac70c52 --- /dev/null +++ b/x/did/types/info.go @@ -0,0 +1,89 @@ +package types + +import ( + "encoding/hex" + + "github.com/mr-tron/base58/base58" +) + +// +// # Genesis Structures +// + +// Equal returns true if two asset infos are equal +func (a *AssetInfo) Equal(b *AssetInfo) bool { + if a == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two chain infos are equal +func (c *ChainInfo) Equal(b *ChainInfo) bool { + if c == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two OpenID config infos are equal +func (o *OpenIDConfig) Equal(b *OpenIDConfig) bool { + if o == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two key infos are equal +func (k *KeyInfo) Equal(b *KeyInfo) bool { + if k == nil && b == nil { + return true + } + return false +} + +// Equal returns true if two validator infos are equal +func (v *ValidatorInfo) Equal(b *ValidatorInfo) bool { + if v == nil && b == nil { + return true + } + return false +} + +// DecodePublicKey extracts the public key from the given data +func (k *KeyInfo) DecodePublicKey(data interface{}) ([]byte, error) { + var bz []byte + switch v := data.(type) { + case string: + bz = []byte(v) + case []byte: + bz = v + default: + return nil, ErrUnsupportedKeyEncoding + } + + if k.Encoding == KeyEncoding_KEY_ENCODING_RAW { + return bz, nil + } + if k.Encoding == KeyEncoding_KEY_ENCODING_HEX { + return hex.DecodeString(string(bz)) + } + if k.Encoding == KeyEncoding_KEY_ENCODING_MULTIBASE { + return base58.Decode(string(bz)) + } + return nil, ErrUnsupportedKeyEncoding +} + +// EncodePublicKey encodes the public key according to the KeyInfo's encoding +func (k *KeyInfo) EncodePublicKey(data []byte) (string, error) { + if k.Encoding == KeyEncoding_KEY_ENCODING_RAW { + return string(data), nil + } + if k.Encoding == KeyEncoding_KEY_ENCODING_HEX { + return hex.EncodeToString(data), nil + } + if k.Encoding == KeyEncoding_KEY_ENCODING_MULTIBASE { + return base58.Encode(data), nil + } + return "", ErrUnsupportedKeyEncoding +} diff --git a/x/did/types/models.pb.go b/x/did/types/models.pb.go index 464f9c0a9..e07b961f8 100644 --- a/x/did/types/models.pb.go +++ b/x/did/types/models.pb.go @@ -5,6 +5,7 @@ package types import ( fmt "fmt" + _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -22,27 +23,23 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// DID defines a parsed DID string -type DID struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Method DIDNamespace `protobuf:"varint,2,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` - Network string `protobuf:"bytes,3,opt,name=network,proto3" json:"network,omitempty"` - Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` - Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` +// Accumulator defines a BLS accumulator +type Accumulator struct { + Accumulator []byte `protobuf:"bytes,1,opt,name=accumulator,proto3" json:"accumulator,omitempty"` } -func (m *DID) Reset() { *m = DID{} } -func (m *DID) String() string { return proto.CompactTextString(m) } -func (*DID) ProtoMessage() {} -func (*DID) Descriptor() ([]byte, []int) { +func (m *Accumulator) Reset() { *m = Accumulator{} } +func (m *Accumulator) String() string { return proto.CompactTextString(m) } +func (*Accumulator) ProtoMessage() {} +func (*Accumulator) Descriptor() ([]byte, []int) { return fileDescriptor_739bb5ab5cb60751, []int{0} } -func (m *DID) XXX_Unmarshal(b []byte) error { +func (m *Accumulator) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *DID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *Accumulator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_DID.Marshal(b, m, deterministic) + return xxx_messageInfo_Accumulator.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -52,49 +49,21 @@ func (m *DID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *DID) XXX_Merge(src proto.Message) { - xxx_messageInfo_DID.Merge(m, src) +func (m *Accumulator) XXX_Merge(src proto.Message) { + xxx_messageInfo_Accumulator.Merge(m, src) } -func (m *DID) XXX_Size() int { +func (m *Accumulator) XXX_Size() int { return m.Size() } -func (m *DID) XXX_DiscardUnknown() { - xxx_messageInfo_DID.DiscardUnknown(m) +func (m *Accumulator) XXX_DiscardUnknown() { + xxx_messageInfo_Accumulator.DiscardUnknown(m) } -var xxx_messageInfo_DID proto.InternalMessageInfo +var xxx_messageInfo_Accumulator proto.InternalMessageInfo -func (m *DID) GetId() string { +func (m *Accumulator) GetAccumulator() []byte { if m != nil { - return m.Id - } - return "" -} - -func (m *DID) GetMethod() DIDNamespace { - if m != nil { - return m.Method - } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED -} - -func (m *DID) GetNetwork() string { - if m != nil { - return m.Network - } - return "" -} - -func (m *DID) GetIdentifier() string { - if m != nil { - return m.Identifier - } - return "" -} - -func (m *DID) GetPaths() []string { - if m != nil { - return m.Paths + return m.Accumulator } return nil } @@ -184,6 +153,83 @@ func (m *Credential) GetController() string { return "" } +// DID defines a parsed DID string +type DID struct { + Method DIDNamespace `protobuf:"varint,1,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + Network string `protobuf:"bytes,2,opt,name=network,proto3" json:"network,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Identifier string `protobuf:"bytes,4,opt,name=identifier,proto3" json:"identifier,omitempty"` + Paths []string `protobuf:"bytes,5,rep,name=paths,proto3" json:"paths,omitempty"` +} + +func (m *DID) Reset() { *m = DID{} } +func (m *DID) String() string { return proto.CompactTextString(m) } +func (*DID) ProtoMessage() {} +func (*DID) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{2} +} +func (m *DID) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DID.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *DID) XXX_Merge(src proto.Message) { + xxx_messageInfo_DID.Merge(m, src) +} +func (m *DID) XXX_Size() int { + return m.Size() +} +func (m *DID) XXX_DiscardUnknown() { + xxx_messageInfo_DID.DiscardUnknown(m) +} + +var xxx_messageInfo_DID proto.InternalMessageInfo + +func (m *DID) GetMethod() DIDNamespace { + if m != nil { + return m.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + +func (m *DID) GetNetwork() string { + if m != nil { + return m.Network + } + return "" +} + +func (m *DID) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *DID) GetIdentifier() string { + if m != nil { + return m.Identifier + } + return "" +} + +func (m *DID) GetPaths() []string { + if m != nil { + return m.Paths + } + return nil +} + // Document defines a DID document type Document struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -192,13 +238,14 @@ type Document struct { AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` + Service []string `protobuf:"bytes,9,rep,name=service,proto3" json:"service,omitempty"` } func (m *Document) Reset() { *m = Document{} } func (m *Document) String() string { return proto.CompactTextString(m) } func (*Document) ProtoMessage() {} func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{2} + return fileDescriptor_739bb5ab5cb60751, []int{3} } func (m *Document) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -269,6 +316,13 @@ func (m *Document) GetCapabilityInvocation() []string { return nil } +func (m *Document) GetService() []string { + if m != nil { + return m.Service + } + return nil +} + // Metadata defines additional information provided to a did type Metadata struct { OriginUri string `protobuf:"bytes,1,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` @@ -280,7 +334,7 @@ func (m *Metadata) Reset() { *m = Metadata{} } func (m *Metadata) String() string { return proto.CompactTextString(m) } func (*Metadata) ProtoMessage() {} func (*Metadata) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{3} + return fileDescriptor_739bb5ab5cb60751, []int{4} } func (m *Metadata) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -341,7 +395,7 @@ func (m *Permissions) Reset() { *m = Permissions{} } func (m *Permissions) String() string { return proto.CompactTextString(m) } func (*Permissions) ProtoMessage() {} func (*Permissions) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{4} + return fileDescriptor_739bb5ab5cb60751, []int{5} } func (m *Permissions) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -386,19 +440,17 @@ func (m *Permissions) GetScopes() []PermissionScope { // Profile defines an associated public identity for a did subject type Profile struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - Attestations []*VerificationMethod `protobuf:"bytes,5,rep,name=attestations,proto3" json:"attestations,omitempty"` - Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` + Metadata *Metadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *Profile) Reset() { *m = Profile{} } func (m *Profile) String() string { return proto.CompactTextString(m) } func (*Profile) ProtoMessage() {} func (*Profile) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{5} + return fileDescriptor_739bb5ab5cb60751, []int{6} } func (m *Profile) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -448,20 +500,6 @@ func (m *Profile) GetController() string { return "" } -func (m *Profile) GetCredentials() []*Credential { - if m != nil { - return m.Credentials - } - return nil -} - -func (m *Profile) GetAttestations() []*VerificationMethod { - if m != nil { - return m.Attestations - } - return nil -} - func (m *Profile) GetMetadata() *Metadata { if m != nil { return m.Metadata @@ -480,7 +518,7 @@ func (m *Property) Reset() { *m = Property{} } func (m *Property) String() string { return proto.CompactTextString(m) } func (*Property) ProtoMessage() {} func (*Property) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{6} + return fileDescriptor_739bb5ab5cb60751, []int{7} } func (m *Property) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -525,18 +563,20 @@ func (m *Property) GetKey() []byte { // PubKey defines a public key for a did type PubKey struct { - Namespace DIDNamespace `protobuf:"varint,1,opt,name=namespace,proto3,enum=did.v1.DIDNamespace" json:"namespace,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - Kind KeyType `protobuf:"varint,3,opt,name=kind,proto3,enum=did.v1.KeyType" json:"kind,omitempty"` - Multibase string `protobuf:"bytes,5,opt,name=multibase,proto3" json:"multibase,omitempty"` - Jwks map[string]string `protobuf:"bytes,6,rep,name=jwks,proto3" json:"jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Role KeyRole `protobuf:"varint,1,opt,name=role,proto3,enum=did.v1.KeyRole" json:"role,omitempty"` + Algorithm KeyAlgorithm `protobuf:"varint,2,opt,name=algorithm,proto3,enum=did.v1.KeyAlgorithm" json:"algorithm,omitempty"` + Encoding KeyEncoding `protobuf:"varint,3,opt,name=encoding,proto3,enum=did.v1.KeyEncoding" json:"encoding,omitempty"` + Raw []byte `protobuf:"bytes,4,opt,name=raw,proto3" json:"raw,omitempty"` + Hex string `protobuf:"bytes,5,opt,name=hex,proto3" json:"hex,omitempty"` + Multibase string `protobuf:"bytes,6,opt,name=multibase,proto3" json:"multibase,omitempty"` + Jwk map[string]string `protobuf:"bytes,7,rep,name=jwk,proto3" json:"jwk,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *PubKey) Reset() { *m = PubKey{} } func (m *PubKey) String() string { return proto.CompactTextString(m) } func (*PubKey) ProtoMessage() {} func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{7} + return fileDescriptor_739bb5ab5cb60751, []int{8} } func (m *PubKey) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -565,25 +605,39 @@ func (m *PubKey) XXX_DiscardUnknown() { var xxx_messageInfo_PubKey proto.InternalMessageInfo -func (m *PubKey) GetNamespace() DIDNamespace { +func (m *PubKey) GetRole() KeyRole { if m != nil { - return m.Namespace + return m.Role } - return DIDNamespace_DID_NAMESPACE_UNSPECIFIED + return KeyRole_KEY_ROLE_UNSPECIFIED } -func (m *PubKey) GetKey() []byte { +func (m *PubKey) GetAlgorithm() KeyAlgorithm { if m != nil { - return m.Key + return m.Algorithm + } + return KeyAlgorithm_KEY_ALGORITHM_UNSPECIFIED +} + +func (m *PubKey) GetEncoding() KeyEncoding { + if m != nil { + return m.Encoding + } + return KeyEncoding_KEY_ENCODING_UNSPECIFIED +} + +func (m *PubKey) GetRaw() []byte { + if m != nil { + return m.Raw } return nil } -func (m *PubKey) GetKind() KeyType { +func (m *PubKey) GetHex() string { if m != nil { - return m.Kind + return m.Hex } - return KeyType_KEY_TYPE_UNSPECIFIED + return "" } func (m *PubKey) GetMultibase() string { @@ -593,25 +647,173 @@ func (m *PubKey) GetMultibase() string { return "" } -func (m *PubKey) GetJwks() map[string]string { +func (m *PubKey) GetJwk() map[string]string { if m != nil { - return m.Jwks + return m.Jwk + } + return nil +} + +// Service defines a Decentralized Service on the Sonr Blockchain +type Service struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + Permissions *Permissions `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions,omitempty"` + Openid *OpenIDConfig `protobuf:"bytes,5,opt,name=openid,proto3" json:"openid,omitempty"` + Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` +} + +func (m *Service) Reset() { *m = Service{} } +func (m *Service) String() string { return proto.CompactTextString(m) } +func (*Service) ProtoMessage() {} +func (*Service) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{9} +} +func (m *Service) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Service.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Service) XXX_Merge(src proto.Message) { + xxx_messageInfo_Service.Merge(m, src) +} +func (m *Service) XXX_Size() int { + return m.Size() +} +func (m *Service) XXX_DiscardUnknown() { + xxx_messageInfo_Service.DiscardUnknown(m) +} + +var xxx_messageInfo_Service proto.InternalMessageInfo + +func (m *Service) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Service) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *Service) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *Service) GetPermissions() *Permissions { + if m != nil { + return m.Permissions + } + return nil +} + +func (m *Service) GetOpenid() *OpenIDConfig { + if m != nil { + return m.Openid + } + return nil +} + +func (m *Service) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +// Token defines a macron token +type Token struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` +} + +func (m *Token) Reset() { *m = Token{} } +func (m *Token) String() string { return proto.CompactTextString(m) } +func (*Token) ProtoMessage() {} +func (*Token) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{10} +} +func (m *Token) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Token.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Token) XXX_Merge(src proto.Message) { + xxx_messageInfo_Token.Merge(m, src) +} +func (m *Token) XXX_Size() int { + return m.Size() +} +func (m *Token) XXX_DiscardUnknown() { + xxx_messageInfo_Token.DiscardUnknown(m) +} + +var xxx_messageInfo_Token proto.InternalMessageInfo + +func (m *Token) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *Token) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *Token) GetMacron() []byte { + if m != nil { + return m.Macron } return nil } // VerificationMethod defines a verification method type VerificationMethod struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + Method DIDNamespace `protobuf:"varint,3,opt,name=method,proto3,enum=did.v1.DIDNamespace" json:"method,omitempty"` + PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + Service *Service `protobuf:"bytes,7,opt,name=service,proto3" json:"service,omitempty"` } func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } func (*VerificationMethod) ProtoMessage() {} func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_739bb5ab5cb60751, []int{8} + return fileDescriptor_739bb5ab5cb60751, []int{11} } func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -654,6 +856,13 @@ func (m *VerificationMethod) GetController() string { return "" } +func (m *VerificationMethod) GetMethod() DIDNamespace { + if m != nil { + return m.Method + } + return DIDNamespace_DID_NAMESPACE_UNSPECIFIED +} + func (m *VerificationMethod) GetPublicKey() *PubKey { if m != nil { return m.PublicKey @@ -661,9 +870,62 @@ func (m *VerificationMethod) GetPublicKey() *PubKey { return nil } +func (m *VerificationMethod) GetService() *Service { + if m != nil { + return m.Service + } + return nil +} + +// Witness defines a BLS witness +type Witness struct { + Witness []byte `protobuf:"bytes,1,opt,name=witness,proto3" json:"witness,omitempty"` +} + +func (m *Witness) Reset() { *m = Witness{} } +func (m *Witness) String() string { return proto.CompactTextString(m) } +func (*Witness) ProtoMessage() {} +func (*Witness) Descriptor() ([]byte, []int) { + return fileDescriptor_739bb5ab5cb60751, []int{12} +} +func (m *Witness) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Witness) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Witness.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Witness) XXX_Merge(src proto.Message) { + xxx_messageInfo_Witness.Merge(m, src) +} +func (m *Witness) XXX_Size() int { + return m.Size() +} +func (m *Witness) XXX_DiscardUnknown() { + xxx_messageInfo_Witness.DiscardUnknown(m) +} + +var xxx_messageInfo_Witness proto.InternalMessageInfo + +func (m *Witness) GetWitness() []byte { + if m != nil { + return m.Witness + } + return nil +} + func init() { - proto.RegisterType((*DID)(nil), "did.v1.DID") + proto.RegisterType((*Accumulator)(nil), "did.v1.Accumulator") proto.RegisterType((*Credential)(nil), "did.v1.Credential") + proto.RegisterType((*DID)(nil), "did.v1.DID") proto.RegisterType((*Document)(nil), "did.v1.Document") proto.RegisterType((*Metadata)(nil), "did.v1.Metadata") proto.RegisterMapType((map[string]*Property)(nil), "did.v1.Metadata.PrivateEntry") @@ -672,71 +934,85 @@ func init() { proto.RegisterType((*Profile)(nil), "did.v1.Profile") proto.RegisterType((*Property)(nil), "did.v1.Property") proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") - proto.RegisterMapType((map[string]string)(nil), "did.v1.PubKey.JwksEntry") + proto.RegisterMapType((map[string]string)(nil), "did.v1.PubKey.JwkEntry") + proto.RegisterType((*Service)(nil), "did.v1.Service") + proto.RegisterType((*Token)(nil), "did.v1.Token") proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") + proto.RegisterType((*Witness)(nil), "did.v1.Witness") } func init() { proto.RegisterFile("did/v1/models.proto", fileDescriptor_739bb5ab5cb60751) } var fileDescriptor_739bb5ab5cb60751 = []byte{ - // 861 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xe3, 0x44, - 0x18, 0xae, 0xed, 0x36, 0x1f, 0x6f, 0x42, 0x5a, 0xcd, 0x06, 0x61, 0x45, 0xbb, 0x51, 0xe4, 0x95, - 0x96, 0x22, 0x95, 0x44, 0x9b, 0x5d, 0x69, 0x01, 0xa1, 0x3d, 0x40, 0x38, 0x94, 0x52, 0x14, 0x99, - 0x8f, 0x03, 0x97, 0x68, 0x62, 0x4f, 0x93, 0xd9, 0xd8, 0x1e, 0x6b, 0x66, 0x9c, 0xe2, 0x7f, 0x81, - 0xc4, 0x2f, 0xe0, 0xc2, 0x0f, 0xe1, 0xc4, 0x71, 0x8f, 0x1c, 0x51, 0xfb, 0x23, 0xe0, 0x88, 0x3c, - 0xe3, 0xaf, 0xd6, 0xec, 0x4a, 0x7b, 0xf3, 0x3c, 0xcf, 0xf3, 0xbe, 0x7e, 0x3f, 0x67, 0xe0, 0x81, - 0x4f, 0xfd, 0xd9, 0xfe, 0xe9, 0x2c, 0x64, 0x3e, 0x09, 0xc4, 0x34, 0xe6, 0x4c, 0x32, 0xd4, 0xf2, - 0xa9, 0x3f, 0xdd, 0x3f, 0x1d, 0x0d, 0x73, 0x72, 0x43, 0x22, 0x22, 0x68, 0xce, 0x3a, 0xbf, 0x1a, - 0x60, 0x2d, 0xce, 0x17, 0x68, 0x00, 0x26, 0xf5, 0x6d, 0x63, 0x62, 0x9c, 0x76, 0x5d, 0x93, 0xfa, - 0xe8, 0x0c, 0x5a, 0x21, 0x91, 0x5b, 0xe6, 0xdb, 0xe6, 0xc4, 0x38, 0x1d, 0xcc, 0x87, 0x53, 0xed, - 0x66, 0xba, 0x38, 0x5f, 0x7c, 0x8b, 0x43, 0x22, 0x62, 0xec, 0x11, 0x37, 0xd7, 0x20, 0x1b, 0xda, - 0x11, 0x91, 0xd7, 0x8c, 0xef, 0x6c, 0x4b, 0xb9, 0x28, 0x8e, 0x68, 0x0c, 0x40, 0x7d, 0x12, 0x49, - 0x7a, 0x45, 0x09, 0xb7, 0x0f, 0x15, 0x59, 0x43, 0xd0, 0x10, 0x8e, 0x62, 0x2c, 0xb7, 0xc2, 0x3e, - 0x9a, 0x58, 0xa7, 0x5d, 0x57, 0x1f, 0x9c, 0x3f, 0x0c, 0x80, 0x2f, 0x39, 0x51, 0x32, 0x1c, 0x34, - 0x82, 0xfb, 0x10, 0x8e, 0xbd, 0x92, 0x5d, 0xc9, 0x34, 0x26, 0x2a, 0xca, 0xae, 0x3b, 0xa8, 0xe0, - 0xef, 0xd3, 0x98, 0xa0, 0xc7, 0xf0, 0x5e, 0x4d, 0x48, 0x7d, 0x15, 0x5d, 0xdf, 0xed, 0x57, 0xe0, - 0xb9, 0x8f, 0x1e, 0x42, 0x57, 0x72, 0x1c, 0x89, 0x98, 0x71, 0x69, 0x1f, 0xaa, 0x30, 0x2a, 0x20, - 0x4b, 0x4d, 0x24, 0xeb, 0x57, 0xc4, 0x93, 0x76, 0x4b, 0xa7, 0x96, 0x1f, 0xb3, 0xd4, 0x3c, 0x16, - 0x49, 0xce, 0x82, 0x80, 0x70, 0xbb, 0xad, 0x53, 0xab, 0x10, 0xe7, 0x77, 0x13, 0x3a, 0x0b, 0xe6, - 0x25, 0x21, 0x89, 0x64, 0x23, 0x85, 0x4b, 0x18, 0xee, 0x09, 0xa7, 0x57, 0xd4, 0xc3, 0x92, 0xb2, - 0x68, 0xa5, 0x0b, 0x29, 0x6c, 0x73, 0x62, 0x9d, 0xf6, 0xe6, 0xa3, 0xa2, 0xda, 0x3f, 0xd6, 0x34, - 0x97, 0x4a, 0xe2, 0x3e, 0xd8, 0x37, 0x30, 0x81, 0x9e, 0xc0, 0x00, 0x27, 0x72, 0x9b, 0xe5, 0xa4, - 0x89, 0x3c, 0x91, 0x7b, 0x28, 0xfa, 0x08, 0x4e, 0xb0, 0x10, 0x84, 0xd7, 0xfe, 0x99, 0x57, 0xfe, - 0xb8, 0xc4, 0xb5, 0x4f, 0xf4, 0x0c, 0xde, 0xf7, 0x70, 0x8c, 0xd7, 0x34, 0xa0, 0x32, 0x5d, 0xf9, - 0x24, 0x20, 0x1b, 0xed, 0xb9, 0xad, 0xf4, 0xc3, 0x8a, 0x5c, 0x94, 0xdc, 0x3d, 0x23, 0x1a, 0xed, - 0x59, 0x1e, 0x4e, 0xe7, 0xbe, 0xd1, 0x79, 0xc9, 0x39, 0xbf, 0x99, 0xd0, 0xb9, 0x24, 0x12, 0xfb, - 0x58, 0x62, 0xf4, 0x08, 0x80, 0x71, 0xba, 0xa1, 0xd1, 0x2a, 0xe1, 0x34, 0x2f, 0x58, 0x57, 0x23, - 0x3f, 0x70, 0x8a, 0x9e, 0x43, 0x2b, 0x4e, 0xd6, 0x01, 0xf5, 0xf2, 0x4a, 0x3d, 0x2c, 0x2a, 0x55, - 0x38, 0x98, 0x2e, 0x15, 0xfd, 0x55, 0x24, 0x79, 0xea, 0xe6, 0x5a, 0xf4, 0x02, 0xda, 0x31, 0xa7, - 0x7b, 0x2c, 0x89, 0x6d, 0x29, 0xb3, 0x47, 0x4d, 0x33, 0xcd, 0x6b, 0xbb, 0x42, 0x3d, 0xfa, 0x14, - 0x7a, 0x35, 0x7f, 0xe8, 0x04, 0xac, 0x1d, 0x49, 0xf3, 0xa8, 0xb2, 0xcf, 0x6c, 0x7e, 0xf7, 0x38, - 0x48, 0x8a, 0x01, 0xd4, 0x87, 0xcf, 0xcc, 0x4f, 0x8c, 0xd1, 0x37, 0xd0, 0xaf, 0xfb, 0xfc, 0x1f, - 0xdb, 0x27, 0x75, 0xdb, 0xde, 0xfc, 0xa4, 0x88, 0x69, 0xc9, 0x59, 0x4c, 0xb8, 0x4c, 0x6b, 0xde, - 0x9c, 0x00, 0x7a, 0x4b, 0xc2, 0x43, 0x2a, 0x04, 0x65, 0x91, 0xc8, 0xd6, 0x73, 0xc3, 0x71, 0x24, - 0x85, 0x6d, 0x4c, 0xac, 0x37, 0xaf, 0xa7, 0xd6, 0xa0, 0x19, 0xb4, 0x84, 0xc7, 0x62, 0xa2, 0xc7, - 0x6b, 0x30, 0xff, 0xa0, 0xfc, 0x53, 0xe9, 0xf2, 0xbb, 0x8c, 0x77, 0x73, 0x99, 0xf3, 0x8f, 0x01, - 0xed, 0x25, 0x67, 0x57, 0x34, 0x20, 0x8d, 0xc9, 0xad, 0x2d, 0x84, 0xf9, 0xb6, 0x85, 0xb0, 0xee, - 0x2f, 0x04, 0x7a, 0x0e, 0xbd, 0x6a, 0xf1, 0x84, 0x9a, 0xd0, 0xde, 0x1c, 0x15, 0xb1, 0x54, 0xfb, - 0xee, 0xd6, 0x65, 0xe8, 0x25, 0xf4, 0xb1, 0x94, 0x44, 0x48, 0x35, 0x2c, 0xfa, 0xa2, 0x78, 0xfb, - 0x86, 0xdc, 0xd1, 0xa3, 0x33, 0xe8, 0x84, 0x79, 0x93, 0xd5, 0x06, 0xd7, 0x0a, 0x5d, 0x34, 0xdf, - 0x2d, 0x15, 0xce, 0x4b, 0xe8, 0x14, 0xe5, 0x47, 0x13, 0xe8, 0x61, 0xcf, 0x4b, 0xc2, 0x24, 0xc0, - 0x92, 0x71, 0x55, 0x82, 0xbe, 0x5b, 0x87, 0x8a, 0x9e, 0x9a, 0x8a, 0xc9, 0x3e, 0x9d, 0x7f, 0x0d, - 0x68, 0x2d, 0x93, 0xf5, 0x05, 0x49, 0xd1, 0x1c, 0xba, 0x51, 0xd1, 0x0a, 0x65, 0xfc, 0xa6, 0x36, - 0x55, 0xb2, 0xa6, 0x43, 0xf4, 0x18, 0x0e, 0x77, 0x34, 0xd2, 0x37, 0xd7, 0x60, 0x7e, 0x5c, 0x38, - 0xb8, 0x20, 0x69, 0x76, 0xc3, 0xb9, 0x8a, 0xcc, 0xae, 0xb0, 0x30, 0x09, 0x24, 0x5d, 0x63, 0x41, - 0xec, 0x23, 0xbd, 0x33, 0x25, 0x80, 0xce, 0xe0, 0xf0, 0xd5, 0xf5, 0x4e, 0xd8, 0x2d, 0x55, 0x39, - 0xbb, 0x6c, 0xbe, 0x0a, 0x73, 0xfa, 0xf5, 0xf5, 0x4e, 0xe8, 0xa9, 0x57, 0xaa, 0xd1, 0x0b, 0xe8, - 0x96, 0xd0, 0xbb, 0x0c, 0xbc, 0x23, 0x00, 0x35, 0x9b, 0xd1, 0x18, 0x9f, 0xbb, 0x43, 0x62, 0x36, - 0x86, 0xe4, 0x63, 0x00, 0xbd, 0xb4, 0xab, 0xec, 0xc7, 0x96, 0x6a, 0xd8, 0xe0, 0x6e, 0xc8, 0x6e, - 0x57, 0x2b, 0x2e, 0x48, 0xfa, 0xc5, 0xe7, 0x7f, 0xde, 0x8c, 0x8d, 0xd7, 0x37, 0x63, 0xe3, 0xef, - 0x9b, 0xb1, 0xf1, 0xcb, 0xed, 0xf8, 0xe0, 0xf5, 0xed, 0xf8, 0xe0, 0xaf, 0xdb, 0xf1, 0xc1, 0x4f, - 0xce, 0x86, 0xca, 0x6d, 0xb2, 0x9e, 0x7a, 0x2c, 0x9c, 0xb1, 0x48, 0xb0, 0x88, 0xcf, 0xb6, 0xd7, - 0x38, 0x9d, 0xfd, 0x3c, 0xcb, 0x1e, 0xc2, 0xec, 0xd1, 0x10, 0xeb, 0x96, 0x7a, 0x04, 0x9f, 0xfd, - 0x17, 0x00, 0x00, 0xff, 0xff, 0x25, 0x90, 0xfd, 0x6b, 0x39, 0x07, 0x00, 0x00, + // 1026 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xef, 0xee, 0x36, 0xfe, 0xf3, 0x1c, 0xdc, 0x68, 0x12, 0xca, 0xca, 0x6a, 0xad, 0x68, 0x23, + 0x95, 0x44, 0x2a, 0xb6, 0xea, 0xf2, 0x5f, 0x08, 0xa9, 0xd4, 0x3d, 0x84, 0x10, 0x1a, 0x6d, 0x0b, + 0x48, 0x5c, 0xa2, 0xf1, 0xee, 0xc4, 0x9e, 0x66, 0x77, 0x66, 0x35, 0x33, 0xeb, 0xc4, 0x47, 0xbe, + 0x01, 0x5f, 0x80, 0x03, 0x9f, 0x82, 0x2b, 0xe2, 0xc4, 0x81, 0x43, 0x8f, 0x1c, 0x51, 0xc2, 0x07, + 0x41, 0x3b, 0x33, 0xeb, 0xdd, 0xc4, 0x40, 0x29, 0x17, 0x6b, 0xde, 0xfb, 0xfd, 0xe6, 0xcd, 0xfb, + 0xef, 0x85, 0xcd, 0x98, 0xc6, 0xc3, 0xf9, 0x83, 0x61, 0xca, 0x63, 0x92, 0xc8, 0x41, 0x26, 0xb8, + 0xe2, 0xa8, 0x11, 0xd3, 0x78, 0x30, 0x7f, 0xd0, 0xbb, 0x6d, 0xc1, 0x88, 0x33, 0xa9, 0x30, 0x53, + 0x16, 0xef, 0x6d, 0x59, 0xfd, 0x94, 0x30, 0x22, 0xe9, 0x52, 0x3b, 0xe5, 0x53, 0xae, 0x8f, 0xc3, + 0xe2, 0x64, 0xb4, 0xc1, 0x10, 0x3a, 0x8f, 0xa2, 0x28, 0x4f, 0xf3, 0x04, 0x2b, 0x2e, 0xd0, 0x36, + 0x74, 0x70, 0x25, 0xfa, 0xce, 0xb6, 0xb3, 0xbb, 0x1e, 0xd6, 0x55, 0xc1, 0x2f, 0x0e, 0xc0, 0x63, + 0x41, 0x62, 0xc2, 0x14, 0xc5, 0x09, 0xea, 0x82, 0x4b, 0x63, 0xcd, 0x6b, 0x87, 0x2e, 0x8d, 0xd1, + 0xdb, 0x70, 0x2b, 0x5a, 0xa2, 0xc7, 0x6a, 0x91, 0x11, 0xdf, 0xd5, 0x60, 0xb7, 0x52, 0x3f, 0x5f, + 0x64, 0x04, 0xed, 0xc0, 0x1b, 0x35, 0x22, 0x8d, 0x7d, 0x4f, 0xbf, 0xb5, 0x5e, 0x29, 0xf7, 0x63, + 0x74, 0x07, 0xda, 0x4a, 0x60, 0x26, 0x33, 0x2e, 0x94, 0x7f, 0x73, 0xdb, 0xdb, 0x6d, 0x87, 0x95, + 0x02, 0xf9, 0xd0, 0x94, 0xf9, 0xe4, 0x05, 0x89, 0x94, 0xdf, 0xd0, 0x6f, 0x94, 0x22, 0xea, 0x03, + 0x44, 0x9c, 0x29, 0xc1, 0x93, 0x84, 0x08, 0xbf, 0xa9, 0xc1, 0x9a, 0x26, 0xf8, 0xc1, 0x01, 0x6f, + 0xbc, 0x3f, 0x46, 0xf7, 0xa1, 0x91, 0x12, 0x35, 0xe3, 0x26, 0x82, 0xee, 0x68, 0x6b, 0x60, 0x52, + 0x3b, 0x18, 0xef, 0x8f, 0xbf, 0xc4, 0x29, 0x91, 0x19, 0x8e, 0x48, 0x68, 0x39, 0xc5, 0x7b, 0x8c, + 0xa8, 0x33, 0x2e, 0x4e, 0x6d, 0x4c, 0xa5, 0x58, 0xf7, 0xc4, 0x5b, 0xf1, 0x84, 0xea, 0x78, 0x4e, + 0x28, 0x11, 0xfe, 0x4d, 0xe3, 0x49, 0xa5, 0x41, 0x5b, 0xb0, 0x96, 0x61, 0x35, 0x93, 0xfe, 0x9a, + 0x8e, 0xce, 0x08, 0xc1, 0xcf, 0x2e, 0xb4, 0xc6, 0x3c, 0xca, 0x53, 0xc2, 0xd4, 0x4a, 0x8a, 0x0f, + 0x61, 0x6b, 0x4e, 0x04, 0x3d, 0xa1, 0x11, 0x56, 0x94, 0xb3, 0x63, 0xe3, 0x9d, 0xf4, 0xdd, 0x6d, + 0x6f, 0xb7, 0x33, 0xea, 0x95, 0x21, 0x7c, 0x5d, 0xe3, 0x1c, 0x6a, 0x4a, 0xb8, 0x39, 0x5f, 0xd1, + 0x49, 0x74, 0x0f, 0xba, 0x38, 0x57, 0xb3, 0xc2, 0x23, 0x03, 0xd8, 0x44, 0x5f, 0xd3, 0xa2, 0x3d, + 0xd8, 0xc0, 0x52, 0x12, 0x51, 0x7b, 0xd3, 0x3a, 0x7d, 0x6b, 0xa9, 0x37, 0x36, 0xd1, 0x43, 0x78, + 0x33, 0xc2, 0x19, 0x9e, 0xd0, 0x84, 0xaa, 0xc5, 0x71, 0x4c, 0x12, 0x32, 0x35, 0x96, 0x9b, 0x9a, + 0xbf, 0x55, 0x81, 0xe3, 0x25, 0x76, 0xed, 0x12, 0x65, 0x73, 0x6e, 0xdd, 0x69, 0x5d, 0xbf, 0xb4, + 0xbf, 0xc4, 0x74, 0xe2, 0x89, 0x98, 0xd3, 0x88, 0xf8, 0x6d, 0x4d, 0x2b, 0xc5, 0xe0, 0x47, 0x17, + 0x5a, 0x87, 0x44, 0xe1, 0x18, 0x2b, 0x8c, 0xee, 0x02, 0x70, 0x41, 0xa7, 0x94, 0x1d, 0xe7, 0x82, + 0xda, 0x54, 0xb6, 0x8d, 0xe6, 0x2b, 0x41, 0xd1, 0xbb, 0xd0, 0xc8, 0xf2, 0x49, 0x42, 0x23, 0x9b, + 0xc3, 0x3b, 0x65, 0x0e, 0x4b, 0x03, 0x83, 0x23, 0x0d, 0x3f, 0x61, 0x4a, 0x2c, 0x42, 0xcb, 0x45, + 0x1f, 0x40, 0x33, 0x13, 0x74, 0x8e, 0x15, 0xf1, 0x3d, 0x7d, 0xed, 0xee, 0xea, 0x35, 0x83, 0x9b, + 0x7b, 0x25, 0xbb, 0xf7, 0x11, 0x74, 0x6a, 0xf6, 0xd0, 0x06, 0x78, 0xa7, 0x64, 0x61, 0xbd, 0x2a, + 0x8e, 0x45, 0x53, 0xcc, 0x71, 0x92, 0x97, 0xa3, 0x63, 0x84, 0x8f, 0xdd, 0x0f, 0x9d, 0xde, 0x17, + 0xb0, 0x5e, 0xb7, 0xf9, 0x37, 0x77, 0xef, 0xd5, 0xef, 0x76, 0x46, 0x1b, 0xa5, 0x4f, 0x47, 0x82, + 0x67, 0x44, 0xa8, 0x45, 0xcd, 0x5a, 0x90, 0x40, 0xe7, 0x88, 0x88, 0x94, 0x4a, 0x49, 0x39, 0x93, + 0xc5, 0x34, 0x4c, 0x45, 0xb1, 0x47, 0x7c, 0x67, 0xdb, 0xfb, 0xe7, 0x69, 0x30, 0x1c, 0x34, 0x84, + 0x86, 0x8c, 0x78, 0x46, 0x4c, 0xe3, 0x75, 0x47, 0x6f, 0x2d, 0x5f, 0x5a, 0x9a, 0x7c, 0x56, 0xe0, + 0xa1, 0xa5, 0x05, 0xdf, 0x39, 0xd0, 0x3c, 0x12, 0xfc, 0x84, 0x26, 0x64, 0xa5, 0xa7, 0x6b, 0x03, + 0xe4, 0xfe, 0xdb, 0x28, 0x7b, 0xd7, 0x47, 0x19, 0xdd, 0x87, 0x56, 0x6a, 0xd3, 0xad, 0xc7, 0xab, + 0x16, 0x72, 0x59, 0x86, 0x70, 0xc9, 0x08, 0x3e, 0x85, 0x56, 0x99, 0x88, 0x57, 0xef, 0xba, 0x32, + 0xbb, 0xae, 0x46, 0x8a, 0x63, 0xf0, 0x93, 0x0b, 0x8d, 0xa3, 0x7c, 0x72, 0x40, 0x16, 0x68, 0x07, + 0x6e, 0x0a, 0x9e, 0x10, 0xbb, 0x39, 0x6e, 0x95, 0x8f, 0x1e, 0x90, 0x45, 0xc8, 0x13, 0x12, 0x6a, + 0x10, 0x8d, 0xa0, 0x8d, 0x93, 0x29, 0x17, 0x54, 0xcd, 0x52, 0x6d, 0xa7, 0x96, 0xd5, 0x03, 0xb2, + 0x78, 0x54, 0x62, 0x61, 0x45, 0x43, 0x43, 0x68, 0x11, 0x16, 0xf1, 0x98, 0xb2, 0xa9, 0x8e, 0xb7, + 0x3b, 0xda, 0xac, 0x5d, 0x79, 0x62, 0xa1, 0x70, 0x49, 0x2a, 0xdc, 0x14, 0xf8, 0x4c, 0x47, 0xbf, + 0x1e, 0x16, 0xc7, 0x42, 0x33, 0x23, 0xe7, 0xfe, 0x9a, 0x69, 0x8b, 0x19, 0x39, 0x2f, 0x36, 0x69, + 0x9a, 0x27, 0x8a, 0x4e, 0xb0, 0x24, 0x76, 0x5b, 0x56, 0x0a, 0xb4, 0x07, 0xde, 0x8b, 0xb3, 0x53, + 0x3d, 0x9e, 0x9d, 0x5a, 0x21, 0x75, 0xa0, 0x83, 0xcf, 0xcf, 0x4e, 0x4d, 0x03, 0x17, 0x9c, 0xde, + 0xfb, 0xd0, 0x2a, 0x15, 0xaf, 0xd3, 0xb9, 0xc1, 0x9f, 0x0e, 0x34, 0x9f, 0x99, 0xd9, 0x5c, 0xa9, + 0xfe, 0xd5, 0x1a, 0xbb, 0x2b, 0x35, 0xbe, 0x0d, 0x0d, 0x33, 0xac, 0xb6, 0xfe, 0x56, 0x42, 0xef, + 0x41, 0x27, 0xab, 0xfa, 0xd7, 0x96, 0x7f, 0x73, 0xb5, 0x0f, 0x65, 0x58, 0xe7, 0x15, 0x7d, 0xce, + 0x33, 0xc2, 0x68, 0xac, 0x13, 0xd4, 0xa9, 0x2a, 0xf2, 0x34, 0x23, 0x6c, 0x7f, 0xfc, 0x98, 0xb3, + 0x13, 0x3a, 0x0d, 0x2d, 0xe7, 0x4a, 0x83, 0x35, 0x5e, 0xd9, 0x60, 0x4f, 0x61, 0xed, 0x39, 0x3f, + 0x25, 0xec, 0xff, 0xc4, 0x98, 0xe2, 0x48, 0x70, 0x66, 0xff, 0x08, 0xad, 0x14, 0xfc, 0xe6, 0x00, + 0x5a, 0x5d, 0xe5, 0xaf, 0x6d, 0xbe, 0xfa, 0xa7, 0xf3, 0xfe, 0xc3, 0x3f, 0xdd, 0x3b, 0x00, 0x66, + 0xc9, 0x1d, 0x17, 0xf5, 0x35, 0x79, 0xed, 0x5e, 0x6d, 0x8b, 0xb0, 0x6d, 0x18, 0xc5, 0x28, 0xec, + 0x55, 0x5b, 0xb8, 0xa9, 0xb9, 0xcb, 0x69, 0xb0, 0x15, 0xaf, 0xd6, 0xf2, 0x0e, 0x34, 0xbf, 0xa1, + 0x8a, 0x11, 0x29, 0x8b, 0x99, 0x3f, 0x33, 0x47, 0x3b, 0x7b, 0xa5, 0xf8, 0xd9, 0x27, 0xbf, 0x5e, + 0xf4, 0x9d, 0x97, 0x17, 0x7d, 0xe7, 0x8f, 0x8b, 0xbe, 0xf3, 0xfd, 0x65, 0xff, 0xc6, 0xcb, 0xcb, + 0xfe, 0x8d, 0xdf, 0x2f, 0xfb, 0x37, 0xbe, 0x0d, 0xa6, 0x54, 0xcd, 0xf2, 0xc9, 0x20, 0xe2, 0xe9, + 0x90, 0x33, 0xc9, 0x99, 0x18, 0xea, 0x9f, 0xf3, 0x61, 0xf1, 0xcd, 0x53, 0x7c, 0x6e, 0xc8, 0x49, + 0x43, 0x7f, 0xd9, 0x3c, 0xfc, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x95, 0xda, 0x01, 0x93, 0x3c, 0x09, + 0x00, 0x00, } -func (m *DID) Marshal() (dAtA []byte, err error) { +func (m *Accumulator) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -746,48 +1022,20 @@ func (m *DID) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *DID) MarshalTo(dAtA []byte) (int, error) { +func (m *Accumulator) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *DID) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Accumulator) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Paths) > 0 { - for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Paths[iNdEx]) - copy(dAtA[i:], m.Paths[iNdEx]) - i = encodeVarintModels(dAtA, i, uint64(len(m.Paths[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Identifier) > 0 { - i -= len(m.Identifier) - copy(dAtA[i:], m.Identifier) - i = encodeVarintModels(dAtA, i, uint64(len(m.Identifier))) - i-- - dAtA[i] = 0x22 - } - if len(m.Network) > 0 { - i -= len(m.Network) - copy(dAtA[i:], m.Network) - i = encodeVarintModels(dAtA, i, uint64(len(m.Network))) - i-- - dAtA[i] = 0x1a - } - if m.Method != 0 { - i = encodeVarintModels(dAtA, i, uint64(m.Method)) - i-- - dAtA[i] = 0x10 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + if len(m.Accumulator) > 0 { + i -= len(m.Accumulator) + copy(dAtA[i:], m.Accumulator) + i = encodeVarintModels(dAtA, i, uint64(len(m.Accumulator))) i-- dAtA[i] = 0xa } @@ -861,6 +1109,64 @@ func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *DID) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *DID) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DID) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Paths) > 0 { + for iNdEx := len(m.Paths) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Paths[iNdEx]) + copy(dAtA[i:], m.Paths[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.Paths[iNdEx]))) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Identifier) > 0 { + i -= len(m.Identifier) + copy(dAtA[i:], m.Identifier) + i = encodeVarintModels(dAtA, i, uint64(len(m.Identifier))) + i-- + dAtA[i] = 0x22 + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintModels(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x1a + } + if len(m.Network) > 0 { + i -= len(m.Network) + copy(dAtA[i:], m.Network) + i = encodeVarintModels(dAtA, i, uint64(len(m.Network))) + i-- + dAtA[i] = 0x12 + } + if m.Method != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Method)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *Document) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -881,6 +1187,15 @@ func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Service) > 0 { + for iNdEx := len(m.Service) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Service[iNdEx]) + copy(dAtA[i:], m.Service[iNdEx]) + i = encodeVarintModels(dAtA, i, uint64(len(m.Service[iNdEx]))) + i-- + dAtA[i] = 0x4a + } + } if len(m.CapabilityInvocation) > 0 { for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.CapabilityInvocation[iNdEx]) @@ -1105,35 +1420,7 @@ func (m *Profile) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintModels(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 - } - if len(m.Attestations) > 0 { - for iNdEx := len(m.Attestations) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Attestations[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Credentials) > 0 { - for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintModels(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } + dAtA[i] = 0x22 } if len(m.Controller) > 0 { i -= len(m.Controller) @@ -1216,9 +1503,9 @@ func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Jwks) > 0 { - for k := range m.Jwks { - v := m.Jwks[k] + if len(m.Jwk) > 0 { + for k := range m.Jwk { + v := m.Jwk[k] baseI := i i -= len(v) copy(dAtA[i:], v) @@ -1232,7 +1519,7 @@ func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintModels(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } } if len(m.Multibase) > 0 { @@ -1240,24 +1527,160 @@ func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Multibase) i = encodeVarintModels(dAtA, i, uint64(len(m.Multibase))) i-- + dAtA[i] = 0x32 + } + if len(m.Hex) > 0 { + i -= len(m.Hex) + copy(dAtA[i:], m.Hex) + i = encodeVarintModels(dAtA, i, uint64(len(m.Hex))) + i-- dAtA[i] = 0x2a } - if m.Kind != 0 { - i = encodeVarintModels(dAtA, i, uint64(m.Kind)) + if len(m.Raw) > 0 { + i -= len(m.Raw) + copy(dAtA[i:], m.Raw) + i = encodeVarintModels(dAtA, i, uint64(len(m.Raw))) + i-- + dAtA[i] = 0x22 + } + if m.Encoding != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Encoding)) i-- dAtA[i] = 0x18 } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintModels(dAtA, i, uint64(len(m.Key))) + if m.Algorithm != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Algorithm)) + i-- + dAtA[i] = 0x10 + } + if m.Role != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Role)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *Service) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Service) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if m.Openid != nil { + { + size, err := m.Openid.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if m.Permissions != nil { + { + size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintModels(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x1a + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) i-- dAtA[i] = 0x12 } - if m.Namespace != 0 { - i = encodeVarintModels(dAtA, i, uint64(m.Namespace)) + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) i-- - dAtA[i] = 0x8 + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *Token) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Token) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Macron) > 0 { + i -= len(m.Macron) + copy(dAtA[i:], m.Macron) + i = encodeVarintModels(dAtA, i, uint64(len(m.Macron))) + i-- + dAtA[i] = 0x1a + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintModels(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintModels(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa } return len(dAtA) - i, nil } @@ -1282,6 +1705,18 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintModels(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } if m.PublicKey != nil { { size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) @@ -1292,7 +1727,12 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintModels(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x1a + dAtA[i] = 0x22 + } + if m.Method != 0 { + i = encodeVarintModels(dAtA, i, uint64(m.Method)) + i-- + dAtA[i] = 0x18 } if len(m.Controller) > 0 { i -= len(m.Controller) @@ -1311,6 +1751,36 @@ func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *Witness) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *Witness) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Witness) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Witness) > 0 { + i -= len(m.Witness) + copy(dAtA[i:], m.Witness) + i = encodeVarintModels(dAtA, i, uint64(len(m.Witness))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintModels(dAtA []byte, offset int, v uint64) int { offset -= sovModels(v) base := offset @@ -1322,33 +1792,16 @@ func encodeVarintModels(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *DID) Size() (n int) { +func (m *Accumulator) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Id) + l = len(m.Accumulator) if l > 0 { n += 1 + l + sovModels(uint64(l)) } - if m.Method != 0 { - n += 1 + sovModels(uint64(m.Method)) - } - l = len(m.Network) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - l = len(m.Identifier) - if l > 0 { - n += 1 + l + sovModels(uint64(l)) - } - if len(m.Paths) > 0 { - for _, s := range m.Paths { - l = len(s) - n += 1 + l + sovModels(uint64(l)) - } - } return n } @@ -1387,6 +1840,36 @@ func (m *Credential) Size() (n int) { return n } +func (m *DID) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Method != 0 { + n += 1 + sovModels(uint64(m.Method)) + } + l = len(m.Network) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Identifier) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if len(m.Paths) > 0 { + for _, s := range m.Paths { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } + return n +} + func (m *Document) Size() (n int) { if m == nil { return 0 @@ -1427,6 +1910,12 @@ func (m *Document) Size() (n int) { n += 1 + l + sovModels(uint64(l)) } } + if len(m.Service) > 0 { + for _, s := range m.Service { + l = len(s) + n += 1 + l + sovModels(uint64(l)) + } + } return n } @@ -1505,18 +1994,6 @@ func (m *Profile) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovModels(uint64(l)) - } - } - if len(m.Attestations) > 0 { - for _, e := range m.Attestations { - l = e.Size() - n += 1 + l + sovModels(uint64(l)) - } - } if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovModels(uint64(l)) @@ -1547,22 +2024,29 @@ func (m *PubKey) Size() (n int) { } var l int _ = l - if m.Namespace != 0 { - n += 1 + sovModels(uint64(m.Namespace)) + if m.Role != 0 { + n += 1 + sovModels(uint64(m.Role)) } - l = len(m.Key) + if m.Algorithm != 0 { + n += 1 + sovModels(uint64(m.Algorithm)) + } + if m.Encoding != 0 { + n += 1 + sovModels(uint64(m.Encoding)) + } + l = len(m.Raw) if l > 0 { n += 1 + l + sovModels(uint64(l)) } - if m.Kind != 0 { - n += 1 + sovModels(uint64(m.Kind)) + l = len(m.Hex) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) } l = len(m.Multibase) if l > 0 { n += 1 + l + sovModels(uint64(l)) } - if len(m.Jwks) > 0 { - for k, v := range m.Jwks { + if len(m.Jwk) > 0 { + for k, v := range m.Jwk { _ = k _ = v mapEntrySize := 1 + len(k) + sovModels(uint64(len(k))) + 1 + len(v) + sovModels(uint64(len(v))) @@ -1572,6 +2056,60 @@ func (m *PubKey) Size() (n int) { return n } +func (m *Service) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + if m.Permissions != nil { + l = m.Permissions.Size() + n += 1 + l + sovModels(uint64(l)) + } + if m.Openid != nil { + l = m.Openid.Size() + n += 1 + l + sovModels(uint64(l)) + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *Token) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + l = len(m.Macron) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } + return n +} + func (m *VerificationMethod) Size() (n int) { if m == nil { return 0 @@ -1586,10 +2124,30 @@ func (m *VerificationMethod) Size() (n int) { if l > 0 { n += 1 + l + sovModels(uint64(l)) } + if m.Method != 0 { + n += 1 + sovModels(uint64(m.Method)) + } if m.PublicKey != nil { l = m.PublicKey.Size() n += 1 + l + sovModels(uint64(l)) } + if m.Service != nil { + l = m.Service.Size() + n += 1 + l + sovModels(uint64(l)) + } + return n +} + +func (m *Witness) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Witness) + if l > 0 { + n += 1 + l + sovModels(uint64(l)) + } return n } @@ -1599,7 +2157,7 @@ func sovModels(x uint64) (n int) { func sozModels(x uint64) (n int) { return sovModels(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *DID) Unmarshal(dAtA []byte) error { +func (m *Accumulator) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1622,17 +2180,17 @@ func (m *DID) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: DID: wiretype end group for non-group") + return fmt.Errorf("proto: Accumulator: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: DID: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: Accumulator: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Accumulator", wireType) } - var stringLen uint64 + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -1642,138 +2200,25 @@ func (m *DID) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if byteLen < 0 { return ErrInvalidLengthModels } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthModels } if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + m.Accumulator = append(m.Accumulator[:0], dAtA[iNdEx:postIndex]...) + if m.Accumulator == nil { + m.Accumulator = []byte{} } - m.Method = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Method |= DIDNamespace(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Network = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Identifier = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex default: iNdEx = preIndex @@ -2040,6 +2485,203 @@ func (m *Credential) Unmarshal(dAtA []byte) error { } return nil } +func (m *DID) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: DID: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DID: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + m.Method = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Network = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Identifier", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Identifier = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Paths", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Paths = append(m.Paths, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *Document) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2263,6 +2905,38 @@ func (m *Document) Unmarshal(dAtA []byte) error { } m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex + case 9: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Service = append(m.Service, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipModels(dAtA[iNdEx:]) @@ -2936,74 +3610,6 @@ func (m *Profile) Unmarshal(dAtA []byte) error { m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Attestations", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowModels - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthModels - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthModels - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Attestations = append(m.Attestations, &VerificationMethod{}) - if err := m.Attestations[len(m.Attestations)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } @@ -3209,9 +3815,9 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Namespace", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Role", wireType) } - m.Namespace = 0 + m.Role = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -3221,14 +3827,52 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Namespace |= DIDNamespace(b&0x7F) << shift + m.Role |= KeyRole(b&0x7F) << shift if b < 0x80 { break } } case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Algorithm", wireType) + } + m.Algorithm = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Algorithm |= KeyAlgorithm(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Encoding", wireType) + } + m.Encoding = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Encoding |= KeyEncoding(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Raw", wireType) } var byteLen int for shift := uint(0); ; shift += 7 { @@ -3255,16 +3899,16 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} + m.Raw = append(m.Raw[:0], dAtA[iNdEx:postIndex]...) + if m.Raw == nil { + m.Raw = []byte{} } iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Kind", wireType) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Hex", wireType) } - m.Kind = 0 + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowModels @@ -3274,12 +3918,25 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Kind |= KeyType(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - case 5: + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Hex = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Multibase", wireType) } @@ -3311,9 +3968,9 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { } m.Multibase = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 7: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Jwks", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Jwk", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3340,8 +3997,8 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Jwks == nil { - m.Jwks = make(map[string]string) + if m.Jwk == nil { + m.Jwk = make(map[string]string) } var mapkey string var mapvalue string @@ -3436,7 +4093,409 @@ func (m *PubKey) Unmarshal(dAtA []byte) error { iNdEx += skippy } } - m.Jwks[mapkey] = mapvalue + m.Jwk[mapkey] = mapvalue + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Service) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Service: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Permissions == nil { + m.Permissions = &Permissions{} + } + if err := m.Permissions.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Openid", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Openid == nil { + m.Openid = &OpenIDConfig{} + } + if err := m.Openid.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Token) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Token: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Token: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Macron = append(m.Macron[:0], dAtA[iNdEx:postIndex]...) + if m.Macron == nil { + m.Macron = []byte{} + } iNdEx = postIndex default: iNdEx = preIndex @@ -3553,6 +4612,25 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Method", wireType) + } + m.Method = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Method |= DIDNamespace(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) } @@ -3588,6 +4666,126 @@ func (m *VerificationMethod) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Service == nil { + m.Service = &Service{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipModels(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthModels + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *Witness) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Witness: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Witness: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Witness", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowModels + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthModels + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthModels + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Witness = append(m.Witness[:0], dAtA[iNdEx:postIndex]...) + if m.Witness == nil { + m.Witness = []byte{} + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipModels(dAtA[iNdEx:]) diff --git a/x/did/types/msgs.go b/x/did/types/msgs.go index e308bb52a..f5b91d206 100644 --- a/x/did/types/msgs.go +++ b/x/did/types/msgs.go @@ -65,7 +65,7 @@ func NewMsgRegisterController( func (msg MsgRegisterController) Route() string { return ModuleName } // Type returns the the action -func (msg MsgRegisterController) Type() string { return "initialize_controller" } +func (msg MsgRegisterController) Type() string { return "register_controller" } // GetSignBytes implements the LegacyMsg interface. func (msg MsgRegisterController) GetSignBytes() []byte { @@ -92,7 +92,7 @@ func NewMsgRegisterService( sender sdk.Address, ) (*MsgRegisterService, error) { return &MsgRegisterService{ - Authority: sender.String(), + Controller: sender.String(), }, nil } @@ -100,7 +100,7 @@ func NewMsgRegisterService( func (msg MsgRegisterService) Route() string { return ModuleName } // Type returns the the action -func (msg MsgRegisterService) Type() string { return "initialize_controller" } +func (msg MsgRegisterService) Type() string { return "register_service" } // GetSignBytes implements the LegacyMsg interface. func (msg MsgRegisterService) GetSignBytes() []byte { @@ -109,7 +109,7 @@ func (msg MsgRegisterService) GetSignBytes() []byte { // GetSigners returns the expected signers for a MsgUpdateParams message. func (msg *MsgRegisterService) GetSigners() []sdk.AccAddress { - addr, _ := sdk.AccAddressFromBech32(msg.Authority) + addr, _ := sdk.AccAddressFromBech32(msg.Controller) return []sdk.AccAddress{addr} } @@ -117,3 +117,38 @@ func (msg *MsgRegisterService) GetSigners() []sdk.AccAddress { func (msg *MsgRegisterService) Validate() error { return nil } + +// +// [AllocateVault] +// + +// NewMsgAllocateVault creates a new instance of MsgAllocateVault +func NewMsgAllocateVault( + sender sdk.Address, +) (*MsgAllocateVault, error) { + return &MsgAllocateVault{ + Authority: sender.String(), + }, nil +} + +// Route returns the name of the module +func (msg MsgAllocateVault) Route() string { return ModuleName } + +// Type returns the the action +func (msg MsgAllocateVault) Type() string { return "allocate_vault" } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgAllocateVault) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgAllocateVault) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} +} + +// Vaalidate does a sanity check on the provided data. +func (msg *MsgAllocateVault) Validate() error { + return nil +} diff --git a/x/did/types/openid.go b/x/did/types/openid.go new file mode 100644 index 000000000..11beb94c1 --- /dev/null +++ b/x/did/types/openid.go @@ -0,0 +1,27 @@ +package types + +// DiscoveryDocument represents the OIDC discovery document. +type DiscoveryDocument struct { + Issuer string `json:"issuer"` + AuthorizationEndpoint string `json:"authorization_endpoint"` + TokenEndpoint string `json:"token_endpoint"` + UserinfoEndpoint string `json:"userinfo_endpoint"` + JwksURI string `json:"jwks_uri"` + RegistrationEndpoint string `json:"registration_endpoint"` + ScopesSupported []string `json:"scopes_supported"` + ResponseTypesSupported []string `json:"response_types_supported"` + SubjectTypesSupported []string `json:"subject_types_supported"` + IDTokenSigningAlgValuesSupported []string `json:"id_token_signing_alg_values_supported"` + ClaimsSupported []string `json:"claims_supported"` + GrantTypesSupported []string `json:"grant_types_supported"` + TokenEndpointAuthMethodsSupported []string `json:"token_endpoint_auth_methods_supported"` +} + +// UserInfo represents the user information. +type UserInfo struct { + DID string `json:"did"` + Sub string `json:"sub"` + Name string `json:"name"` + Email string `json:"email"` + // Add other claims as needed +} diff --git a/x/did/types/perms.go b/x/did/types/perms.go index a05a1b0d4..fd10719b3 100644 --- a/x/did/types/perms.go +++ b/x/did/types/perms.go @@ -21,9 +21,9 @@ var ( StringToPermissionScope = map[string]PermissionScope{ "PERMISSION_SCOPE_UNSPECIFIED": PermissionScope_PERMISSION_SCOPE_UNSPECIFIED, - "PERMISSION_SCOPE_PROFILE_NAME": PermissionScope_PERMISSION_SCOPE_PROFILE_NAME, - "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_EMAIL, - "PERMISSION_SCOPE_IDENTIFIERS_PHONE": PermissionScope_PERMISSION_SCOPE_IDENTIFIERS_PHONE, + "PERMISSION_SCOPE_BASIC_INFO": PermissionScope_PERMISSION_SCOPE_BASIC_INFO, + "PERMISSION_SCOPE_IDENTIFIERS_EMAIL": PermissionScope_PERMISSION_SCOPE_RECORDS_READ, + "PERMISSION_SCOPE_IDENTIFIERS_PHONE": PermissionScope_PERMISSION_SCOPE_RECORDS_WRITE, "PERMISSION_SCOPE_TRANSACTIONS_READ": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_READ, "PERMISSION_SCOPE_TRANSACTIONS_WRITE": PermissionScope_PERMISSION_SCOPE_TRANSACTIONS_WRITE, "PERMISSION_SCOPE_WALLETS_READ": PermissionScope_PERMISSION_SCOPE_WALLETS_READ, diff --git a/x/did/types/pubkey.go b/x/did/types/pubkey.go new file mode 100644 index 000000000..3a5f8a546 --- /dev/null +++ b/x/did/types/pubkey.go @@ -0,0 +1,40 @@ +package types + +import ( + cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types" +) + +// NewEthPublicKey returns a new ethereum public key +func NewPublicKey(data []byte, keyInfo *KeyInfo) (*PubKey, error) { + return &PubKey{ + Role: keyInfo.Role, + }, nil +} + +// Address returns the address of the public key +func (k *PubKey) Address() cryptotypes.Address { + return nil +} + +// Bytes returns the raw bytes of the public key +func (k *PubKey) Bytes() []byte { + return k.GetRaw() +} + +// VerifySignature verifies a signature over the given message +func (k *PubKey) VerifySignature(msg []byte, sig []byte) bool { + return false +} + +// Equals returns true if two public keys are equal +func (k *PubKey) Equals(k2 cryptotypes.PubKey) bool { + if k == nil && k2 == nil { + return true + } + return false +} + +// Type returns the type of the public key +func (k *PubKey) Type() string { + return "" +} diff --git a/x/did/types/query.pb.go b/x/did/types/query.pb.go index a093fbd7f..ec3b9b56f 100644 --- a/x/did/types/query.pb.go +++ b/x/did/types/query.pb.go @@ -28,22 +28,26 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package -// QueryParamsRequest is the request type for the Query/Params RPC method. -type QueryParamsRequest struct { +// Queryequest is the request type for the Query/Params RPC method. +type QueryRequest struct { + Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` + Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` + Subject string `protobuf:"bytes,3,opt,name=subject,proto3" json:"subject,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` } -func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } -func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryParamsRequest) ProtoMessage() {} -func (*QueryParamsRequest) Descriptor() ([]byte, []int) { +func (m *QueryRequest) Reset() { *m = QueryRequest{} } +func (m *QueryRequest) String() string { return proto.CompactTextString(m) } +func (*QueryRequest) ProtoMessage() {} +func (*QueryRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ae1fa9bb626e2869, []int{0} } -func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { +func (m *QueryRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *QueryRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_QueryParamsRequest.Marshal(b, m, deterministic) + return xxx_messageInfo_QueryRequest.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -53,17 +57,45 @@ func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, return b[:n], nil } } -func (m *QueryParamsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryParamsRequest.Merge(m, src) +func (m *QueryRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryRequest.Merge(m, src) } -func (m *QueryParamsRequest) XXX_Size() int { +func (m *QueryRequest) XXX_Size() int { return m.Size() } -func (m *QueryParamsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +func (m *QueryRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryRequest.DiscardUnknown(m) } -var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo +var xxx_messageInfo_QueryRequest proto.InternalMessageInfo + +func (m *QueryRequest) GetDid() string { + if m != nil { + return m.Did + } + return "" +} + +func (m *QueryRequest) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *QueryRequest) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *QueryRequest) GetCredentials() []*Credential { + if m != nil { + return m.Credentials + } + return nil +} // QueryParamsResponse is the response type for the Query/Params RPC method. type QueryParamsResponse struct { @@ -111,51 +143,6 @@ func (m *QueryParamsResponse) GetParams() *Params { return nil } -// QueryAccountsRequest is the request type for the Query/Exists RPC method. -type QueryAccountsRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (m *QueryAccountsRequest) Reset() { *m = QueryAccountsRequest{} } -func (m *QueryAccountsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryAccountsRequest) ProtoMessage() {} -func (*QueryAccountsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{2} -} -func (m *QueryAccountsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryAccountsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryAccountsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryAccountsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryAccountsRequest.Merge(m, src) -} -func (m *QueryAccountsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryAccountsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryAccountsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryAccountsRequest proto.InternalMessageInfo - -func (m *QueryAccountsRequest) GetDid() string { - if m != nil { - return m.Did - } - return "" -} - // QueryAccountsResponse is the response type for the Query/Exists RPC method. type QueryAccountsResponse struct { Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` @@ -165,7 +152,7 @@ func (m *QueryAccountsResponse) Reset() { *m = QueryAccountsResponse{} } func (m *QueryAccountsResponse) String() string { return proto.CompactTextString(m) } func (*QueryAccountsResponse) ProtoMessage() {} func (*QueryAccountsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{3} + return fileDescriptor_ae1fa9bb626e2869, []int{2} } func (m *QueryAccountsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -201,69 +188,20 @@ func (m *QueryAccountsResponse) GetExists() bool { return false } -// QueryCredentialsRequest is the request type for the Query/Exists RPC method. -type QueryCredentialsRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` - Origin string `protobuf:"bytes,2,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (m *QueryCredentialsRequest) Reset() { *m = QueryCredentialsRequest{} } -func (m *QueryCredentialsRequest) String() string { return proto.CompactTextString(m) } -func (*QueryCredentialsRequest) ProtoMessage() {} -func (*QueryCredentialsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{4} -} -func (m *QueryCredentialsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryCredentialsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryCredentialsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryCredentialsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryCredentialsRequest.Merge(m, src) -} -func (m *QueryCredentialsRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryCredentialsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryCredentialsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryCredentialsRequest proto.InternalMessageInfo - -func (m *QueryCredentialsRequest) GetDid() string { - if m != nil { - return m.Did - } - return "" -} - -func (m *QueryCredentialsRequest) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - // QueryCredentialsResponse is the response type for the Query/Exists RPC method. type QueryCredentialsResponse struct { - Credentials map[string][]byte `protobuf:"bytes,1,rep,name=credentials,proto3" json:"credentials,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` } func (m *QueryCredentialsResponse) Reset() { *m = QueryCredentialsResponse{} } func (m *QueryCredentialsResponse) String() string { return proto.CompactTextString(m) } func (*QueryCredentialsResponse) ProtoMessage() {} func (*QueryCredentialsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{5} + return fileDescriptor_ae1fa9bb626e2869, []int{3} } func (m *QueryCredentialsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -292,152 +230,37 @@ func (m *QueryCredentialsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryCredentialsResponse proto.InternalMessageInfo -func (m *QueryCredentialsResponse) GetCredentials() map[string][]byte { +func (m *QueryCredentialsResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *QueryCredentialsResponse) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + +func (m *QueryCredentialsResponse) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *QueryCredentialsResponse) GetCredentials() []*Credential { if m != nil { return m.Credentials } return nil } -// QueryIdentitiesRequest is the request type for the Query/Exists RPC method. -type QueryIdentitiesRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (m *QueryIdentitiesRequest) Reset() { *m = QueryIdentitiesRequest{} } -func (m *QueryIdentitiesRequest) String() string { return proto.CompactTextString(m) } -func (*QueryIdentitiesRequest) ProtoMessage() {} -func (*QueryIdentitiesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{6} -} -func (m *QueryIdentitiesRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryIdentitiesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryIdentitiesRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryIdentitiesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryIdentitiesRequest.Merge(m, src) -} -func (m *QueryIdentitiesRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryIdentitiesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryIdentitiesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryIdentitiesRequest proto.InternalMessageInfo - -func (m *QueryIdentitiesRequest) GetDid() string { +func (m *QueryCredentialsResponse) GetError() string { if m != nil { - return m.Did - } - return "" -} - -// QueryIdentitiesResponse is the response type for the Query/Exists RPC method. -type QueryIdentitiesResponse struct { - Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` - VerificationMethod []*VerificationMethod `protobuf:"bytes,2,rep,name=verificationMethod,proto3" json:"verificationMethod,omitempty"` -} - -func (m *QueryIdentitiesResponse) Reset() { *m = QueryIdentitiesResponse{} } -func (m *QueryIdentitiesResponse) String() string { return proto.CompactTextString(m) } -func (*QueryIdentitiesResponse) ProtoMessage() {} -func (*QueryIdentitiesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{7} -} -func (m *QueryIdentitiesResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryIdentitiesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryIdentitiesResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryIdentitiesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryIdentitiesResponse.Merge(m, src) -} -func (m *QueryIdentitiesResponse) XXX_Size() int { - return m.Size() -} -func (m *QueryIdentitiesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_QueryIdentitiesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryIdentitiesResponse proto.InternalMessageInfo - -func (m *QueryIdentitiesResponse) GetExists() bool { - if m != nil { - return m.Exists - } - return false -} - -func (m *QueryIdentitiesResponse) GetVerificationMethod() []*VerificationMethod { - if m != nil { - return m.VerificationMethod - } - return nil -} - -// QueryResolveRequest is the request type for the Query/Resolve RPC method. -type QueryResolveRequest struct { - Did string `protobuf:"bytes,1,opt,name=did,proto3" json:"did,omitempty"` -} - -func (m *QueryResolveRequest) Reset() { *m = QueryResolveRequest{} } -func (m *QueryResolveRequest) String() string { return proto.CompactTextString(m) } -func (*QueryResolveRequest) ProtoMessage() {} -func (*QueryResolveRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{8} -} -func (m *QueryResolveRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryResolveRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryResolveRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryResolveRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryResolveRequest.Merge(m, src) -} -func (m *QueryResolveRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryResolveRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryResolveRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryResolveRequest proto.InternalMessageInfo - -func (m *QueryResolveRequest) GetDid() string { - if m != nil { - return m.Did + return m.Error } return "" } @@ -452,7 +275,7 @@ func (m *QueryResolveResponse) Reset() { *m = QueryResolveResponse{} } func (m *QueryResolveResponse) String() string { return proto.CompactTextString(m) } func (*QueryResolveResponse) ProtoMessage() {} func (*QueryResolveResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{9} + return fileDescriptor_ae1fa9bb626e2869, []int{4} } func (m *QueryResolveResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -488,62 +311,16 @@ func (m *QueryResolveResponse) GetDocument() *Document { return nil } -// QueryServiceRequest is the request type for the Query/LoginOptions RPC method. -type QueryServiceRequest struct { - Origin string `protobuf:"bytes,1,opt,name=origin,proto3" json:"origin,omitempty"` -} - -func (m *QueryServiceRequest) Reset() { *m = QueryServiceRequest{} } -func (m *QueryServiceRequest) String() string { return proto.CompactTextString(m) } -func (*QueryServiceRequest) ProtoMessage() {} -func (*QueryServiceRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{10} -} -func (m *QueryServiceRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *QueryServiceRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_QueryServiceRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *QueryServiceRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_QueryServiceRequest.Merge(m, src) -} -func (m *QueryServiceRequest) XXX_Size() int { - return m.Size() -} -func (m *QueryServiceRequest) XXX_DiscardUnknown() { - xxx_messageInfo_QueryServiceRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_QueryServiceRequest proto.InternalMessageInfo - -func (m *QueryServiceRequest) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" -} - // QueryLoginOptionsResponse is the response type for the Query/LoginOptions RPC method. type QueryServiceResponse struct { - // options is the PublicKeyCredentialAttestationOptions - Options string `protobuf:"bytes,1,opt,name=options,proto3" json:"options,omitempty"` + Service *Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` } func (m *QueryServiceResponse) Reset() { *m = QueryServiceResponse{} } func (m *QueryServiceResponse) String() string { return proto.CompactTextString(m) } func (*QueryServiceResponse) ProtoMessage() {} func (*QueryServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_ae1fa9bb626e2869, []int{11} + return fileDescriptor_ae1fa9bb626e2869, []int{5} } func (m *QueryServiceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -572,75 +349,127 @@ func (m *QueryServiceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_QueryServiceResponse proto.InternalMessageInfo -func (m *QueryServiceResponse) GetOptions() string { +func (m *QueryServiceResponse) GetService() *Service { if m != nil { - return m.Options + return m.Service + } + return nil +} + +// QueryTokenResponse is the response type for the Query/LoginOptions RPC method. +type QueryTokenResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Token *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` +} + +func (m *QueryTokenResponse) Reset() { *m = QueryTokenResponse{} } +func (m *QueryTokenResponse) String() string { return proto.CompactTextString(m) } +func (*QueryTokenResponse) ProtoMessage() {} +func (*QueryTokenResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_ae1fa9bb626e2869, []int{6} +} +func (m *QueryTokenResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryTokenResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *QueryTokenResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryTokenResponse.Merge(m, src) +} +func (m *QueryTokenResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryTokenResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryTokenResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryTokenResponse proto.InternalMessageInfo + +func (m *QueryTokenResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *QueryTokenResponse) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + +func (m *QueryTokenResponse) GetError() string { + if m != nil { + return m.Error } return "" } func init() { - proto.RegisterType((*QueryParamsRequest)(nil), "did.v1.QueryParamsRequest") + proto.RegisterType((*QueryRequest)(nil), "did.v1.QueryRequest") proto.RegisterType((*QueryParamsResponse)(nil), "did.v1.QueryParamsResponse") - proto.RegisterType((*QueryAccountsRequest)(nil), "did.v1.QueryAccountsRequest") proto.RegisterType((*QueryAccountsResponse)(nil), "did.v1.QueryAccountsResponse") - proto.RegisterType((*QueryCredentialsRequest)(nil), "did.v1.QueryCredentialsRequest") proto.RegisterType((*QueryCredentialsResponse)(nil), "did.v1.QueryCredentialsResponse") - proto.RegisterMapType((map[string][]byte)(nil), "did.v1.QueryCredentialsResponse.CredentialsEntry") - proto.RegisterType((*QueryIdentitiesRequest)(nil), "did.v1.QueryIdentitiesRequest") - proto.RegisterType((*QueryIdentitiesResponse)(nil), "did.v1.QueryIdentitiesResponse") - proto.RegisterType((*QueryResolveRequest)(nil), "did.v1.QueryResolveRequest") proto.RegisterType((*QueryResolveResponse)(nil), "did.v1.QueryResolveResponse") - proto.RegisterType((*QueryServiceRequest)(nil), "did.v1.QueryServiceRequest") proto.RegisterType((*QueryServiceResponse)(nil), "did.v1.QueryServiceResponse") + proto.RegisterType((*QueryTokenResponse)(nil), "did.v1.QueryTokenResponse") } func init() { proto.RegisterFile("did/v1/query.proto", fileDescriptor_ae1fa9bb626e2869) } var fileDescriptor_ae1fa9bb626e2869 = []byte{ - // 669 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x94, 0x4f, 0x4f, 0x13, 0x4f, - 0x18, 0xc7, 0xd9, 0xf2, 0xa3, 0xf0, 0x7b, 0xaa, 0x86, 0x4c, 0x0b, 0x34, 0x0b, 0x2c, 0xb8, 0x07, - 0x21, 0x46, 0xbb, 0x82, 0x17, 0x63, 0xd4, 0x44, 0xc1, 0x83, 0x26, 0x26, 0xba, 0x24, 0x1c, 0x3c, - 0xb9, 0xec, 0x8c, 0x65, 0x42, 0x3b, 0x53, 0x76, 0xa7, 0x95, 0x0d, 0xe1, 0xe2, 0x2b, 0x30, 0xf1, - 0x85, 0xf8, 0x36, 0x3c, 0x92, 0x78, 0xf1, 0x68, 0xc0, 0xb7, 0xe0, 0xdd, 0x74, 0xe6, 0xd9, 0x76, - 0x77, 0xe9, 0xe2, 0xad, 0xf3, 0xfc, 0xf9, 0x7e, 0x9e, 0x99, 0xfd, 0x3e, 0x05, 0x42, 0x39, 0xf5, - 0x06, 0x5b, 0xde, 0x71, 0x9f, 0x45, 0x49, 0xab, 0x17, 0x49, 0x25, 0x49, 0x95, 0x72, 0xda, 0x1a, - 0x6c, 0xd9, 0x2b, 0x6d, 0x29, 0xdb, 0x1d, 0xe6, 0x05, 0x3d, 0xee, 0x05, 0x42, 0x48, 0x15, 0x28, - 0x2e, 0x45, 0x6c, 0xaa, 0xec, 0x06, 0x76, 0xb6, 0x99, 0x60, 0x31, 0x4f, 0xa3, 0x75, 0x8c, 0x76, - 0x25, 0x65, 0x1d, 0x0c, 0xba, 0x0d, 0x20, 0xef, 0x86, 0xfa, 0x6f, 0x83, 0x28, 0xe8, 0xc6, 0x3e, - 0x3b, 0xee, 0xb3, 0x58, 0xb9, 0x4f, 0xa1, 0x9e, 0x8b, 0xc6, 0x3d, 0x29, 0x62, 0x46, 0xee, 0x40, - 0xb5, 0xa7, 0x23, 0x4d, 0x6b, 0xdd, 0xda, 0xac, 0x6d, 0xdf, 0x6a, 0x99, 0x71, 0x5a, 0x58, 0x87, - 0x59, 0x77, 0x13, 0x1a, 0xba, 0xfd, 0x79, 0x18, 0xca, 0xbe, 0x50, 0xa9, 0x2c, 0x99, 0x87, 0x69, - 0xca, 0xa9, 0x6e, 0xfe, 0xdf, 0x1f, 0xfe, 0x74, 0x3d, 0x58, 0x28, 0x54, 0x22, 0x6a, 0x11, 0xaa, - 0xec, 0x84, 0xc7, 0xca, 0xa0, 0xe6, 0x7c, 0x3c, 0xb9, 0x3b, 0xb0, 0xa4, 0x1b, 0x76, 0x22, 0x46, - 0x99, 0x50, 0x3c, 0xe8, 0x94, 0xab, 0x0f, 0x45, 0x64, 0xc4, 0xdb, 0x5c, 0x34, 0x2b, 0x3a, 0x88, - 0x27, 0xf7, 0x9b, 0x05, 0xcd, 0xab, 0x2a, 0x48, 0xde, 0x83, 0x5a, 0x38, 0x0e, 0x37, 0xad, 0xf5, - 0xe9, 0xcd, 0xda, 0xf6, 0x56, 0x7a, 0xd3, 0xb2, 0xb6, 0x56, 0x26, 0xf6, 0x52, 0xa8, 0x28, 0xf1, - 0xb3, 0x2a, 0xf6, 0x33, 0x98, 0x2f, 0x16, 0x0c, 0xe7, 0x3d, 0x62, 0x49, 0x3a, 0xef, 0x11, 0x4b, - 0x48, 0x03, 0x66, 0x06, 0x41, 0xa7, 0xcf, 0xf4, 0xb8, 0x37, 0x7c, 0x73, 0x78, 0x5c, 0x79, 0x64, - 0xb9, 0x77, 0x61, 0x51, 0x93, 0x5f, 0x69, 0x09, 0xc5, 0xd9, 0x35, 0x6f, 0x7a, 0x86, 0x4f, 0x94, - 0xad, 0xbd, 0xfe, 0x55, 0xc9, 0x6b, 0x20, 0x03, 0x16, 0xf1, 0x8f, 0x3c, 0xd4, 0x3e, 0x7a, 0xc3, - 0xd4, 0xa1, 0xa4, 0xcd, 0x8a, 0xbe, 0xba, 0x9d, 0x5e, 0x7d, 0xff, 0x4a, 0x85, 0x3f, 0xa1, 0xcb, - 0xdd, 0x40, 0xef, 0xf8, 0x2c, 0x96, 0x9d, 0x01, 0x2b, 0x9f, 0x73, 0x17, 0x5d, 0x32, 0x2a, 0xc4, - 0x21, 0xef, 0xc1, 0x1c, 0x95, 0x61, 0xbf, 0xcb, 0x84, 0x42, 0x9f, 0xcd, 0xa7, 0x23, 0xec, 0x62, - 0xdc, 0x1f, 0x55, 0xb8, 0xf7, 0x11, 0xb7, 0xc7, 0xa2, 0x01, 0x0f, 0x47, 0xb8, 0xf1, 0xa7, 0xb7, - 0x72, 0x9f, 0xfe, 0x01, 0x42, 0x47, 0xe5, 0x08, 0x6d, 0xc2, 0xac, 0xec, 0xe9, 0x1d, 0xc2, 0x86, - 0xf4, 0xb8, 0xfd, 0xe7, 0x3f, 0x98, 0xd1, 0x2d, 0x64, 0x1f, 0xaa, 0xc6, 0xe8, 0xc4, 0xce, 0xd9, - 0x21, 0xb7, 0x3b, 0xf6, 0xf2, 0xc4, 0x9c, 0xc1, 0xb8, 0xf5, 0xcf, 0x3f, 0x7e, 0x7f, 0xad, 0xdc, - 0x24, 0x35, 0x6f, 0xb8, 0x8c, 0x66, 0x5d, 0x08, 0x85, 0xb9, 0xd4, 0xff, 0x64, 0x25, 0xd7, 0x5d, - 0x58, 0x20, 0x7b, 0xb5, 0x24, 0x8b, 0xea, 0xcb, 0x5a, 0x7d, 0x81, 0xd4, 0xb5, 0xfa, 0x29, 0xe5, - 0xf4, 0xcc, 0x0b, 0x52, 0xe5, 0x04, 0x6a, 0x19, 0x0b, 0x92, 0xb5, 0x72, 0x47, 0x1b, 0xd6, 0xfa, - 0xbf, 0x2c, 0xef, 0x6e, 0x68, 0xdc, 0x6d, 0xb2, 0x96, 0xc1, 0x9d, 0x9a, 0x77, 0x3e, 0xf3, 0x32, - 0xee, 0x27, 0x1d, 0x80, 0xb1, 0x19, 0x89, 0x93, 0x13, 0xbe, 0xe2, 0x68, 0x7b, 0xad, 0x34, 0x8f, - 0xdc, 0x55, 0xcd, 0x5d, 0x22, 0x0b, 0x19, 0x2e, 0x1f, 0xeb, 0x7f, 0x80, 0x59, 0xb4, 0x14, 0xc9, - 0x7f, 0x8b, 0xbc, 0x23, 0xed, 0x95, 0xc9, 0x49, 0x84, 0xd8, 0x1a, 0xd2, 0x20, 0x44, 0x43, 0x22, - 0x93, 0x35, 0x30, 0x12, 0xc2, 0x2c, 0xfa, 0xa7, 0x40, 0xc8, 0x9b, 0xb0, 0x40, 0x28, 0x58, 0xae, - 0x70, 0x8d, 0xd8, 0x64, 0x47, 0x0f, 0xf8, 0xe2, 0xc9, 0xf7, 0x0b, 0xc7, 0x3a, 0xbf, 0x70, 0xac, - 0x5f, 0x17, 0x8e, 0xf5, 0xe5, 0xd2, 0x99, 0x3a, 0xbf, 0x74, 0xa6, 0x7e, 0x5e, 0x3a, 0x53, 0xef, - 0xdd, 0x36, 0x57, 0x87, 0xfd, 0x83, 0x56, 0x28, 0xbb, 0x9e, 0x14, 0xb1, 0x14, 0x91, 0x77, 0xf8, - 0x29, 0x48, 0xbc, 0x13, 0x2d, 0xa4, 0x92, 0x1e, 0x8b, 0x0f, 0xaa, 0xfa, 0xef, 0xfd, 0xe1, 0xdf, - 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xc4, 0xb0, 0x4a, 0x45, 0x06, 0x00, 0x00, + // 620 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0x4f, 0x4f, 0x13, 0x41, + 0x18, 0xc6, 0x59, 0x4a, 0xb7, 0xf5, 0x5d, 0x40, 0x9c, 0x16, 0xb2, 0x16, 0xdc, 0x90, 0x31, 0x51, + 0x48, 0x4c, 0x27, 0x54, 0x8f, 0x7a, 0x40, 0xb8, 0x78, 0x83, 0x95, 0x83, 0x31, 0x5e, 0x96, 0xdd, + 0x49, 0x1d, 0x6d, 0x67, 0xca, 0xce, 0x6c, 0x03, 0x21, 0x5c, 0x3c, 0x79, 0x34, 0xf1, 0x43, 0x78, + 0xf7, 0x53, 0x78, 0x24, 0xf1, 0xe2, 0xd1, 0x80, 0x1f, 0xc4, 0x74, 0x76, 0x86, 0xdd, 0xc5, 0x92, + 0x10, 0x2f, 0x4d, 0xe7, 0x79, 0xe7, 0xfd, 0xbd, 0x7f, 0xe6, 0x69, 0x01, 0x25, 0x2c, 0x21, 0xe3, + 0x2d, 0x72, 0x94, 0xd1, 0xf4, 0xa4, 0x3b, 0x4a, 0x85, 0x12, 0xc8, 0x4d, 0x58, 0xd2, 0x1d, 0x6f, + 0x75, 0xda, 0x26, 0xd6, 0xa7, 0x9c, 0x4a, 0x26, 0xf3, 0x68, 0xa7, 0x65, 0xd4, 0xa1, 0x48, 0xe8, + 0xc0, 0x8a, 0x6b, 0x7d, 0x21, 0xfa, 0x03, 0x4a, 0xa2, 0x11, 0x23, 0x11, 0xe7, 0x42, 0x45, 0x8a, + 0x09, 0x6e, 0xa2, 0xf8, 0xb3, 0x03, 0xf3, 0xfb, 0x93, 0x02, 0x21, 0x3d, 0xca, 0xa8, 0x54, 0x68, + 0x09, 0x6a, 0x09, 0x4b, 0x7c, 0x67, 0xdd, 0xd9, 0xb8, 0x13, 0x4e, 0xbe, 0xa2, 0x15, 0x70, 0x45, + 0xca, 0xfa, 0x8c, 0xfb, 0xb3, 0x5a, 0x34, 0x27, 0xe4, 0x43, 0x43, 0x66, 0x87, 0x1f, 0x68, 0xac, + 0xfc, 0x9a, 0x0e, 0xd8, 0x23, 0x7a, 0x06, 0x5e, 0x9c, 0xd2, 0x84, 0x72, 0xc5, 0xa2, 0x81, 0xf4, + 0xe7, 0xd6, 0x6b, 0x1b, 0x5e, 0x0f, 0x75, 0xf3, 0xde, 0xbb, 0x3b, 0x57, 0xa1, 0xb0, 0x7c, 0x0d, + 0xbf, 0x80, 0x96, 0xee, 0x64, 0x2f, 0x4a, 0xa3, 0xa1, 0x0c, 0xa9, 0x1c, 0x09, 0x2e, 0x29, 0x7a, + 0x04, 0xee, 0x48, 0x2b, 0xba, 0x27, 0xaf, 0xb7, 0x68, 0x39, 0xe6, 0x9e, 0x89, 0x62, 0x02, 0xcb, + 0x3a, 0x7d, 0x3b, 0x8e, 0x45, 0xc6, 0x55, 0x01, 0x58, 0x01, 0x97, 0x1e, 0x33, 0xa9, 0x72, 0x40, + 0x33, 0x34, 0x27, 0xfc, 0xdd, 0x01, 0x5f, 0x67, 0x14, 0x0d, 0x15, 0x49, 0x7a, 0xb8, 0x38, 0xa6, + 0xd2, 0x66, 0xd9, 0x63, 0x79, 0xec, 0xd9, 0xea, 0xd8, 0xc5, 0xa2, 0x6a, 0x95, 0x45, 0xfd, 0xd7, + 0x3a, 0x50, 0x1b, 0xea, 0x34, 0x4d, 0x45, 0xea, 0xd7, 0x35, 0x2c, 0x3f, 0xe0, 0x5d, 0x68, 0x9b, + 0xe7, 0x92, 0x62, 0x30, 0xa6, 0x57, 0xfd, 0x3e, 0x81, 0x66, 0x22, 0xe2, 0x6c, 0x48, 0xb9, 0x32, + 0x7b, 0x5a, 0xb2, 0x05, 0x76, 0x8d, 0x1e, 0x5e, 0xdd, 0xc0, 0xdb, 0x86, 0xf2, 0x9a, 0xa6, 0x63, + 0x16, 0x17, 0x94, 0x4d, 0x68, 0xc8, 0x5c, 0x32, 0x90, 0xbb, 0x16, 0x62, 0x6f, 0xda, 0x38, 0x66, + 0x80, 0x34, 0xe2, 0x40, 0x7c, 0xa4, 0xfc, 0x16, 0x6b, 0x7b, 0x08, 0x75, 0x35, 0xb9, 0xaa, 0x97, + 0xe6, 0xf5, 0x16, 0x2c, 0x38, 0xcf, 0xcf, 0x63, 0xc5, 0xcc, 0xb5, 0xd2, 0xcc, 0xbd, 0x6f, 0x73, + 0x50, 0xd7, 0xb5, 0xd0, 0x1e, 0xb8, 0xf9, 0xab, 0xa3, 0xb6, 0xcd, 0x2f, 0x9b, 0xb7, 0xb3, 0x5a, + 0x51, 0xab, 0x46, 0xc2, 0xad, 0x4f, 0x3f, 0xff, 0x7c, 0x9d, 0x5d, 0x40, 0x1e, 0x99, 0xfc, 0x4c, + 0x72, 0xd7, 0xa0, 0x77, 0xd0, 0xb4, 0x86, 0xb9, 0x81, 0xf9, 0xa0, 0xa2, 0x5e, 0x77, 0x17, 0x5e, + 0xd5, 0xd4, 0x65, 0xd4, 0xd2, 0xd4, 0xd3, 0x84, 0x25, 0x67, 0x24, 0xb2, 0xc4, 0x31, 0x78, 0x3b, + 0xe5, 0x27, 0x9d, 0x5a, 0x60, 0xbd, 0xa2, 0x4e, 0x31, 0x23, 0x26, 0xba, 0xc6, 0x26, 0x7a, 0x4c, + 0xcc, 0xf6, 0xc9, 0x69, 0x6e, 0xad, 0x33, 0x72, 0x6a, 0xcc, 0x77, 0x46, 0xca, 0xde, 0xd9, 0x87, + 0x86, 0x31, 0xc8, 0x0d, 0x35, 0xd7, 0xae, 0xa9, 0x15, 0x33, 0x61, 0xa4, 0xeb, 0xcd, 0x23, 0x28, + 0x66, 0x42, 0x6f, 0xa0, 0x61, 0x3c, 0x70, 0x2b, 0xe4, 0x35, 0x67, 0xe1, 0xfb, 0x1a, 0xd9, 0x42, + 0xf7, 0xfe, 0x19, 0x01, 0xbd, 0x82, 0xfa, 0x41, 0xfe, 0xfa, 0x53, 0xb9, 0x9d, 0x8a, 0x5a, 0xb1, + 0x1b, 0x5e, 0xd4, 0xd4, 0x26, 0x76, 0x89, 0xf6, 0xcf, 0xcb, 0xe7, 0x3f, 0x2e, 0x02, 0xe7, 0xfc, + 0x22, 0x70, 0x7e, 0x5f, 0x04, 0xce, 0x97, 0xcb, 0x60, 0xe6, 0xfc, 0x32, 0x98, 0xf9, 0x75, 0x19, + 0xcc, 0xbc, 0xc5, 0x7d, 0xa6, 0xde, 0x67, 0x87, 0xdd, 0x58, 0x0c, 0x89, 0xe0, 0x52, 0xf0, 0x94, + 0xe8, 0x8f, 0x63, 0x3d, 0xa2, 0x3a, 0x19, 0x51, 0x79, 0xe8, 0xea, 0xbf, 0xc4, 0xa7, 0x7f, 0x03, + 0x00, 0x00, 0xff, 0xff, 0xb5, 0xea, 0x49, 0x17, 0x79, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -656,17 +485,17 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type QueryClient interface { // Params queries all parameters of the module. - Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) // Accounts returns associated wallet accounts with the DID. - Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) + Accounts(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) // Credentials returns associated credentials with the DID and Service Origin. - Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) - // Identities returns associated identity with the DID. - Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) + Credentials(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) // Resolve queries the DID document by its id. - Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) + Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) + // Token returns the current authentication token for the client. + Token(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryTokenResponse, error) } type queryClient struct { @@ -677,7 +506,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { return &queryClient{cc} } -func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { +func (c *queryClient) Params(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Params", in, out, opts...) if err != nil { @@ -686,7 +515,7 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } -func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { +func (c *queryClient) Accounts(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryAccountsResponse, error) { out := new(QueryAccountsResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Accounts", in, out, opts...) if err != nil { @@ -695,7 +524,7 @@ func (c *queryClient) Accounts(ctx context.Context, in *QueryAccountsRequest, op return out, nil } -func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { +func (c *queryClient) Credentials(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryCredentialsResponse, error) { out := new(QueryCredentialsResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Credentials", in, out, opts...) if err != nil { @@ -704,16 +533,7 @@ func (c *queryClient) Credentials(ctx context.Context, in *QueryCredentialsReque return out, nil } -func (c *queryClient) Identities(ctx context.Context, in *QueryIdentitiesRequest, opts ...grpc.CallOption) (*QueryIdentitiesResponse, error) { - out := new(QueryIdentitiesResponse) - err := c.cc.Invoke(ctx, "/did.v1.Query/Identities", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { +func (c *queryClient) Resolve(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryResolveResponse, error) { out := new(QueryResolveResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Resolve", in, out, opts...) if err != nil { @@ -722,7 +542,7 @@ func (c *queryClient) Resolve(ctx context.Context, in *QueryResolveRequest, opts return out, nil } -func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { +func (c *queryClient) Service(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryServiceResponse, error) { out := new(QueryServiceResponse) err := c.cc.Invoke(ctx, "/did.v1.Query/Service", in, out, opts...) if err != nil { @@ -731,51 +551,60 @@ func (c *queryClient) Service(ctx context.Context, in *QueryServiceRequest, opts return out, nil } +func (c *queryClient) Token(ctx context.Context, in *QueryRequest, opts ...grpc.CallOption) (*QueryTokenResponse, error) { + out := new(QueryTokenResponse) + err := c.cc.Invoke(ctx, "/did.v1.Query/Token", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Params queries all parameters of the module. - Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + Params(context.Context, *QueryRequest) (*QueryParamsResponse, error) // Accounts returns associated wallet accounts with the DID. - Accounts(context.Context, *QueryAccountsRequest) (*QueryAccountsResponse, error) + Accounts(context.Context, *QueryRequest) (*QueryAccountsResponse, error) // Credentials returns associated credentials with the DID and Service Origin. - Credentials(context.Context, *QueryCredentialsRequest) (*QueryCredentialsResponse, error) - // Identities returns associated identity with the DID. - Identities(context.Context, *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) + Credentials(context.Context, *QueryRequest) (*QueryCredentialsResponse, error) // Resolve queries the DID document by its id. - Resolve(context.Context, *QueryResolveRequest) (*QueryResolveResponse, error) + Resolve(context.Context, *QueryRequest) (*QueryResolveResponse, error) // Service returns associated ServiceInfo for a given Origin - Service(context.Context, *QueryServiceRequest) (*QueryServiceResponse, error) + Service(context.Context, *QueryRequest) (*QueryServiceResponse, error) + // Token returns the current authentication token for the client. + Token(context.Context, *QueryRequest) (*QueryTokenResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. type UnimplementedQueryServer struct { } -func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } -func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryAccountsRequest) (*QueryAccountsResponse, error) { +func (*UnimplementedQueryServer) Accounts(ctx context.Context, req *QueryRequest) (*QueryAccountsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Accounts not implemented") } -func (*UnimplementedQueryServer) Credentials(ctx context.Context, req *QueryCredentialsRequest) (*QueryCredentialsResponse, error) { +func (*UnimplementedQueryServer) Credentials(ctx context.Context, req *QueryRequest) (*QueryCredentialsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Credentials not implemented") } -func (*UnimplementedQueryServer) Identities(ctx context.Context, req *QueryIdentitiesRequest) (*QueryIdentitiesResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Identities not implemented") -} -func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryResolveRequest) (*QueryResolveResponse, error) { +func (*UnimplementedQueryServer) Resolve(ctx context.Context, req *QueryRequest) (*QueryResolveResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Resolve not implemented") } -func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryServiceRequest) (*QueryServiceResponse, error) { +func (*UnimplementedQueryServer) Service(ctx context.Context, req *QueryRequest) (*QueryServiceResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Service not implemented") } +func (*UnimplementedQueryServer) Token(ctx context.Context, req *QueryRequest) (*QueryTokenResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Token not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) } func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryParamsRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -787,13 +616,13 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf FullMethod: "/did.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + return srv.(QueryServer).Params(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryAccountsRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -805,13 +634,13 @@ func _Query_Accounts_Handler(srv interface{}, ctx context.Context, dec func(inte FullMethod: "/did.v1.Query/Accounts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Accounts(ctx, req.(*QueryAccountsRequest)) + return srv.(QueryServer).Accounts(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryCredentialsRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -823,31 +652,13 @@ func _Query_Credentials_Handler(srv interface{}, ctx context.Context, dec func(i FullMethod: "/did.v1.Query/Credentials", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Credentials(ctx, req.(*QueryCredentialsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Query_Identities_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryIdentitiesRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(QueryServer).Identities(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/did.v1.Query/Identities", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Identities(ctx, req.(*QueryIdentitiesRequest)) + return srv.(QueryServer).Credentials(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryResolveRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -859,13 +670,13 @@ func _Query_Resolve_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/did.v1.Query/Resolve", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Resolve(ctx, req.(*QueryResolveRequest)) + return srv.(QueryServer).Resolve(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(QueryServiceRequest) + in := new(QueryRequest) if err := dec(in); err != nil { return nil, err } @@ -877,7 +688,25 @@ func _Query_Service_Handler(srv interface{}, ctx context.Context, dec func(inter FullMethod: "/did.v1.Query/Service", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(QueryServer).Service(ctx, req.(*QueryServiceRequest)) + return srv.(QueryServer).Service(ctx, req.(*QueryRequest)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Token_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Token(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/did.v1.Query/Token", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Token(ctx, req.(*QueryRequest)) } return interceptor(ctx, in, info, handler) } @@ -898,10 +727,6 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Credentials", Handler: _Query_Credentials_Handler, }, - { - MethodName: "Identities", - Handler: _Query_Identities_Handler, - }, { MethodName: "Resolve", Handler: _Query_Resolve_Handler, @@ -910,12 +735,16 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Service", Handler: _Query_Service_Handler, }, + { + MethodName: "Token", + Handler: _Query_Token_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "did/v1/query.proto", } -func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { +func (m *QueryRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -925,16 +754,51 @@ func (m *QueryParamsRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *QueryRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *QueryRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if len(m.Credentials) > 0 { + for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x1a + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x12 + } + if len(m.Did) > 0 { + i -= len(m.Did) + copy(dAtA[i:], m.Did) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -973,36 +837,6 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryAccountsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryAccountsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryAccountsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryAccountsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1036,43 +870,6 @@ func (m *QueryAccountsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryCredentialsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryCredentialsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryCredentialsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x12 - } - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryCredentialsResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1093,84 +890,17 @@ func (m *QueryCredentialsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error _ = i var l int _ = l - if len(m.Credentials) > 0 { - for k := range m.Credentials { - v := m.Credentials[k] - baseI := i - if len(v) > 0 { - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintQuery(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - } - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintQuery(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintQuery(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func (m *QueryIdentitiesRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryIdentitiesRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryIdentitiesRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Error))) i-- - dAtA[i] = 0xa + dAtA[i] = 0x2a } - return len(dAtA) - i, nil -} - -func (m *QueryIdentitiesResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryIdentitiesResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryIdentitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VerificationMethod) > 0 { - for iNdEx := len(m.VerificationMethod) - 1; iNdEx >= 0; iNdEx-- { + if len(m.Credentials) > 0 { + for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { { - size, err := m.VerificationMethod[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1178,12 +908,26 @@ func (m *QueryIdentitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) i = encodeVarintQuery(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x22 } } - if m.Exists { + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) i-- - if m.Exists { + dAtA[i] = 0x1a + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x12 + } + if m.Success { + i-- + if m.Success { dAtA[i] = 1 } else { dAtA[i] = 0 @@ -1194,36 +938,6 @@ func (m *QueryIdentitiesResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *QueryResolveRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryResolveRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryResolveRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Did) > 0 { - i -= len(m.Did) - copy(dAtA[i:], m.Did) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Did))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryResolveResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1259,36 +973,6 @@ func (m *QueryResolveResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *QueryServiceRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *QueryServiceRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *QueryServiceRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func (m *QueryServiceResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1309,16 +993,73 @@ func (m *QueryServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Options) > 0 { - i -= len(m.Options) - copy(dAtA[i:], m.Options) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Options))) + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } +func (m *QueryTokenResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *QueryTokenResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryTokenResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Error) > 0 { + i -= len(m.Error) + copy(dAtA[i:], m.Error) + i = encodeVarintQuery(dAtA, i, uint64(len(m.Error))) + i-- + dAtA[i] = 0x1a + } + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -1330,12 +1071,30 @@ func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *QueryParamsRequest) Size() (n int) { +func (m *QueryRequest) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.Did) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + if len(m.Credentials) > 0 { + for _, e := range m.Credentials { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } return n } @@ -1352,19 +1111,6 @@ func (m *QueryParamsResponse) Size() (n int) { return n } -func (m *QueryAccountsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryAccountsResponse) Size() (n int) { if m == nil { return 0 @@ -1377,13 +1123,16 @@ func (m *QueryAccountsResponse) Size() (n int) { return n } -func (m *QueryCredentialsRequest) Size() (n int) { +func (m *QueryCredentialsResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Did) + if m.Success { + n += 2 + } + l = len(m.Subject) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1391,68 +1140,13 @@ func (m *QueryCredentialsRequest) Size() (n int) { if l > 0 { n += 1 + l + sovQuery(uint64(l)) } - return n -} - -func (m *QueryCredentialsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l if len(m.Credentials) > 0 { - for k, v := range m.Credentials { - _ = k - _ = v - l = 0 - if len(v) > 0 { - l = 1 + len(v) + sovQuery(uint64(len(v))) - } - mapEntrySize := 1 + len(k) + sovQuery(uint64(len(k))) + l - n += mapEntrySize + 1 + sovQuery(uint64(mapEntrySize)) - } - } - return n -} - -func (m *QueryIdentitiesRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *QueryIdentitiesResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Exists { - n += 2 - } - if len(m.VerificationMethod) > 0 { - for _, e := range m.VerificationMethod { + for _, e := range m.Credentials { l = e.Size() n += 1 + l + sovQuery(uint64(l)) } } - return n -} - -func (m *QueryResolveRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Did) + l = len(m.Error) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1472,26 +1166,33 @@ func (m *QueryResolveResponse) Size() (n int) { return n } -func (m *QueryServiceRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Origin) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - func (m *QueryServiceResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l - l = len(m.Options) + if m.Service != nil { + l = m.Service.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryTokenResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success { + n += 2 + } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovQuery(uint64(l)) + } + l = len(m.Error) if l > 0 { n += 1 + l + sovQuery(uint64(l)) } @@ -1504,7 +1205,7 @@ func sovQuery(x uint64) (n int) { func sozQuery(x uint64) (n int) { return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1527,12 +1228,142 @@ func (m *QueryParamsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryParamsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryRequest: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryRequest: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Credentials = append(m.Credentials, &Credential{}) + if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipQuery(dAtA[iNdEx:]) @@ -1640,88 +1471,6 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryAccountsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryAccountsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryAccountsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryAccountsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -1792,7 +1541,7 @@ func (m *QueryAccountsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryCredentialsRequest) Unmarshal(dAtA []byte) error { +func (m *QueryCredentialsResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1815,15 +1564,35 @@ func (m *QueryCredentialsRequest) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: QueryCredentialsRequest: wiretype end group for non-group") + return fmt.Errorf("proto: QueryCredentialsResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCredentialsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: QueryCredentialsResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1851,9 +1620,9 @@ func (m *QueryCredentialsRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Did = string(dAtA[iNdEx:postIndex]) + m.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } @@ -1885,57 +1654,7 @@ func (m *QueryCredentialsRequest) Unmarshal(dAtA []byte) error { } m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryCredentialsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryCredentialsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryCredentialsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) } @@ -1964,158 +1683,14 @@ func (m *QueryCredentialsResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.Credentials == nil { - m.Credentials = make(map[string][]byte) - } - var mapkey string - mapvalue := []byte{} - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthQuery - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthQuery - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var mapbyteLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - mapbyteLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intMapbyteLen := int(mapbyteLen) - if intMapbyteLen < 0 { - return ErrInvalidLengthQuery - } - postbytesIndex := iNdEx + intMapbyteLen - if postbytesIndex < 0 { - return ErrInvalidLengthQuery - } - if postbytesIndex > l { - return io.ErrUnexpectedEOF - } - mapvalue = make([]byte, mapbyteLen) - copy(mapvalue, dAtA[iNdEx:postbytesIndex]) - iNdEx = postbytesIndex - } else { - iNdEx = entryPreIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.Credentials[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { + m.Credentials = append(m.Credentials, &Credential{}) + if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryIdentitiesRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryIdentitiesRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryIdentitiesRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: + iNdEx = postIndex + case 5: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2143,193 +1718,7 @@ func (m *QueryIdentitiesRequest) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Did = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryIdentitiesResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryIdentitiesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryIdentitiesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Exists = bool(v != 0) - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethod", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethod = append(m.VerificationMethod, &VerificationMethod{}) - if err := m.VerificationMethod[len(m.VerificationMethod)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *QueryResolveRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryResolveRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryResolveRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Did = string(dAtA[iNdEx:postIndex]) + m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2438,88 +1827,6 @@ func (m *QueryResolveResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *QueryServiceRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: QueryServiceRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: QueryServiceRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func (m *QueryServiceResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 @@ -2551,7 +1858,149 @@ func (m *QueryServiceResponse) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Options", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Service == nil { + m.Service = &Service{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryTokenResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: QueryTokenResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryTokenResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Error", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2579,7 +2028,7 @@ func (m *QueryServiceResponse) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Options = string(dAtA[iNdEx:postIndex]) + m.Error = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex diff --git a/x/did/types/query.pb.gw.go b/x/did/types/query.pb.gw.go index 5a8f31c40..f3a697dd7 100644 --- a/x/did/types/query.pb.gw.go +++ b/x/did/types/query.pb.gw.go @@ -33,26 +33,48 @@ var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage var _ = metadata.Join +var ( + filter_Query_Params_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryParamsRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Params_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Params(ctx, &protoReq) return msg, metadata, err } +var ( + filter_Query_Accounts_0 = &utilities.DoubleArray{Encoding: map[string]int{"did": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAccountsRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -73,13 +95,20 @@ func request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Accounts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryAccountsRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -100,13 +129,24 @@ func local_request_Query_Accounts_0(ctx context.Context, marshaler runtime.Marsh return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Accounts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Accounts(ctx, &protoReq) return msg, metadata, err } +var ( + filter_Query_Credentials_0 = &utilities.DoubleArray{Encoding: map[string]int{"origin": 0, "subject": 1}, Base: []int{1, 1, 2, 0, 0}, Check: []int{0, 1, 1, 2, 3}} +) + func request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCredentialsRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -116,17 +156,6 @@ func request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshale _ = err ) - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - val, ok = pathParams["origin"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") @@ -138,13 +167,31 @@ func request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshale return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) } + val, ok = pathParams["subject"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subject") + } + + protoReq.Subject, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subject", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Credentials_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Credentials(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Credentials_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryCredentialsRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -154,17 +201,6 @@ func local_request_Query_Credentials_0(ctx context.Context, marshaler runtime.Ma _ = err ) - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - val, ok = pathParams["origin"] if !ok { return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "origin") @@ -176,67 +212,35 @@ func local_request_Query_Credentials_0(ctx context.Context, marshaler runtime.Ma return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) } + val, ok = pathParams["subject"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "subject") + } + + protoReq.Subject, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "subject", err) + } + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Credentials_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Credentials(ctx, &protoReq) return msg, metadata, err } -func request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryIdentitiesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := client.Identities(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Query_Identities_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryIdentitiesRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["did"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "did") - } - - protoReq.Did, err = runtime.String(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) - } - - msg, err := server.Identities(ctx, &protoReq) - return msg, metadata, err - -} +var ( + filter_Query_Resolve_0 = &utilities.DoubleArray{Encoding: map[string]int{"did": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) func request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResolveRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -257,13 +261,20 @@ func request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Resolve_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Resolve(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryResolveRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -284,13 +295,24 @@ func local_request_Query_Resolve_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "did", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Resolve_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Resolve(ctx, &protoReq) return msg, metadata, err } +var ( + filter_Query_Service_0 = &utilities.DoubleArray{Encoding: map[string]int{"origin": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} +) + func request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryServiceRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -311,13 +333,20 @@ func request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, c return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Service_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := client.Service(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) return msg, metadata, err } func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq QueryServiceRequest + var protoReq QueryRequest var metadata runtime.ServerMetadata var ( @@ -338,11 +367,54 @@ func local_request_Query_Service_0(ctx context.Context, marshaler runtime.Marsha return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "origin", err) } + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Service_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + msg, err := server.Service(ctx, &protoReq) return msg, metadata, err } +var ( + filter_Query_Token_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_Token_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Token_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.Token(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Token_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryRequest + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_Token_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.Token(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -418,29 +490,6 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) - mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - var stream runtime.ServerTransportStream - ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Query_Identities_0(rctx, inboundMarshaler, server, req, pathParams) - md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -487,6 +536,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("POST", pattern_Query_Token_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Token_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Token_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -588,26 +660,6 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) - mux.Handle("GET", pattern_Query_Identities_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Query_Identities_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Query_Identities_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - mux.Handle("GET", pattern_Query_Resolve_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { ctx, cancel := context.WithCancel(req.Context()) defer cancel() @@ -648,6 +700,26 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("POST", pattern_Query_Token_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Token_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Token_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -656,13 +728,13 @@ var ( pattern_Query_Accounts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "accounts"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Credentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 1, 0, 4, 1, 5, 1, 2, 2}, []string{"did", "origin", "credentials"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Credentials_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1, 1, 0, 4, 1, 5, 2, 2, 3}, []string{"service", "origin", "subject", "credentials"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Identities_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0, 2, 1}, []string{"did", "identities"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 0}, []string{"did"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Resolve_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 0}, []string{"did", "resolve"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 1, 0, 4, 1, 5, 1}, []string{"service", "origin"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Service_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 1, 0, 4, 1, 5, 2}, []string{"did", "service", "origin"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Token_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0}, []string{"token"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( @@ -672,9 +744,9 @@ var ( forward_Query_Credentials_0 = runtime.ForwardResponseMessage - forward_Query_Identities_0 = runtime.ForwardResponseMessage - forward_Query_Resolve_0 = runtime.ForwardResponseMessage forward_Query_Service_0 = runtime.ForwardResponseMessage + + forward_Query_Token_0 = runtime.ForwardResponseMessage ) diff --git a/x/did/types/state.go b/x/did/types/state.go index 4768c695c..e490eec6d 100644 --- a/x/did/types/state.go +++ b/x/did/types/state.go @@ -2,3 +2,11 @@ package types // ByteArray is a list of byte arrays type ByteArray = [][]byte + +// ToVerificationMethod converts a Profile to a VerificationMethod +func (p Profile) ToVerificationMethod() VerificationMethod { + return VerificationMethod{ + Id: p.Id, + Controller: p.Controller, + } +} diff --git a/x/did/types/state.pb.go b/x/did/types/state.pb.go index abddda968..9691a3002 100644 --- a/x/did/types/state.pb.go +++ b/x/did/types/state.pb.go @@ -33,8 +33,14 @@ type Assertion struct { PublicKey *PubKey `protobuf:"bytes,3,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The value of the linked identifier CredentialId []byte `protobuf:"bytes,4,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` + // The display label of the attestation + CredentialLabel string `protobuf:"bytes,5,opt,name=credential_label,json=credentialLabel,proto3" json:"credential_label,omitempty"` + // The origin of the attestation + Origin string `protobuf:"bytes,6,opt,name=origin,proto3" json:"origin,omitempty"` + // The subject of the attestation + Subject string `protobuf:"bytes,7,opt,name=subject,proto3" json:"subject,omitempty"` // Metadata is optional additional information about the assertion - Metadata *Metadata `protobuf:"bytes,5,opt,name=metadata,proto3" json:"metadata,omitempty"` + Metadata *Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } func (m *Assertion) Reset() { *m = Assertion{} } @@ -98,6 +104,27 @@ func (m *Assertion) GetCredentialId() []byte { return nil } +func (m *Assertion) GetCredentialLabel() string { + if m != nil { + return m.CredentialLabel + } + return "" +} + +func (m *Assertion) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *Assertion) GetSubject() string { + if m != nil { + return m.Subject + } + return "" +} + func (m *Assertion) GetMetadata() *Metadata { if m != nil { return m.Metadata @@ -202,6 +229,8 @@ type Controller struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The DID of the controller Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` + // Aliases of the controller + Aliases []string `protobuf:"bytes,3,rep,name=aliases,proto3" json:"aliases,omitempty"` // PubKey is the verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // The vault address or identifier @@ -255,6 +284,13 @@ func (m *Controller) GetAddress() string { return "" } +func (m *Controller) GetAliases() []string { + if m != nil { + return m.Aliases + } + return nil +} + func (m *Controller) GetPublicKey() *PubKey { if m != nil { return m.PublicKey @@ -276,9 +312,15 @@ type Delegation struct { // The Decentralized Identifier of the delegated account Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // Resolved from module parameters - ChainInfoId string `protobuf:"bytes,3,opt,name=chain_info_id,json=chainInfoId,proto3" json:"chain_info_id,omitempty"` + ChainIndex string `protobuf:"bytes,3,opt,name=chain_index,json=chainIndex,proto3" json:"chain_index,omitempty"` // The delegation proof or verification method PublicKey *PubKey `protobuf:"bytes,4,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` + // The Account Address + AccountAddress string `protobuf:"bytes,5,opt,name=account_address,json=accountAddress,proto3" json:"account_address,omitempty"` + // The Account label + AccountLabel string `protobuf:"bytes,6,opt,name=account_label,json=accountLabel,proto3" json:"account_label,omitempty"` + // The Chain ID + ChainId string `protobuf:"bytes,7,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` } func (m *Delegation) Reset() { *m = Delegation{} } @@ -328,9 +370,9 @@ func (m *Delegation) GetController() string { return "" } -func (m *Delegation) GetChainInfoId() string { +func (m *Delegation) GetChainIndex() string { if m != nil { - return m.ChainInfoId + return m.ChainIndex } return "" } @@ -342,34 +384,59 @@ func (m *Delegation) GetPublicKey() *PubKey { return nil } -// Service represents a service in a DID Document -type Service struct { +func (m *Delegation) GetAccountAddress() string { + if m != nil { + return m.AccountAddress + } + return "" +} + +func (m *Delegation) GetAccountLabel() string { + if m != nil { + return m.AccountLabel + } + return "" +} + +func (m *Delegation) GetChainId() string { + if m != nil { + return m.ChainId + } + return "" +} + +// ServiceRecord represents a decentralized service in a DID Document +type ServiceRecord struct { // The ID of the service Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // The type of the service ServiceType string `protobuf:"bytes,2,opt,name=service_type,json=serviceType,proto3" json:"service_type,omitempty"` // The controller DID of the service - ControllerDid string `protobuf:"bytes,3,opt,name=controller_did,json=controllerDid,proto3" json:"controller_did,omitempty"` + Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` // The domain name of the service OriginUri string `protobuf:"bytes,4,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` + // The description of the service + Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // The service endpoint - ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + ServiceEndpoints map[string]string `protobuf:"bytes,6,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Scopes is the Authorization Grants of the service - Permissions *Permissions `protobuf:"bytes,6,opt,name=permissions,proto3" json:"permissions,omitempty"` + Permissions *Permissions `protobuf:"bytes,7,opt,name=permissions,proto3" json:"permissions,omitempty"` + // Metadata is optional additional information about the service + Metadata *Metadata `protobuf:"bytes,8,opt,name=metadata,proto3" json:"metadata,omitempty"` } -func (m *Service) Reset() { *m = Service{} } -func (m *Service) String() string { return proto.CompactTextString(m) } -func (*Service) ProtoMessage() {} -func (*Service) Descriptor() ([]byte, []int) { +func (m *ServiceRecord) Reset() { *m = ServiceRecord{} } +func (m *ServiceRecord) String() string { return proto.CompactTextString(m) } +func (*ServiceRecord) ProtoMessage() {} +func (*ServiceRecord) Descriptor() ([]byte, []int) { return fileDescriptor_f44bb702879c34b4, []int{4} } -func (m *Service) XXX_Unmarshal(b []byte) error { +func (m *ServiceRecord) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ServiceRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_Service.Marshal(b, m, deterministic) + return xxx_messageInfo_ServiceRecord.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -379,112 +446,137 @@ func (m *Service) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { return b[:n], nil } } -func (m *Service) XXX_Merge(src proto.Message) { - xxx_messageInfo_Service.Merge(m, src) +func (m *ServiceRecord) XXX_Merge(src proto.Message) { + xxx_messageInfo_ServiceRecord.Merge(m, src) } -func (m *Service) XXX_Size() int { +func (m *ServiceRecord) XXX_Size() int { return m.Size() } -func (m *Service) XXX_DiscardUnknown() { - xxx_messageInfo_Service.DiscardUnknown(m) +func (m *ServiceRecord) XXX_DiscardUnknown() { + xxx_messageInfo_ServiceRecord.DiscardUnknown(m) } -var xxx_messageInfo_Service proto.InternalMessageInfo +var xxx_messageInfo_ServiceRecord proto.InternalMessageInfo -func (m *Service) GetId() string { +func (m *ServiceRecord) GetId() string { if m != nil { return m.Id } return "" } -func (m *Service) GetServiceType() string { +func (m *ServiceRecord) GetServiceType() string { if m != nil { return m.ServiceType } return "" } -func (m *Service) GetControllerDid() string { +func (m *ServiceRecord) GetController() string { if m != nil { - return m.ControllerDid + return m.Controller } return "" } -func (m *Service) GetOriginUri() string { +func (m *ServiceRecord) GetOriginUri() string { if m != nil { return m.OriginUri } return "" } -func (m *Service) GetServiceEndpoints() map[string]string { +func (m *ServiceRecord) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *ServiceRecord) GetServiceEndpoints() map[string]string { if m != nil { return m.ServiceEndpoints } return nil } -func (m *Service) GetPermissions() *Permissions { +func (m *ServiceRecord) GetPermissions() *Permissions { if m != nil { return m.Permissions } return nil } +func (m *ServiceRecord) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + func init() { proto.RegisterType((*Assertion)(nil), "did.v1.Assertion") proto.RegisterType((*Attestation)(nil), "did.v1.Attestation") proto.RegisterType((*Controller)(nil), "did.v1.Controller") proto.RegisterType((*Delegation)(nil), "did.v1.Delegation") - proto.RegisterType((*Service)(nil), "did.v1.Service") - proto.RegisterMapType((map[string]string)(nil), "did.v1.Service.ServiceEndpointsEntry") + proto.RegisterType((*ServiceRecord)(nil), "did.v1.ServiceRecord") + proto.RegisterMapType((map[string]string)(nil), "did.v1.ServiceRecord.ServiceEndpointsEntry") } func init() { proto.RegisterFile("did/v1/state.proto", fileDescriptor_f44bb702879c34b4) } var fileDescriptor_f44bb702879c34b4 = []byte{ - // 613 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x4f, 0x6b, 0xd4, 0x40, - 0x18, 0xc6, 0x3b, 0xfb, 0xaf, 0xcd, 0xbb, 0xed, 0xb2, 0x4e, 0xab, 0x86, 0x8a, 0x61, 0x8d, 0x16, - 0xf6, 0x50, 0x37, 0xb4, 0x22, 0x48, 0xf1, 0x52, 0xdb, 0x1e, 0x4a, 0x11, 0x24, 0xea, 0xc5, 0x4b, - 0xc8, 0x66, 0xa6, 0xdb, 0xd1, 0x64, 0x66, 0x99, 0x99, 0xac, 0xe6, 0x4b, 0x88, 0xf8, 0x01, 0xf4, - 0xeb, 0x78, 0x11, 0x0a, 0x5e, 0x3c, 0xca, 0xf6, 0x1b, 0xf4, 0x13, 0x48, 0x92, 0x49, 0xb7, 0xae, - 0x42, 0xd1, 0x83, 0xa7, 0xdd, 0xf7, 0xc9, 0x93, 0x99, 0xe7, 0xf7, 0xcc, 0x10, 0xc0, 0x84, 0x11, - 0x6f, 0xb2, 0xe5, 0x29, 0x1d, 0x6a, 0x3a, 0x18, 0x4b, 0xa1, 0x05, 0x6e, 0x11, 0x46, 0x06, 0x93, - 0xad, 0xf5, 0x9b, 0x91, 0x50, 0x89, 0x50, 0x9e, 0x90, 0x49, 0x6e, 0x11, 0x32, 0x29, 0x0d, 0xeb, - 0x6b, 0xe6, 0xa5, 0x11, 0xe5, 0x54, 0x31, 0x65, 0xd4, 0x55, 0xa3, 0x26, 0x82, 0xd0, 0xd8, 0x88, - 0xee, 0x57, 0x04, 0xd6, 0xae, 0x52, 0x54, 0x6a, 0x26, 0x38, 0xee, 0x40, 0x8d, 0x11, 0x1b, 0xf5, - 0x50, 0xdf, 0xf2, 0x6b, 0x8c, 0x60, 0x07, 0x20, 0x12, 0x5c, 0x4b, 0x11, 0xc7, 0x54, 0xda, 0xb5, - 0x42, 0xbf, 0xa4, 0xe0, 0xfb, 0x00, 0xe3, 0x74, 0x18, 0xb3, 0x28, 0x78, 0x43, 0x33, 0xbb, 0xde, - 0x43, 0xfd, 0xf6, 0x76, 0x67, 0x50, 0xc6, 0x1b, 0x3c, 0x4b, 0x87, 0x47, 0x34, 0xf3, 0xad, 0xd2, - 0x71, 0x44, 0x33, 0x7c, 0x17, 0x56, 0x22, 0x49, 0x09, 0xe5, 0x9a, 0x85, 0x71, 0xc0, 0x88, 0xdd, - 0xe8, 0xa1, 0xfe, 0xb2, 0xbf, 0x3c, 0x13, 0x0f, 0x09, 0xde, 0x84, 0xa5, 0x84, 0xea, 0x90, 0x84, - 0x3a, 0xb4, 0x9b, 0xc5, 0x8a, 0xdd, 0x6a, 0xc5, 0xa7, 0x46, 0xf7, 0x2f, 0x1c, 0x3b, 0x9d, 0xf3, - 0x4f, 0xdf, 0xde, 0xd7, 0x97, 0xa0, 0x51, 0x26, 0x77, 0xcf, 0x11, 0xb4, 0x77, 0xb5, 0xa6, 0x79, - 0x5f, 0xff, 0x81, 0xe8, 0x06, 0xb4, 0x84, 0x64, 0x23, 0xc6, 0x0b, 0x14, 0xcb, 0x37, 0x13, 0xb6, - 0x61, 0x51, 0xa5, 0xc3, 0xd7, 0x34, 0xd2, 0x05, 0x83, 0xe5, 0x57, 0xe3, 0x2f, 0x78, 0xad, 0x2b, - 0xf1, 0xee, 0x15, 0x78, 0x4e, 0x89, 0x87, 0xd7, 0xa0, 0x63, 0x96, 0xd9, 0x2c, 0xf7, 0xe9, 0x22, - 0x1b, 0xd9, 0x35, 0xf7, 0x23, 0x02, 0xd8, 0x9b, 0x31, 0xcc, 0x33, 0xdb, 0xb0, 0x18, 0x12, 0x22, - 0xa9, 0x52, 0x06, 0xb8, 0x1a, 0xe7, 0x68, 0x1b, 0x57, 0xd1, 0xde, 0x02, 0x6b, 0x12, 0xa6, 0xb1, - 0x0e, 0x22, 0x46, 0x0c, 0xd7, 0x52, 0x21, 0xec, 0x31, 0x32, 0x77, 0x12, 0x75, 0xf7, 0x33, 0x02, - 0xd8, 0xa7, 0x31, 0x1d, 0xfd, 0xdb, 0x41, 0xb8, 0xb0, 0x12, 0x9d, 0x84, 0x8c, 0x07, 0x8c, 0x1f, - 0x8b, 0xfc, 0xae, 0xd4, 0x0b, 0x4b, 0xbb, 0x10, 0x0f, 0xf9, 0xb1, 0x38, 0x24, 0x7f, 0x19, 0x7f, - 0x2e, 0x61, 0xc3, 0x9d, 0xd6, 0x60, 0xf1, 0x39, 0x95, 0x13, 0x16, 0xd1, 0xdf, 0xe2, 0xdd, 0x81, - 0x65, 0x55, 0x3e, 0x0a, 0x74, 0x36, 0xa6, 0x26, 0x60, 0xdb, 0x68, 0x2f, 0xb2, 0x31, 0xc5, 0x1b, - 0xd0, 0x99, 0xe5, 0x0d, 0xc8, 0x45, 0xc4, 0x95, 0x99, 0xba, 0xcf, 0x08, 0xbe, 0x0d, 0x50, 0x1e, - 0x56, 0x90, 0x4a, 0x66, 0xae, 0x89, 0x55, 0x2a, 0x2f, 0x25, 0xc3, 0x3e, 0x5c, 0xab, 0x36, 0xa2, - 0x9c, 0x8c, 0x05, 0xe3, 0x5a, 0xd9, 0xcd, 0x5e, 0xbd, 0xdf, 0xde, 0xde, 0xa8, 0x50, 0x4c, 0xc8, - 0xea, 0xf7, 0xa0, 0xf2, 0x1d, 0x70, 0x2d, 0x33, 0xbf, 0xab, 0xe6, 0x64, 0xfc, 0x10, 0xda, 0x63, - 0x2a, 0x13, 0xa6, 0x14, 0x13, 0x5c, 0x99, 0x6b, 0xb6, 0x7a, 0x51, 0xcc, 0xec, 0x91, 0x7f, 0xd9, - 0xb7, 0xbe, 0x07, 0xd7, 0xff, 0xb8, 0x03, 0xee, 0x42, 0x3d, 0x2f, 0xb8, 0x6c, 0x27, 0xff, 0x8b, - 0xd7, 0xa0, 0x39, 0x09, 0xe3, 0xb4, 0xea, 0xa5, 0x1c, 0x76, 0x6a, 0x8f, 0xd0, 0x5c, 0xc9, 0xcd, - 0x27, 0x8f, 0xbf, 0x4c, 0x1d, 0x74, 0x3a, 0x75, 0xd0, 0x8f, 0xa9, 0x83, 0x3e, 0x9c, 0x39, 0x0b, - 0xa7, 0x67, 0xce, 0xc2, 0xf7, 0x33, 0x67, 0xe1, 0x95, 0x3b, 0x62, 0xfa, 0x24, 0x1d, 0x0e, 0x22, - 0x91, 0x78, 0x82, 0x2b, 0xc1, 0xa5, 0x77, 0xf2, 0x36, 0xcc, 0xbc, 0x77, 0x5e, 0xfe, 0xa1, 0xca, - 0x5b, 0x57, 0xc3, 0x56, 0xf1, 0x95, 0x7a, 0xf0, 0x33, 0x00, 0x00, 0xff, 0xff, 0x13, 0xa6, 0x96, - 0x2c, 0x07, 0x05, 0x00, 0x00, + // 796 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x95, 0x41, 0x4f, 0x23, 0x37, + 0x14, 0xc7, 0x99, 0x99, 0x24, 0x24, 0x6f, 0x92, 0x10, 0x0c, 0x14, 0x17, 0xd4, 0x69, 0x08, 0x87, + 0xa6, 0x2a, 0x4d, 0x04, 0x55, 0xd5, 0x2a, 0x6a, 0x0f, 0x94, 0x72, 0x40, 0xb4, 0x52, 0x95, 0xb6, + 0x52, 0xc5, 0x25, 0x9d, 0x8c, 0xad, 0xe0, 0x76, 0x32, 0x8e, 0x6c, 0x4f, 0x44, 0x3e, 0x43, 0xa5, + 0xaa, 0x9f, 0xa0, 0x9f, 0xa7, 0x87, 0x1e, 0x90, 0xf6, 0xb2, 0xa7, 0xd5, 0x0a, 0xa4, 0xfd, 0x00, + 0x7b, 0xde, 0xc3, 0x6a, 0x3c, 0x1e, 0x32, 0x84, 0x45, 0x08, 0x0e, 0x7b, 0x41, 0xf8, 0xff, 0xfe, + 0x8e, 0xdf, 0xfb, 0x3d, 0x3f, 0x0f, 0x20, 0xc2, 0x48, 0x77, 0xba, 0xdf, 0x95, 0xca, 0x57, 0xb4, + 0x33, 0x11, 0x5c, 0x71, 0x54, 0x22, 0x8c, 0x74, 0xa6, 0xfb, 0x5b, 0x9b, 0x01, 0x97, 0x63, 0x2e, + 0xbb, 0x5c, 0x8c, 0x13, 0x0b, 0x17, 0xe3, 0xd4, 0xb0, 0xb5, 0x6e, 0x36, 0x8d, 0x68, 0x44, 0x25, + 0x93, 0x46, 0x5d, 0x33, 0xea, 0x98, 0x13, 0x1a, 0x1a, 0xb1, 0xf5, 0xc6, 0x86, 0xca, 0xa1, 0x94, + 0x54, 0x28, 0xc6, 0x23, 0x54, 0x07, 0x9b, 0x11, 0x6c, 0x35, 0xad, 0x76, 0xa5, 0x6f, 0x33, 0x82, + 0x3c, 0x80, 0x80, 0x47, 0x4a, 0xf0, 0x30, 0xa4, 0x02, 0xdb, 0x5a, 0xcf, 0x29, 0xe8, 0x73, 0x80, + 0x49, 0x3c, 0x0c, 0x59, 0x30, 0xf8, 0x93, 0xce, 0xb0, 0xd3, 0xb4, 0xda, 0xee, 0x41, 0xbd, 0x93, + 0xa6, 0xd7, 0xf9, 0x29, 0x1e, 0x9e, 0xd2, 0x59, 0xbf, 0x92, 0x3a, 0x4e, 0xe9, 0x0c, 0xed, 0x42, + 0x2d, 0x10, 0x94, 0xd0, 0x48, 0x31, 0x3f, 0x1c, 0x30, 0x82, 0x0b, 0x4d, 0xab, 0x5d, 0xed, 0x57, + 0xe7, 0xe2, 0x09, 0x41, 0x9f, 0x42, 0x23, 0x67, 0x0a, 0xfd, 0x21, 0x0d, 0x71, 0x51, 0x9f, 0xbc, + 0x32, 0xd7, 0x7f, 0x48, 0x64, 0xf4, 0x01, 0x94, 0xb8, 0x60, 0x23, 0x16, 0xe1, 0x92, 0x36, 0x98, + 0x15, 0xc2, 0xb0, 0x2c, 0xe3, 0xe1, 0x1f, 0x34, 0x50, 0x78, 0x59, 0x07, 0xb2, 0x25, 0xda, 0x83, + 0xf2, 0x98, 0x2a, 0x9f, 0xf8, 0xca, 0xc7, 0x65, 0x9d, 0x6e, 0x23, 0x4b, 0xf7, 0x47, 0xa3, 0xf7, + 0x6f, 0x1c, 0xbd, 0xdf, 0x5f, 0xff, 0xfb, 0xec, 0x6f, 0xe7, 0x0c, 0x0a, 0x09, 0x16, 0xb4, 0x0e, + 0x75, 0xf3, 0x33, 0x7b, 0xe9, 0x39, 0x0d, 0x0b, 0x5b, 0x68, 0x13, 0x56, 0xe7, 0x40, 0xb2, 0x80, + 0x8d, 0x2d, 0xb4, 0x03, 0xdb, 0xb9, 0xc0, 0x62, 0x49, 0x0d, 0x07, 0x5b, 0xd8, 0x6a, 0xfd, 0x65, + 0x83, 0x7b, 0xa8, 0x14, 0x4d, 0xda, 0xfb, 0x1e, 0x1a, 0x30, 0x07, 0x56, 0xb8, 0x0f, 0x58, 0xf1, + 0x7e, 0x60, 0xa5, 0x07, 0x81, 0x7d, 0xab, 0x81, 0x7d, 0xf5, 0x24, 0x60, 0xd8, 0x6e, 0xfd, 0x6f, + 0x01, 0x1c, 0xcd, 0x8b, 0x5b, 0x84, 0x81, 0x61, 0xd9, 0x27, 0x44, 0x50, 0x29, 0x0d, 0x89, 0x6c, + 0xa9, 0x23, 0x21, 0xf3, 0x25, 0x95, 0xd8, 0x69, 0x3a, 0x3a, 0x92, 0x2e, 0x17, 0x00, 0x15, 0x1e, + 0x02, 0xb4, 0x0d, 0x95, 0xa9, 0x1f, 0x87, 0x6a, 0x10, 0x30, 0x62, 0x50, 0x94, 0xb5, 0x70, 0xc4, + 0x48, 0xaf, 0xa3, 0xab, 0x6b, 0x9b, 0xea, 0x6a, 0x37, 0xd9, 0xe8, 0xb2, 0x56, 0x72, 0x3b, 0x75, + 0x39, 0x4e, 0xeb, 0x85, 0x0d, 0xf0, 0x3d, 0x0d, 0xe9, 0xe8, 0x69, 0xbd, 0xfd, 0x18, 0xdc, 0xe0, + 0xdc, 0x67, 0xd1, 0x80, 0x45, 0x84, 0x5e, 0xe8, 0xe6, 0x26, 0x86, 0x44, 0x3a, 0x49, 0x94, 0xc7, + 0xd6, 0xf6, 0x09, 0xac, 0xf8, 0x41, 0xc0, 0xe3, 0x48, 0x0d, 0x32, 0x8c, 0x69, 0x85, 0x75, 0x23, + 0x1f, 0x1a, 0x9a, 0xbb, 0x50, 0xcb, 0x8c, 0xe9, 0xf8, 0xa5, 0xd3, 0x55, 0x35, 0x62, 0x3a, 0x7b, + 0x1f, 0x42, 0xd9, 0x64, 0x47, 0xb2, 0x21, 0x4b, 0x53, 0x23, 0xbd, 0x91, 0xe6, 0xe4, 0x1b, 0x4e, + 0x1e, 0xe0, 0x85, 0x63, 0xf7, 0xb2, 0x8d, 0x1a, 0x9c, 0x07, 0x38, 0x77, 0x1f, 0x6e, 0x1d, 0xac, + 0xe7, 0x68, 0x13, 0xd6, 0xf2, 0x73, 0x94, 0x6d, 0x75, 0x70, 0xa1, 0xf5, 0xca, 0x81, 0xda, 0xcf, + 0x54, 0x4c, 0x59, 0x40, 0xfb, 0x34, 0xe0, 0x82, 0xdc, 0x61, 0xbc, 0x03, 0x55, 0x99, 0x1a, 0x06, + 0x6a, 0x36, 0xa1, 0x86, 0xb2, 0x6b, 0xb4, 0x5f, 0x66, 0x13, 0xba, 0xd0, 0x06, 0xe7, 0x4e, 0x1b, + 0x3e, 0x02, 0x48, 0x2f, 0xe9, 0x20, 0x16, 0xcc, 0xcc, 0x4d, 0x25, 0x55, 0x7e, 0x15, 0x0c, 0x35, + 0xc1, 0x25, 0x54, 0x06, 0x82, 0x4d, 0x92, 0x26, 0x1b, 0xa2, 0x79, 0x09, 0xfd, 0x06, 0xab, 0x59, + 0x0e, 0x34, 0x22, 0x13, 0xce, 0x22, 0x25, 0x71, 0xa9, 0xe9, 0xb4, 0xdd, 0x83, 0xcf, 0xb2, 0x6e, + 0xdd, 0xaa, 0x22, 0x5b, 0x1d, 0x67, 0xee, 0xe3, 0x48, 0x89, 0x59, 0xbf, 0x21, 0x17, 0x64, 0xf4, + 0x25, 0xb8, 0x13, 0x2a, 0xc6, 0x4c, 0x4a, 0xc6, 0x23, 0xa9, 0xdb, 0xe0, 0x1e, 0xac, 0xdd, 0xdc, + 0x80, 0x79, 0xa8, 0x9f, 0xf7, 0x3d, 0xee, 0x11, 0xdc, 0x3a, 0x82, 0x8d, 0x77, 0xe6, 0x83, 0x1a, + 0xe0, 0x24, 0xf7, 0x2e, 0x85, 0x9d, 0xfc, 0x8b, 0xd6, 0xa1, 0x38, 0xf5, 0xc3, 0x38, 0xc3, 0x9c, + 0x2e, 0x7a, 0xf6, 0xd7, 0xd6, 0xc2, 0xc3, 0xd0, 0xc8, 0x23, 0xd5, 0x97, 0x60, 0x1b, 0x36, 0xee, + 0x3c, 0x0a, 0x3a, 0x98, 0x4c, 0x52, 0xf1, 0xbb, 0x6f, 0xfe, 0xbb, 0xf2, 0xac, 0xcb, 0x2b, 0xcf, + 0x7a, 0x79, 0xe5, 0x59, 0xff, 0x5c, 0x7b, 0x4b, 0x97, 0xd7, 0xde, 0xd2, 0xf3, 0x6b, 0x6f, 0xe9, + 0xac, 0x35, 0x62, 0xea, 0x3c, 0x1e, 0x76, 0x02, 0x3e, 0xee, 0xf2, 0x48, 0xf2, 0x48, 0x74, 0xf5, + 0x9f, 0x8b, 0x6e, 0xf2, 0xb5, 0x4b, 0x7a, 0x2e, 0x87, 0x25, 0xfd, 0xa9, 0xfb, 0xe2, 0x6d, 0x00, + 0x00, 0x00, 0xff, 0xff, 0x39, 0xd5, 0x9b, 0xc7, 0x4c, 0x07, 0x00, 0x00, } func (m *Assertion) Marshal() (dAtA []byte, err error) { @@ -517,6 +609,27 @@ func (m *Assertion) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintState(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x42 + } + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintState(dAtA, i, uint64(len(m.Subject))) + i-- + dAtA[i] = 0x3a + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintState(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x32 + } + if len(m.CredentialLabel) > 0 { + i -= len(m.CredentialLabel) + copy(dAtA[i:], m.CredentialLabel) + i = encodeVarintState(dAtA, i, uint64(len(m.CredentialLabel))) + i-- dAtA[i] = 0x2a } if len(m.CredentialId) > 0 { @@ -669,6 +782,15 @@ func (m *Controller) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } + if len(m.Aliases) > 0 { + for iNdEx := len(m.Aliases) - 1; iNdEx >= 0; iNdEx-- { + i -= len(m.Aliases[iNdEx]) + copy(dAtA[i:], m.Aliases[iNdEx]) + i = encodeVarintState(dAtA, i, uint64(len(m.Aliases[iNdEx]))) + i-- + dAtA[i] = 0x1a + } + } if len(m.Address) > 0 { i -= len(m.Address) copy(dAtA[i:], m.Address) @@ -706,6 +828,27 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.ChainId) > 0 { + i -= len(m.ChainId) + copy(dAtA[i:], m.ChainId) + i = encodeVarintState(dAtA, i, uint64(len(m.ChainId))) + i-- + dAtA[i] = 0x3a + } + if len(m.AccountLabel) > 0 { + i -= len(m.AccountLabel) + copy(dAtA[i:], m.AccountLabel) + i = encodeVarintState(dAtA, i, uint64(len(m.AccountLabel))) + i-- + dAtA[i] = 0x32 + } + if len(m.AccountAddress) > 0 { + i -= len(m.AccountAddress) + copy(dAtA[i:], m.AccountAddress) + i = encodeVarintState(dAtA, i, uint64(len(m.AccountAddress))) + i-- + dAtA[i] = 0x2a + } if m.PublicKey != nil { { size, err := m.PublicKey.MarshalToSizedBuffer(dAtA[:i]) @@ -718,10 +861,10 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.ChainInfoId) > 0 { - i -= len(m.ChainInfoId) - copy(dAtA[i:], m.ChainInfoId) - i = encodeVarintState(dAtA, i, uint64(len(m.ChainInfoId))) + if len(m.ChainIndex) > 0 { + i -= len(m.ChainIndex) + copy(dAtA[i:], m.ChainIndex) + i = encodeVarintState(dAtA, i, uint64(len(m.ChainIndex))) i-- dAtA[i] = 0x1a } @@ -742,7 +885,7 @@ func (m *Delegation) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *Service) Marshal() (dAtA []byte, err error) { +func (m *ServiceRecord) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -752,16 +895,28 @@ func (m *Service) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *Service) MarshalTo(dAtA []byte) (int, error) { +func (m *ServiceRecord) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ServiceRecord) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintState(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x42 + } if m.Permissions != nil { { size, err := m.Permissions.MarshalToSizedBuffer(dAtA[:i]) @@ -772,7 +927,7 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintState(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if len(m.ServiceEndpoints) > 0 { for k := range m.ServiceEndpoints { @@ -790,9 +945,16 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0xa i = encodeVarintState(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x2a + dAtA[i] = 0x32 } } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintState(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x2a + } if len(m.OriginUri) > 0 { i -= len(m.OriginUri) copy(dAtA[i:], m.OriginUri) @@ -800,10 +962,10 @@ func (m *Service) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x22 } - if len(m.ControllerDid) > 0 { - i -= len(m.ControllerDid) - copy(dAtA[i:], m.ControllerDid) - i = encodeVarintState(dAtA, i, uint64(len(m.ControllerDid))) + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintState(dAtA, i, uint64(len(m.Controller))) i-- dAtA[i] = 0x1a } @@ -857,6 +1019,18 @@ func (m *Assertion) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } + l = len(m.CredentialLabel) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.Subject) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } if m.Metadata != nil { l = m.Metadata.Size() n += 1 + l + sovState(uint64(l)) @@ -911,6 +1085,12 @@ func (m *Controller) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } + if len(m.Aliases) > 0 { + for _, s := range m.Aliases { + l = len(s) + n += 1 + l + sovState(uint64(l)) + } + } if m.PublicKey != nil { l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) @@ -936,7 +1116,7 @@ func (m *Delegation) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ChainInfoId) + l = len(m.ChainIndex) if l > 0 { n += 1 + l + sovState(uint64(l)) } @@ -944,10 +1124,22 @@ func (m *Delegation) Size() (n int) { l = m.PublicKey.Size() n += 1 + l + sovState(uint64(l)) } + l = len(m.AccountAddress) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.AccountLabel) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } + l = len(m.ChainId) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } return n } -func (m *Service) Size() (n int) { +func (m *ServiceRecord) Size() (n int) { if m == nil { return 0 } @@ -961,7 +1153,7 @@ func (m *Service) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } - l = len(m.ControllerDid) + l = len(m.Controller) if l > 0 { n += 1 + l + sovState(uint64(l)) } @@ -969,6 +1161,10 @@ func (m *Service) Size() (n int) { if l > 0 { n += 1 + l + sovState(uint64(l)) } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovState(uint64(l)) + } if len(m.ServiceEndpoints) > 0 { for k, v := range m.ServiceEndpoints { _ = k @@ -981,6 +1177,10 @@ func (m *Service) Size() (n int) { l = m.Permissions.Size() n += 1 + l + sovState(uint64(l)) } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovState(uint64(l)) + } return n } @@ -1154,6 +1354,102 @@ func (m *Assertion) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field CredentialLabel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.CredentialLabel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Subject = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) } @@ -1553,6 +1849,38 @@ func (m *Controller) Unmarshal(dAtA []byte) error { } m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Aliases", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Aliases = append(m.Aliases, string(dAtA[iNdEx:postIndex])) + iNdEx = postIndex case 4: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field PublicKey", wireType) @@ -1737,7 +2065,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ChainInfoId", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ChainIndex", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1765,7 +2093,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ChainInfoId = string(dAtA[iNdEx:postIndex]) + m.ChainIndex = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1803,6 +2131,102 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field AccountLabel", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.AccountLabel = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ChainId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ChainId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) @@ -1824,7 +2248,7 @@ func (m *Delegation) Unmarshal(dAtA []byte) error { } return nil } -func (m *Service) Unmarshal(dAtA []byte) error { +func (m *ServiceRecord) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1847,10 +2271,10 @@ func (m *Service) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: Service: wiretype end group for non-group") + return fmt.Errorf("proto: ServiceRecord: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: Service: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ServiceRecord: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1919,7 +2343,7 @@ func (m *Service) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ControllerDid", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -1947,7 +2371,7 @@ func (m *Service) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.ControllerDid = string(dAtA[iNdEx:postIndex]) + m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { @@ -1982,6 +2406,38 @@ func (m *Service) Unmarshal(dAtA []byte) error { m.OriginUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) } @@ -2108,7 +2564,7 @@ func (m *Service) Unmarshal(dAtA []byte) error { } m.ServiceEndpoints[mapkey] = mapvalue iNdEx = postIndex - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Permissions", wireType) } @@ -2144,6 +2600,42 @@ func (m *Service) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 8: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowState + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthState + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthState + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipState(dAtA[iNdEx:]) diff --git a/x/did/types/tx.pb.go b/x/did/types/tx.pb.go index 370bc42d8..aeea91030 100644 --- a/x/did/types/tx.pb.go +++ b/x/did/types/tx.pb.go @@ -37,9 +37,9 @@ type MsgUpdateParams struct { // 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"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } @@ -89,6 +89,13 @@ func (m *MsgUpdateParams) GetParams() Params { return Params{} } +func (m *MsgUpdateParams) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. // @@ -129,30 +136,28 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo -// MsgAuthenticate is the message type for the Authenticate RPC. -type MsgAuthenticate struct { - // authority is the address of the governance account. +// MsgAllocateVault is the message type for the AllocateVault RPC. +type MsgAllocateVault struct { + // authority is the address of the service 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,2,opt,name=controller,proto3" json:"controller,omitempty"` - // Address is the address to authenticate. - Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` - // Origin is the origin of the request in wildcard form. - Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + // subject is a unique human-defined identifier to associate with the vault. + Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } -func (m *MsgAuthenticate) Reset() { *m = MsgAuthenticate{} } -func (m *MsgAuthenticate) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticate) ProtoMessage() {} -func (*MsgAuthenticate) Descriptor() ([]byte, []int) { +func (m *MsgAllocateVault) Reset() { *m = MsgAllocateVault{} } +func (m *MsgAllocateVault) String() string { return proto.CompactTextString(m) } +func (*MsgAllocateVault) ProtoMessage() {} +func (*MsgAllocateVault) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{2} } -func (m *MsgAuthenticate) XXX_Unmarshal(b []byte) error { +func (m *MsgAllocateVault) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthenticate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAllocateVault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthenticate.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAllocateVault.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -162,62 +167,59 @@ func (m *MsgAuthenticate) XXX_Marshal(b []byte, deterministic bool) ([]byte, err return b[:n], nil } } -func (m *MsgAuthenticate) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticate.Merge(m, src) +func (m *MsgAllocateVault) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAllocateVault.Merge(m, src) } -func (m *MsgAuthenticate) XXX_Size() int { +func (m *MsgAllocateVault) XXX_Size() int { return m.Size() } -func (m *MsgAuthenticate) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticate.DiscardUnknown(m) +func (m *MsgAllocateVault) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAllocateVault.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthenticate proto.InternalMessageInfo +var xxx_messageInfo_MsgAllocateVault proto.InternalMessageInfo -func (m *MsgAuthenticate) GetAuthority() string { +func (m *MsgAllocateVault) GetAuthority() string { if m != nil { return m.Authority } return "" } -func (m *MsgAuthenticate) GetController() string { +func (m *MsgAllocateVault) GetSubject() string { if m != nil { - return m.Controller + return m.Subject } return "" } -func (m *MsgAuthenticate) GetAddress() string { +func (m *MsgAllocateVault) GetToken() *Token { if m != nil { - return m.Address + return m.Token } - return "" + return nil } -func (m *MsgAuthenticate) GetOrigin() string { - if m != nil { - return m.Origin - } - return "" +// MsgAllocateVaultResponse is the response type for the AllocateVault RPC. +type MsgAllocateVaultResponse struct { + // CID is the content identifier of the vault. + Cid string `protobuf:"bytes,1,opt,name=cid,proto3" json:"cid,omitempty"` + // ExpiryBlock is the block number at which the vault will expire. + ExpiryBlock int64 `protobuf:"varint,2,opt,name=expiry_block,json=expiryBlock,proto3" json:"expiry_block,omitempty"` } -// MsgAuthenticateResponse is the response type for the Authenticate RPC. -type MsgAuthenticateResponse struct { -} - -func (m *MsgAuthenticateResponse) Reset() { *m = MsgAuthenticateResponse{} } -func (m *MsgAuthenticateResponse) String() string { return proto.CompactTextString(m) } -func (*MsgAuthenticateResponse) ProtoMessage() {} -func (*MsgAuthenticateResponse) Descriptor() ([]byte, []int) { +func (m *MsgAllocateVaultResponse) Reset() { *m = MsgAllocateVaultResponse{} } +func (m *MsgAllocateVaultResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAllocateVaultResponse) ProtoMessage() {} +func (*MsgAllocateVaultResponse) Descriptor() ([]byte, []int) { return fileDescriptor_d73284df019ff211, []int{3} } -func (m *MsgAuthenticateResponse) XXX_Unmarshal(b []byte) error { +func (m *MsgAllocateVaultResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *MsgAuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *MsgAllocateVaultResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_MsgAuthenticateResponse.Marshal(b, m, deterministic) + return xxx_messageInfo_MsgAllocateVaultResponse.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -227,17 +229,31 @@ func (m *MsgAuthenticateResponse) XXX_Marshal(b []byte, deterministic bool) ([]b return b[:n], nil } } -func (m *MsgAuthenticateResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_MsgAuthenticateResponse.Merge(m, src) +func (m *MsgAllocateVaultResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAllocateVaultResponse.Merge(m, src) } -func (m *MsgAuthenticateResponse) XXX_Size() int { +func (m *MsgAllocateVaultResponse) XXX_Size() int { return m.Size() } -func (m *MsgAuthenticateResponse) XXX_DiscardUnknown() { - xxx_messageInfo_MsgAuthenticateResponse.DiscardUnknown(m) +func (m *MsgAllocateVaultResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAllocateVaultResponse.DiscardUnknown(m) } -var xxx_messageInfo_MsgAuthenticateResponse proto.InternalMessageInfo +var xxx_messageInfo_MsgAllocateVaultResponse proto.InternalMessageInfo + +func (m *MsgAllocateVaultResponse) GetCid() string { + if m != nil { + return m.Cid + } + return "" +} + +func (m *MsgAllocateVaultResponse) GetExpiryBlock() int64 { + if m != nil { + return m.ExpiryBlock + } + return 0 +} // MsgProveWitness is the message type for the ProveWitness RPC. type MsgProveWitness struct { @@ -247,6 +263,8 @@ type MsgProveWitness struct { Property string `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"` // Witness Value is the bytes of the witness. Witness []byte `protobuf:"bytes,3,opt,name=witness,proto3" json:"witness,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,4,opt,name=token,proto3" json:"token,omitempty"` } func (m *MsgProveWitness) Reset() { *m = MsgProveWitness{} } @@ -303,6 +321,13 @@ func (m *MsgProveWitness) GetWitness() []byte { return nil } +func (m *MsgProveWitness) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + // MsgProveWitnessResponse is the response type for the ProveWitness RPC. type MsgProveWitnessResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` @@ -360,10 +385,8 @@ func (m *MsgProveWitnessResponse) GetProperty() string { type MsgSyncVault struct { // controller is the address of the controller to sync. Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` - // cid is the IPFS content identifier. - Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - // Macroon is the public token to authenticate the operation. - Macron []byte `protobuf:"bytes,3,opt,name=macron,proto3" json:"macron,omitempty"` + // Token is the public token to authenticate the operation. + Token *Token `protobuf:"bytes,3,opt,name=token,proto3" json:"token,omitempty"` } func (m *MsgSyncVault) Reset() { *m = MsgSyncVault{} } @@ -406,16 +429,9 @@ func (m *MsgSyncVault) GetController() string { return "" } -func (m *MsgSyncVault) GetCid() string { +func (m *MsgSyncVault) GetToken() *Token { if m != nil { - return m.Cid - } - return "" -} - -func (m *MsgSyncVault) GetMacron() []byte { - if m != nil { - return m.Macron + return m.Token } return nil } @@ -471,10 +487,12 @@ type MsgRegisterController struct { Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` // Assertions is the list of assertions to initialize the controller with. Cid string `protobuf:"bytes,2,opt,name=cid,proto3" json:"cid,omitempty"` - // Keyshares is the list of keyshares to initialize the controller with. - Keyshares [][]byte `protobuf:"bytes,3,rep,name=keyshares,proto3" json:"keyshares,omitempty"` - // Verifications is the list of verifications to initialize the controller with. - Verifications [][]byte `protobuf:"bytes,4,rep,name=verifications,proto3" json:"verifications,omitempty"` + // Origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,3,opt,name=origin,proto3" json:"origin,omitempty"` + // Credential is the list of keyshares to initialize the controller with. + Authentication []*Credential `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` } func (m *MsgRegisterController) Reset() { *m = MsgRegisterController{} } @@ -524,26 +542,35 @@ func (m *MsgRegisterController) GetCid() string { return "" } -func (m *MsgRegisterController) GetKeyshares() [][]byte { +func (m *MsgRegisterController) GetOrigin() string { if m != nil { - return m.Keyshares + return m.Origin + } + return "" +} + +func (m *MsgRegisterController) GetAuthentication() []*Credential { + if m != nil { + return m.Authentication } return nil } -func (m *MsgRegisterController) GetVerifications() [][]byte { +func (m *MsgRegisterController) GetToken() *Token { if m != nil { - return m.Verifications + return m.Token } return nil } // MsgRegisterControllerResponse is the response type for the InitializeController RPC. type MsgRegisterControllerResponse struct { + // 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. - Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` // Accounts are a Address Map and Supported coin Denoms for the controller - Accounts map[string]string `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + Accounts map[string]string `protobuf:"bytes,3,rep,name=accounts,proto3" json:"accounts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } func (m *MsgRegisterControllerResponse) Reset() { *m = MsgRegisterControllerResponse{} } @@ -579,6 +606,13 @@ func (m *MsgRegisterControllerResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterControllerResponse proto.InternalMessageInfo +func (m *MsgRegisterControllerResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + func (m *MsgRegisterControllerResponse) GetController() string { if m != nil { return m.Controller @@ -593,21 +627,164 @@ func (m *MsgRegisterControllerResponse) GetAccounts() map[string]string { return nil } +// MsgAuthorize is the message type for the Authorize RPC. +type MsgAuthorize struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // Controller is the address of the controller to authenticate. + Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` + // Address is the address to authenticate. + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty"` + // Origin is the origin of the request in wildcard form. + Origin string `protobuf:"bytes,4,opt,name=origin,proto3" json:"origin,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,5,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *MsgAuthorize) Reset() { *m = MsgAuthorize{} } +func (m *MsgAuthorize) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorize) ProtoMessage() {} +func (*MsgAuthorize) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{10} +} +func (m *MsgAuthorize) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAuthorize) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAuthorize.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAuthorize) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorize.Merge(m, src) +} +func (m *MsgAuthorize) XXX_Size() int { + return m.Size() +} +func (m *MsgAuthorize) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorize.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAuthorize proto.InternalMessageInfo + +func (m *MsgAuthorize) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgAuthorize) GetController() string { + if m != nil { + return m.Controller + } + return "" +} + +func (m *MsgAuthorize) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *MsgAuthorize) GetOrigin() string { + if m != nil { + return m.Origin + } + return "" +} + +func (m *MsgAuthorize) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + +// MsgAuthorizeResponse is the response type for the Authorize RPC. +type MsgAuthorizeResponse struct { + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Token *Token `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` +} + +func (m *MsgAuthorizeResponse) Reset() { *m = MsgAuthorizeResponse{} } +func (m *MsgAuthorizeResponse) String() string { return proto.CompactTextString(m) } +func (*MsgAuthorizeResponse) ProtoMessage() {} +func (*MsgAuthorizeResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d73284df019ff211, []int{11} +} +func (m *MsgAuthorizeResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgAuthorizeResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgAuthorizeResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgAuthorizeResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgAuthorizeResponse.Merge(m, src) +} +func (m *MsgAuthorizeResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgAuthorizeResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgAuthorizeResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgAuthorizeResponse proto.InternalMessageInfo + +func (m *MsgAuthorizeResponse) GetSuccess() bool { + if m != nil { + return m.Success + } + return false +} + +func (m *MsgAuthorizeResponse) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + // MsgRegisterService is the message type for the RegisterService RPC. type MsgRegisterService struct { // authority is the address of the governance account. - Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + Controller string `protobuf:"bytes,1,opt,name=controller,proto3" json:"controller,omitempty"` // origin is the origin of the request in wildcard form. OriginUri string `protobuf:"bytes,2,opt,name=origin_uri,json=originUri,proto3" json:"origin_uri,omitempty"` - // PermissionScope is the scope of the service. - Scopes []PermissionScope `protobuf:"varint,3,rep,packed,name=scopes,proto3,enum=did.v1.PermissionScope" json:"scopes,omitempty"` + // Permissions is the scope of the service. + Scopes *Permissions `protobuf:"bytes,3,opt,name=scopes,proto3" json:"scopes,omitempty"` + // Description is the description of the service + Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"` + // service_endpoints is the endpoints of the service + ServiceEndpoints map[string]string `protobuf:"bytes,5,rep,name=service_endpoints,json=serviceEndpoints,proto3" json:"service_endpoints,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` + // Metadata is optional additional information about the service + Metadata *Metadata `protobuf:"bytes,6,opt,name=metadata,proto3" json:"metadata,omitempty"` + // token is the macron token to authenticate the operation. + Token *Token `protobuf:"bytes,7,opt,name=token,proto3" json:"token,omitempty"` } func (m *MsgRegisterService) Reset() { *m = MsgRegisterService{} } func (m *MsgRegisterService) String() string { return proto.CompactTextString(m) } func (*MsgRegisterService) ProtoMessage() {} func (*MsgRegisterService) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{10} + return fileDescriptor_d73284df019ff211, []int{12} } func (m *MsgRegisterService) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -636,9 +813,9 @@ func (m *MsgRegisterService) XXX_DiscardUnknown() { var xxx_messageInfo_MsgRegisterService proto.InternalMessageInfo -func (m *MsgRegisterService) GetAuthority() string { +func (m *MsgRegisterService) GetController() string { if m != nil { - return m.Authority + return m.Controller } return "" } @@ -650,23 +827,52 @@ func (m *MsgRegisterService) GetOriginUri() string { return "" } -func (m *MsgRegisterService) GetScopes() []PermissionScope { +func (m *MsgRegisterService) GetScopes() *Permissions { if m != nil { return m.Scopes } return nil } +func (m *MsgRegisterService) GetDescription() string { + if m != nil { + return m.Description + } + return "" +} + +func (m *MsgRegisterService) GetServiceEndpoints() map[string]string { + if m != nil { + return m.ServiceEndpoints + } + return nil +} + +func (m *MsgRegisterService) GetMetadata() *Metadata { + if m != nil { + return m.Metadata + } + return nil +} + +func (m *MsgRegisterService) GetToken() *Token { + if m != nil { + return m.Token + } + return nil +} + // MsgRegisterServiceResponse is the response type for the RegisterService RPC. type MsgRegisterServiceResponse struct { - Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` + Did string `protobuf:"bytes,2,opt,name=did,proto3" json:"did,omitempty"` } func (m *MsgRegisterServiceResponse) Reset() { *m = MsgRegisterServiceResponse{} } func (m *MsgRegisterServiceResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterServiceResponse) ProtoMessage() {} func (*MsgRegisterServiceResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_d73284df019ff211, []int{11} + return fileDescriptor_d73284df019ff211, []int{13} } func (m *MsgRegisterServiceResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -702,11 +908,18 @@ func (m *MsgRegisterServiceResponse) GetSuccess() bool { return false } +func (m *MsgRegisterServiceResponse) GetDid() string { + if m != nil { + return m.Did + } + return "" +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "did.v1.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "did.v1.MsgUpdateParamsResponse") - proto.RegisterType((*MsgAuthenticate)(nil), "did.v1.MsgAuthenticate") - proto.RegisterType((*MsgAuthenticateResponse)(nil), "did.v1.MsgAuthenticateResponse") + proto.RegisterType((*MsgAllocateVault)(nil), "did.v1.MsgAllocateVault") + proto.RegisterType((*MsgAllocateVaultResponse)(nil), "did.v1.MsgAllocateVaultResponse") proto.RegisterType((*MsgProveWitness)(nil), "did.v1.MsgProveWitness") proto.RegisterType((*MsgProveWitnessResponse)(nil), "did.v1.MsgProveWitnessResponse") proto.RegisterType((*MsgSyncVault)(nil), "did.v1.MsgSyncVault") @@ -714,64 +927,78 @@ func init() { proto.RegisterType((*MsgRegisterController)(nil), "did.v1.MsgRegisterController") proto.RegisterType((*MsgRegisterControllerResponse)(nil), "did.v1.MsgRegisterControllerResponse") proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterControllerResponse.AccountsEntry") + proto.RegisterType((*MsgAuthorize)(nil), "did.v1.MsgAuthorize") + proto.RegisterType((*MsgAuthorizeResponse)(nil), "did.v1.MsgAuthorizeResponse") proto.RegisterType((*MsgRegisterService)(nil), "did.v1.MsgRegisterService") + proto.RegisterMapType((map[string]string)(nil), "did.v1.MsgRegisterService.ServiceEndpointsEntry") proto.RegisterType((*MsgRegisterServiceResponse)(nil), "did.v1.MsgRegisterServiceResponse") } func init() { proto.RegisterFile("did/v1/tx.proto", fileDescriptor_d73284df019ff211) } var fileDescriptor_d73284df019ff211 = []byte{ - // 788 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0x4f, 0x4f, 0xdb, 0x48, - 0x14, 0x8f, 0x09, 0x04, 0xf2, 0x08, 0x64, 0xe5, 0xcd, 0x6e, 0x82, 0x05, 0x01, 0x59, 0xbb, 0x52, - 0x84, 0x76, 0xe3, 0x25, 0x48, 0x08, 0xb1, 0x2b, 0xad, 0x60, 0xb5, 0x12, 0x97, 0x08, 0xd6, 0x11, - 0x5b, 0x89, 0x0b, 0x32, 0xf6, 0xd4, 0x19, 0x11, 0x7b, 0xac, 0x99, 0x71, 0x20, 0xb7, 0xaa, 0x3d, - 0xf4, 0xd8, 0x7e, 0x90, 0x1e, 0x38, 0xb4, 0xdf, 0x81, 0x23, 0xea, 0xa9, 0xea, 0xa1, 0xad, 0xe0, - 0xc0, 0xd7, 0xa8, 0x26, 0x9e, 0x38, 0x0e, 0x09, 0xa1, 0xcd, 0x6d, 0xde, 0xbf, 0xdf, 0xfb, 0xfd, - 0xe6, 0x8d, 0x5f, 0x02, 0x79, 0x07, 0x3b, 0x46, 0x7b, 0xc3, 0xe0, 0x17, 0xd5, 0x80, 0x12, 0x4e, - 0xd4, 0x8c, 0x83, 0x9d, 0x6a, 0x7b, 0x43, 0x2b, 0xda, 0x84, 0x79, 0x84, 0x19, 0x1e, 0x73, 0x45, - 0xdc, 0x63, 0x6e, 0x94, 0xa0, 0xfd, 0x28, 0x2b, 0x3c, 0xe2, 0xa0, 0x16, 0x93, 0xce, 0x82, 0x74, - 0xba, 0xc8, 0x47, 0x0c, 0xc7, 0x5e, 0x97, 0xb8, 0xa4, 0x7b, 0x34, 0xc4, 0x49, 0x7a, 0x97, 0x22, - 0xe4, 0x93, 0x28, 0x10, 0x19, 0x51, 0x48, 0x7f, 0xa9, 0x40, 0xbe, 0xce, 0xdc, 0xa3, 0xc0, 0xb1, - 0x38, 0x3a, 0xb4, 0xa8, 0xe5, 0x31, 0x75, 0x0b, 0xb2, 0x56, 0xc8, 0x9b, 0x84, 0x62, 0xde, 0x29, - 0x29, 0x6b, 0x4a, 0x25, 0xbb, 0x57, 0x7a, 0xff, 0xf6, 0xf7, 0x82, 0x2c, 0xdc, 0x75, 0x1c, 0x8a, - 0x18, 0x6b, 0x70, 0x8a, 0x7d, 0xd7, 0xec, 0xa7, 0xaa, 0xbf, 0x41, 0x26, 0xe8, 0x22, 0x94, 0xa6, - 0xd6, 0x94, 0xca, 0x7c, 0x6d, 0xb1, 0x1a, 0x29, 0xab, 0x46, 0xb8, 0x7b, 0xd3, 0x57, 0x9f, 0x56, - 0x53, 0xa6, 0xcc, 0xd9, 0x59, 0x7c, 0x7e, 0x77, 0xb9, 0xde, 0xaf, 0xd6, 0x97, 0xa0, 0x78, 0x8f, - 0x88, 0x89, 0x58, 0x40, 0x7c, 0x86, 0xf4, 0xcf, 0x11, 0xc9, 0xdd, 0x90, 0x37, 0x91, 0xcf, 0xb1, - 0x6d, 0x71, 0x34, 0x31, 0xc9, 0x6d, 0x00, 0x9b, 0xf8, 0x9c, 0x92, 0x56, 0x0b, 0xd1, 0x2e, 0xd1, - 0x71, 0x85, 0x89, 0x5c, 0xb5, 0x06, 0xb3, 0x56, 0x14, 0x2c, 0xa5, 0x1f, 0x29, 0xeb, 0x25, 0xaa, - 0x3f, 0x43, 0x86, 0x50, 0xec, 0x62, 0xbf, 0x34, 0x2d, 0x4a, 0x4c, 0x69, 0x3d, 0x20, 0x3e, 0x29, - 0x30, 0x16, 0xff, 0x2a, 0x12, 0x7f, 0x48, 0x49, 0x1b, 0x3d, 0xc1, 0xdc, 0x17, 0xb0, 0x93, 0x8a, - 0xd7, 0x60, 0x2e, 0xa0, 0x24, 0x40, 0x94, 0x77, 0x22, 0xe9, 0x66, 0x6c, 0xab, 0x25, 0x98, 0x3d, - 0x8f, 0xe0, 0xbb, 0xf2, 0x72, 0x66, 0xcf, 0x1c, 0x22, 0x7b, 0xd0, 0x25, 0x9b, 0x24, 0xd4, 0x23, - 0x2b, 0x40, 0x58, 0x68, 0xdb, 0x02, 0x44, 0xd0, 0x9a, 0x33, 0x7b, 0xe6, 0xb8, 0xd6, 0xfa, 0x0b, - 0x05, 0x72, 0x75, 0xe6, 0x36, 0x3a, 0xbe, 0xfd, 0xbf, 0x15, 0xb6, 0xf8, 0xbd, 0x21, 0x29, 0xdf, - 0x31, 0xa4, 0x1f, 0x20, 0x6d, 0x63, 0x47, 0x76, 0x10, 0x47, 0x31, 0x02, 0xcf, 0xb2, 0x29, 0xf1, - 0xa5, 0x2c, 0x69, 0xed, 0xe4, 0x85, 0xaa, 0x44, 0xa9, 0xfe, 0x07, 0x14, 0x92, 0x24, 0x1e, 0xd7, - 0xa4, 0xbf, 0x53, 0xe0, 0xa7, 0x3a, 0x73, 0x4d, 0xe4, 0x62, 0xc6, 0x11, 0xfd, 0xa7, 0x4f, 0x63, - 0xd2, 0x01, 0x0d, 0xd3, 0x5f, 0x86, 0xec, 0x19, 0xea, 0xb0, 0xa6, 0x45, 0x91, 0x18, 0x4c, 0xba, - 0x92, 0x33, 0xfb, 0x0e, 0xf5, 0x17, 0x58, 0x68, 0x23, 0x8a, 0x9f, 0x8a, 0x27, 0x83, 0x89, 0xcf, - 0x4a, 0xd3, 0xdd, 0x8c, 0x41, 0xe7, 0xd0, 0x00, 0xef, 0x14, 0x58, 0x19, 0xc9, 0x3b, 0xd6, 0x3c, - 0xf9, 0x00, 0x0e, 0x60, 0xce, 0xb2, 0x6d, 0x12, 0xfa, 0x5c, 0xac, 0x81, 0x74, 0x65, 0xbe, 0xb6, - 0xd9, 0x5b, 0x03, 0x63, 0x5b, 0x56, 0x77, 0x65, 0xd5, 0xbf, 0x3e, 0xa7, 0x1d, 0x33, 0x06, 0xd1, - 0xfe, 0x84, 0x85, 0x81, 0x90, 0xb8, 0xa3, 0x33, 0x24, 0x6f, 0xd5, 0x14, 0x47, 0xb5, 0x00, 0x33, - 0x6d, 0xab, 0x15, 0x22, 0x79, 0x6f, 0x91, 0xb1, 0x33, 0xb5, 0xad, 0xe8, 0x6f, 0x14, 0x50, 0x13, - 0x6d, 0x1b, 0x88, 0xb6, 0xb1, 0x3d, 0xf9, 0xf2, 0x58, 0x01, 0x88, 0x3e, 0xe0, 0x93, 0x90, 0x62, - 0xd9, 0x2d, 0x1b, 0x79, 0x8e, 0x28, 0x56, 0x0d, 0xc8, 0x30, 0x9b, 0x04, 0x72, 0x50, 0x8b, 0xb5, - 0x62, 0xbc, 0x00, 0x11, 0xf5, 0x30, 0x63, 0x98, 0xf8, 0x0d, 0x11, 0x37, 0x65, 0xda, 0xd0, 0x60, - 0xb6, 0x40, 0x1b, 0x66, 0xfb, 0xf8, 0x43, 0xac, 0x7d, 0x4c, 0x43, 0xba, 0xce, 0x5c, 0x75, 0x1f, - 0x72, 0x03, 0x9b, 0xbc, 0x98, 0xb8, 0xfa, 0x64, 0x40, 0x5b, 0x7d, 0x20, 0x10, 0xf7, 0xda, 0x87, - 0xdc, 0xc0, 0xba, 0x4d, 0x22, 0x25, 0x03, 0x03, 0x48, 0xa3, 0xf6, 0x97, 0x40, 0x1a, 0xd8, 0x5d, - 0x49, 0xa4, 0x64, 0x60, 0x00, 0x69, 0xe4, 0x72, 0xf9, 0x1b, 0xb2, 0xfd, 0x15, 0x51, 0x48, 0x64, - 0xc7, 0x5e, 0x6d, 0x79, 0x94, 0x37, 0x06, 0x38, 0x06, 0x75, 0xc4, 0xb7, 0xba, 0x32, 0xf6, 0x7d, - 0x6a, 0xbf, 0x7e, 0xd3, 0xf3, 0x55, 0xff, 0x83, 0xfc, 0xfd, 0x57, 0xa6, 0x8d, 0xa8, 0x94, 0x31, - 0x4d, 0x7f, 0x38, 0xd6, 0x83, 0xd4, 0x66, 0x9e, 0xdd, 0x5d, 0xae, 0x2b, 0x7b, 0x7f, 0x5d, 0xdd, - 0x94, 0x95, 0xeb, 0x9b, 0xb2, 0xf2, 0xe5, 0xa6, 0xac, 0xbc, 0xbe, 0x2d, 0xa7, 0xae, 0x6f, 0xcb, - 0xa9, 0x0f, 0xb7, 0xe5, 0xd4, 0xb1, 0xee, 0x62, 0xde, 0x0c, 0x4f, 0xab, 0x36, 0xf1, 0x0c, 0xe2, - 0x33, 0xe2, 0x53, 0xa3, 0x79, 0x6e, 0x75, 0x8c, 0x0b, 0x43, 0xfc, 0x39, 0xe0, 0x9d, 0x00, 0xb1, - 0xd3, 0x4c, 0xf7, 0x77, 0x7e, 0xf3, 0x6b, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xd3, 0x5a, 0x47, - 0x77, 0x08, 0x00, 0x00, + // 974 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x56, 0x4d, 0x6f, 0x1b, 0x45, + 0x18, 0xce, 0xda, 0xb1, 0x13, 0xbf, 0xf9, 0x32, 0x53, 0xb7, 0x71, 0x57, 0xc4, 0x0d, 0x8b, 0x90, + 0xa2, 0x52, 0xec, 0x36, 0x95, 0x50, 0x15, 0x90, 0x50, 0x12, 0x55, 0xaa, 0x84, 0xac, 0x96, 0x0d, + 0x01, 0xa9, 0x12, 0x8a, 0x36, 0xb3, 0xa3, 0xed, 0x10, 0x7b, 0x67, 0x35, 0x33, 0x36, 0x31, 0x07, + 0x04, 0xfc, 0x02, 0xae, 0xfc, 0x07, 0x0e, 0x3d, 0xf4, 0x27, 0x70, 0xe8, 0xb1, 0x42, 0x1c, 0x38, + 0x21, 0x94, 0x1c, 0x2a, 0xf1, 0x2b, 0xd0, 0xec, 0xcc, 0x7e, 0xd8, 0xb1, 0x13, 0xc7, 0x5c, 0x12, + 0xbf, 0x1f, 0xf3, 0xce, 0xf3, 0x3e, 0xcf, 0x3b, 0xb3, 0x03, 0x6b, 0x3e, 0xf5, 0x5b, 0xfd, 0x07, + 0x2d, 0x79, 0xda, 0x8c, 0x38, 0x93, 0x0c, 0x95, 0x7d, 0xea, 0x37, 0xfb, 0x0f, 0xec, 0x75, 0xcc, + 0x44, 0x97, 0x89, 0x56, 0x57, 0x04, 0x2a, 0xde, 0x15, 0x81, 0x4e, 0xb0, 0x6f, 0xeb, 0xc0, 0x51, + 0x6c, 0xb5, 0xb4, 0x61, 0x42, 0xb7, 0x4c, 0x31, 0xcc, 0x42, 0x21, 0xbd, 0x50, 0x26, 0xfe, 0x9a, + 0xf1, 0x07, 0x24, 0x24, 0x82, 0x26, 0xde, 0x1b, 0xc6, 0xdb, 0x65, 0x3e, 0xe9, 0xa4, 0xa9, 0x01, + 0x0b, 0x98, 0x2e, 0xad, 0x7e, 0x69, 0xaf, 0xf3, 0x9b, 0x05, 0x6b, 0x6d, 0x11, 0x1c, 0x46, 0xbe, + 0x27, 0xc9, 0x33, 0x8f, 0x7b, 0x5d, 0x81, 0x3e, 0x86, 0x8a, 0xd7, 0x93, 0x2f, 0x18, 0xa7, 0x72, + 0x50, 0xb7, 0x36, 0xad, 0xad, 0xca, 0x5e, 0xfd, 0x8f, 0x57, 0x1f, 0xd5, 0x0c, 0xa2, 0x5d, 0xdf, + 0xe7, 0x44, 0x88, 0x03, 0xc9, 0x69, 0x18, 0xb8, 0x59, 0x2a, 0xba, 0x07, 0xe5, 0x28, 0xae, 0x50, + 0x2f, 0x6c, 0x5a, 0x5b, 0x4b, 0xdb, 0xab, 0x4d, 0xdd, 0x71, 0x53, 0xd7, 0xdd, 0x9b, 0x7f, 0xfd, + 0xf7, 0x9d, 0x39, 0xd7, 0xe4, 0xa0, 0xf7, 0xa1, 0x24, 0xd9, 0x09, 0x09, 0xeb, 0xc5, 0x38, 0x79, + 0x25, 0x49, 0xfe, 0x52, 0x39, 0x5d, 0x1d, 0xdb, 0x59, 0xfd, 0xf9, 0xed, 0xcb, 0xbb, 0xd9, 0x16, + 0xce, 0x6d, 0x58, 0x1f, 0x41, 0xeb, 0x12, 0x11, 0xb1, 0x50, 0x10, 0xe7, 0x57, 0x0b, 0xaa, 0x6d, + 0x11, 0xec, 0x76, 0x3a, 0x0c, 0x7b, 0x92, 0x7c, 0xe5, 0xf5, 0x3a, 0x72, 0xe6, 0x56, 0xea, 0xb0, + 0x20, 0x7a, 0xc7, 0xdf, 0x12, 0x2c, 0xe3, 0x5e, 0x2a, 0x6e, 0x62, 0xce, 0x06, 0xfb, 0x29, 0xd4, + 0x47, 0xa1, 0x25, 0xb8, 0x51, 0x15, 0x8a, 0x98, 0xfa, 0x1a, 0x9c, 0xab, 0x7e, 0xa2, 0xf7, 0x60, + 0x99, 0x9c, 0x46, 0x94, 0x0f, 0x8e, 0x8e, 0x3b, 0x0c, 0x9f, 0xc4, 0x08, 0x8a, 0xee, 0x92, 0xf6, + 0xed, 0x29, 0x97, 0xf3, 0x4a, 0xcb, 0xf6, 0x8c, 0xb3, 0x3e, 0xf9, 0x9a, 0xca, 0x90, 0x88, 0xd9, + 0x65, 0xb3, 0x61, 0x31, 0xe2, 0x2c, 0x22, 0x5c, 0x0e, 0x4c, 0xb3, 0xa9, 0xad, 0x78, 0xf8, 0x4e, + 0x97, 0x8f, 0xfb, 0x5d, 0x76, 0x13, 0x33, 0xe3, 0x61, 0xfe, 0x5a, 0x3c, 0xac, 0x8f, 0xa0, 0x4e, + 0x69, 0x88, 0x19, 0xc7, 0x58, 0xed, 0xa4, 0xb0, 0x2f, 0xba, 0x89, 0x79, 0x19, 0x3e, 0xe7, 0x07, + 0x58, 0x6e, 0x8b, 0xe0, 0x60, 0x10, 0x62, 0xad, 0xf7, 0x23, 0x00, 0xcc, 0x42, 0xc9, 0x59, 0xa7, + 0x43, 0xf8, 0x95, 0x24, 0xe4, 0x72, 0xa7, 0xd3, 0x75, 0x4d, 0xf5, 0x93, 0x5b, 0xe5, 0xdc, 0x87, + 0x5a, 0x7e, 0xff, 0xab, 0xbb, 0x71, 0xfe, 0xb5, 0xe0, 0x66, 0x5b, 0x04, 0x2e, 0x09, 0xa8, 0x90, + 0x84, 0xef, 0x67, 0x08, 0x66, 0xd5, 0xcf, 0x0c, 0x50, 0x21, 0x1b, 0xa0, 0x5b, 0x50, 0x66, 0x9c, + 0x06, 0x54, 0x37, 0x53, 0x71, 0x8d, 0x85, 0x76, 0x60, 0x55, 0x2d, 0x23, 0xa1, 0xa4, 0xd8, 0x93, + 0x94, 0x29, 0xf1, 0x8a, 0x5b, 0x4b, 0xdb, 0x28, 0x69, 0x76, 0x9f, 0x13, 0x5f, 0x45, 0xbd, 0x8e, + 0x3b, 0x92, 0x99, 0xf1, 0x53, 0xba, 0x86, 0xde, 0x3f, 0x15, 0x60, 0x63, 0x6c, 0xb3, 0x53, 0xc8, + 0x3e, 0x2c, 0x65, 0xe1, 0x1a, 0x52, 0x3e, 0x85, 0x45, 0x0f, 0x63, 0xd6, 0x0b, 0xa5, 0x9a, 0x5a, + 0xd5, 0xe0, 0xc3, 0x04, 0xed, 0xa5, 0x60, 0x9a, 0xbb, 0x66, 0xd5, 0xe3, 0x50, 0xf2, 0x81, 0x9b, + 0x16, 0xb1, 0x3f, 0x81, 0x95, 0xa1, 0x90, 0xa2, 0xfc, 0x84, 0x0c, 0x92, 0x33, 0x7b, 0x42, 0x06, + 0xa8, 0x06, 0xa5, 0xbe, 0xd7, 0xe9, 0x11, 0x23, 0x83, 0x36, 0x76, 0x0a, 0x8f, 0x2c, 0xc5, 0x81, + 0x9a, 0xd1, 0x5d, 0x4d, 0xca, 0xf7, 0x64, 0x66, 0x9d, 0x67, 0x27, 0x64, 0x1b, 0x16, 0x3c, 0x1d, + 0xd4, 0x03, 0x71, 0xc9, 0xb2, 0x24, 0x31, 0x37, 0x43, 0xf3, 0x43, 0x33, 0x34, 0xd3, 0x1c, 0x1c, + 0xc6, 0xc7, 0x24, 0xa5, 0x60, 0x0a, 0xf5, 0xd3, 0x6d, 0x0a, 0x93, 0xb7, 0x71, 0x7e, 0x2f, 0x02, + 0xca, 0x29, 0x7a, 0x40, 0x78, 0x9f, 0x62, 0xf2, 0x3f, 0x2e, 0x81, 0x0d, 0x00, 0xdd, 0xe6, 0x51, + 0x8f, 0x53, 0x23, 0x65, 0x45, 0x7b, 0x0e, 0x39, 0x45, 0x1f, 0x42, 0x59, 0x60, 0x16, 0x11, 0x61, + 0x2e, 0x89, 0x1b, 0xe9, 0x07, 0x8e, 0xf0, 0x2e, 0x15, 0x82, 0xb2, 0x50, 0xb8, 0x26, 0x05, 0x6d, + 0xc2, 0x92, 0x4f, 0x04, 0xe6, 0x34, 0x32, 0x27, 0x4d, 0x15, 0xcb, 0xbb, 0xd0, 0x37, 0xf0, 0x8e, + 0xd0, 0x90, 0x8f, 0x48, 0xe8, 0x47, 0x8c, 0xaa, 0x81, 0x2d, 0xc5, 0x03, 0x7b, 0x7f, 0xcc, 0xc0, + 0x9a, 0xf6, 0x9a, 0xe6, 0xff, 0xe3, 0x64, 0x89, 0x9e, 0xd6, 0xaa, 0x18, 0x71, 0xa3, 0x7b, 0xb0, + 0xd8, 0x25, 0xd2, 0xf3, 0x3d, 0xe9, 0xd5, 0xcb, 0x31, 0xde, 0x6a, 0x5a, 0xd5, 0xf8, 0xdd, 0x34, + 0x23, 0x23, 0x7c, 0x61, 0x32, 0xe1, 0xf6, 0x3e, 0xdc, 0x1c, 0xbb, 0xfb, 0x75, 0x0e, 0xc4, 0xc5, + 0x4b, 0xf4, 0x09, 0xd8, 0x17, 0xdb, 0x9c, 0x62, 0x46, 0xaa, 0x50, 0xf4, 0xb3, 0x8b, 0xcf, 0xa7, + 0xfe, 0xf6, 0x9f, 0x45, 0x28, 0xb6, 0x45, 0x80, 0x9e, 0xc0, 0xf2, 0xd0, 0x8b, 0x66, 0x3d, 0x47, + 0x67, 0x3e, 0x60, 0xdf, 0x99, 0x10, 0x48, 0x77, 0xff, 0x0c, 0x2a, 0xd9, 0xc9, 0xad, 0xe5, 0xb2, + 0x53, 0xaf, 0xfd, 0xee, 0x38, 0x6f, 0x5a, 0xe0, 0x73, 0x58, 0x19, 0x7e, 0x92, 0xd4, 0xf3, 0xe9, + 0xf9, 0x88, 0xbd, 0x39, 0x29, 0x92, 0x47, 0x93, 0x7d, 0xeb, 0xf2, 0x68, 0x52, 0xef, 0x10, 0x9a, + 0x8b, 0xdf, 0xa5, 0xe7, 0x80, 0xc6, 0x7c, 0x79, 0x36, 0x2e, 0xbd, 0x1e, 0xed, 0x0f, 0xa6, 0xba, + 0x3d, 0xd1, 0x17, 0xb0, 0x36, 0x7a, 0x12, 0xed, 0xc9, 0x63, 0x6c, 0x3b, 0x93, 0x63, 0x49, 0x49, + 0xbb, 0xf4, 0xe3, 0xdb, 0x97, 0x77, 0xad, 0xbd, 0x4f, 0x5f, 0x9f, 0x35, 0xac, 0x37, 0x67, 0x0d, + 0xeb, 0x9f, 0xb3, 0x86, 0xf5, 0xcb, 0x79, 0x63, 0xee, 0xcd, 0x79, 0x63, 0xee, 0xaf, 0xf3, 0xc6, + 0xdc, 0x73, 0x27, 0xa0, 0xf2, 0x45, 0xef, 0xb8, 0x89, 0x59, 0xb7, 0xc5, 0x42, 0xc1, 0x42, 0xde, + 0x8a, 0xff, 0x9c, 0xb6, 0xd4, 0x13, 0x58, 0x0e, 0x22, 0x22, 0x8e, 0xcb, 0xf1, 0x4b, 0xf7, 0xe1, + 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xdb, 0xbe, 0xf6, 0x61, 0x91, 0x0b, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -790,10 +1017,11 @@ type MsgClient interface { // // Since: cosmos-sdk 0.47 UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) + // Authorize asserts the given controller is the owner of the given address. + Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) + // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. + // this operation is called by services initiating a controller registration. + AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. SyncVault(ctx context.Context, in *MsgSyncVault, opts ...grpc.CallOption) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. @@ -819,18 +1047,18 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } -func (c *msgClient) Authenticate(ctx context.Context, in *MsgAuthenticate, opts ...grpc.CallOption) (*MsgAuthenticateResponse, error) { - out := new(MsgAuthenticateResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/Authenticate", in, out, opts...) +func (c *msgClient) Authorize(ctx context.Context, in *MsgAuthorize, opts ...grpc.CallOption) (*MsgAuthorizeResponse, error) { + out := new(MsgAuthorizeResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/Authorize", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *msgClient) ProveWitness(ctx context.Context, in *MsgProveWitness, opts ...grpc.CallOption) (*MsgProveWitnessResponse, error) { - out := new(MsgProveWitnessResponse) - err := c.cc.Invoke(ctx, "/did.v1.Msg/ProveWitness", in, out, opts...) +func (c *msgClient) AllocateVault(ctx context.Context, in *MsgAllocateVault, opts ...grpc.CallOption) (*MsgAllocateVaultResponse, error) { + out := new(MsgAllocateVaultResponse) + err := c.cc.Invoke(ctx, "/did.v1.Msg/AllocateVault", in, out, opts...) if err != nil { return nil, err } @@ -870,10 +1098,11 @@ type MsgServer interface { // // Since: cosmos-sdk 0.47 UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) - // Authenticate asserts the given controller is the owner of the given address. - Authenticate(context.Context, *MsgAuthenticate) (*MsgAuthenticateResponse, error) - // ProveWitness is an operation to prove the controller has a valid property using ZK Accumulators. - ProveWitness(context.Context, *MsgProveWitness) (*MsgProveWitnessResponse, error) + // Authorize asserts the given controller is the owner of the given address. + Authorize(context.Context, *MsgAuthorize) (*MsgAuthorizeResponse, error) + // AllocateVault assembles a sqlite3 database in a local directory and returns the CID of the database. + // this operation is called by services initiating a controller registration. + AllocateVault(context.Context, *MsgAllocateVault) (*MsgAllocateVaultResponse, error) // SyncVault synchronizes the controller with the Vault Motr DWN WASM Wallet. SyncVault(context.Context, *MsgSyncVault) (*MsgSyncVaultResponse, error) // RegisterController initializes a controller with the given authentication set, address, cid, publicKey, and user-defined alias. @@ -889,11 +1118,11 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } -func (*UnimplementedMsgServer) Authenticate(ctx context.Context, req *MsgAuthenticate) (*MsgAuthenticateResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented") +func (*UnimplementedMsgServer) Authorize(ctx context.Context, req *MsgAuthorize) (*MsgAuthorizeResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Authorize not implemented") } -func (*UnimplementedMsgServer) ProveWitness(ctx context.Context, req *MsgProveWitness) (*MsgProveWitnessResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method ProveWitness not implemented") +func (*UnimplementedMsgServer) AllocateVault(ctx context.Context, req *MsgAllocateVault) (*MsgAllocateVaultResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method AllocateVault not implemented") } func (*UnimplementedMsgServer) SyncVault(ctx context.Context, req *MsgSyncVault) (*MsgSyncVaultResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method SyncVault not implemented") @@ -927,38 +1156,38 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } -func _Msg_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgAuthenticate) +func _Msg_Authorize_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAuthorize) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).Authenticate(ctx, in) + return srv.(MsgServer).Authorize(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/Authenticate", + FullMethod: "/did.v1.Msg/Authorize", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).Authenticate(ctx, req.(*MsgAuthenticate)) + return srv.(MsgServer).Authorize(ctx, req.(*MsgAuthorize)) } return interceptor(ctx, in, info, handler) } -func _Msg_ProveWitness_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(MsgProveWitness) +func _Msg_AllocateVault_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgAllocateVault) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(MsgServer).ProveWitness(ctx, in) + return srv.(MsgServer).AllocateVault(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/did.v1.Msg/ProveWitness", + FullMethod: "/did.v1.Msg/AllocateVault", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(MsgServer).ProveWitness(ctx, req.(*MsgProveWitness)) + return srv.(MsgServer).AllocateVault(ctx, req.(*MsgAllocateVault)) } return interceptor(ctx, in, info, handler) } @@ -1026,12 +1255,12 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ Handler: _Msg_UpdateParams_Handler, }, { - MethodName: "Authenticate", - Handler: _Msg_Authenticate_Handler, + MethodName: "Authorize", + Handler: _Msg_Authorize_Handler, }, { - MethodName: "ProveWitness", - Handler: _Msg_ProveWitness_Handler, + MethodName: "AllocateVault", + Handler: _Msg_AllocateVault_Handler, }, { MethodName: "SyncVault", @@ -1070,6 +1299,18 @@ func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -1113,7 +1354,7 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { +func (m *MsgAllocateVault) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1123,34 +1364,32 @@ func (m *MsgAuthenticate) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthenticate) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAllocateVault) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAllocateVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if len(m.Origin) > 0 { - i -= len(m.Origin) - copy(dAtA[i:], m.Origin) - i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) - i-- - dAtA[i] = 0x22 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + if len(m.Subject) > 0 { + i -= len(m.Subject) + copy(dAtA[i:], m.Subject) + i = encodeVarintTx(dAtA, i, uint64(len(m.Subject))) i-- dAtA[i] = 0x12 } @@ -1164,7 +1403,7 @@ func (m *MsgAuthenticate) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *MsgAuthenticateResponse) Marshal() (dAtA []byte, err error) { +func (m *MsgAllocateVaultResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1174,16 +1413,28 @@ func (m *MsgAuthenticateResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *MsgAuthenticateResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *MsgAllocateVaultResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *MsgAuthenticateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *MsgAllocateVaultResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l + if m.ExpiryBlock != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.ExpiryBlock)) + i-- + dAtA[i] = 0x10 + } + if len(m.Cid) > 0 { + i -= len(m.Cid) + copy(dAtA[i:], m.Cid) + i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -1207,6 +1458,18 @@ func (m *MsgProveWitness) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if len(m.Witness) > 0 { i -= len(m.Witness) copy(dAtA[i:], m.Witness) @@ -1291,20 +1554,18 @@ func (m *MsgSyncVault) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Macron) > 0 { - i -= len(m.Macron) - copy(dAtA[i:], m.Macron) - i = encodeVarintTx(dAtA, i, uint64(len(m.Macron))) + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x1a } - if len(m.Cid) > 0 { - i -= len(m.Cid) - copy(dAtA[i:], m.Cid) - i = encodeVarintTx(dAtA, i, uint64(len(m.Cid))) - i-- - dAtA[i] = 0x12 - } if len(m.Controller) > 0 { i -= len(m.Controller) copy(dAtA[i:], m.Controller) @@ -1368,23 +1629,38 @@ func (m *MsgRegisterController) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Verifications) > 0 { - for iNdEx := len(m.Verifications) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Verifications[iNdEx]) - copy(dAtA[i:], m.Verifications[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Verifications[iNdEx]))) + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Authentication) > 0 { + for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Authentication[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } i-- dAtA[i] = 0x22 } } - if len(m.Keyshares) > 0 { - for iNdEx := len(m.Keyshares) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Keyshares[iNdEx]) - copy(dAtA[i:], m.Keyshares[iNdEx]) - i = encodeVarintTx(dAtA, i, uint64(len(m.Keyshares[iNdEx]))) - i-- - dAtA[i] = 0x1a - } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x1a } if len(m.Cid) > 0 { i -= len(m.Cid) @@ -1439,7 +1715,7 @@ func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, dAtA[i] = 0xa i = encodeVarintTx(dAtA, i, uint64(baseI-i)) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a } } if len(m.Controller) > 0 { @@ -1447,11 +1723,129 @@ func (m *MsgRegisterControllerResponse) MarshalToSizedBuffer(dAtA []byte) (int, copy(dAtA[i:], m.Controller) i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) i-- + dAtA[i] = 0x12 + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *MsgAuthorize) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAuthorize) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAuthorize) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x2a + } + if len(m.Origin) > 0 { + i -= len(m.Origin) + copy(dAtA[i:], m.Origin) + i = encodeVarintTx(dAtA, i, uint64(len(m.Origin))) + i-- + dAtA[i] = 0x22 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintTx(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) + i-- + dAtA[i] = 0x12 + } + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } +func (m *MsgAuthorizeResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgAuthorizeResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgAuthorizeResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if m.Success { + i-- + if m.Success { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func (m *MsgRegisterService) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1472,21 +1866,65 @@ func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if len(m.Scopes) > 0 { - dAtA3 := make([]byte, len(m.Scopes)*10) - var j2 int - for _, num := range m.Scopes { - for num >= 1<<7 { - dAtA3[j2] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j2++ + if m.Token != nil { + { + size, err := m.Token.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - dAtA3[j2] = uint8(num) - j2++ + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x3a + } + if m.Metadata != nil { + { + size, err := m.Metadata.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } + if len(m.ServiceEndpoints) > 0 { + for k := range m.ServiceEndpoints { + v := m.ServiceEndpoints[k] + baseI := i + i -= len(v) + copy(dAtA[i:], v) + i = encodeVarintTx(dAtA, i, uint64(len(v))) + i-- + dAtA[i] = 0x12 + i -= len(k) + copy(dAtA[i:], k) + i = encodeVarintTx(dAtA, i, uint64(len(k))) + i-- + dAtA[i] = 0xa + i = encodeVarintTx(dAtA, i, uint64(baseI-i)) + i-- + dAtA[i] = 0x2a + } + } + if len(m.Description) > 0 { + i -= len(m.Description) + copy(dAtA[i:], m.Description) + i = encodeVarintTx(dAtA, i, uint64(len(m.Description))) + i-- + dAtA[i] = 0x22 + } + if m.Scopes != nil { + { + size, err := m.Scopes.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) } - i -= j2 - copy(dAtA[i:], dAtA3[:j2]) - i = encodeVarintTx(dAtA, i, uint64(j2)) i-- dAtA[i] = 0x1a } @@ -1497,10 +1935,10 @@ func (m *MsgRegisterService) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x12 } - if len(m.Authority) > 0 { - i -= len(m.Authority) - copy(dAtA[i:], m.Authority) - i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + if len(m.Controller) > 0 { + i -= len(m.Controller) + copy(dAtA[i:], m.Controller) + i = encodeVarintTx(dAtA, i, uint64(len(m.Controller))) i-- dAtA[i] = 0xa } @@ -1527,6 +1965,13 @@ func (m *MsgRegisterServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, err _ = i var l int _ = l + if len(m.Did) > 0 { + i -= len(m.Did) + copy(dAtA[i:], m.Did) + i = encodeVarintTx(dAtA, i, uint64(len(m.Did))) + i-- + dAtA[i] = 0x12 + } if m.Success { i-- if m.Success { @@ -1563,6 +2008,10 @@ func (m *MsgUpdateParams) Size() (n int) { } l = m.Params.Size() n += 1 + l + sovTx(uint64(l)) + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1575,7 +2024,7 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } -func (m *MsgAuthenticate) Size() (n int) { +func (m *MsgAllocateVault) Size() (n int) { if m == nil { return 0 } @@ -1585,27 +2034,30 @@ func (m *MsgAuthenticate) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Controller) + l = len(m.Subject) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Address) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Origin) - if l > 0 { + if m.Token != nil { + l = m.Token.Size() n += 1 + l + sovTx(uint64(l)) } return n } -func (m *MsgAuthenticateResponse) Size() (n int) { +func (m *MsgAllocateVaultResponse) Size() (n int) { if m == nil { return 0 } var l int _ = l + l = len(m.Cid) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.ExpiryBlock != 0 { + n += 1 + sovTx(uint64(m.ExpiryBlock)) + } return n } @@ -1627,6 +2079,10 @@ func (m *MsgProveWitness) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1656,12 +2112,8 @@ func (m *MsgSyncVault) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - l = len(m.Cid) - if l > 0 { - n += 1 + l + sovTx(uint64(l)) - } - l = len(m.Macron) - if l > 0 { + if m.Token != nil { + l = m.Token.Size() n += 1 + l + sovTx(uint64(l)) } return n @@ -1693,17 +2145,19 @@ func (m *MsgRegisterController) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Keyshares) > 0 { - for _, b := range m.Keyshares { - l = len(b) + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.Authentication) > 0 { + for _, e := range m.Authentication { + l = e.Size() n += 1 + l + sovTx(uint64(l)) } } - if len(m.Verifications) > 0 { - for _, b := range m.Verifications { - l = len(b) - n += 1 + l + sovTx(uint64(l)) - } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovTx(uint64(l)) } return n } @@ -1714,6 +2168,9 @@ func (m *MsgRegisterControllerResponse) Size() (n int) { } var l int _ = l + if m.Success { + n += 2 + } l = len(m.Controller) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -1729,7 +2186,7 @@ func (m *MsgRegisterControllerResponse) Size() (n int) { return n } -func (m *MsgRegisterService) Size() (n int) { +func (m *MsgAuthorize) Size() (n int) { if m == nil { return 0 } @@ -1739,16 +2196,78 @@ func (m *MsgRegisterService) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Origin) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgAuthorizeResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Success { + n += 2 + } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterService) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Controller) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } l = len(m.OriginUri) if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if len(m.Scopes) > 0 { - l = 0 - for _, e := range m.Scopes { - l += sovTx(uint64(e)) + if m.Scopes != nil { + l = m.Scopes.Size() + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.Description) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if len(m.ServiceEndpoints) > 0 { + for k, v := range m.ServiceEndpoints { + _ = k + _ = v + mapEntrySize := 1 + len(k) + sovTx(uint64(len(k))) + 1 + len(v) + sovTx(uint64(len(v))) + n += mapEntrySize + 1 + sovTx(uint64(mapEntrySize)) } - n += 1 + sovTx(uint64(l)) + l + } + if m.Metadata != nil { + l = m.Metadata.Size() + n += 1 + l + sovTx(uint64(l)) + } + if m.Token != nil { + l = m.Token.Size() + n += 1 + l + sovTx(uint64(l)) } return n } @@ -1762,6 +2281,10 @@ func (m *MsgRegisterServiceResponse) Size() (n int) { if m.Success { n += 2 } + l = len(m.Did) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1865,6 +2388,42 @@ func (m *MsgUpdateParams) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -1936,7 +2495,7 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { +func (m *MsgAllocateVault) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -1959,10 +2518,10 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthenticate: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAllocateVault: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticate: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAllocateVault: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1999,7 +2558,7 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -2027,13 +2586,13 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Controller = string(dAtA[iNdEx:postIndex]) + m.Subject = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } - var stringLen uint64 + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2043,55 +2602,27 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - stringLen |= uint64(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - intStringLen := int(stringLen) - if intStringLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + intStringLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + if m.Token == nil { + m.Token = &Token{} } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex default: iNdEx = preIndex @@ -2114,7 +2645,7 @@ func (m *MsgAuthenticate) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { +func (m *MsgAllocateVaultResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -2137,12 +2668,63 @@ func (m *MsgAuthenticateResponse) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgAuthenticateResponse: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAllocateVaultResponse: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgAuthenticateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAllocateVaultResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Cid = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ExpiryBlock", wireType) + } + m.ExpiryBlock = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ExpiryBlock |= int64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2291,6 +2873,42 @@ func (m *MsgProveWitness) Unmarshal(dAtA []byte) error { m.Witness = []byte{} } iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2475,43 +3093,11 @@ func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { } m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Cid", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Cid = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Macron", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2521,24 +3107,26 @@ func (m *MsgSyncVault) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Macron = append(m.Macron[:0], dAtA[iNdEx:postIndex]...) - if m.Macron == nil { - m.Macron = []byte{} + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err } iNdEx = postIndex default: @@ -2727,9 +3315,9 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { iNdEx = postIndex case 3: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Keyshares", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) } - var byteLen int + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2739,29 +3327,29 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + stringLen |= uint64(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + intStringLen := int(stringLen) + if intStringLen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + intStringLen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Keyshares = append(m.Keyshares, make([]byte, postIndex-iNdEx)) - copy(m.Keyshares[len(m.Keyshares)-1], dAtA[iNdEx:postIndex]) + m.Origin = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Verifications", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) } - var byteLen int + var msglen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -2771,23 +3359,61 @@ func (m *MsgRegisterController) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - byteLen |= int(b&0x7F) << shift + msglen |= int(b&0x7F) << shift if b < 0x80 { break } } - if byteLen < 0 { + if msglen < 0 { return ErrInvalidLengthTx } - postIndex := iNdEx + byteLen + postIndex := iNdEx + msglen if postIndex < 0 { return ErrInvalidLengthTx } if postIndex > l { return io.ErrUnexpectedEOF } - m.Verifications = append(m.Verifications, make([]byte, postIndex-iNdEx)) - copy(m.Verifications[len(m.Verifications)-1], dAtA[iNdEx:postIndex]) + m.Authentication = append(m.Authentication, &Credential{}) + if err := m.Authentication[len(m.Authentication)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } iNdEx = postIndex default: iNdEx = preIndex @@ -2840,6 +3466,26 @@ func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { } switch fieldNum { case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) } @@ -2871,7 +3517,7 @@ func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { } m.Controller = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 2: + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) } @@ -3019,7 +3665,7 @@ func (m *MsgRegisterControllerResponse) Unmarshal(dAtA []byte) error { } return nil } -func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { +func (m *MsgAuthorize) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -3042,10 +3688,10 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") + return fmt.Errorf("proto: MsgAuthorize: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: MsgAuthorize: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -3080,6 +3726,326 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { } m.Authority = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Origin", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Origin = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgAuthorizeResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgAuthorizeResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgAuthorizeResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Success", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Success = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgRegisterService: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterService: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Controller = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field OriginUri", wireType) @@ -3113,55 +4079,127 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { m.OriginUri = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: - if wireType == 0 { - var v PermissionScope - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= PermissionScope(b&0x7F) << shift - if b < 0x80 { - break - } + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx } - m.Scopes = append(m.Scopes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthTx - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthTx - } - if postIndex > l { + if iNdEx >= l { return io.ErrUnexpectedEOF } - var elementCount int - if elementCount != 0 && len(m.Scopes) == 0 { - m.Scopes = make([]PermissionScope, 0, elementCount) + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break } - for iNdEx < postIndex { - var v PermissionScope + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Scopes == nil { + m.Scopes = &Permissions{} + } + if err := m.Scopes.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Description = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ServiceEndpoints", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ServiceEndpoints == nil { + m.ServiceEndpoints = make(map[string]string) + } + var mapkey string + var mapvalue string + for iNdEx < postIndex { + entryPreIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + if fieldNum == 1 { + var stringLenmapkey uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTx @@ -3171,16 +4209,142 @@ func (m *MsgRegisterService) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= PermissionScope(b&0x7F) << shift + stringLenmapkey |= uint64(b&0x7F) << shift if b < 0x80 { break } } - m.Scopes = append(m.Scopes, v) + intStringLenmapkey := int(stringLenmapkey) + if intStringLenmapkey < 0 { + return ErrInvalidLengthTx + } + postStringIndexmapkey := iNdEx + intStringLenmapkey + if postStringIndexmapkey < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapkey > l { + return io.ErrUnexpectedEOF + } + mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) + iNdEx = postStringIndexmapkey + } else if fieldNum == 2 { + var stringLenmapvalue uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLenmapvalue |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLenmapvalue := int(stringLenmapvalue) + if intStringLenmapvalue < 0 { + return ErrInvalidLengthTx + } + postStringIndexmapvalue := iNdEx + intStringLenmapvalue + if postStringIndexmapvalue < 0 { + return ErrInvalidLengthTx + } + if postStringIndexmapvalue > l { + return io.ErrUnexpectedEOF + } + mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) + iNdEx = postStringIndexmapvalue + } else { + iNdEx = entryPreIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > postIndex { + return io.ErrUnexpectedEOF + } + iNdEx += skippy } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Scopes", wireType) } + m.ServiceEndpoints[mapkey] = mapvalue + iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Metadata", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Metadata == nil { + m.Metadata = &Metadata{} + } + if err := m.Metadata.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Token", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Token == nil { + m.Token = &Token{} + } + if err := m.Token.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -3251,6 +4415,38 @@ func (m *MsgRegisterServiceResponse) Unmarshal(dAtA []byte) error { } } m.Success = bool(v != 0) + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Did", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Did = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) diff --git a/x/did/types/types.go b/x/did/types/types.go deleted file mode 100644 index 777f908ff..000000000 --- a/x/did/types/types.go +++ /dev/null @@ -1,15 +0,0 @@ -package types - -func (a *AssetInfo) Equal(b *AssetInfo) bool { - if a == nil && b == nil { - return true - } - return false -} - -func (c *ChainInfo) Equal(b *ChainInfo) bool { - if c == nil && b == nil { - return true - } - return false -} diff --git a/x/did/types/types.pb.go b/x/did/types/types.pb.go deleted file mode 100644 index 75ec7c838..000000000 --- a/x/did/types/types.pb.go +++ /dev/null @@ -1,2274 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: did/v1/types.proto - -package types - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/gogoproto/gogoproto" - proto "github.com/cosmos/gogoproto/proto" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// Credential defines a WebAuthn credential -type Credential struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CredentialType string `protobuf:"bytes,2,opt,name=credential_type,json=credentialType,proto3" json:"credential_type,omitempty"` - CredentialId []byte `protobuf:"bytes,3,opt,name=credential_id,json=credentialId,proto3" json:"credential_id,omitempty"` - Transport []string `protobuf:"bytes,4,rep,name=transport,proto3" json:"transport,omitempty"` - AttestationType string `protobuf:"bytes,5,opt,name=attestation_type,json=attestationType,proto3" json:"attestation_type,omitempty"` - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - Controller string `protobuf:"bytes,7,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *Credential) Reset() { *m = Credential{} } -func (m *Credential) String() string { return proto.CompactTextString(m) } -func (*Credential) ProtoMessage() {} -func (*Credential) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{0} -} -func (m *Credential) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Credential) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Credential.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Credential) XXX_Merge(src proto.Message) { - xxx_messageInfo_Credential.Merge(m, src) -} -func (m *Credential) XXX_Size() int { - return m.Size() -} -func (m *Credential) XXX_DiscardUnknown() { - xxx_messageInfo_Credential.DiscardUnknown(m) -} - -var xxx_messageInfo_Credential proto.InternalMessageInfo - -func (m *Credential) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Credential) GetCredentialType() string { - if m != nil { - return m.CredentialType - } - return "" -} - -func (m *Credential) GetCredentialId() []byte { - if m != nil { - return m.CredentialId - } - return nil -} - -func (m *Credential) GetTransport() []string { - if m != nil { - return m.Transport - } - return nil -} - -func (m *Credential) GetAttestationType() string { - if m != nil { - return m.AttestationType - } - return "" -} - -func (m *Credential) GetDisplayName() string { - if m != nil { - return m.DisplayName - } - return "" -} - -func (m *Credential) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -// Document defines a DID document -type Document struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,2,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` - Authentication []string `protobuf:"bytes,4,rep,name=authentication,proto3" json:"authentication,omitempty"` - AssertionMethod []string `protobuf:"bytes,5,rep,name=assertion_method,json=assertionMethod,proto3" json:"assertion_method,omitempty"` - CapabilityDelegation []string `protobuf:"bytes,7,rep,name=capability_delegation,json=capabilityDelegation,proto3" json:"capability_delegation,omitempty"` - CapabilityInvocation []string `protobuf:"bytes,8,rep,name=capability_invocation,json=capabilityInvocation,proto3" json:"capability_invocation,omitempty"` -} - -func (m *Document) Reset() { *m = Document{} } -func (m *Document) String() string { return proto.CompactTextString(m) } -func (*Document) ProtoMessage() {} -func (*Document) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{1} -} -func (m *Document) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Document) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Document.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Document) XXX_Merge(src proto.Message) { - xxx_messageInfo_Document.Merge(m, src) -} -func (m *Document) XXX_Size() int { - return m.Size() -} -func (m *Document) XXX_DiscardUnknown() { - xxx_messageInfo_Document.DiscardUnknown(m) -} - -var xxx_messageInfo_Document proto.InternalMessageInfo - -func (m *Document) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Document) GetVerificationMethods() []*VerificationMethod { - if m != nil { - return m.VerificationMethods - } - return nil -} - -func (m *Document) GetAuthentication() []string { - if m != nil { - return m.Authentication - } - return nil -} - -func (m *Document) GetAssertionMethod() []string { - if m != nil { - return m.AssertionMethod - } - return nil -} - -func (m *Document) GetCapabilityDelegation() []string { - if m != nil { - return m.CapabilityDelegation - } - return nil -} - -func (m *Document) GetCapabilityInvocation() []string { - if m != nil { - return m.CapabilityInvocation - } - return nil -} - -// Identity defines an associated profile for a did subject -type Identity struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Subject string `protobuf:"bytes,2,opt,name=subject,proto3" json:"subject,omitempty"` - Controller string `protobuf:"bytes,3,opt,name=controller,proto3" json:"controller,omitempty"` - Credentials []*Credential `protobuf:"bytes,4,rep,name=credentials,proto3" json:"credentials,omitempty"` - VerificationMethods []*VerificationMethod `protobuf:"bytes,5,rep,name=verification_methods,json=verificationMethods,proto3" json:"verification_methods,omitempty"` -} - -func (m *Identity) Reset() { *m = Identity{} } -func (m *Identity) String() string { return proto.CompactTextString(m) } -func (*Identity) ProtoMessage() {} -func (*Identity) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{2} -} -func (m *Identity) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Identity) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Identity.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Identity) XXX_Merge(src proto.Message) { - xxx_messageInfo_Identity.Merge(m, src) -} -func (m *Identity) XXX_Size() int { - return m.Size() -} -func (m *Identity) XXX_DiscardUnknown() { - xxx_messageInfo_Identity.DiscardUnknown(m) -} - -var xxx_messageInfo_Identity proto.InternalMessageInfo - -func (m *Identity) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *Identity) GetSubject() string { - if m != nil { - return m.Subject - } - return "" -} - -func (m *Identity) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *Identity) GetCredentials() []*Credential { - if m != nil { - return m.Credentials - } - return nil -} - -func (m *Identity) GetVerificationMethods() []*VerificationMethod { - if m != nil { - return m.VerificationMethods - } - return nil -} - -// PubKey defines a public key for a did -type PubKey struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Key []byte `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` - KeyType string `protobuf:"bytes,3,opt,name=key_type,json=keyType,proto3" json:"key_type,omitempty"` - Controller string `protobuf:"bytes,4,opt,name=controller,proto3" json:"controller,omitempty"` -} - -func (m *PubKey) Reset() { *m = PubKey{} } -func (m *PubKey) String() string { return proto.CompactTextString(m) } -func (*PubKey) ProtoMessage() {} -func (*PubKey) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{3} -} -func (m *PubKey) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *PubKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_PubKey.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *PubKey) XXX_Merge(src proto.Message) { - xxx_messageInfo_PubKey.Merge(m, src) -} -func (m *PubKey) XXX_Size() int { - return m.Size() -} -func (m *PubKey) XXX_DiscardUnknown() { - xxx_messageInfo_PubKey.DiscardUnknown(m) -} - -var xxx_messageInfo_PubKey proto.InternalMessageInfo - -func (m *PubKey) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *PubKey) GetKey() []byte { - if m != nil { - return m.Key - } - return nil -} - -func (m *PubKey) GetKeyType() string { - if m != nil { - return m.KeyType - } - return "" -} - -func (m *PubKey) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -// VerificationMethod defines a verification method -type VerificationMethod struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Controller string `protobuf:"bytes,2,opt,name=controller,proto3" json:"controller,omitempty"` - // The delegation proof or verification method - PublicKeyMultibase string `protobuf:"bytes,3,opt,name=public_key_multibase,json=publicKeyMultibase,proto3" json:"public_key_multibase,omitempty"` - // Public Key JWKS is a map of the associated public keys - PublicKeyJwks map[string]string `protobuf:"bytes,4,rep,name=public_key_jwks,json=publicKeyJwks,proto3" json:"public_key_jwks,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` -} - -func (m *VerificationMethod) Reset() { *m = VerificationMethod{} } -func (m *VerificationMethod) String() string { return proto.CompactTextString(m) } -func (*VerificationMethod) ProtoMessage() {} -func (*VerificationMethod) Descriptor() ([]byte, []int) { - return fileDescriptor_e3176cd2dbe76ac1, []int{4} -} -func (m *VerificationMethod) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VerificationMethod) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VerificationMethod.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VerificationMethod) XXX_Merge(src proto.Message) { - xxx_messageInfo_VerificationMethod.Merge(m, src) -} -func (m *VerificationMethod) XXX_Size() int { - return m.Size() -} -func (m *VerificationMethod) XXX_DiscardUnknown() { - xxx_messageInfo_VerificationMethod.DiscardUnknown(m) -} - -var xxx_messageInfo_VerificationMethod proto.InternalMessageInfo - -func (m *VerificationMethod) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *VerificationMethod) GetController() string { - if m != nil { - return m.Controller - } - return "" -} - -func (m *VerificationMethod) GetPublicKeyMultibase() string { - if m != nil { - return m.PublicKeyMultibase - } - return "" -} - -func (m *VerificationMethod) GetPublicKeyJwks() map[string]string { - if m != nil { - return m.PublicKeyJwks - } - return nil -} - -func init() { - proto.RegisterType((*Credential)(nil), "did.v1.Credential") - proto.RegisterType((*Document)(nil), "did.v1.Document") - proto.RegisterType((*Identity)(nil), "did.v1.Identity") - proto.RegisterType((*PubKey)(nil), "did.v1.PubKey") - proto.RegisterType((*VerificationMethod)(nil), "did.v1.VerificationMethod") - proto.RegisterMapType((map[string]string)(nil), "did.v1.VerificationMethod.PublicKeyJwksEntry") -} - -func init() { proto.RegisterFile("did/v1/types.proto", fileDescriptor_e3176cd2dbe76ac1) } - -var fileDescriptor_e3176cd2dbe76ac1 = []byte{ - // 628 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xcf, 0x6e, 0xd3, 0x4e, - 0x10, 0xae, 0x9d, 0xe6, 0x4f, 0x27, 0x69, 0x53, 0xed, 0x2f, 0x3f, 0xe1, 0x46, 0xc8, 0x0a, 0x41, - 0x82, 0x70, 0x20, 0xa6, 0x2d, 0x07, 0x84, 0x38, 0x20, 0x28, 0x87, 0x52, 0x15, 0x55, 0x16, 0x70, - 0xe0, 0x12, 0xad, 0xed, 0x25, 0xd9, 0xc6, 0xf6, 0x5a, 0xde, 0x75, 0x8a, 0x9f, 0x02, 0x9e, 0x82, - 0x67, 0xe1, 0xd8, 0x23, 0xdc, 0x50, 0xfb, 0x0e, 0x9c, 0x91, 0x77, 0xe3, 0xd8, 0x8d, 0xd5, 0x0b, - 0xb7, 0xdd, 0xef, 0xfb, 0x76, 0x67, 0xe6, 0x9b, 0xd1, 0x00, 0xf2, 0xa8, 0x67, 0x2d, 0xf6, 0x2d, - 0x91, 0x46, 0x84, 0x8f, 0xa3, 0x98, 0x09, 0x86, 0x1a, 0x1e, 0xf5, 0xc6, 0x8b, 0xfd, 0xfe, 0x1d, - 0x97, 0xf1, 0x80, 0x71, 0x2b, 0xe0, 0xd3, 0x4c, 0x12, 0xf0, 0xa9, 0x12, 0xf4, 0x7b, 0x53, 0x36, - 0x65, 0xf2, 0x68, 0x65, 0xa7, 0x25, 0xba, 0xa7, 0xe4, 0x13, 0x45, 0xa8, 0x8b, 0xa2, 0x86, 0x7f, - 0x34, 0x80, 0xd7, 0x31, 0xf1, 0x48, 0x28, 0x28, 0xf6, 0xd1, 0x0e, 0xe8, 0xd4, 0x33, 0xb4, 0x81, - 0x36, 0xda, 0xb2, 0x75, 0xea, 0xa1, 0x87, 0xd0, 0x75, 0x57, 0xec, 0x24, 0x4b, 0xc5, 0xd0, 0x25, - 0xb9, 0x53, 0xc0, 0xef, 0xd3, 0x88, 0xa0, 0xfb, 0xb0, 0x5d, 0x12, 0x52, 0xcf, 0xa8, 0x0d, 0xb4, - 0x51, 0xc7, 0xee, 0x14, 0xe0, 0xb1, 0x87, 0xee, 0xc2, 0x96, 0x88, 0x71, 0xc8, 0x23, 0x16, 0x0b, - 0x63, 0x73, 0x50, 0x1b, 0x6d, 0xd9, 0x05, 0x80, 0x1e, 0xc1, 0x2e, 0x16, 0x82, 0x70, 0x81, 0x05, - 0x65, 0xa1, 0x0a, 0x56, 0x97, 0xc1, 0xba, 0x25, 0x5c, 0x46, 0xbb, 0x07, 0x1d, 0x8f, 0xf2, 0xc8, - 0xc7, 0xe9, 0x24, 0xc4, 0x01, 0x31, 0x1a, 0x52, 0xd6, 0x5e, 0x62, 0xef, 0x70, 0x40, 0x90, 0x09, - 0xe0, 0xb2, 0x50, 0xc4, 0xcc, 0xf7, 0x49, 0x6c, 0x34, 0xa5, 0xa0, 0x84, 0x0c, 0xbf, 0xeb, 0xd0, - 0x3a, 0x62, 0x6e, 0x12, 0x90, 0x50, 0x54, 0xca, 0x3e, 0x85, 0xde, 0x82, 0xc4, 0xf4, 0x33, 0x75, - 0x55, 0x2e, 0x01, 0x11, 0x33, 0xe6, 0x71, 0x43, 0x1f, 0xd4, 0x46, 0xed, 0x83, 0xfe, 0x58, 0xb5, - 0x61, 0xfc, 0xb1, 0xa4, 0x39, 0x95, 0x12, 0xfb, 0xbf, 0x45, 0x05, 0xe3, 0xe8, 0x01, 0xec, 0xe0, - 0x44, 0xcc, 0x32, 0x1f, 0x14, 0xb1, 0x2c, 0x7e, 0x0d, 0x95, 0x0e, 0x70, 0x4e, 0xe2, 0x52, 0x4c, - 0xa3, 0x2e, 0x95, 0xdd, 0x15, 0xae, 0xfe, 0x44, 0x87, 0xf0, 0xbf, 0x8b, 0x23, 0xec, 0x50, 0x9f, - 0x8a, 0x74, 0xe2, 0x11, 0x9f, 0x4c, 0xd5, 0xcf, 0x4d, 0xa9, 0xef, 0x15, 0xe4, 0xd1, 0x8a, 0x5b, - 0x7b, 0x44, 0xc3, 0x05, 0x5b, 0xa6, 0xd3, 0x5a, 0x7f, 0x74, 0xbc, 0xe2, 0x86, 0xbf, 0x34, 0x68, - 0x1d, 0xcb, 0x1e, 0x8a, 0xb4, 0x62, 0x94, 0x01, 0x4d, 0x9e, 0x38, 0xe7, 0xc4, 0x15, 0xcb, 0xb9, - 0xc8, 0xaf, 0x6b, 0xfe, 0xd7, 0xd6, 0xfd, 0x47, 0x4f, 0xa1, 0x5d, 0xcc, 0x06, 0x97, 0x86, 0xb4, - 0x0f, 0x50, 0xee, 0x6c, 0x31, 0x92, 0x76, 0x59, 0x76, 0x6b, 0x63, 0xea, 0xff, 0xd4, 0x98, 0x21, - 0x81, 0xc6, 0x59, 0xe2, 0x9c, 0x90, 0x6a, 0x61, 0xbb, 0x50, 0x9b, 0x93, 0x54, 0x16, 0xd5, 0xb1, - 0xb3, 0x23, 0xda, 0x83, 0xd6, 0x9c, 0xa4, 0x6a, 0x2c, 0x55, 0x39, 0xcd, 0x39, 0x49, 0xe5, 0x38, - 0xde, 0xac, 0x75, 0xb3, 0x32, 0x6b, 0x5f, 0x75, 0x40, 0xd5, 0x94, 0x2a, 0x31, 0x6f, 0x7e, 0xa3, - 0x57, 0x2c, 0x7b, 0x02, 0xbd, 0x28, 0x71, 0x7c, 0xea, 0x4e, 0xb2, 0x44, 0x82, 0xc4, 0x17, 0xd4, - 0xc1, 0x3c, 0xcf, 0x06, 0x29, 0xee, 0x84, 0xa4, 0xa7, 0x39, 0x83, 0x3e, 0x40, 0xb7, 0xf4, 0xe2, - 0xfc, 0x62, 0x9e, 0x1b, 0xfd, 0xf8, 0x76, 0xa7, 0xc6, 0x67, 0xf9, 0x3f, 0x6f, 0x2f, 0xe6, 0xfc, - 0x4d, 0x28, 0xe2, 0xd4, 0xde, 0x8e, 0xca, 0x58, 0xff, 0x25, 0xa0, 0xaa, 0x28, 0xb7, 0x4c, 0xd5, - 0x23, 0x2d, 0xeb, 0x41, 0x7d, 0x81, 0xfd, 0x24, 0xdf, 0x19, 0xea, 0xf2, 0x5c, 0x7f, 0xa6, 0xbd, - 0x7a, 0xf1, 0xe3, 0xca, 0xd4, 0x2e, 0xaf, 0x4c, 0xed, 0xf7, 0x95, 0xa9, 0x7d, 0xbb, 0x36, 0x37, - 0x2e, 0xaf, 0xcd, 0x8d, 0x9f, 0xd7, 0xe6, 0xc6, 0xa7, 0xe1, 0x94, 0x8a, 0x59, 0xe2, 0x8c, 0x5d, - 0x16, 0x58, 0x2c, 0xe4, 0x2c, 0x8c, 0xad, 0xd9, 0x05, 0x4e, 0xad, 0x2f, 0x56, 0xb6, 0x0f, 0xe5, - 0x32, 0x74, 0x1a, 0x72, 0x77, 0x1d, 0xfe, 0x0d, 0x00, 0x00, 0xff, 0xff, 0x43, 0x8a, 0x36, 0x63, - 0x23, 0x05, 0x00, 0x00, -} - -func (m *Credential) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Credential) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Credential) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x3a - } - if len(m.DisplayName) > 0 { - i -= len(m.DisplayName) - copy(dAtA[i:], m.DisplayName) - i = encodeVarintTypes(dAtA, i, uint64(len(m.DisplayName))) - i-- - dAtA[i] = 0x32 - } - if len(m.AttestationType) > 0 { - i -= len(m.AttestationType) - copy(dAtA[i:], m.AttestationType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AttestationType))) - i-- - dAtA[i] = 0x2a - } - if len(m.Transport) > 0 { - for iNdEx := len(m.Transport) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Transport[iNdEx]) - copy(dAtA[i:], m.Transport[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Transport[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.CredentialId) > 0 { - i -= len(m.CredentialId) - copy(dAtA[i:], m.CredentialId) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialId))) - i-- - dAtA[i] = 0x1a - } - if len(m.CredentialType) > 0 { - i -= len(m.CredentialType) - copy(dAtA[i:], m.CredentialType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CredentialType))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Document) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Document) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Document) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.CapabilityInvocation) > 0 { - for iNdEx := len(m.CapabilityInvocation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityInvocation[iNdEx]) - copy(dAtA[i:], m.CapabilityInvocation[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityInvocation[iNdEx]))) - i-- - dAtA[i] = 0x42 - } - } - if len(m.CapabilityDelegation) > 0 { - for iNdEx := len(m.CapabilityDelegation) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.CapabilityDelegation[iNdEx]) - copy(dAtA[i:], m.CapabilityDelegation[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.CapabilityDelegation[iNdEx]))) - i-- - dAtA[i] = 0x3a - } - } - if len(m.AssertionMethod) > 0 { - for iNdEx := len(m.AssertionMethod) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.AssertionMethod[iNdEx]) - copy(dAtA[i:], m.AssertionMethod[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.AssertionMethod[iNdEx]))) - i-- - dAtA[i] = 0x2a - } - } - if len(m.Authentication) > 0 { - for iNdEx := len(m.Authentication) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.Authentication[iNdEx]) - copy(dAtA[i:], m.Authentication[iNdEx]) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Authentication[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } - if len(m.VerificationMethods) > 0 { - for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Identity) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Identity) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Identity) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.VerificationMethods) > 0 { - for iNdEx := len(m.VerificationMethods) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.VerificationMethods[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x2a - } - } - if len(m.Credentials) > 0 { - for iNdEx := len(m.Credentials) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Credentials[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintTypes(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x1a - } - if len(m.Subject) > 0 { - i -= len(m.Subject) - copy(dAtA[i:], m.Subject) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Subject))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *PubKey) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *PubKey) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *PubKey) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x22 - } - if len(m.KeyType) > 0 { - i -= len(m.KeyType) - copy(dAtA[i:], m.KeyType) - i = encodeVarintTypes(dAtA, i, uint64(len(m.KeyType))) - i-- - dAtA[i] = 0x1a - } - if len(m.Key) > 0 { - i -= len(m.Key) - copy(dAtA[i:], m.Key) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Key))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VerificationMethod) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VerificationMethod) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VerificationMethod) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.PublicKeyJwks) > 0 { - for k := range m.PublicKeyJwks { - v := m.PublicKeyJwks[k] - baseI := i - i -= len(v) - copy(dAtA[i:], v) - i = encodeVarintTypes(dAtA, i, uint64(len(v))) - i-- - dAtA[i] = 0x12 - i -= len(k) - copy(dAtA[i:], k) - i = encodeVarintTypes(dAtA, i, uint64(len(k))) - i-- - dAtA[i] = 0xa - i = encodeVarintTypes(dAtA, i, uint64(baseI-i)) - i-- - dAtA[i] = 0x22 - } - } - if len(m.PublicKeyMultibase) > 0 { - i -= len(m.PublicKeyMultibase) - copy(dAtA[i:], m.PublicKeyMultibase) - i = encodeVarintTypes(dAtA, i, uint64(len(m.PublicKeyMultibase))) - i-- - dAtA[i] = 0x1a - } - if len(m.Controller) > 0 { - i -= len(m.Controller) - copy(dAtA[i:], m.Controller) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Controller))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintTypes(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintTypes(dAtA []byte, offset int, v uint64) int { - offset -= sovTypes(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *Credential) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CredentialType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.CredentialId) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Transport) > 0 { - for _, s := range m.Transport { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - l = len(m.AttestationType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.DisplayName) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *Document) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.VerificationMethods) > 0 { - for _, e := range m.VerificationMethods { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.Authentication) > 0 { - for _, s := range m.Authentication { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.AssertionMethod) > 0 { - for _, s := range m.AssertionMethod { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.CapabilityDelegation) > 0 { - for _, s := range m.CapabilityDelegation { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.CapabilityInvocation) > 0 { - for _, s := range m.CapabilityInvocation { - l = len(s) - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *Identity) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Subject) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.Credentials) > 0 { - for _, e := range m.Credentials { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - if len(m.VerificationMethods) > 0 { - for _, e := range m.VerificationMethods { - l = e.Size() - n += 1 + l + sovTypes(uint64(l)) - } - } - return n -} - -func (m *PubKey) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Key) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.KeyType) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - return n -} - -func (m *VerificationMethod) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.Controller) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - l = len(m.PublicKeyMultibase) - if l > 0 { - n += 1 + l + sovTypes(uint64(l)) - } - if len(m.PublicKeyJwks) > 0 { - for k, v := range m.PublicKeyJwks { - _ = k - _ = v - mapEntrySize := 1 + len(k) + sovTypes(uint64(len(k))) + 1 + len(v) + sovTypes(uint64(len(v))) - n += mapEntrySize + 1 + sovTypes(uint64(mapEntrySize)) - } - } - return n -} - -func sovTypes(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozTypes(x uint64) (n int) { - return sovTypes(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *Credential) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Credential: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Credential: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CredentialId", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CredentialId = append(m.CredentialId[:0], dAtA[iNdEx:postIndex]...) - if m.CredentialId == nil { - m.CredentialId = []byte{} - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Transport", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Transport = append(m.Transport, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AttestationType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AttestationType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DisplayName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.DisplayName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Document) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Document: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Document: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) - if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Authentication", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Authentication = append(m.Authentication, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AssertionMethod", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AssertionMethod = append(m.AssertionMethod, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityDelegation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityDelegation = append(m.CapabilityDelegation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field CapabilityInvocation", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.CapabilityInvocation = append(m.CapabilityInvocation, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Identity) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Identity: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Identity: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Subject", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Subject = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Credentials", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Credentials = append(m.Credentials, &Credential{}) - if err := m.Credentials[len(m.Credentials)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field VerificationMethods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.VerificationMethods = append(m.VerificationMethods, &VerificationMethod{}) - if err := m.VerificationMethods[len(m.VerificationMethods)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *PubKey) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: PubKey: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) - if m.Key == nil { - m.Key = []byte{} - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field KeyType", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.KeyType = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VerificationMethod) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: VerificationMethod: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VerificationMethod: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Controller", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Controller = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyMultibase", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.PublicKeyMultibase = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PublicKeyJwks", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthTypes - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthTypes - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PublicKeyJwks == nil { - m.PublicKeyJwks = make(map[string]string) - } - var mapkey string - var mapvalue string - for iNdEx < postIndex { - entryPreIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - if fieldNum == 1 { - var stringLenmapkey uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapkey |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapkey := int(stringLenmapkey) - if intStringLenmapkey < 0 { - return ErrInvalidLengthTypes - } - postStringIndexmapkey := iNdEx + intStringLenmapkey - if postStringIndexmapkey < 0 { - return ErrInvalidLengthTypes - } - if postStringIndexmapkey > l { - return io.ErrUnexpectedEOF - } - mapkey = string(dAtA[iNdEx:postStringIndexmapkey]) - iNdEx = postStringIndexmapkey - } else if fieldNum == 2 { - var stringLenmapvalue uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTypes - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLenmapvalue |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLenmapvalue := int(stringLenmapvalue) - if intStringLenmapvalue < 0 { - return ErrInvalidLengthTypes - } - postStringIndexmapvalue := iNdEx + intStringLenmapvalue - if postStringIndexmapvalue < 0 { - return ErrInvalidLengthTypes - } - if postStringIndexmapvalue > l { - return io.ErrUnexpectedEOF - } - mapvalue = string(dAtA[iNdEx:postStringIndexmapvalue]) - iNdEx = postStringIndexmapvalue - } else { - iNdEx = entryPreIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > postIndex { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - m.PublicKeyJwks[mapkey] = mapvalue - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipTypes(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthTypes - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipTypes(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowTypes - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthTypes - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupTypes - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthTypes - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthTypes = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowTypes = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupTypes = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/did/types/bip32.go b/x/did/types/utils.go similarity index 87% rename from x/did/types/bip32.go rename to x/did/types/utils.go index 9c54b6e2d..42b592caf 100644 --- a/x/did/types/bip32.go +++ b/x/did/types/utils.go @@ -10,8 +10,8 @@ import ( "github.com/btcsuite/btcd/btcec/v2" ) -// ComputePublicKey computes the public key of a child key given the extended public key, chain code, and index. -func ComputePublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, error) { +// ComputeAccountPublicKey computes the public key of a child key given the extended public key, chain code, and index. +func ComputeAccountPublicKey(extPubKey []byte, chainCode uint32, index int) ([]byte, error) { // Check if the index is a hardened child key if chainCode&0x80000000 != 0 && index < 0 { return nil, errors.New("invalid index") diff --git a/x/did/types/verifier.go b/x/did/types/verifier.go new file mode 100644 index 000000000..652ec610d --- /dev/null +++ b/x/did/types/verifier.go @@ -0,0 +1,11 @@ +package types + +import sdk "github.com/cosmos/cosmos-sdk/types" + +func (t *Token) Validate(permissions string) error { + return nil +} + +func (t *Token) Verify(msg sdk.Msg) error { + return nil +} diff --git a/x/did/types/zkprop.go b/x/did/types/zkprop.go new file mode 100644 index 000000000..c90ba5422 --- /dev/null +++ b/x/did/types/zkprop.go @@ -0,0 +1,145 @@ +package types + +import ( + "fmt" + + "github.com/onsonr/crypto/accumulator" + "github.com/onsonr/crypto/core/curves" +) + +// Element is the element for the BLS scheme +type Element = accumulator.Element + +// NewProperty creates a new Property which is used for ZKP +func NewProperty(propertyKey string, pubKey []byte) (*Property, error) { + input := append(pubKey, []byte(propertyKey)...) + hash := []byte(input) + + curve := curves.BLS12381(&curves.PointBls12381G1{}) + key, err := new(accumulator.SecretKey).New(curve, hash[:]) + if err != nil { + return nil, fmt.Errorf("failed to create secret key: %w", err) + } + + keyBytes, err := key.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal secret key: %w", err) + } + + return &Property{Key: keyBytes}, nil +} + +// CreateAccumulator creates a new accumulator +func CreateAccumulator(prop *Property, values ...string) (*Accumulator, error) { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + acc, err := new(accumulator.Accumulator).New(curve) + if err != nil { + return nil, err + } + + secretKey := new(accumulator.SecretKey) + if err := secretKey.UnmarshalBinary(prop.Key); err != nil { + return nil, err + } + + fin, _, err := acc.Update(secretKey, ConvertValuesToZeroKnowledgeElements(values), nil) + if err != nil { + return nil, err + } + + accBytes, err := fin.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal accumulator: %w", err) + } + + return &Accumulator{Accumulator: accBytes}, nil +} + +// CreateWitness creates a witness for the accumulator for a given value +func CreateWitness(prop *Property, acc *Accumulator, value string) (*Witness, error) { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + element := curve.Scalar.Hash([]byte(value)) + + secretKey := new(accumulator.SecretKey) + if err := secretKey.UnmarshalBinary(prop.Key); err != nil { + return nil, err + } + + accObj := new(accumulator.Accumulator) + if err := accObj.UnmarshalBinary(acc.Accumulator); err != nil { + return nil, fmt.Errorf("failed to unmarshal accumulator: %w", err) + } + + mw, err := new(accumulator.MembershipWitness).New(element, accObj, secretKey) + if err != nil { + return nil, err + } + + witnessBytes, err := mw.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal witness: %w", err) + } + + return &Witness{Witness: witnessBytes}, nil +} + +// VerifyWitness proves that a value is a member of the accumulator +func VerifyWitness(prop *Property, acc *Accumulator, witness *Witness) error { + secretKey := new(accumulator.SecretKey) + if err := secretKey.UnmarshalBinary(prop.Key); err != nil { + return err + } + + curve := curves.BLS12381(&curves.PointBls12381G1{}) + publicKey, err := secretKey.GetPublicKey(curve) + if err != nil { + return err + } + + accObj := new(accumulator.Accumulator) + if err := accObj.UnmarshalBinary(acc.Accumulator); err != nil { + return fmt.Errorf("failed to unmarshal accumulator: %w", err) + } + + witnessObj := new(accumulator.MembershipWitness) + if err := witnessObj.UnmarshalBinary(witness.Witness); err != nil { + return fmt.Errorf("failed to unmarshal witness: %w", err) + } + + return witnessObj.Verify(publicKey, accObj) +} + +// UpdateAccumulator updates the accumulator with new values +func UpdateAccumulator(prop *Property, acc *Accumulator, addValues []string, removeValues []string) (*Accumulator, error) { + secretKey := new(accumulator.SecretKey) + if err := secretKey.UnmarshalBinary(prop.Key); err != nil { + return nil, err + } + + accObj := new(accumulator.Accumulator) + if err := accObj.UnmarshalBinary(acc.Accumulator); err != nil { + return nil, fmt.Errorf("failed to unmarshal accumulator: %w", err) + } + + updatedAcc, _, err := accObj.Update(secretKey, ConvertValuesToZeroKnowledgeElements(addValues), ConvertValuesToZeroKnowledgeElements(removeValues)) + if err != nil { + return nil, err + } + + updatedAccBytes, err := updatedAcc.MarshalBinary() + if err != nil { + return nil, fmt.Errorf("failed to marshal updated accumulator: %w", err) + } + + return &Accumulator{Accumulator: updatedAccBytes}, nil +} + +// ConvertValuesToZeroKnowledgeElements converts a slice of strings to a slice of accumulator elements +func ConvertValuesToZeroKnowledgeElements(values []string) []Element { + curve := curves.BLS12381(&curves.PointBls12381G1{}) + elements := make([]accumulator.Element, len(values)) + for i, value := range values { + elements[i] = curve.Scalar.Hash([]byte(value)) + } + return elements +} diff --git a/x/oracle/ibc_middleware.go b/x/oracle/ibc_middleware.go index e7dd9808f..0674a10a6 100644 --- a/x/oracle/ibc_middleware.go +++ b/x/oracle/ibc_middleware.go @@ -1,7 +1,7 @@ package oracle import ( - "github.com/onsonr/hway/x/oracle/keeper" + "github.com/onsonr/sonr/x/oracle/keeper" sdk "github.com/cosmos/cosmos-sdk/types" capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types" diff --git a/x/oracle/keeper/genesis.go b/x/oracle/keeper/genesis.go index c6b82713e..af1457f1b 100644 --- a/x/oracle/keeper/genesis.go +++ b/x/oracle/keeper/genesis.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/onsonr/hway/x/oracle/types" + "github.com/onsonr/sonr/x/oracle/types" sdk "github.com/cosmos/cosmos-sdk/types" ) diff --git a/x/oracle/keeper/keeper.go b/x/oracle/keeper/keeper.go index bc3b25aa8..3cb2a7e11 100644 --- a/x/oracle/keeper/keeper.go +++ b/x/oracle/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/onsonr/hway/x/oracle/types" + "github.com/onsonr/sonr/x/oracle/types" "github.com/cosmos/cosmos-sdk/baseapp" "github.com/cosmos/cosmos-sdk/codec" diff --git a/x/oracle/module.go b/x/oracle/module.go index 233c4e6d3..39016479a 100644 --- a/x/oracle/module.go +++ b/x/oracle/module.go @@ -4,8 +4,8 @@ import ( "encoding/json" "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/onsonr/hway/x/oracle/keeper" - "github.com/onsonr/hway/x/oracle/types" + "github.com/onsonr/sonr/x/oracle/keeper" + "github.com/onsonr/sonr/x/oracle/types" "github.com/spf13/cobra" "github.com/cosmos/cosmos-sdk/client" diff --git a/x/oracle/types/genesis.pb.go b/x/oracle/types/genesis.pb.go index 71cd005fc..efeed87fb 100644 --- a/x/oracle/types/genesis.pb.go +++ b/x/oracle/types/genesis.pb.go @@ -67,7 +67,7 @@ func init() { func init() { proto.RegisterFile("oracle/v1/genesis.proto", fileDescriptor_14b982a0a6345d1d) } var fileDescriptor_14b982a0a6345d1d = []byte{ - // 147 bytes of a gzipped FileDescriptorProto + // 144 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcf, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x48, 0xe8, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, @@ -75,9 +75,8 @@ var fileDescriptor_14b982a0a6345d1d = []byte{ 0xc4, 0x92, 0x54, 0x27, 0xfb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, - 0x2b, 0xd2, 0xcf, 0x28, 0x4f, 0xac, 0xd4, 0xaf, 0xd0, 0x87, 0x5a, 0x5e, 0x52, 0x59, 0x90, 0x5a, - 0x9c, 0xc4, 0x06, 0x36, 0xd7, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x25, 0x38, 0x48, 0xfb, 0x93, - 0x00, 0x00, 0x00, + 0x2b, 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x50, 0xcb, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, + 0xe6, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x74, 0xe4, 0x19, 0x43, 0x93, 0x00, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/oracle/types/query.pb.go b/x/oracle/types/query.pb.go index 83371e3e1..bc3d610dc 100644 --- a/x/oracle/types/query.pb.go +++ b/x/oracle/types/query.pb.go @@ -24,14 +24,14 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("oracle/v1/query.proto", fileDescriptor_34238c8dfdfcd7ec) } var fileDescriptor_34238c8dfdfcd7ec = []byte{ - // 133 bytes of a gzipped FileDescriptorProto + // 130 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcd, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0x2c, 0x4d, 0x2d, 0xaa, 0xd4, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x08, 0xeb, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x27, 0xfb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, - 0xce, 0xcf, 0x2b, 0xd2, 0xcf, 0x28, 0x4f, 0xac, 0xd4, 0xaf, 0xd0, 0x87, 0x5a, 0x55, 0x52, 0x59, - 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x36, 0xc7, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x1c, 0x7f, 0x61, - 0xbe, 0x81, 0x00, 0x00, 0x00, + 0xce, 0xcf, 0x2b, 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x50, 0xab, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, + 0xd8, 0xc0, 0xe6, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x4d, 0xa3, 0x30, 0x06, 0x81, 0x00, + 0x00, 0x00, } diff --git a/x/oracle/types/tx.pb.go b/x/oracle/types/tx.pb.go index 405cea3d0..8d38e5b0e 100644 --- a/x/oracle/types/tx.pb.go +++ b/x/oracle/types/tx.pb.go @@ -24,14 +24,13 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package func init() { proto.RegisterFile("oracle/v1/tx.proto", fileDescriptor_31571edce0094a5d) } var fileDescriptor_31571edce0094a5d = []byte{ - // 130 bytes of a gzipped FileDescriptorProto + // 127 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xca, 0x2f, 0x4a, 0x4c, 0xce, 0x49, 0xd5, 0x2f, 0x33, 0xd4, 0x2f, 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x84, 0x88, 0xe9, 0x95, 0x19, 0x4a, 0x89, 0xa4, 0xe7, 0xa7, 0xe7, 0x83, 0x45, 0xf5, 0x41, 0x2c, 0x88, 0x02, 0x27, 0xfb, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x52, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0xcf, 0xcf, 0x2b, 0xce, 0xcf, 0x2b, - 0xd2, 0xcf, 0x28, 0x4f, 0xac, 0xd4, 0xaf, 0xd0, 0x87, 0xda, 0x53, 0x52, 0x59, 0x90, 0x5a, 0x9c, - 0xc4, 0x06, 0x36, 0xc7, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x39, 0x40, 0x7c, 0x7a, 0x7e, 0x00, - 0x00, 0x00, + 0xd2, 0x07, 0x13, 0x15, 0xfa, 0x50, 0x7b, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xe6, + 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x68, 0x9c, 0x2d, 0xc2, 0x7e, 0x00, 0x00, 0x00, }